Jump to content

Mixed VoodooHDA/AppleHDA onboard/ATI HDMI audio.


Lord Kamina

Recommended Posts

DISCLAIMER:I have made this guide for people using ATI/AMD GPUs because that is what I have, because as-far-as-I-know AMD uses only one audio codec and because it's what I've tried and know, works. Still, the principle should be just as valid for NVIDIA or even Intel HD cards.

 

 

My Build:


  • [*:27ud9cd4]Motherboard: Asus P5G41T-M LX PLUS
    [*:27ud9cd4]CPU: Intel E7400, overclocked @ 3.37GHz
    [*:27ud9cd4]Memory: 4GB Ram DDR3 1333
    [*:27ud9cd4]Ethernet: Realtek RTL8169
    [*:27ud9cd4]Audio Codec: ALC887-VD
    [*:27ud9cd4]Graphics: XFX Radeon HD 5570 1GB DDR3
    [*:27ud9cd4]OS: Mountain Lion 10.8.2

 

I bought this Asus board a couple months ago and mostly it works very well. Now, when I bought it I looked at the audio codec but I didn't search for actual user experiences getting it to work (my mistake) and to my surprise, upon getting home I quickly realized that AppleHDA and my board just weren't the best of buddies.

 

Flash-forward a couple of weeks and I'm resigned to using VoodooHDA. Now, VoodooHDA doesn't make friends with my HDMI audio so I have to choose between AppleHDA and HDMI or Voodoo and on-board and frankly, that sucks.

 

The solution? Use both at the same time!

 

Now, usually this will result in a kernel panic. Why? Because by default both these kexts try to match devices by their PCI-Class and logically end-up trying to take control of the same devices and that's not good.

 

But, with a few minor edits it's possible to have them both coexist peacefully.

 

Normally, AppleHDA(AppleHDA.kext/Contents/Plugins/AppleHDAController/Contents/Info.plist) will have these lines near the bottom:

 

IOClass
AppleHDAController
IOPCIClassMatch
0x04020000&0xFFFE0000
IOProviderClass
IOPCIDevice

 

And VoodooHDA.kext/Contents/Info.plist will have these:

 

IOClass
VoodooHDADevice
IOPCIClassMatch
0x04020000&0xFFFE0000
IOProviderClass
IOPCIDevice

 

See the similarity?

 

Now, if instead you change them to the following (note, the actual values might and probably will change depending on your actual on-board codec and GPU)

 

IOClass

AppleHDAController

IOPCIPrimaryMatch/key>

0xaa601002 (0x1002:aa60 is the PCI Vendor ID for my Radeon's HDMI device, you can check these by using "System Info.app")

IOProviderClass

IOPCIDevice

 

And

 

IOClass

VoodooHDADevice

IOPCIPrimaryMatch

0x27d88086 (0x8086:27d8 is the PCI Vendor ID for my on-board ALC887 device, you can check these by using "System Info.app")

IOProviderClass

IOPCIDevice

 

Now Voodoo will know to try and match only your on-board audio and AppleHDA will know to try and match only your GPU's audio.

 

Clearly, you're not yet quite done. For this to work, you will need more-or-less the same DSDT edits you would use to enable HDMI audio normally (and if you're using an AMD card like me, you need to be sure your Framebuffer is correct, which I won't go into now)

 

The only departure from the tried-and-true DSDT edit for AMD cards is the following (I'm not entirely sure it is needed but I did it this way and it worked)

 

You must add the layout-id that normally goes in the HDEF section to the HDAU section, like this:

 

Device (HDAU)

{

Name (_ADR, One)

Method (_DSM, 4, NotSerialized)

{

Store (Package (0×04)

{

“hda-gfxâ€,

Buffer (0x0A)

{

“onboard-1″

},

"layout-id",

Buffer (0x04)

{

0x01, 0x00, 0x00, 0x00

}

}, Local0)

DTGP (Arg0, Arg1, Arg2, Arg3, RefOf (Local0))

Return (Local0)

}

}

 

Once all that is done, you need to edit AppleHDA proper:

 

Since Mountain Lion supports ATI HDMI audio OOB, you only need to change the layout/pathmap to suit your card. You will find numerous tutorials explaining in details how to do that. For now, what I did was use layout id: 1 and defined it thus:

 

<?xml version="1.0" encoding="UTF-8"?>

LayoutID

1

PathMapRef

CodecID

268610049 (My Radeon's codec ID in decimal, should be the same for all ATI/AMD cards)

HDMI

Outputs

HDMI

PathMapID

268610049 (Following Apple's example on a layout that included an Nvidia HDMI audio, I used the Device ID as the PathMapID, the actual number is mostly irrelevant as long as it matches Platforms.xml though)

 

And then in Platforms.xml, I did this:

 

PathMaps

PathMap

NodeID

3

NodeID

2

PathMapID

268610049 See? Same ID

 

The Node IDs I just get from a codec dump of my HDMI card done in Linux.

 

After all this was done, I deleted all other layouts and Pathmaps (left the DSP section alone, though) and compressed those XMLs again using zlib.pl, just ran MyFix, rebooted and all was working as expected.

 


  • [*:27ud9cd4]System Info:
http://olarila.com/forum/viewtopic.php?f=6&t=63
[*:27ud9cd4]How to modify your DSDT to add your ATI/AMD GPU: http://rampagedev.wordpress.com/2012/07 ... dsdt-36-2/
[*:27ud9cd4]zlib.pl: http://www.olarila.com/forum/viewtopic.php?f=27&t=1702

 

I am attaching both my own modified AppleHDA (done as per the instructions here, the binary itself is intact, I just messed with the Info.plists, pathmaps and whatnot) and my IORegistry so you can have fun with it:

AppleHDA_HDMI.kext.zip

Tiamat_Voodoo_AppleHDA.ioreg.zip

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • Create New...