Windows 10 and Realtek HD Audio drivers for SPDIF output: How to get your 5.1 surround sound back

8,223 views
Skip to first unread message

Dennis Mungai

unread,
Jan 8, 2017, 1:33:00 PM1/8/17
to Nairobi Linux Users Group
Hello, squad.

A little background:

I've spent the last few days studying 5.1 channel transmission over SPDIF from a Realtek HD Audio (Intel's "Azalia" HD Audio card) on Linux, and came across this A52 plugin that encodes all PCM stereo signals to AC3 with 5.1 channels on Linux, provided an appropriate output profile for the same is provided for SPDIF via a tool such as pavucontrol. See the docs here: https://help.ubuntu.com/community/DigitalAC-3Pulseaudio

The motivation for the research was acquiring an LG Home theatre system that accepts SPDIF input, and then realizing later that the TV at the table room doesn't support ARC (HDMI's Audio return Channel), meaning the only way I could connect audio from the PC to the AVR was via Toslink/SPDIF.

So far, that setup works flawlessly on Linux without a hitch, and audio pass through via a Pulse-audio audio sink on Kodi media center also works beautifully.

Now comes the pain, thanks to Windows 10:

Then, I came across more f*ckery in Windows: Despite the Realtek HD Audio adapter supporting the licensed Dolby Digital 5.1 encoder in hardware, it had been disabled deliberately by the OEM-issued drivers, even on Windows update.

A driver component checks for a feature introduced in WDDM 2.x (Windows Display Driver Model with Protected User Mode Audio (PUMA), and it expects a return value of 1, which is Windows default. However, due to retarded programming on Realtek's part (looking for a non-existent HAL and then attempting to initialize it and failing really hard as expected), even if its' 1 or 0, it will then explicitly disable the Dolby Digital Audio encoder on the card's DSPs.

To read more about protected user mode audio, see this MSDN article: https://msdn.microsoft.com/en-us/library/windows/desktop/dd756608(v=vs.85).aspx

TL-DR: Disabling it can save you a lot of pain if you have poorly written drivers. Sometimes I wonder why the WHQL validation program exists :-)

I was led to inspect the driver component as there are threads on Techpowerup.com referring to so-called "unlocked Realtek HD drivers" that mandate disabling enforced driver signing (again, retarded) and using a "patcher" running on boot (really dangerous, same technique used by people activating illegitimate Windows installations) to override this behavior.

I've made corrections to the affected component and included instructions on installing the package with the changes on Windows 10, and uploaded the driver archive and the installation instructions to OneDrive for anyone to fetch and install if they're affected by the problem. The reference driver base is R279, and installing the driver does not require one to disable in-built security options such as mandatory driver signing.

Link to the driver package: https://1drv.ms/f/s!AjAHK3AVf89twzlIEsTRRagev2LB

Regards,

Dennis Mungai




adrian iamandi

unread,
Jun 14, 2018, 5:26:40 AM6/14/18
to Nairobi GNU/Linux User Group
You Mr. are a God! i have been struggling to find a damn audio SDPIF driver for a Asus(g752vs) Model for 5 damn whole hours. Thank you so much for having this attitude and adding this useful piece of information. I for one, i work as a programmer and sometimes something like this beats me because there is no damn explication or the driver doesn't work. This kind of attitude where we create our own community of people that get into trouble and help one another not to face the same problem or spend too much time on it its the perfect attitude, thanks once again.

Denis Vandale

unread,
Nov 15, 2018, 8:15:35 PM11/15/18
to Nairobi GNU/Linux User Group

Denis Vandale

unread,
Nov 15, 2018, 8:15:59 PM11/15/18
to Nairobi GNU/Linux User Group

Denis Vandale

unread,
Nov 15, 2018, 8:18:29 PM11/15/18
to Nairobi GNU/Linux User Group
When I download the file and try to unzip it, I get an error code 08x something followed by :unspecified error.  Any clue as to why?


On Sunday, January 8, 2017 at 12:33:00 PM UTC-6, Dennis Mungai wrote:
Message has been deleted

Dennis Mungai

unread,
Nov 27, 2018, 6:35:19 AM11/27/18
to Nairobi Linux Users Group
You're most welcome :-)

On Tue, 27 Nov 2018 at 14:17, Casey Pidcock <case...@gmail.com> wrote:
I just wanted to say thank you very much for this. This menu is now available.  For those who have navigated here, this works great.  M

--
You received this message because you are subscribed to the Google Groups "Nairobi GNU/Linux User Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to nairobi-gnu...@googlegroups.com.
To post to this group, send email to nairo...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Casey Pidcock

unread,
Nov 27, 2018, 6:44:04 AM11/27/18
to Nairobi GNU/Linux User Group
Thank you so much for this.  My receiver now properly displays "DTS 3/2.1" instead of "DTS".  Also, the Realtek GUI has changed and DTS options are now available.  If you've navigated here, you're probably and advanced user.  Follow the instructions to a T on the readme and you're all set. Thank you again.

For reference I am running:
Receiver: Onkyo TX-SR502 
Optical cable: 8M Black Digital Fiber Optical Audio SPDIF TosLink Cable

Computer:
3-day old clean install of
Win 10 Home 64  Bit.  V 1809. Build 17763.134 (mostly all of the defaults enabled)
Motherboard: ASUS Sabertooth 990FX R 2.0
Realtex 7848_20160617

may or may not be relevant:
AMD HDMI audio driver (goes with AMD R9 290 GPU)
K-Lite codec pack (stock -not configured yet)
MadVR not installed uet


I used Blade Runner 2049 as my sample, playen in MPC-HC 64 bit player (default options).  Here is the streaming information for reference:

Format                         : Matroska
Format version            : Version 4
File size                       : 20.9 GiB
Duration                       : 2 h 43 min
Overall bit rate mode   : Variable
Overall bit rate             : 18.2 Mb/s
Encoded date              : UTC 2018-01-13 15:15:32
Writing application       : mkvmerge v19.0.0 ('Brave Captain') 32-bit
Writing library              : libebml v1.3.5 + libmatroska v1.4.8

Video
ID                             : 1
Format                     : AVC
Format/Info              : Advanced Video Codec
Format profile          : High@L4.1
Format settings       : CABAC / 4 Ref Frames
Format settings, CABAC         : Yes
Format settings, ReFrames      : 4 frames
Codec ID                 : V_MPEG4/ISO/AVC
Duration                  : 2 h 43 min
Bit rate mode          : Variable
Bit rate                    : 14.0 Mb/s
Maximum bit rate    : 30.0 Mb/s
Width                      : 1 920 pixels
Height                      : 1 080 pixels
Display aspect ratio     : 16:9
Frame rate mode         : Constant
Frame rate                   : 23.976 (23976/1000) FPS
Color space                 : YUV
Chroma subsampling  : 4:2:0
Bit depth                      : 8 bits
Scan type                    : Progressive
Bits/(Pixel*Frame)       : 0.282
Stream size                 : 16.0 GiB (77%)
Writing library              : x264 core 148 r2665 a01e339
Encoding settings        : cabac=1 / ref=4 / deblock=1:0:0 / analyse=0x3:0x133 / me=umh / subme=9 / psy=1 / psy_rd=1.00:0.00 / mixed_ref=1 / me_range=16 / chroma_me=1 / trellis=2 / 8x8dct=1 / cqm=0 / deadzone=21,11 / fast_pskip=1 / chroma_qp_offset=-2 / threads=12 / lookahead_threads=1 / sliced_threads=0 / slices=4 / nr=0 / decimate=1 / interlaced=0 / bluray_compat=0 / constrained_intra=0 / bframes=3 / b_pyramid=0 / b_adapt=1 / b_bias=0 / direct=3 / weightb=1 / open_gop=0 / weightp=1 / keyint=24 / keyint_min=1 / scenecut=40 / intra_refresh=0 / rc_lookahead=24 / rc=2pass / mbtree=1 / bitrate=14020 / ratetol=1.0 / qcomp=0.60 / qpmin=0 / qpmax=69 / qpstep=4 / cplxblur=20.0 / qblur=0.5 / vbv_maxrate=30000 / vbv_bufsize=30000 / nal_hrd=vbr / filler=0 / ip_ratio=1.10 / aq=1:1.00
Language                   : English
Default                        : Yes
Forced                        : No

Audio #1
ID                             : 2
Format                     : MLP FBA 16-ch
Format/Info              : Meridian Lossless Packing FBA with 16-channel presentation
Commercial name   : Dolby TrueHD with Dolby Atmos
Codec ID                 : A_TRUEHD
Duration                  : 2 h 43 min
Bit rate mode           : Variable
Bit rate                     : 3 710 kb/s
Maximum bit rate     : 7 251 kb/s
Channel(s)                 8 channels
Channel layout         : L R C LFE Ls Rs Lb Rb
Sampling rate           : 48.0 kHz
Frame rate                : 1 200.000 FPS (40 SPF)
Compression mode               : Lossless
Stream size               : 4.24 GiB (20%)
Language                  : English
Default                       : Yes
Forced                       : No
Number of dynamic objects      : 11
Bed channel count                    : 1 channel
Bed channel configuration        : LFE

Audio #2
ID                             : 3
Format                     : AC-3
Format/Info              : Audio Coding 3
Commercial name   : Dolby Digital
Codec ID                 : A_AC3
Duration                  : 2 h 43 min
Bit rate mode          : Constant
Bit rate                    : 448 kb/s
Channel(s)              : 6 channels
Channel layout       : L R C LFE Ls Rs
Sampling rate         : 48.0 kHz
Frame rate              : 31.250 FPS (1536 SPF)
Bit depth                 : 16 bits
Compression mode               : Lossy
Stream size                           : 525 MiB (2%)
Language                              : English
Service kind                          : Complete Main
Default                                  : No
Forced                                  : No
 
Text #1
ID                             : 4
Format                     : PGS
Muxing mode           : zlib
Codec ID                  : S_HDMV/PGS
Codec ID/Info          : Picture based subtitle format used on BDs/HD-DVDs
Duration                     : 2 h 29 min
Bit rate                       : 21.2 kb/s
Count of elements          : 2716
Stream size                    : 22.7 MiB (0%)
Language                       : English
Default                           : No
Forced                           : No


cap.PNG
cap2.PNG
Reply all
Reply to author
Forward
0 new messages