InfiniteMac OSx86  


Reply
 
Thread tools Display modes
  #1  
Old 09-08-2009, 03:15 AM
mormegil mormegil is offline
Panther
 
Join Date: Aug 2009
Posts: 148
[GUIDE] How to port AppleHDA to SL

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.

Core2Quad / MSI P45 Neo2-FR / HD4870 / Snow Leopard

Last edited by mormegil; 09-18-2009 at 03:48 AM.
Reply With Quote
  #2  
Old 09-08-2009, 03:58 AM
infinitek's Avatar
infinitek infinitek is offline
Puma
 
Join Date: Jul 2008
Posts: 20
Thanx for the info.....can u post your alc888 patched applehda...?????

Gigabyte GA-EP35-DS3L
E8400 Intel C2D
XFX 9800GT 512mb
Audio Realtek ALC888
Lan Realtek 8111
Reply With Quote
  #3  
Old 09-08-2009, 04:09 AM
mormegil mormegil is offline
Panther
 
Join Date: Aug 2009
Posts: 148
This plist works best. I'm not going to upload patched applehda from now on.

Core2Quad / MSI P45 Neo2-FR / HD4870 / Snow Leopard
Reply With Quote
  #4  
Old 09-08-2009, 06:36 AM
Snow's Avatar
Snow Snow is offline
Tiger
 
Join Date: Jan 2008
Posts: 263
Great and thorough guide bro, good job!

Snow Leopard 10.6.7  Gigabyte GA-P35-DS3P  Intel Q6600 @ 3Ghz  Corsair CM2X2048-6400DHX  Gigabyte HD5770 Silent Cell  Samsung SyncMaster 2494SW  ALC889a  Creative T5400 5.1  Maxtor 380215AS  Pioneer DVR-215D  Presonus Inspire 1394  KRK Rokit 5  Wacom Bamboo One 
 SL USB Guide => http://www.infinitemac.com/f57/guide...k-drive-t3705/ 
Reply With Quote
  #5  
Old 09-08-2009, 06:41 AM
xxxslayeriiixxx xxxslayeriiixxx is offline
Jaguar
 
Join Date: Aug 2009
Location: USA, CA
Posts: 82
i hope this will work for me. thx for the post


Code:
BIOS:E758_SZ2Z Motherboard:EVGA x58 132-BL-E758-A1 CPU:Intel Core i7 920 @ 4.0 GHz OS:Snow Leopard 10J567:x64 Vanilla Memory:24 GB G.skill DDR3 1333 MHz HDD:10 x 1TB Western Digital Caviar Black Graphics Card:EVGA Geforce GTX480 1536 mb Monitor:Dell Ultrasharp 2408WFP Rev. A02 Audio: Onboard

Reply With Quote
  #6  
Old 09-09-2009, 12:17 PM
Pietruszka Pietruszka is offline
Cheetah
 
Join Date: Feb 2008
Posts: 6
Hi

what if I've got more (not only 0) numbers in my old appleHDA.kext...I've got form 0...to 23...

which one need to copy ???

thanks for help
Reply With Quote
  #7  
Old 09-09-2009, 12:45 PM
mormegil mormegil is offline
Panther
 
Join Date: Aug 2009
Posts: 148
In step no. 2, search for your codec id (decimal) under the key CodecID. Once you've found it, take not the LayoutID it's using. If it's not 12, change it.

Search again, just to make sure it appears only once. You can safely remove the other layouts and keep your plist clean.

Core2Quad / MSI P45 Neo2-FR / HD4870 / Snow Leopard
Reply With Quote
  #8  
Old 09-09-2009, 12:53 PM
Pietruszka Pietruszka is offline
Cheetah
 
Join Date: Feb 2008
Posts: 6
thanks

copied all pathmaps and layouts but didn't work..... I'll try yous suggestions...

thanks for help

p.s. if doesn't work can I post working applehda form leo and the new one from 10.6???
Reply With Quote
  #9  
Old 09-10-2009, 03:23 AM
mormegil mormegil is offline
Panther
 
Join Date: Aug 2009
Posts: 148
Quote:
Originally Posted by Pietruszka View Post
thanks

copied all pathmaps and layouts but didn't work..... I'll try yous suggestions...

thanks for help

p.s. if doesn't work can I post working applehda form leo and the new one from 10.6???
have you patched dsdt?

Core2Quad / MSI P45 Neo2-FR / HD4870 / Snow Leopard
Reply With Quote
  #10  
Old 09-10-2009, 09:07 AM
Pietruszka Pietruszka is offline
Cheetah
 
Join Date: Feb 2008
Posts: 6
yes I've patched DSDT

still doesn't work for me...maybe I do something wrong.....

anyway thanks for help



💡 Deploy cloud instances seamlessly on DigitalOcean. Free credits ($100) for InfMac readers.

Reply With Quote
Reply