Contribute
Register

Snow Leopard HDMI Audio - Part 3b: Kext Edits for NVIDIA 4xx

Status
Not open for further replies.

toleda

Moderator
Joined
May 19, 2010
Messages
22,834
Motherboard
Asus Maximus VII Impact
CPU
i7-4770K
Graphics
RX 560 + HD4600
Mac
  1. iMac
  2. MacBook Pro
  3. Mac mini
Classic Mac
  1. 512K
  2. LC
  3. Power Mac
Mobile Phone
  1. iOS
Demystifying HDMI Audio Part 3b: Kext Edits for NVIDIA 4xx

images.jpeg
2.jpeg
1im.jpeg

3.jpeg


Enabling HDMI audio via AppleHDA in Mac OS X 10.6.x is comprised of four guides:
Snow Leopard HDMI Audio - Part 1: Requirements
Snow Leopard HDMI Audio - Part 2: DSDT Edits
Snow Leopard HDMI Audio - Part 3a: Kext Edits for AMD 5xxx
Snow Leopard HDMI Audio - Part 3b: Kext Edits for NVIDIA 4xx

Please note: This guide applies to Mac OS X 10.6.5, 10.6.6 and 10.6.7 only. The Early 2011 MacBookPro 10.6.7 release, Early 2011 iMac 10.6.7 release and Mac OS X 10.7 are not considered.

Even with a successfully configured DSDT, more work is required. *Specifically, your system must be enabled for the specific graphics card you have installed. *Typically, this means editing particular software components in your system for compatibility with your graphics card. *There is a specific method for Nvidia GeForce GT4XX graphics cards and a different method for AMD Radeon HD 5XXX graphics cards

What you will need:
DSDTSE v1.4.3 - http://www.osx86.es/?p=610
IORegistryExplorer - Mac OS X Retail Install Disc v10.6 or v10.6.3: Optional Installs/Xcode
HexEdit v220 - http://hexedit.sourceforge.net/
dsdt-hdmi_audio-v2.dsl

DSDT-HDMI_Audio_Edits_v2.dsl

Additional Audio Kext editing details are included in HDMI Audio Kext Verification:

HDMI_Audio_Kext_Verification.pdf

Depending on how your graphics card is enabled, additional edits of your DSDT may be required.* The edits are defined as GraphicsEnabler=Yes or Graphics Enabler=No.

Two components of AppleHDA are relevant to enabling HDMI audio.* They are 1. AppleHDA binary and 2. AppleHDAController binary. HexEdit is the tool used to edit each of the binaries.* Additional information describing AppleHDA and HexEdit are available in HDMI Audio Kext Verification.

Credit to bcc9 and tmongkol

Part 3b: Kext Edits Table of Contents

1. *Nvidia GeForce GT 4XX Graphics Cards*(and the GT 240)
** * * * a. *Additional DSDT Edits
** * * * * * * * GraphicsEnabler=Yes
** * * * * * * * GraphicsEnabler=No
** * * * b. *Kext Edits
** * * * * * * * *AppleHDA

1. Nvidia GeForce GT 4XX Graphics Cards (and the GT 240)

a. *Additional DSDT edits

With GraphicsEnabler=Yes in com.apple.Boot.plist, make the following changes to your dsdt.

Add the following code to Device (GFX0)

Code:
* * * * * * * * * * * * Store (Package (0x06)
* * * * * * * * * * * * * * {
* * * * * * * * * * * * * * * * "@0,connector-type",*
* * * * * * * * * * * * * * * * Buffer (0x04)
* * * * * * * * * * * * * * * * {
* * * * * * * * * * * * * * * * * * 0x00, 0x08, 0x00, 0x00
* * * * * * * * * * * * * * * * },*

* * * * * * * * * * * * * * * * "@1,connector-type",*
* * * * * * * * * * * * * * * * Buffer (0x04)
* * * * * * * * * * * * * * * * {
* * * * * * * * * * * * * * * * * * 0x00, 0x08, 0x00, 0x00
* * * * * * * * * * * * * * * * },*

1.* Open your dsdt in DSDTSE. open DSDT-HDMI_Audio_Edits_v2 in DSDTSE
2.* Copy the code labeled "Nvidia_GE=Y-DSDT_HDMI_Audio_Edit - Complete"
3.* Paste the copied code over the existing Device (PEGP), Device (GFX0) and Device (HDAU)
4.* Compile, install, reboot with HDMI device plugged
5.* Run IOReg, Search "HDAU", Note device-id, Save for later. *
6.* Jump to b. Audio Kext Edits *

With GraphicsEnabler=No in com.apple.Boot.plist, make the following changes to your dsdt.

Add the following code to Device (GFX0) - Modify for your particular Nvidia GeForce 4xx graphics card.

Code:
* * * * * * * * * * * * Store (Package (0x1E)
* * * * * * * * * * * * * * {
* * * * * * * * * * * * * * * * "AAPL,slot-name",*
* * * * * * * * * * * * * * * * "PCI x16",*
* * * * * * * * * * * * * * * * "@0,compatible",*
* * * * * * * * * * * * * * * * Buffer (0x0B)
* * * * * * * * * * * * * * * * {
* * * * * * * * * * * * * * * * * * "NVDA,NVMac"
* * * * * * * * * * * * * * * * },*
** * * * * * * * * * * * * * * *
 * * * * * * * * * * * * * * "@0,connector-type",*
 * * * * * * * * * * * * * * Buffer (0x04)
 * * * * * * * * * * * * * * {
 * * * * * * * * * * * * * * * * 0x00, 0x08, 0x00, 0x00
 * * * * * * * * * * * * * * },*
  * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* * * * * * * * * * * * * * * * "@0,device_type",*
* * * * * * * * * * * * * * * * Buffer (0x08)
* * * * * * * * * * * * * * * * {
* * * * * * * * * * * * * * * * * * "display"
* * * * * * * * * * * * * * * * },*

* * * * * * * * * * * * * * * * "@0,name",*
* * * * * * * * * * * * * * * * Buffer (0x0F)
* * * * * * * * * * * * * * * * {
* * * * * * * * * * * * * * * * * * "NVDA,Display-A"
* * * * * * * * * * * * * * * * },*

* * * * * * * * * * * * * * * * "@1,compatible",*
* * * * * * * * * * * * * * * * Buffer (0x0B)
* * * * * * * * * * * * * * * * {
* * * * * * * * * * * * * * * * * * "NVDA,NVMac"
* * * * * * * * * * * * * * * * },*
** * * * * * * * * * * * * * * *
 * * * * * * * * * * * * * * "@1,connector-type",*
 * * * * * * * * * * * * * * Buffer (0x04)
 * * * * * * * * * * * * * * {
 * * * * * * * * * * * * * * * * 0x00, 0x08, 0x00, 0x00
 * * * * * * * * * * * * * * },* * * * * * * * * * * * * * * * *

* * * * * * * * * * * * * * * * "@1,device_type",*
* * * * * * * * * * * * * * * * Buffer (0x08)
* * * * * * * * * * * * * * * * {
* * * * * * * * * * * * * * * * * * "display"
* * * * * * * * * * * * * * * * },*

* * * * * * * * * * * * * * * * "@1,name",*
* * * * * * * * * * * * * * * * Buffer (0x0F)
* * * * * * * * * * * * * * * * {
* * * * * * * * * * * * * * * * * * "NVDA,Display-B"
* * * * * * * * * * * * * * * * },*

* * * * * * * * * * * * * * * * "NVCAP",*
* * * * * * * * * * * * * * * * Buffer (0x18)
* * * * * * * * * * * * * * * * {
* * * * * * * * * * * * * * * * * * /* 0000 */* * 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00,*
* * * * * * * * * * * * * * * * * * /* 0008 */* * 0x1c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0A,*
* * * * * * * * * * * * * * * * * * /* 0010 */* * 0x00, 0x00, 0x00, 0x00
* * * * * * * * * * * * * * * * },*

* * * * * * * * * * * * * * * * "VRAM,totalsize",*
* * * * * * * * * * * * * * * * Buffer (0x04)
* * * * * * * * * * * * * * * * {
* * * * * * * * * * * * * * * * * * 0x00, 0x00, 0x00, 0x40
* * * * * * * * * * * * * * * * },*

* * * * * * * * * * * * * * * * "device_type",*
* * * * * * * * * * * * * * * * Buffer (0x0C)
* * * * * * * * * * * * * * * * {
* * * * * * * * * * * * * * * * * * "NVDA,Parent"
* * * * * * * * * * * * * * * * },*

* * * * * * * * * * * * * * * * "model",*
* * * * * * * * * * * * * * * * Buffer (0x10)
* * * * * * * * * * * * * * * * {
* * * * * * * * * * * * * * * * * * "GeForce GTX 460"
* * * * * * * * * * * * * * * * },*

* * * * * * * * * * * * * * * * "rom-revision",*
* * * * * * * * * * * * * * * * Buffer (0x0e)
* * * * * * * * * * * * * * * * {
* * * * * * * * * * * * * * * * * * "70.08.29.00.30"
* * * * * * * * * * * * * * * * },*

1.* Open your dsdt in DSDTSE. open DSDT-HDMI_Audio_Edits_v2 in DSDTSE
2.* Copy the code labeled "Nvidia_GE=N-DSDT_HDMI_Audio_Edit - Complete"
3.* Paste the copied code over the existing Device (PEGP), Device (GFX0) and Device (HDAU)
4.* Compile, install, reboot with HDMI device plugged
5.* Run IOReg, Search "HDAU", Note device-id, this your HDMI Device_id; save for later.

b. *Audio Kext edits

Verify AppleHDA v 1.9.9 is installed in S/L/E. *
Editing binary details are included in HDMI Audio Kext Verification

AppleHDAController Binary Edit
If your HDMI Device_id is one the following, an edit is not required (i.e., GT 240).
de 10 c0 0a, de 10 94 0d, de 10 e2 0b, de 10 e4 0b

Example:* HDMI Device_id: "eb 0b"
** * * * * * * * * Find: de 10 e2 0b * Replace: de 10 eb 0b

1.* Run IOReg - Skip to Step 3, if you have HDMI Device_id
2.* Search HDAU, Note device-id, this your HDMI Device_id
3. *Edit AppleHDAController Binary: *
** * * * * * Find: de 10 e2 0b * Replace: de 10 ?? ?? * 2 Times
4.* Install AppleHDAController Binary in AppleHDA.kext
5.* Install AppleHDA.kext in S/L/E
6.* Run Kext Utility
7.* Reboot with HDMI device plugged in

AppleHDA Binary Edit
If your HDMI Codec_id is one the following, an edit is not required.
07 00 de 10, 0c 00 de 10, 0a 00 de 10

Example:* HDMI Codec_id: "10 de 00 12" *
** * * * * * * * * Represented in AppleHDA as "12 00 de 10"
** * * * * * * * * Find: 0a 00 de 10* Replace 12 00 de 10

1.* Run IOReg
2.* Search HDAU
3.* Clear Search box
4.* Scroll down 2 lines and select IOHDACodecDevice
5.* Note: IOHDACodecVendorID 10 de ??* ?? *
* * * * * * * * Convert to AppleHDA ?? ?? de 10
6.* Edit AppleHDA Binary: *
** * * * * * * Find: 0a 00 de 10* Replace ?? ?? de 10* 4 Times
7.* Install AppleHDA Binary in AppleHDA.kext
8.* Install AppleHDA.kext in S/L/E
9.* Run Kext Utility
10.Reboot with HDMI device plugged in

Mac OS X 10.6.x HDMI Audio
Select System Preferences/Sound/Output.* Select the HDMI audio device.

Nvidia-HDMI_Audio-Sound.png
 

Attachments

  • DSDT-HDMI_Audio_Edits_v2.dsl
    13.5 KB · Views: 434
  • HDMI_Audio_Kext_Verification.pdf
    1.7 MB · Views: 553
Last edited by a moderator:
Re: Demystifying HDMI Audio Part 3b: Kext Edits for NVIDIA 4xx

Hi everybody!
First of all i want to thank toleda for this excelent guide. I nearly got it working but stuck with the last part - kext editing.

My hardware:
  • MB: Asus P5E (Ad1889b codec)
    Video: Zotac GTX 470

My Software:
  • Mac OS X 10.6.7 (installed 10.6.3 vanilla with chameleon 2 rc5 and updated from software update)
    AppleHDA v 1.9.9f12 (extracted from 10.6.7 combo update)
    NVidia native drivers
    DSDT fixes for motherboard from this thread: http://www.insanelymac.com/forum/index. ... pic=199816

My DeviceID for HDAU@0,1 from IORef is: e5 0b
My IOHDACodecVendorID for IOGDACodecDevice@0,1,0 is: 10 de 00 10

AppleHDAController binary pathed: OK

The problem is: I can't find 14 00 de 10 code in AppleHDA binary. However i found 0a 00 de 10 and tryed to replace it with 10 00 de 10

After that, i have HDMI audio (and built in audio in System Profiler, screenshot attached). But HDMI audio still doesn't appear in Audio-MIDI setup, and doesn't work.

Any help would be much appreciated!

My DSDT.aml video section:
Code:
            Device (P0P2)
            {
                Name (_ADR, 0x00010000)
                Device (GFX0)
                {
                    Name (_ADR, Zero)
                    Name (_SUN, One)
                    Method (_DSM, 4, NotSerialized)
                    {
                        Store (Package (0x20)
                            {
                                "AAPL,slot-name", 
                                "PCI x16", 
                                "@0,compatible", 
                                Buffer (0x0B)
                                {
                                    "NVDA,NVMac"
                                }, 

                                "@0,connector-type", 
                                Buffer (0x04)
                                {
                                    0x00, 0x08, 0x00, 0x00
                                }, 

                                "@0,device_type", 
                                Buffer (0x08)
                                {
                                    "display"
                                }, 

                                "@0,display_cfg", 
                                Buffer (0x08)
                                {
                                    0x03, 0x01, 0x00, 0x00
                                }, 

                                "@0,name", 
                                Buffer (0x0F)
                                {
                                    "NVDA,Display-A"
                                }, 

                                "@1,compatible", 
                                Buffer (0x0B)
                                {
                                    "NVDA,NVMac"
                                }, 

                                "@1,connector-type", 
                                Buffer (0x04)
                                {
                                    0x00, 0x08, 0x00, 0x00
                                }, 

                                "@1,device_type", 
                                Buffer (0x08)
                                {
                                    "display"
                                }, 

                                "@1,display_cfg", 
                                Buffer (0x08)
                                {
                                    0xFF, 0xFF, 0x00, 0x01
                                }, 

                                "@1,name", 
                                Buffer (0x0F)
                                {
                                    "NVDA,Display-B"
                                }, 

                                "NVCAP", 
                                Buffer (0x14)
                                {
                                    /* 0000 */    0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 
                                    /* 0008 */    0x1C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0A, 
                                    /* 0010 */    0x00, 0x00, 0x00, 0x00
                                }, 

                                "VRAM,totalsize", 
                                Buffer (0x04)
                                {
                                    0x00, 0x00, 0x00, 0x50
                                }, 

                                "device_type", 
                                Buffer (0x0D)
                                {
                                    "NVDA,GeForce"
                                }, 

                                "model", 
                                Buffer (0x10)
                                {
                                    "GeForce GTX 470"
                                }, 

                                "rom-revision", 
                                Buffer (0x25)
                                {
                                    "nVidia GeForce GTX 470 OpenGL Engine"
                                }
                            }, Local0)
                        DTGP (Arg0, Arg1, Arg2, Arg3, RefOf (Local0))
                        Return (Local0)
                    }
                }

                Device (HDAU)
                {
                    Name (_ADR, One)
                    Method (_DSM, 4, NotSerialized)
                    {
                        Store (Package (0x02)
                            {
                                "hda-gfx", 
                                Buffer (0x0A)
                                {
                                    "onboard-1"
                                }
                            }, Local0)
                        DTGP (Arg0, Arg1, Arg2, Arg3, RefOf (Local0))
                        Return (Local0)
                    }
                }
            }
 

Attachments

  • screenshot.png
    screenshot.png
    466.7 KB · Views: 2,606
Re: Demystifying HDMI Audio Part 3b: Kext Edits for NVIDIA 4xx

silentshade said:
Hi everybody!
First of all i want to thank toleda for this excelent guide. I nearly got it working but stuck with the last part - kext editing.

....

After that, i have HDMI audio (and built in audio in System Profiler, screenshot attached). But HDMI audio still doesn't appear in Audio-MIDI setup, and doesn't work.

Any help would be much appreciated!

Thanks for your feedback. 14 00 de 10 is not in AppleHDA binary v1.9.9; my mistake. You chose a good alternative. In IOReg, you will see NVDA,Display-A@0 and NVDA,Display-B@1. Underneath one or the other will be display0. Select the NVDA that has display0 attached. Please verify audio-codec-index, av-signal-type and connector-type and their value. You can also pm a copy of your IOReg.
 
Re: Demystifying HDMI Audio Part 3b: Kext Edits for NVIDIA 4xx

Thanks for fast reply!

It seems to be a little different in my case.
Attaching a screenshot of IOReg GFX0. Also must say that my monitor is plugged into second DVI port.

Sent you pm with IOReg dump.
 

Attachments

  • ioreg-gfx0.png
    ioreg-gfx0.png
    136.2 KB · Views: 2,573
Re: Demystifying HDMI Audio Part 3b: Kext Edits for NVIDIA 4xx

silentshade said:
Thanks for fast reply!

It seems to be a little different in my case.
Attaching a screenshot of IOReg GFX0. Also must say that my monitor is plugged into second DVI port.

Sent you pm with IOReg dump.

Are you saying you have a DVI monitor plugged into the DVI port? Do you have a TV (or other HDMI device) plugged in the HDMI port as well?
 
Re: Demystifying HDMI Audio Part 3b: Kext Edits for NVIDIA 4xx

Yes, exactly. Monitor is plugged in second DVI and TV is plugged into HDMI. First DVI is empty.
-- EDIT --
I just wanted to point that the second DVI port is used for monitor if it makes any difference.
Also i got this in kernel log - only one line:
Code:
Jun 23 04:38:58 localhost kernel[0]: Sound assertion "0 != createAudioEngines ( fPathMap_aDriverInstance )" failed in "/SourceCache/AppleHDA/AppleHDA-199.4.12/AppleHDA/AppleHDADriver.cpp" at line 202 goto Exit
There is some another line wich i can see during boot, but somewhy it doesn't get logged.. It's similar error telling something about pciVendorProduct ID unknown.. I'll try to shoot it and upload
-- EDIT2 --
Second error photo attached

-- EDIT3 --
Ok, got it from dmesg
Code:
Sound assertion "0 == pciVendorProductID" failed in "/SourceCache/AppleHDA/AppleHDA-199.4.12/AppleHDAController/AppleHDAController.cpp" at line 3345 goto Exit
 

Attachments

  • IMAG0030.jpg
    IMAG0030.jpg
    1.1 MB · Views: 2,642
Re: Demystifying HDMI Audio Part 3b: Kext Edits for NVIDIA 4xx

silentshade said:
Yes, exactly. Monitor is plugged in second DVI and TV is plugged into HDMI. First DVI is empty.

I need to see About This Mac/System Profiler/Graphics/Displays. Thanks.
 
Re: Demystifying HDMI Audio Part 3b: Kext Edits for NVIDIA 4xx

Here it is. Switched system locale to English for better understanding, and attached some addtional information too.
 

Attachments

  • gfx.png
    gfx.png
    79.1 KB · Views: 2,488
  • pcicards.png
    pcicards.png
    64.3 KB · Views: 2,468
  • audio.png
    audio.png
    91.7 KB · Views: 2,554
Re: Demystifying HDMI Audio Part 3b: Kext Edits for NVIDIA 4xx

i get no output(blank screen) when connected hdmi. only vga and dvi works :( can anybody please help. card is gts 450
 
Re: Demystifying HDMI Audio Part 3b: Kext Edits for NVIDIA 4xx

Hi,

My config: Sabertooth x58 + Asus gt 440 1gb ddr5

I try to edit my dsdt.aml provide by MacMan but unfortunately i can't see existing Device (PEGP), Device (GFX0) and Device (HDAU) in my dsdt.aml file :crazy: . So I don't know where to start to edit my file.
My dsdt file is from this forum (dsdt database ---> Sabertooth x58 1006).

Any help would be apreciate.

Tank, and sorry for my english.
:?
 
Status
Not open for further replies.
Back
Top