Contribute
Register

Lion HDMI Audio - Part 3a: Kext Edits - AMD

toleda

Moderator
Joined
May 20, 2010
Messages
24,223
Motherboard
Asus Maximus VII Impact
CPU
Core i7-4770K
Graphics
RX 560 + HD4600
Mac
iMac, MacBook Pro, Mac mini
Classic Mac
512K, LC, Power Mac
Mobile Phone
iOS



Lion HDMI Audio

Part 3a: Lion HDMI Audio Kext Edits - AMD HD 5xxx and HD 6xxx 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 AMD HD 5xxx and HD 6xxx graphics cards are described below.

This guide applies to Mac OS X 10.7.x only.
10.7.2 Update: Framebuffers Juncus and Osmunda added to ATI6000Controller.

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. radeon_bios_decode - Editing custom personalities for ATI Radeon HD[45]xxx - InsanelyMac Forum
6. vbios - TechPowerUp - techPowerUp! :: Video Bios Collection
7. DSDT-HDMI_Audio_Edits_v3: View attachment DSDT-HDMI_Audio_Edits_v3.dsl
8. 10.7.1 - ATI5000/6000Controller.kext FrameBuffers_v7.4.10 Framebuffer_List: View attachment FB-amd-5xxx-6xxx.pdf
8a. 10.7.2 - ATI5000/6000Controller.kext FrameBuffers_v7.12.9 Framebuffer_List: View attachment FB-amd-5xxx-6xxx-v7.12.pdf
Note: Framebuffers Juncus and Osmunda added to ATI6000Controller.
9. AMD HD 5xxx and HD 6xxx HDMI Audio Case Studies: View attachment amd_hd_5xxx-6xxx_hdmi_audio_case_studies.pdf
10. How to find device_ids for your graphics card: View attachment graphics_card_device_ids.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. For AMD graphics cards, the ATI5000Controller binary or ATI6000Controller binary is very important. HexEdit is the tool used to edit each of the binaries.

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.

Credit: VCH888: ALC889A, Gigabyte (Intel): now having a working front mic - Page 38 - Sound - InsanelyMac Forum
Credit: bcc9: Editing custom personalities for ATI Radeon HD[45]xxx - InsanelyMac Forum

Part 3a: Lion HDMI Audio Kext Edits Table of Contents
1. AMD RADEON HD 5xxx and HD 6xxx Graphics Cards
a. Additional DSDT Edits
GraphicsEnabler=Yes
GraphicsEnabler=No
b. Kext Edits
AppleHDA.kext
ATI5000Controller.kext or ATI6000Controller.kext

1. AMD RADEON HD5xxx and HD 6xxx Graphics Cards

a. Additional DSDT edits

With GraphicsEnabler=Yes in org.chameleon.Boot.plist, no changes are required in the DSDT.

1. Jump to b. Audio Kext Edits

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 Radeon HD 5xxx or HD 6xxx graphics card.

Code:
[LEFT][COLOR=#404040][FONT=Monaco]                        Store (Package (0x0C)[/FONT][/COLOR]
[COLOR=#404040][FONT=Monaco]                            {[/FONT][/COLOR]
[COLOR=#404040][FONT=Monaco]                                "@0,name", [/FONT][/COLOR]
[COLOR=#404040][FONT=Monaco]                                Buffer (0x0D)[/FONT][/COLOR]
[COLOR=#404040][FONT=Monaco]                                {[/FONT][/COLOR]
[COLOR=#404040][FONT=Monaco]                                    "ATY,Uakari"[/FONT][/COLOR]
[COLOR=#404040][FONT=Monaco]                                }, [/FONT][/COLOR]

[COLOR=#404040][FONT=Monaco]                                "@1,name", [/FONT][/COLOR]
[COLOR=#404040][FONT=Monaco]                                Buffer (0x0D)[/FONT][/COLOR]
[COLOR=#404040][FONT=Monaco]                                {[/FONT][/COLOR]
[COLOR=#404040][FONT=Monaco]                                    "ATY,Uakari"[/FONT][/COLOR]
[COLOR=#404040][FONT=Monaco]                                }, [/FONT][/COLOR]

[COLOR=#404040][FONT=Monaco]                                "@2,name", [/FONT][/COLOR]
[COLOR=#404040][FONT=Monaco]                                Buffer (0x0D)[/FONT][/COLOR]
[COLOR=#404040][FONT=Monaco]                                {[/FONT][/COLOR]
[COLOR=#404040][FONT=Monaco]                                    "ATY,Uakari"[/FONT][/COLOR]
[COLOR=#404040][FONT=Monaco]                                }, [/FONT][/COLOR]

[COLOR=#404040][FONT=Monaco]                                "@3,name", [/FONT][/COLOR]
[COLOR=#404040][FONT=Monaco]                                Buffer (0x0D)[/FONT][/COLOR]
[COLOR=#404040][FONT=Monaco]                                {[/FONT][/COLOR]
[COLOR=#404040][FONT=Monaco]                                    "ATY,Uakari"[/FONT][/COLOR]
[COLOR=#404040][FONT=Monaco]                                }, [/FONT][/COLOR]

[COLOR=#404040][FONT=Monaco]                                "model", [/FONT][/COLOR]
[COLOR=#404040][FONT=Monaco]                                Buffer (0x13)[/FONT][/COLOR]
[COLOR=#404040][FONT=Monaco]                                {[/FONT][/COLOR]
[COLOR=#404040][FONT=Monaco]                                    "AMD Radeon HD 5870"[/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 "AMD_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, an edit is not required (i.e., HD 5770, 5870, 6850, 6870).
50 aa, 58 aa, 60 aa, 61 aa, 68 aa, 88 aa, 90 aa, or 98 aa

Example: Your HDMI Audio Device_id is: "54 aa".
HexEdit/Find: "02 10 50 aa", HexEdit/Replace: "02 10 54 aa".

1. Run IOReg - Skip to Step 3, if you have your HDMI Audio Device_id.
2. Search HDAU, note device-id.
3. Note device-id, this your HDMI Audio Device_id.
4. Edit AppleHDAController Binary;
a. HexEdit/Find: "02 10 50 aa", HexEdit/Replace: "02 10 ?? aa" 4 Times.

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

AppleHDA Binary Edit
The AMD HDMI Codec_id is always 10 02 aa 01. No edits Of AppleHDA binary for AMD graphics cards is required.

ATI5000Controller or ATI6000Controller Binary Edit
Note: Use ATI5000Controller Framebuffers for HD 5xxx graphics cards and ATI6000Controller Framebuffers for HD 6xxx graphics cards.

Example 1: Sapphire HD 6870.
a. vbios: HDMI sense_id 0x4.
b. Duckweed FrameBuffer: HDMI (00 08) 0x4.

1. In terminal, run ./radeon_bios_decode < HD6xxx.vbios.bin (example: HD6870.bin).
2. Identify HDMI sense_id (answer = 4).
3. Run IOReg.
4. Search ATY.
5. Identify Frambuffer (Duckweed).
6. Lookup Duckweed in ATI6000Controller.kext FrameBuffers_v7.4.10 Framebuffer_List .
7. Locate HDMI connector (00 08) (answer = 4).
8. HDMI sense_id = HDMI connector_id.
9. No edit necessary.

Example 2: Gigabyte HD 5770.
a. vbios: HDMI sense_id 0x5.
b. Vervet FrameBuffer:* HDMI (00 08) 0x1.

1. In terminal, run ./radeon_bios_decode < HD5XXX.vbios.bin (example: HD5770.bin).
2. Identify HDMI sense_id (answer = 5).
3. Run IOReg.
4. Search ATY.
5. Identify Frambuffer (Vervet).
6. Locate HDMI connector (00 08) (answer = 1).
7. HDMI sense_id not HDMI connector_id.
8. Edit AMD5000Controller Binary.
a. HexEdit/Find: 00 08 00 00 00 02 00 00 00 71 00 00 22 05 05 01
b. HexEdit/Replace: 00 08 00 00 00 02 00 00 00 71 00 00 22 05 05 05 2 Times - Lion/1 Time - ML

9. Install AMD5000Controller Binary in ATI5000Controller.kext.
10. Install ATI5000Controller.kext in S/L/E.
11. Run KextBeast or Kext Wizard.
12. Reboot with HDMI device connected.

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

DFI-MI-P55-T36/i7-875K/Sapphire HD 5870 Vapor X OC/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

 
Last edited by a moderator:
Joined
Aug 12, 2010
Messages
1,856
Motherboard
X58A-UD3R v2
CPU
i7-930
Graphics
Batmobile 5770
Mac
MacBook, MacBook Pro
Classic Mac
Mobile Phone
Android
Re: Draft - Part 3a: Lion HDMI Audio Kext Edits - AMD - Draft

Nice guide !

I don't understand this bit though .... maybe some more words are needed:
AppleHDAController Binary Edit
If your HDMI Audio Device_id is one the following, an edit is not required (i.e., HD 5770, 5870, 6850, 6870).
50 aa, 58 aa, 60 aa, 61 aa, 68 aa, 88 aa, 90 aa, or 98 aa

Example: Your HDMI Audio Device_id is: "54 aa"
HexEdit/Find: "02 10 50 aa", HexEdit/Replace: "02 10 54 aa"
 

Going Bald

Moderator
Joined
Aug 14, 2010
Messages
22,454
Motherboard
GA-X58A-UD7 Rev.1 BIOS F7
CPU
Intel Xeon W3670
Graphics
RX580
Mac
iMac, MacBook Pro, Mac mini
Classic Mac
iMac
Re: Draft - Part 3a: Lion HDMI Audio Kext Edits - AMD - Draft

notshy said:
Nice guide !

I don't understand this bit though .... maybe some more words are needed:
AppleHDAController Binary Edit
If your HDMI Audio Device_id is one the following, an edit is not required (i.e., HD 5770, 5870, 6850, 6870).
50 aa, 58 aa, 60 aa, 61 aa, 68 aa, 88 aa, 90 aa, or 98 aa

Example: Your HDMI Audio Device_id is: "54 aa"
HexEdit/Find: "02 10 50 aa", HexEdit/Replace: "02 10 54 aa"
Maybe a reference back to step 1a. 11-13?
11. Reboot with HDMI device plugged
12. Run IOReg, Search "HDAU"
13. Note device-id, this your HDMI Audio Device_id; save for later.
 

Stork

Admin
Staff member
Joined
Sep 21, 2010
Messages
12,626
Motherboard
ASUS ROG MAXIMUS X HERO Z370
CPU
i7-8700K
Graphics
RX 580
Mac
MacBook Pro, Mac mini, Mac Pro
Classic Mac
Power Mac, PowerBook
Mobile Phone
iOS
Re: Draft - Part 3a: Lion HDMI Audio Kext Edits - AMD - Draft

notshy said:
Nice guide !

I don't understand this bit though...
:lol: I don't understand any of it! But, that's all right. Because, like Blanche DuBois (Street Car Named Desire) said, "Whoever you are, I have always depended on the kindness of strangers." :eek:

So, I'll await the explanation that passes the "spousal test." :thumbup:
 

toleda

Moderator
Joined
May 20, 2010
Messages
24,223
Motherboard
Asus Maximus VII Impact
CPU
Core i7-4770K
Graphics
RX 560 + HD4600
Mac
iMac, MacBook Pro, Mac mini
Classic Mac
512K, LC, Power Mac
Mobile Phone
iOS
Re: Draft - Part 3a: Lion HDMI Audio Kext Edits - AMD - Draft

notshy said:
Nice guide !

I don't understand this bit though .... maybe some more words are needed:
AppleHDAController Binary Edit
If your HDMI Audio Device_id is one the following, an edit is not required (i.e., HD 5770, 5870, 6850, 6870).
50 aa, 58 aa, 60 aa, 61 aa, 68 aa, 88 aa, 90 aa, or 98 aa

Example: Your HDMI Audio Device_id is: "54 aa"
HexEdit/Find: "02 10 50 aa", HexEdit/Replace: "02 10 54 aa"
Notshy, thanks for the feedback. My intention with the example is to show the answer and then explain how to get there in more detail. Any suggestions to make it clear?
 

Going Bald

Moderator
Joined
Aug 14, 2010
Messages
22,454
Motherboard
GA-X58A-UD7 Rev.1 BIOS F7
CPU
Intel Xeon W3670
Graphics
RX580
Mac
iMac, MacBook Pro, Mac mini
Classic Mac
iMac
Re: Draft - Part 3a: Lion HDMI Audio Kext Edits - AMD - Draft

My id is 58 aa, so from above:
AppleHDAController Binary Edit
If your HDMI Audio Device_id is one the following, an edit is not required (i.e., HD 5770, 5870, 6850, 6870).
50 aa, 58 aa, 60 aa, 61 aa, 68 aa, 88 aa, 90 aa, or 98 aa
I should have no edits to do, but still no audio out in preferences
Where am I going wrong?

BTW, I can't get the ./radeon decoder to work - it keeps saying no file found. I am working on this on a fresh install, Lion over-write on 10.6.8. Should I be using the Lion complete install with the new 64-bit only kernel to be doing this?
 

Attachments

toleda

Moderator
Joined
May 20, 2010
Messages
24,223
Motherboard
Asus Maximus VII Impact
CPU
Core i7-4770K
Graphics
RX 560 + HD4600
Mac
iMac, MacBook Pro, Mac mini
Classic Mac
512K, LC, Power Mac
Mobile Phone
iOS
Re: Draft - Part 3a: Lion HDMI Audio Kext Edits - AMD - Draft

Going Bald said:
My id is 58 aa, so from above:
AppleHDAController Binary Edit
If your HDMI Audio Device_id is one the following, an edit is not required (i.e., HD 5770, 5870, 6850, 6870).
50 aa, 58 aa, 60 aa, 61 aa, 68 aa, 88 aa, 90 aa, or 98 aa
I should have no edits to do, but still no audio out in preferences
Where am I going wrong?

BTW, I can't get the ./radeon decoder to work - it keeps saying no file found. I am working on this on a fresh install, Lion over-write on 10.6.8. Should I be using the Lion complete install with the new 64-bit only kernel to be doing this?
Regarding ./radeon_bios_decode, you have a syntax problem. A space is missing after decode and before <. It is unlikely you will need to patch the Framebuffer but is good to see what is in the vbios.

On to the DSDT, GraphicsEnabler=Yes (GE=Y) is the best choice for your 5770/Vervet. Therefore, please edit your dsdt with the code from: AMD_GE=Y-DSDT_HDMI_Audio_Edit - Complete (Same as Generic). With GE=N and the edits you have in your dsdt, you will have the DVD/Geekbench issue.

With respect to Lion over 10.6.8 that is fine so long as all the ATI-----.kexts are v7.4.10. You should be on 10.7.1.

Last item, please attach a copy of you IOReg (IOReg/File/Save a Copy As...). Your screenshots confirm everything is good but I need to look at a couple of other items.
 

Going Bald

Moderator
Joined
Aug 14, 2010
Messages
22,454
Motherboard
GA-X58A-UD7 Rev.1 BIOS F7
CPU
Intel Xeon W3670
Graphics
RX580
Mac
iMac, MacBook Pro, Mac mini
Classic Mac
iMac
Re: Draft - Part 3a: Lion HDMI Audio Kext Edits - AMD - Draft

Okay, tried the bios decoder again with this syntax (pic included)
./radeon_bios_decode(space)<(space)HD5770.bin
and hit enter - still no file found. In about this mac since I installed it the gfx card identifies itself an ATI Radeon HD 5700 Series, not as a HD5770


Attached is a dump of IOREG
 

Attachments

toleda

Moderator
Joined
May 20, 2010
Messages
24,223
Motherboard
Asus Maximus VII Impact
CPU
Core i7-4770K
Graphics
RX 560 + HD4600
Mac
iMac, MacBook Pro, Mac mini
Classic Mac
512K, LC, Power Mac
Mobile Phone
iOS
Re: Draft - Part 3a: Lion HDMI Audio Kext Edits - AMD - Draft

Going Bald said:
Okay, tried the bios decoder again with this syntax (pic included)
./radeon_bios_decode(space)<(space)HD5770.bin
and hit enter - still no file found. In about this mac since I installed it the gfx card identifies itself an ATI Radeon HD 5700 Series, not as a HD5770


Attached is a dump of IOREG
Where/how did you get HD5770.bin? When you enter ls in terminal do see both files (program and bios) in the same directory? For simplicity, I use Downloads. If it still doesn't work, please attach HD5770.bin.

IOReg looks correct. What are you using for your HDMI device?

Regarding GE=Y, the key issue is Vervet and it is loading correctly. If RadeonFramebuffer loads, then GE=Y is not working. Verify DVDPlayer and Geekbench both work. My HD 6870 is reported as HD 6870 Series in System Profiler with Chameleon.
 

Going Bald

Moderator
Joined
Aug 14, 2010
Messages
22,454
Motherboard
GA-X58A-UD7 Rev.1 BIOS F7
CPU
Intel Xeon W3670
Graphics
RX580
Mac
iMac, MacBook Pro, Mac mini
Classic Mac
iMac
Re: Draft - Part 3a: Lion HDMI Audio Kext Edits - AMD - Draft

toleda said:
Where/how did you get HD5770.bin? When you enter ls in terminal do see both files (program and bios) in the same directory? For simplicity, I use Downloads. If it still doesn't work, please attach HD5770.bin.
So far as I can tell, I do not have HD5770.bin unless it is in the gfx card itself. I have never messed with extracting anything from a gfx card (the ./radeon_bios_decode < HD5770 command was supposed to extract it, yes?). The gfx card is original from the factory and I have no idea how to go about changing it. Should be some way to update it similar to updating a main board bios, yes? Here is pic of terminal ls command:
terminal - ls.pngGPU-Z-Profiler- HD5770.zip

toleda said:
IOReg looks correct. What are you using for your HDMI device?
ViewSonic VX2433WM - see Profiler pic in zip file

toleda said:
Regarding GE=Y, the key issue is Vervet and it is loading correctly. If RadeonFramebuffer loads, then GE=Y is not working. Verify DVDPlayer and Geekbench both work. My HD 6870 is reported as HD 6870 Series in System Profiler with Chameleon.
DVD player works, although watching a movie without audio seems strange. Can't test GeekBench, never bought the 64-bit version. Here is Cinebench results.Cinebench.zip
 

Attachments

Top