Okay. I've been getting a lot of requests from people who wants to convert their Leopard AppleHDA.kext into Snow Leopard.
This guide assumes you have fully working kext or at least one which works well enough for your needs.
Edit: This guide also assumes you have injected your audio by DSDT. Check out snow's guide
If you can't find any AZAL or HDEF in your dsdt, just insert it manually like
this.
Things you need:
1.
Vanilla SL AppleHDA.kext
2.
Working AppleHDA.kext (make sure it works in leopard!)
3.
PlistEdit Pro
4.
HexEdit
1) First off, these are the codecs known to be supported natively without any binary patching required.
Code:
Name Codec ID (dec) Codec ID (hex)
AD1984 299112836 0x11D41984
AD1988 299112843 0x11D4198B
STAC9220 -2088470912 0x83847680
ALC262 283902562 0x10ec0262
ALC885 283904133 0x10ec0885
If your codec id matches one of these you can skip this step.
Else, look into your vanilla SL AppleHDA.kext (Right click -> Show Package Contents) and browse to:
Code:
(SL)AppleHDA.kext/Contents/MacOS/
Open up the
AppleHDA binary with HexEdit. You are going to replace one of the codec ids above with your own.
In this example I'm going to replace the codec 0x10ec0885 (ALC885) with 0x10ec0888 (ALC888).
So hit Command+F and search for
8508ec10 (byte-flip of
10ec0885) and replace with
8808ec10 (byte-flip of
10ec0888).
Then just hit "Replace All". There will be 4 instances just to double check. Once you're done, Save and Exit.
2) Next, the plists. You will have to edit two of them in your SL kext.
Firstly you need to edit:
Code:
(SL)AppleHDA.kext/Contents/PlugIns/AppleHDAHardwareConfigDriver.kext/Contents/Info.plist
Open it up with your plist editor, go to:
Code:
IOKitPersonalities/HDA Hardware Config Resource/HDAConfigDefault/
and delete everything under it.
Now, depending on which version your working applehda is, open either one of these:
Code:
(Leo)AppleHDA.kext/Contents/PlugIns/AppleHDAController.kext/Contents/Info.plist
(Leo)AppleHDA.kext/Contents/PlugIns/AppleHDAHardwareConfigDriver.kext/Contents/Info.plist
Then browse through until you see something like this:
ConfigData.jpg
Right click on the key (number
0 in the picture above) containing your
CodecID and copy.
Also, take note of the
LayoutID you're using. It should be 12.
Now go back to your SL plist above, click on
HDAConfigDefault and paste as child. Save and exit.
3) Next, you need to edit:
Code:
(SL)AppleHDA.kext/Contents/PlugIns/AppleHDAPlatformDriver.kext/Contents/Info.plist
Go to:
Code:
IOKitPersonalities/HDA Platform Resource/
and delete everything under
Layouts and
PathMaps
Again, depending on which version your working applehda is, open either one of these:
Code:
(Leo)AppleHDA.kext/Contents/Info.plist
(Leo)AppleHDA.kext/Contents/PlugIns/AppleHDAPlatformDriver.kext/Contents/Info.plist
Then browse through until you see something like this:
layout.jpg
Right click on the key under
Layouts (the number
0 in the picture) which contains your
LayoutID (12) and copy.
Take note of the
PathMapID being used. In this case it's
9.
Also make sure
CodecID is correct.
Now go back to your SL plist above, click on
Layouts and paste as child.
Back to the Leo plist, browse through until you see something like this:
pathmap.jpg
Right click on the key under
PathMaps (number
0) which has your
PathMapID (9 in this case). Copy.
Go back to your SL plist, click on
PathMaps and paste as child.