# Cannot get NVIDIA HDA to encode multichannel PCM into Dolby Digital through HDMI [Using latest nvidia drivers that I've modded myself]



## paxkronos (Sep 30, 2022)

I've just modded the latest official nvidia drivers using information based on the wonderful developments made by you guys.

The Dolby Theater v4 app is installed and the Dolby Theater v4 APO shows up in a dedicated tab in the NVIDIA HDA HDMI sound driver page.
However, "Dolby Digital" doesn't show up in the list of "Default Formats" of the HDMI device which seems to be the reason why I cannot get games outputting 5.1 PCM to play 5.1 surround in my receiver (the receiver still says LPCM instead of Dolby Digital). Any clues to this?

Here is my setup:
PC -(HDMI)-> TV -(HDMI ARC)-> Receiver

Some facts:
- Running Windows 10
- The receiver only supports 2ch LPCM or Dolby Digital through HDMI ARC.
- When playing broadcast TV or Netflix in the TV, the receiver correctly outputs Dolby Digital.
- On the PC when configuring VLC with AC3 passthru and playing a Dolby Digital encoded audio file the receiver correctly outputs Dolby Digital.

What's missing is having Windows encode multichannel PCM into a Dolby Digital bitstream through HDMI and, my understanding is that I need "Dolby Digital" to show up in the list of "Default Formats" like shown below ?



http://imgur.com/SqoJQXZ


Any hints where to look next would be greatly appreciated !


----------



## Ferather (Sep 30, 2022)

What is listed in supported formats out of curiosity, and is the TV in passthrough mode? When it says LPCM do you get audio?


----------



## paxkronos (Sep 30, 2022)

> What is listed in supported formats out of curiosity, and is the TV in passthrough mode?


In supported formats it lists:
* Dolby Digital
* Dolby Digital Plus
* DTS

I have proof that the Dolby Digital format is actually supported, because if I play Dolby Digital content through VLC the receiver correctly receives Dolby Digital.

I don't know if the TV is in passthrough mode. But, according to the receiver specs, the receiver doesn't support Dolby Digital Plus with HDMI (ARC) so the DD+ format must be advertised by the TV.
I didn't actually try playing DD+ content through VLC, so I can't tell if the TV will send that to the receiver as-is or will recode into Dolby Digital.

EDIT: To your other question.


> When it says LPCM do you get audio?



When playing a game outputting 5.1 PCM, the receiver shows LPCM and I can hear stereo sound from the speakers.


----------



## Ferather (Sep 30, 2022)

Here is what normally happens (PCM and bitstreaming [passthrough]).

PCM from game, other > PCM sound device (GPU) > PCM processors (software APO's [SFX, MFX, EFX]) > PCM out (HDMI) >> TV >> Receiver.
Compressed PCM (not actually PCM) > Passthrough device (GPU) > Compressed PCM out (HDMI) >> TV >> Receiver.

In default formats, you want 'Dolby Digital Live' you might also see it as 'Dolby Digital Live 5.1'.

This can be achieved by adding the APO to the device (plus any extra steps) or by software (which you probably won't find easily).

PCM from game, other > PCM sound device (GPU) > PCM compressor (encoder [EFX]) > Compressed PCM out (HDMI) >> TV >> Receiver.

----

In short whatever you have done so far is either in the wrong format (one that is not supported [probably DD+]) or its not working.

If you are receiving PCM and there is audio, no digital compression to DDL 5.1 has taken place (still PCM).


----------



## bug (Sep 30, 2022)

@paxkronos My old Samsung TV was picky about sound output. It would not output Dolby Digital from anything other than cable TV. Anything else (HDMI-in, its own "smart" apps) would just output stereo.

I would suggest getting the TV out of the equation and test PC -(HDMI)-> Receiver first.


----------



## Ferather (Sep 30, 2022)

It's also possible that it is working but the TV is decoding, but I feel that is unlikely.

====

Here are some images of a GPU I converted to do 'DTS Interactive' aka DTS Audio.





====

Tip, always put encoders at the last point on EFX, although this means using the 'Disable enhancers' will NOT disable compression.

SFX [6 channel PCM] > MFX [6 channel PCM] > EFX [6 channel PCM]+[Encoder] >> HDMI Out.


----------



## paxkronos (Sep 30, 2022)

@Ferather



> PCM from game, other > PCM sound device (GPU) > PCM compressor (encoder [EFX]) > Compressed PCM out (HDMI) >> TV >> Receiver



This is exactly what I want to achieve, the HDMI bitsream must be Dolby Digital since that's the only compressed format the receiver supports on HDMI (ARC) input.

I thought adding PCEE4 into the nvhda driver was supposed to achieve this ? What else should I add ?



> In default formats, you want 'Dolby Digital Live' you might also see it as 'Dolby Digital Live 5.1'.



What's the difference between "Dolby Digital" (that I saw in some modding threads) and "Dolby Digital Live" ?

Can you pinpoint me to an official HDMI audio driver for Windows 10 that bundles this ? I'll try to figure out from there ...



> If you are receiving PCM and there is audio, no digital compression to DDL 5.1 has taken place (still PCM).


Exactly.

@bug


> @paxkronos My old Samsung TV was picky about sound output. It would not output Dolby Digital from anything other than cable TV. Anything else (HDMI-in, its own "smart" apps) would just output stereo.
> I would suggest getting the TV out of the equation and test PC -(HDMI)-> Receiver first.



Please re-read my post, you should get the answer why the TV is not the problem (and thus ruled out).


----------



## Ferather (Sep 30, 2022)

On HDMi its the same, but without the live bit, I just checked. Personally I have only seen it say live, but that's SPDIF I guess.
It sounds like the changes are not quite working properly, or need some other settings (maybe registry).

I have not worked with the Dolby app and system, So I cannot help much directly.


----------



## paxkronos (Sep 30, 2022)

@Ferather  In case you want to have a look: https://www.diffchecker.com/9GsLX2hh

It seems to me I'm adding the PCEE4 to the EFX ProcessingModes registry, isn't this the relevant part ? From your understanding is anything in the file hinting at the problem?


----------



## Ferather (Sep 30, 2022)

Try:

----

You are using: HKR,"FX\\0",%PKEY_FX_StreamEffectClsid%,,[[%PCEE4HDMIAPO_LFX_CLSID%]]

PCEE4_FX_FriendlyName  = "Dolby PCEE4 HDMI Effects"
PCEE4HDMIAPO_LFX_CLSID = "{27C1D074-0E39-43b1-B00A-293DD512B759}"
PCEE4HDMIAPO_GFX_CLSID = "{12844204-3EAD-4d9b-AB7F-B1C0FC218915}"
PCEE4HDMIAPO_UI_CLSID  = "{DB811C5C-8490-418b-9807-5E99702AA9C9}"

But I see only registration for a different system, not in the inf file:

HKCR,AudioEngine\AudioProcessingObjects\%[[FX_DOLBYAPO_PCEE4_HDMI_PREMIX_CLSID]]%, "FriendlyName", ,"Dolby PCEE4 LFX APO"

It's possible the file registration adds what is needed.

----

Remove: FX_MODE_CLSID, keeping everything Dolby

HKR,"FX\\0",%PKEY_ItemNameDisplay%,,%PCEE4_FX_FriendlyName%
HKR,"FX\\0",%PKEY_FX_StreamEffectClsid%,,%PCEE4HDMIAPO_LFX_CLSID%
HKR,"FX\\0",%PKEY_FX_ModeEffectClsid%,,%FX_MODE_CLSID%        <<<<<<<<<<<
HKR,"FX\\0",%PKEY_FX_EndpointEffectClsid%,,%PCEE4HDMIAPO_GFX_CLSID%
HKR,"FX\\0",%PKEY_FX_UiClsid%,,%PCEE4HDMIAPO_UI_CLSID%

----

In regedit you can search 'audioprocessingobject' and look for registered APO's.

====

Edit: some GPU's might not like EFX, if that is the case use only SFX, MFX, and MFX as final.

Edit 2: Check with the file originator the portion of the APO you are trying use is unlocked-working.


----------



## paxkronos (Sep 30, 2022)

@Ferather



> You are using: HKR,"FX\\0",%PKEY_FX_StreamEffectClsid%,,[[%PCEE4HDMIAPO_LFX_CLSID%]]
> 
> PCEE4_FX_FriendlyName  = "Dolby PCEE4 HDMI Effects"
> PCEE4HDMIAPO_LFX_CLSID = "{27C1D074-0E39-43b1-B00A-293DD512B759}"
> ...



My appologies but I'm not sure I understand what you mean by "registration for a different system, not in the inf file" ?

FX_StreamEffect refers to PCEE4HDMIAPO_LFX_CLSID which is *27C1D074-0E39-43b1-B00A-293DD512B759*.

FX_DOLBYAPO_PCEE4_HDMI_PREMIX_CLSID is also *27C1D074-0E39-43b1-B00A-293DD512B759*:

`FX_DOLBYAPO_PCEE4_HDMI_PREMIX_CLSID             = "{27C1D074-0E39-43b1-B00A-293DD512B759}"`

I've checked the registry after installing the driver and the *27C1D074-0E39-43b1-B00A-293DD512B759 *audioprocessingobject exists with name "Dolby PCEE4 LFX APO".

I've looked at EEL64H.dll strings and it says "Dolby PCEE4 HDMI LFX APO x64", so if I'm not missing anything, this looks correct.



> Remove: FX_MODE_CLSID, keeping everything Dolby



I did that and reinstalled the driver. Unfortunatly still no Dolby Digital displayed in the Default Format list.



> Edit: some GPU's might not like EFX, if that is the case use only SFX, MFX, and MFX as final.



Ok, I'll try that next.

EDIT: Didn't help.



> Edit 2: Check with the file originator the portion of the APO you are trying use is unlocked-working.



Good idea. I'll check that after.


----------



## Ferather (Oct 1, 2022)

Fair enough, different strings, odd but no issue. I am out of generic reasons; I would need to have worked with the files to know anything more.

Sorry I was not able to provide a direct answer.

----



paxkronos said:


> My appologies but I'm not sure I understand what you mean by "registration for a different system, not in the inf file" ?



This is file registration (data from file):

[PCEE4_x64.RegisterDlls]
11,,EEL64H.dll,1
11,,EEG64H.dll,1
11,,EED64H.dll,1
11,,EEP64H.dll,1
11,,EEA64H.dll,1

This is fully inf based (manual input):

HKCR,AudioEngine\AudioProcessingObjects\%FX_DOLBYAPO_PCEE4_HDMI_PREMIX_CLSID%, "FriendlyName", ,"Dolby PCEE4 LFX APO"
HKCR,AudioEngine\AudioProcessingObjects\%FX_DOLBYAPO_PCEE4_HDMI_PREMIX_CLSID%, "Copyright", ,%DolbyCopyRight%
HKCR,AudioEngine\AudioProcessingObjects\%FX_DOLBYAPO_PCEE4_HDMI_PREMIX_CLSID%, "MajorVersion", 0x00010001, 1
HKCR,AudioEngine\AudioProcessingObjects\%FX_DOLBYAPO_PCEE4_HDMI_PREMIX_CLSID%, "MinorVersion", 0x00010001, 0
HKCR,AudioEngine\AudioProcessingObjects\%FX_DOLBYAPO_PCEE4_HDMI_PREMIX_CLSID%, "Flags", 0x00010001, 0x0000000c
HKCR,AudioEngine\AudioProcessingObjects\%FX_DOLBYAPO_PCEE4_HDMI_PREMIX_CLSID%, "MinInputConnections", 0x00010001, 1
HKCR,AudioEngine\AudioProcessingObjects\%FX_DOLBYAPO_PCEE4_HDMI_PREMIX_CLSID%, "MaxInputConnections", 0x00010001, 1
HKCR,AudioEngine\AudioProcessingObjects\%FX_DOLBYAPO_PCEE4_HDMI_PREMIX_CLSID%, "MinOutputConnections", 0x00010001, 1
HKCR,AudioEngine\AudioProcessingObjects\%FX_DOLBYAPO_PCEE4_HDMI_PREMIX_CLSID%, "MaxOutputConnections", 0x00010001, 1
HKCR,AudioEngine\AudioProcessingObjects\%FX_DOLBYAPO_PCEE4_HDMI_PREMIX_CLSID%, "MaxInstances", 0x00010001, 0xffffffff
HKCR,AudioEngine\AudioProcessingObjects\%FX_DOLBYAPO_PCEE4_HDMI_PREMIX_CLSID%, "NumAPOInterfaces", 0x00010001, 1
HKCR,AudioEngine\AudioProcessingObjects\%FX_DOLBYAPO_PCEE4_HDMI_PREMIX_CLSID%, "APOInterface0", ,"{7F231F59-5CCD-47FF-982D-CEB1CBA9F410}"


----------



## emanresu (Oct 4, 2022)

Didn't read the sumup, but a regkey on the run it seems like. Reminds me of that time I got Realtek drivers running on ze GFX. UAD though..


----------



## paxkronos (Oct 4, 2022)

So it seems PCEE4 may not work on Windows 10 according to some reports I've found on the internet. I'm not entirely certain though but would explain why it doesn't work here.

So in the hopes of looking for an alternate solution with less unknowns in order to diagnose the problem I've uninstalled everything, reverted to original drivers and then installed the generic Intel HDA driver from Optimus. The result:


"Dolby Digital" now shows up in the "Default Formats" list
The "Enhancements" tab disappeared.
The "Dolby" tab disappeared.
That's it. The computer is still sending stereo LPCM to the receiver when I play a 5.1 PCM (from a game for example). I'm starting to wondering if something is missing on the EDID that's needed to enable the "live" DD encoding functionality ?
As I've mentioned, Dolby Digital does show in the list of supported formats of the HDMI interface and if I play DD content through VLC (with passthru enabled), the receiver correctly receives DD audio.


----------



## paxkronos (Oct 5, 2022)

*It's working with the Optimus drivers !!!! Here is the money shot when a game (outputting 5.1 PCM) is being run on the computer..





The issue was indeed in the EDID. I had to override the speaker allocation from stereo to 5.1 in the EDID !

Now I'm wondering about the half-second lag I seem to experience in this configuration...*


----------



## emanresu (Oct 5, 2022)

Nice, but I think you were just a regkey away in your previous setting. I've spent a lot of time with a friend finding every damn UI regkey there is. They can do wonders. So you should go and save/backup/write down all the active regkeys/fx keys for your now working endpoint. Then maybe do what you first did to get the Dolby tabs etc, and try to apply the regkeys from "this run". Just start by removing one and then re-adding it, to see which one that gives Dolby as output format. That's probably the one you missed on the "first run".
Cheers


----------



## paxkronos (Oct 5, 2022)

Yeah @emanresu , absolutely I'll revisit the initial mod on latest Nvidia HDA  I was working on .. If using compressed multichannel through HDMI is going to be a solution then I need to be able to mod the drivers myself as I don't see how I can be relying on third party mods.

It can be that the Nvidia HDA mod was working and I was just missing the EDID override (also needed to get the optimus drivers working). But since I wasn't even able to get "Dolby Digital" show in the default format list, I have my doubts.

What complicates things further is that it seems the Optimus drivers no longer use the PCEE4 DLLs (which is the APO I was modding with). This reinforces my suspicious that those DLLs no longer work on Windows 10...

What a mess !


----------



## Ferather (Oct 5, 2022)

If only you had DTS Audio support.


----------



## paxkronos (Oct 18, 2022)

I do have DTS audio support in the receiver. What's in your mind ?

The current solution I'm using uses the "Dolby Digital" APO which has too much of a lag, it's unusable for gaming.

It seems I need to get the Dolby Digital Live APO working.

Would the DTS APO be able to encode in realtime ?


----------



## Athlonite (Oct 18, 2022)

Hmm why not just bypass the TV and go GPU-HDMI-Receiver that's what I do and DTS plays fine if the content being played is DTS


----------

