Contribute
Register

Snow Leopard HDMI Audio - Part 2: DSDT Edits

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 2: DSDT Edits

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.

If you are uncomfortable editing your DSDT then you will not have HDMI Audio on your Mac OS X system. Simply put, there is no other way. While editing the DSDT is not hard, it must be exactly correct.

What you will need:

1. DSDTSE v1.4.3 - http://www.osx86.es/?p=610
2. IORegistryExplorer - available on Retail Mac OS X Install Disc: Optional Installs/Xcode
3. dsdt-hdmi_audio-v2.dsl
DSDT-HDMI_Audio_Edits_v2.dsl

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. The amount of time needed to enable HDMI audio varies from an hour to as long as you are interested.

Additional dsdt editing details are included in HDMI Audio DSDT Verification
link to:
HDMI_Audio_DSDT_Verification.pdf

Credit to tmongkol and CCraigen

Part 2: DSDT Edits Table of Contents
1. Graphics Card Display Address
2. Open DSDT
3. Preview DSDT
4. Edit DSDT
5. Verify DSDT
6. Working HDMI Audio

IORegistry Explorer is a developer tool that reports the state and status of Mac OS X.

1.Graphics Card Display Address (PCIe)
The display card address defines the path between the processor and the graphics card

There are several techniques to obtain the display address including IOReg, bdmesg, gfxutil, lspci, etc. IOReg is described below.

a. Run IOReg, verify "IOService" is displayed in the upper left corner of the IOReg window
b. Enter "display" in the search window
c. Look for PCIO@0
d. Example: PCI0 > AppleACPIPCI > pci-bridge@d, where "d" is the display address (d is usually 1 or 3, sometimes 2, never 0)
e. The display address is d, actually, 0x000d0000. Note the display address for use later. Graphic card references could also be P0P1@1, P0P3@3, ….

h67n-10.6.6-org-display-addr-ioreg.png


2. Open DSDT
Open Finder on the drive the system boots from and select the Extra folder. Make a back up of your dsdt.aml file. If you don't have an Extra folder, your system is not ready for HDMI audio.

This step verifies the DSDT can be edited for HDMI audio and identifies known problems before investing time making edits and ensures the dsdt compiles before any changes are made.

a. Double click on "dsdt.aml" file and DSDTSE will launch. When the edit window appears. Enter "PEGP" in the search box and search. If there is "Device (PEGP)", your DSDT may already have the HDMI audio dsdt edits. Got to HDMI Audio DSDT Verification
b. Enter "GFX0" in the search box and search (0 is zero, not O). If there is already is a "Device (GFX0)" and there is not a "Device (PEGP)", your mother board may not support HDMI audio. Seek assistance.
c. Enter the display address from Step 1, "0x00010000" or "0x00030000" in the search box and search. Select Next, If search finds another device with the same address, your mother board may not support HDMI audio. Select Next and look for another device. Repeat until you are back at the first entry.

SPECIAL NOTE: If you see "Device (PEG0)" as below (likely in Gigabyte Sandy Bridge DSDTs), That is the place for the HDMI audio edits. In addition, this may be true for P0P1, P0P2, or P0P3.

h67n-10.6.6-org-addr-dsdt.png


d. Select Compile. DSDTSE may say the file has not been saved, enter Yes to save and compile. If there are any errors, they must be resolved before editing can start. You may also select "Save .dsl" from the File menu.

3. Preview DSDT
If this is your first time editing a dsdt, check HDMI Audio DSDT Verification
This step identifies the exact place to put the HDMI audio edits in your DSDT.

a. Double click on dsdt-hdmi_audio-v2.dsl and another editor window will open in DSDTSE. From this window, copy the edit code and paste to your dsdt
b. Enter "PCI0" in the Search box and Search (0 is zero, not O). Hit Next until you see "Device (PCI0)". If "Device (PCI0)" is not found, seek assistance as your mother board may not support HDMI audio.
c. If you found Device PEG0, P0P1, P0P2 or P0P3, skip to Step 4. Edit DSDT.
d. Look down through the code and find "Method (_STA, 0, NotSerialized)", Line 389 in the DSDT below.

h67n-10.6.6-org-pci0-dsdt.png


e. Put the cursor at the beginning of the line above and hit return twice. This creates some space to add the edit code.


4. Edit DSDT
In this step, the HDMI edits are made to the DSDT. Care must be taken to ensure all edits are accurate and complete. Though unlikely, a mistake may make your system unbootable or significantly compromise performance.

a. Go to the other DSDTSE edit window and copy the 44 lines of code under the comment "Generic DSDT_HDMI_Audio_Edit"
b. If present, paste the copied code over Device (PEG0, P0P1, P0P2 or P0P3). For more info, check HDMI Audio DSDT Verification
Otherwise,paste the code into the line above the "Method (_STA, 0, NotSerialized)" line.
c. Make sure the code looks the same as the dsdt below.

h67n-10.6.6-org-hdmi-a-dsdt.png


h67n-10.6.6-org-hdmi-b-dsdt.png
\

d. Compile. If there is an error, see if you can solve it. If not, check HDMI Audio DSDT Verification
e. With a successful compile, select "Install DSDT", select your boot volume, check Extra, and select Install. If the message "A previous dsdt.aml file…", select OK. Enter password.
f. With a successful install, plug your HDMI device into the graphics card and reboot.


5. Verify DSDT
This step verifies the HDMI audio edits are correct.

a. Run IOReg, Search "GFX0". You should see a chain that includes:
PCI0 > AppleACPIPCI > PEGP@1 or 3 > IOPCI2PCIBridge > GFX0@0.
b. Verify GFX0, hda-gfx="onboard-1"

h55n-10.6.7-gfx0-ioreg.png


c. Run IOReg, Search "HDAU". This chain looks like:
PCI0 > AppleACPIPCI > PEGP@1 or @3 > IOPCI2PCIBridge > [email protected].
d. Verify HDAU, hda-gfx="onboard-1", please note device-id for later use.

h55n-10.6.7-hdau-ioreg.png


If you see problems or errors, check HDMI Audio DSDT Verification

Congratulations, it appears you have successfully edited your dsdt for HDMI audio when you see GFX0 and HDAU in IOReg.

6. Working HDMI Audio
HDMI audio is available out of the box for the following graphics card with the above DSDT edits.

a. Sapphire Vapor X HD 5870 1GB
b. Sapphire Vapor X HD 5770 1GB

For all other graphics cards, more work is required.

If one of the graphics cards above is installed and the DSDT is edited properly, working HDMI Audio (HDAU) looks like this:

h55n-5870-10.6.7-hdau-ioreg.png
 

Attachments

  • HDMI_Audio_DSDT_Verification.pdf
    3.2 MB · Views: 1,873
  • DSDT-HDMI_Audio_Edits_v2.dsl
    13.5 KB · Views: 1,518
Last edited by a moderator:
Re: Demystifying HDMI Audio Part 2: DSDT Edits

Firstly thans for the effort you have put into this guide.
I am having a problem with Step 2-C
c. Enter the display address from Step 1, "0x00010000" or "0x00030000" in the search box and search

In step 1 I found "pci-bridge@3" so I search for 0x00030000 but it is not found
I have a HD6870 in a Gigabyte GA-H55M-UD2H and i'm using tonymacx86 DSDT.
Everything was going perfect until then(Ticks in all the boxes)
Any ideas where i may be going wrong?

Sprockett
 
Re: Demystifying HDMI Audio Part 2: DSDT Edits

sprockett said:
Firstly thans for the effort you have put into this guide.
I am having a problem with Step 2-C
c. Enter the display address from Step 1, "0x00010000" or "0x00030000" in the search box and search

In step 1 I found "pci-bridge@3" so I search for 0x00030000 but it is not found
I have a HD6870 in a Gigabyte GA-H55M-UD2H and i'm using tonymacx86 DSDT.
Everything was going perfect until then(Ticks in all the boxes)
Any ideas where i may be going wrong?

Sprockett

Not finding any device at 0x00030000 is good, continue to the next step; 2 d. Please understand that your HD 6870 will not produce HDMI audio even with the edits because AppleHDA v1.9.9 does not support the HD 6xxx cards. When, AppleHDA supports HD 6xxx (probably the next release, 10.6.8), we will update this guide. In the meantime, it makes perfect sense to complete the DSDT edits successfully at this time.
 
Re: Demystifying HDMI Audio Part 2: DSDT Edits

Hi Toleda
Thanks for the heads up
I have continued and finished the edits.
When I get to step 5 Verify DSDT, neither GFX0 or HDAU show when searching.
I'm assuming that's because of the lack of HD6870 support.
Looking forward to the 10.6.8 update.
Do you think this will also work on 10.7?

Thanks again :thumbup:
Sprockett
 
Re: Demystifying HDMI Audio Part 2: DSDT Edits

sprockett said:
Hi Toleda
Thanks for the heads up
I have continued and finished the edits.
When I get to step 5 Verify DSDT, neither GFX0 or HDAU show when searching.
I'm assuming that's because of the lack of HD6870 support.
Looking forward to the 10.6.8 update.
Do you think this will also work on 10.7?

Thanks again :thumbup:
Sprockett

Unfortunately, the verification failure (no GFX0 or HDAU) means the edits were unsuccessful. This DSDT edits are independent of OS X support of a particular graphics card. Please review each step to determine where the problem is. And yes, the HDMI audio DSDT edits will work with with future releases. Good luck.
 
Re: Demystifying HDMI Audio Part 2: DSDT Edits

Slowly getting to the bottom of this...
In step 4-e when i am installing the DSDT, it says "file already exists"...
so I select over-write... Enter password...
Says"DSDT Installed"...
But I check and it hasn't saved it at all (the DSDT remains un-edited)
It has saved it to library/application support/EvOSoftware/DSDT/DSDTFiles/DSDT.aml
So I just copied it over manually and now when I search IOReg, PEGP@3 is there.

Ive moved on to the next issue
The final check... IOReg i can find 'GFX0" and it looks good.
But i cannot find "HDAU" instead i find "HDEF".

Any thoughts.
I have re-tried several times re-reading the instructions every time.
 

Attachments

  • grab of IOReg.tiff
    201.8 KB · Views: 5,952
Re: Demystifying HDMI Audio Part 2: DSDT Edits

sprockett said:
Ive moved on to the next issue
The final check... IOReg i can find 'GFX0" and it looks good.
But i cannot find "HDAU" instead i find "HDEF".

Any thoughts.
I have re-tried several times re-reading the instructions every time.

Please attach or pm your dsdt and ioreg.
 
Re: Demystifying HDMI Audio Part 2: DSDT Edits

Hi Toleda, Thanks for your assistance,
This one has got me scratching my head.
I have attached the DSDT but I'm not able to attach the ioreg (board wont let me)
I'll PM it to you.

Thanks Sprockett
dsdt.aml
 

Attachments

  • dsdt.aml
    19.8 KB · Views: 266
Re: Demystifying HDMI Audio Part 2: DSDT Edits

sprockett said:
Hi Toleda, Thanks for your assistance,
This one has got me scratching my head.
I have attached the DSDT but I'm not able to attach the ioreg (board wont let me)
I'll PM it to you.

Thanks Sprockett
dsdt.aml


Looks like you have an audio enabler loading, correct? Your DSDT is edited properly for HDEF. The edits for HDMI appear to be correct. Try removing the enabler.

Regarding 10.6.8, I have not been to get HDMi audio working on my systems.
 
Re: Demystifying HDMI Audio Part 2: DSDT Edits

Thanks again
I have found the enabler and removed it.
HDAEnabler889.kext
Now I can find the HDAU and looks as I would expect.
Problem is I had updated to 10-6-8, and as you said before my card wont work HD Audio on 10-6-7.
Guess Im waiting for 10-8 Lion.
Its been a great learning curve

Sprockett
 
Status
Not open for further replies.
Back
Top