toleda
Moderator
- Joined
- May 19, 2010
- Messages
- 22,834
- Motherboard
- Asus Maximus VII Impact
- CPU
- i7-4770K
- Graphics
- RX 560 + HD4600
- Mac
- Classic Mac
- Mobile Phone
Demystifying HDMI Audio Part 2: DSDT Edits
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, ….
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.
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.
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.
\
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"
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.
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:
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, ….
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.
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.
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.
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"
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.
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:
Attachments
Last edited by a moderator: