Contribute
Register

Lion HDMI Audio - Part 3b: Kext Edits - Nvidia

Status
Not open for further replies.

toleda

Moderator
Joined
May 19, 2010
Messages
22,845
Motherboard
Asus Maximus VII Impact
CPU
Core 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
plex.jpeg
mac-os-x-lion1-500x250.jpg

hdmi.jpeg
starcraft.jpeg


Lion HDMI Audio
Part 3b: Lion HDMI Audio Kext Edits - Nvidia GT/S/X 4xx and GT/S/X 5xx Graphics Cards

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 GT/S/X 4xxx and 5xx graphics cards, a different method for AMD Radeon HD 5xxx and 6xxx graphics cards and a third method for Intel Integrated Graphics HD3000.

This guide assumes the Part 2a: Lion HDMI Audio DSDT Edits - Discrete Graphics (AMD/Nvidia) edits have been made successfully. The Lion HDMI Audio Kext Edits for Nvidia GT/S/X 4xx and GT/S/X 5xx graphics cards are described below.

Now, is a good time to back up your system. Preferably, you have a bootable backup. Time Machine is not a good choice for the primary backup.

This guide applies to Mac OS X 10.7.x only.
10.7.2 Update: GT430 - DVI port working

What you will need:
1. IORegistryExplorer - available with Xcode for Lion download from the Mac App Store/Developer Tools/Xcode
2. DSDTSE v1.4.3 - http://www.osx86.es/?p=610
3. HexEdit v220 - http://hexedit.sourceforge.net/
4. Kext Beast or Kext Wizard
5. DSDT-HDMI_Audio_Edits_v3: View attachment DSDT-HDMI_Audio_Edits_v3.dsl
6. Nvidia GT/S/X 4xx and GT/S/X 5xx HDMI Audio Case Studies: View attachment nvidia_gt4xx-5xx_case_studies.pdf
7. How to find device_ids for your graphics card: View attachment nvidia_gt4xx-5xx_case_studies.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.

Credit: VCH888: Editing custom personalities for ATI Radeon HD[45]xxx - InsanelyMac Forum

Part 3b: Lion HDMI Audio Kext Edits Table of Contents

1. Nvidia GT/S/X 4xx and GT/S/X 5xx Graphics Cards (and the GT 240)
a. Additional DSDT Edits
GraphicsEnabler=Yes
GraphicsEnabler=No
b. Kext Edits
AppleHDA

1. Nvidia GT/S/X 4xx and GT/S/X 5xx Graphics Cards (and the GT 240)

a.Additional DSDT edits

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

Add the following code to Device (GFX0).
Code:
[LEFT][COLOR=#404040][FONT=Monaco]                        Store (Package (0x06)[/FONT][/COLOR]
[COLOR=#404040][FONT=Monaco]                            {[/FONT][/COLOR]
[COLOR=#404040][FONT=Monaco]                                "@0,connector-type", [/FONT][/COLOR]
[COLOR=#404040][FONT=Monaco]                                Buffer (0x04)[/FONT][/COLOR]
[COLOR=#404040][FONT=Monaco]                                {[/FONT][/COLOR]
[COLOR=#404040][FONT=Monaco]                                    0x00, 0x08, 0x00, 0x00[/FONT][/COLOR]
[COLOR=#404040][FONT=Monaco]                                }, [/FONT][/COLOR]

[COLOR=#404040][FONT=Monaco]                                "@1,connector-type", [/FONT][/COLOR]
[COLOR=#404040][FONT=Monaco]                                Buffer (0x04)[/FONT][/COLOR]
[COLOR=#404040][FONT=Monaco]                                {[/FONT][/COLOR]
[COLOR=#404040][FONT=Monaco]                                    0x00, 0x08, 0x00, 0x00[/FONT][/COLOR]
[COLOR=#404040][FONT=Monaco]                                }, [/FONT][/COLOR][COLOR=#404040][FONT=Monaco]
[/FONT][/COLOR][/LEFT]
1. Make a backup of your dsdt.aml. from Extras.
2. Copy your dsdt.aml to your desktop.
3. Download DSDT-HDMI_Audio_Edits_v3.
4. Open your dsdt in DSDTSE.
5. Open DSDT-HDMI_Audio_Edits_v3 in DSDTSE.
6. Copy the code labeled "Nvidia_GE=Y-DSDT_HDMI_Audio_Edit - Complete" from DSDT-HDMI_Audio_Edits_v3.
7. Search "PEGP" (no quotes) in your dsdt.
8. Paste the copied code over the existing Device (PEGP), Device (GFX0) and Device (HDAU).
9. Compile.
10. Install.
11. Reboot with HDMI device connected.
12. Run IOReg, Search "HDAU".
13. Note device-id, this your HDMI Audio Device_id; save for later.

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

Add the following code to Device (GFX0) - Modify for your particular Nvidia GeForce 4xx/5xx graphics card.
Code:
[LEFT][COLOR=#404040][FONT=Monaco]                        Store (Package (0x1E)[/FONT][/COLOR]
[COLOR=#404040][FONT=Monaco]                            {[/FONT][/COLOR]
[COLOR=#404040][FONT=Monaco]                                "AAPL,slot-name", [/FONT][/COLOR]
[COLOR=#404040][FONT=Monaco]                                "PCI x16", [/FONT][/COLOR]
[COLOR=#404040][FONT=Monaco]                                "@0,compatible", [/FONT][/COLOR]
[COLOR=#404040][FONT=Monaco]                                Buffer (0x0B)[/FONT][/COLOR]
[COLOR=#404040][FONT=Monaco]                                {[/FONT][/COLOR]
[COLOR=#404040][FONT=Monaco]                                    "NVDA,NVMac"[/FONT][/COLOR]
[COLOR=#404040][FONT=Monaco]                                }, [/FONT][/COLOR]

[COLOR=#404040][FONT=Monaco]                                "@0,connector-type", [/FONT][/COLOR]
[COLOR=#404040][FONT=Monaco]                                Buffer (0x04)[/FONT][/COLOR]
[COLOR=#404040][FONT=Monaco]                                {[/FONT][/COLOR]
[COLOR=#404040][FONT=Monaco]                                 0x00, 0x08, 0x00, 0x00[/FONT][/COLOR]
[COLOR=#404040][FONT=Monaco]                                }, [/FONT][/COLOR]

[COLOR=#404040][FONT=Monaco]                                "@0,device_type", [/FONT][/COLOR]
[COLOR=#404040][FONT=Monaco]                                Buffer (0x08)[/FONT][/COLOR]
[COLOR=#404040][FONT=Monaco]                                {[/FONT][/COLOR]
[COLOR=#404040][FONT=Monaco]                                    "display"[/FONT][/COLOR]
[COLOR=#404040][FONT=Monaco]                                }, [/FONT][/COLOR]

[COLOR=#404040][FONT=Monaco]                                "@0,name", [/FONT][/COLOR]
[COLOR=#404040][FONT=Monaco]                                Buffer (0x0F)[/FONT][/COLOR]
[COLOR=#404040][FONT=Monaco]                                {[/FONT][/COLOR]
[COLOR=#404040][FONT=Monaco]                                    "NVDA,Display-A"[/FONT][/COLOR]
[COLOR=#404040][FONT=Monaco]                                }, [/FONT][/COLOR]

[COLOR=#404040][FONT=Monaco]                                "@1,compatible", [/FONT][/COLOR]
[COLOR=#404040][FONT=Monaco]                                Buffer (0x0B)[/FONT][/COLOR]
[COLOR=#404040][FONT=Monaco]                                {[/FONT][/COLOR]
[COLOR=#404040][FONT=Monaco]                                    "NVDA,NVMac"[/FONT][/COLOR]
[COLOR=#404040][FONT=Monaco]                                }, [/FONT][/COLOR]

[COLOR=#404040][FONT=Monaco]                                "@1,connector-type", [/FONT][/COLOR]
[COLOR=#404040][FONT=Monaco]                                Buffer (0x04)[/FONT][/COLOR]
[COLOR=#404040][FONT=Monaco]                                {[/FONT][/COLOR]
[COLOR=#404040][FONT=Monaco]                                    0x00, 0x08, 0x00, 0x00[/FONT][/COLOR]
[COLOR=#404040][FONT=Monaco]                                },                                 [/FONT][/COLOR]

[COLOR=#404040][FONT=Monaco]                                "@1,device_type", [/FONT][/COLOR]
[COLOR=#404040][FONT=Monaco]                                Buffer (0x08)[/FONT][/COLOR]
[COLOR=#404040][FONT=Monaco]                                {[/FONT][/COLOR]
[COLOR=#404040][FONT=Monaco]                                    "display"[/FONT][/COLOR]
[COLOR=#404040][FONT=Monaco]                                }, [/FONT][/COLOR]

[COLOR=#404040][FONT=Monaco]                                "@1,name", [/FONT][/COLOR]
[COLOR=#404040][FONT=Monaco]                                Buffer (0x0F)[/FONT][/COLOR]
[COLOR=#404040][FONT=Monaco]                                {[/FONT][/COLOR]
[COLOR=#404040][FONT=Monaco]                                    "NVDA,Display-B"[/FONT][/COLOR]
[COLOR=#404040][FONT=Monaco]                                }, [/FONT][/COLOR]

[COLOR=#404040][FONT=Monaco]                                "NVCAP", [/FONT][/COLOR]
[COLOR=#404040][FONT=Monaco]                                Buffer (0x18)[/FONT][/COLOR]
[COLOR=#404040][FONT=Monaco]                                {[/FONT][/COLOR]
[COLOR=#404040][FONT=Monaco]                                    /* 0000 */    0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, [/FONT][/COLOR]
[COLOR=#404040][FONT=Monaco]                                    /* 0008 */    0x1c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0A, [/FONT][/COLOR]
[COLOR=#404040][FONT=Monaco]                                    /* 0010 */    0x00, 0x00, 0x00, 0x00[/FONT][/COLOR]
[COLOR=#404040][FONT=Monaco]                                }, [/FONT][/COLOR]

[COLOR=#404040][FONT=Monaco]                                "VRAM,totalsize", [/FONT][/COLOR]
[COLOR=#404040][FONT=Monaco]                                Buffer (0x04)[/FONT][/COLOR]
[COLOR=#404040][FONT=Monaco]                                {[/FONT][/COLOR]
[COLOR=#404040][FONT=Monaco]                                    0x00, 0x00, 0x00, 0x40[/FONT][/COLOR]
[COLOR=#404040][FONT=Monaco]                                }, [/FONT][/COLOR]

[COLOR=#404040][FONT=Monaco]                                "device_type", [/FONT][/COLOR]
[COLOR=#404040][FONT=Monaco]                                Buffer (0x0C)[/FONT][/COLOR]
[COLOR=#404040][FONT=Monaco]                                {[/FONT][/COLOR]
[COLOR=#404040][FONT=Monaco]                                    "NVDA,Parent"[/FONT][/COLOR]
[COLOR=#404040][FONT=Monaco]                                }, [/FONT][/COLOR]

[COLOR=#404040][FONT=Monaco]                                "model", [/FONT][/COLOR]
[COLOR=#404040][FONT=Monaco]                                Buffer (0x10)[/FONT][/COLOR]
[COLOR=#404040][FONT=Monaco]                                {[/FONT][/COLOR]
[COLOR=#404040][FONT=Monaco]                                    "GeForce GTX 460"[/FONT][/COLOR]
[COLOR=#404040][FONT=Monaco]                                }, [/FONT][/COLOR]

[COLOR=#404040][FONT=Monaco]                                "rom-revision", [/FONT][/COLOR]
[COLOR=#404040][FONT=Monaco]                                Buffer (0x0e)[/FONT][/COLOR]
[COLOR=#404040][FONT=Monaco]                                {[/FONT][/COLOR]
[COLOR=#404040][FONT=Monaco]                                    "70.08.29.00.30"[/FONT][/COLOR]
[COLOR=#404040][FONT=Monaco]                                }, 
[/FONT][/COLOR][/LEFT]

1. Make a backup of your dsdt.aml. from Extras.
2. Copy your dsdt.aml to your desktop.
3. Download DSDT-HDMI_Audio_Edits_v3.
4. Open your dsdt in DSDTSE.
5. Open DSDT-HDMI_Audio_Edits_v3 in DSDTSE.
6. Copy the code labeled "Nvidia_GE=N-DSDT_HDMI_Audio_Edit - Complete" from DSDT-HDMI_Audio_Edits_v3.
7. Search "PEGP" (no quotes) in your dsdt.
8. Paste the copied code over the existing Device (PEGP), Device (GFX0) and Device (HDAU).
9. Compile.
10. Install.
11. Reboot with HDMI device connected.
12. Run IOReg, Search "HDAU".
13. Note device-id, this your HDMI Audio Device_id; save for later.

b. Audio Kext edits
Verify AppleHDA v 2.1.x is installed in S/L/E.

AppleHDAController Binary Edit
If your HDMI Audio Device_id is one the following, no edit is required (i.e., GT 430).
de 10 c0 0a, de 10 94 0d, de 10 e2 0b, de 10 ea 0b

Example: HDMI Audio Device_id: "eb 0b".
HexEdit/Find: "de 10 ea 0b", HexEdit/Replace: "de 10 eb 0b"

Special Case - GT 240:
In Lion (AppleHDA_v2.1.x), GT240 (device_id; de 10 e4 0b) was not updated.
HexEdit/Find: "de 10 e4 0b", HexEdit/Replace: "de 10 e3 0b" 2 Times.
Continue with edit on "de 10 ea 0b" as noted below.

1. Run IOReg - Skip to Step 3, if you have HDMI Audio Device_id.
2. Search HDAU, Note device-id, this your HDMI Audio Device_id.
3. Edit AppleHDAController binary:
a. HexEdit/Find: de 10 ea 0b * HexEdit/Replace: de 10 ?? ?? 4 Times.

4. Install AppleHDAController binary in AppleHDA.kext.
5. Install AppleHDA.kext in S/L/E.
6. Run Kext Wizard or Kext Beast.
7. Reboot with HDMI device connected.

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, 13 00 de 10, 14 00 de 10

Example: HDMI Codec_id: "10 de 00 12".
Represented in AppleHDA as "12 00 de 10"
HexEdit/Find: "14 00 de 10", HexEdit/Replace "12 00 de 10"

1. Run IOReg.
2. Search IOHDACodecDevice@0.
3. Note: IOHDACodecVendorID: de 10 ?? ?? (ex.: 10 de 12 34).
a. Convert to AppleHDA: ?? ?? de 10 (ex.: 34 12 de 10).
b. This is the HDMI Codec Device_id.

4. Edit AppleHDA Binary:
a. HexEdit/Find: "14 00 de 10" HexEdit/Replace "?? ?? de 10" 4 Times.

5. Install AppleHDA binary in AppleHDA.kext.
6. Install AppleHDA.kext in S/L/E.
7. Run Kext Beast or Kext Wizard.
8. Reboot with HDMI device connected.

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

AS-P8H67-I-Deluxe/i7-2600K/EVGA GTX 570 HD/10.7.x.
Notes:
1. "The selected device has no output controls"
Indicates the HDMI device (ex., DTR-40.2) controls volume, mute, etc., Lion does not.
2. DisplayPort audio is working
3. HDMI audio is enabled on DVI ports with a DVI2HDMI adapter.

l_atm-prog_graphics-prefs_sound-h.png
 

Attachments

  • graphics_card_device_ids.pdf
    194.1 KB · Views: 1,510
Last edited by a moderator:
Special Case - GT 240:
In Lion (AppleHDA_v2.1.x), GT240 (device_id; de 10 e4 0b) was not updated.
HexEdit/Find: "de 10 e4 0b", HexEdit/Replace: "de 10 e3 0b" 2 Times.
Continue with edit on "de 10 ea 0b" as noted below.

Is your on board audio working? i haven't spent any time with 10.7.2 so I don't know if anything changed. You should be able to use your working 10.7 AppleHDA.kext in 10.7.2. Regarding the Integra, it's the best I've heard.

Sorry to switch threads, but this is what I was looking for! I'm going to try replacing this ID with the G 210 ID when I get home. Could you shed some light on how you discovered this was the ID that needed to be replaced? I have a feeling I might need to search for some others. In response to your question, I do have onboard audio working through DSDT injection. I have the ALC885/889a codec, and was able to get full support without binary edits by studying a Mac Pro DSDT. Shouldn't that be independent of HDMI audio?

I will say, something strange is going on in 10.7.2. Despite using various AppleHDA kexts from previous versions of Lion/SL, nothing has worked.
 
DSH said:
Sorry to switch threads, but this is what I was looking for! I'm going to try replacing this ID with the G 210 ID when I get home. Could you shed some light on how you discovered this was the ID that needed to be replaced? I have a feeling I might need to search for some others. In response to your question, I do have onboard audio working through DSDT injection. I have the ALC885/889a codec, and was able to get full support without binary edits by studying a Mac Pro DSDT. Shouldn't that be independent of HDMI audio?

I will say, something strange is going on in 10.7.2. Despite using various AppleHDA kexts from previous versions of Lion/SL, nothing has worked.
No binary patches are necessary for 885/889a. I am seeing situations where on board is needed for HDMI audio. Regarding ids to patch, I choose what is closest to the architecture of the card being enabled. In your case, The GT 210 is similar architecture to the GT220/GT330M and GT240. Since the GT240 id is not functional in 10.7.1, use the GT220/330M ids.
 
No binary patches are necessary for 885/889a. I am seeing situations where on board is needed for HDMI audio. Regarding ids to patch, I choose what is closest to the architecture of the card being enabled. In your case, The GT 210 is similar architecture to the GT220/GT330M and GT240. Since the GT240 id is not functional in 10.7.1, use the GT220/330M ids.

So you suggest replacing 0a 00 de 10 with my codec id (0b 00 de 10)? What about the device id?

I went through several permutations again tonight, and didn't find one that worked. The device is recognized by the system, but the device assertion fails at startup. With regards to the special case, what do you mean that it was not updated? Though de 10 e4 0b only appears twice, I would guess this is enough to gain functionality.
 
Some kind soul could help me to edit AppleHDA.kext. If someone could make that issue, I would be eternally grateful.

I have EVGA GTX 550Ti and Motherboard Intel DX58SO2.

Thanks a lot for support!
 

Attachments

  • About.tiff
    88.5 KB · Views: 7,739
  • Display.tiff
    181.6 KB · Views: 7,832
  • Graphics-Display.tiff
    89.8 KB · Views: 7,818
  • HDAU.tiff
    166.7 KB · Views: 7,809
  • HDEF.tiff
    159.6 KB · Views: 7,823
  • PCI-card.tiff
    77.1 KB · Views: 7,785
  • dsdt.aml
    17 KB · Views: 448
DSH said:
So you suggest replacing 0a 00 de 10 with my codec id (0b 00 de 10)? What about the device id?

I went through several permutations again tonight, and didn't find one that worked. The device is recognized by the system, but the device assertion fails at startup. With regards to the special case, what do you mean that it was not updated? Though de 10 e4 0b only appears twice, I would guess this is enough to gain functionality.

Guess = Failure

AppleHDA binary
Find: 0a 00 de 10
Replace: 0b 00 de 10 (4x)

AppleHDAController Binary (edit: correct id)
Find: de 10 e2 0b
Replace: de 10 e3 0b (4x)
 
agauzejr said:
Some kind soul could help me to edit AppleHDA.kext. If someone could make that issue, I would be eternally grateful.

I have EVGA GTX 550Ti and Motherboard Intel DX58SO2.

Thanks a lot for support!
You have to patch two binaries in AppleHDA. From your screen shots, I can see one of the two device_ids.

AppleHDAController binary
Find: de 10 ea 0b
Replace: de 10 ee 0b

Please attach a copy of IOReg after you have made the patch above.
 
Guess = Failure

AppleHDA binary
Find: 0a 00 de 10
Replace: 0b 00 de 10 (4x)

AppleHDAController Binary
Find: de 10 0b e2
Replace: de 10 0b e3 (4x)

Just for anyone else following along, small typo on the AppleHDAController binary IDs:
Find: de 10 e2 0b
Replace: de 10 e3 0b

Still didn't work. :/

Just so I'm clear, those with a GT 240 should replace both de 10 e4 0b and de 10 ea 0b with their device id (6 times)?

I noticed the 10.7.2 that came out today is build 11C74, while the GM was 11C73. I'll diff the two AppleHDAs tonight and retry all the permutations if they are different. It could just be that 10.7.2 just won't work with the G210.
 
Hi Toleda!

Thank you so much for the answer...

Could you attach the original AppleHDA.kext 2.1.1? I unfortunately lost my file. If you can do this patch for me...

Thanks
 
DSH said:
Just for anyone else following along, small typo on the AppleHDAController binary IDs:
Find: de 10 e2 0b
Replace: de 10 e3 0b

Still didn't work. :/

Just so I'm clear, those with a GT 240 should replace both de 10 e4 0b and de 10 ea 0b with their device id (6 times)?

I noticed the 10.7.2 that came out today is build 11C74, while the GM was 11C73. I'll diff the two AppleHDAs tonight and retry all the permutations if they are different. It could just be that 10.7.2 just won't work with the G210.
DSH, you are correct on the device_ids. I have edit the post. Regarding the GT240, follow the guide exactly; the result is 4 instances of the right device_id, not 6 and not 2.
 
Status
Not open for further replies.
Back
Top