Jump to content
Welcome to InsanelyMac Forum

Register now to gain access to all of our features. Once registered and logged in, you will be able to contribute to this site by submitting your own content or replying to existing content. You'll be able to customize your profile, receive reputation points as a reward for submitting content, while also communicating with other members via your own private inbox, plus much more! This message will be removed once you have signed in.

  • Announcements

    • Allan

      Forum Rules   04/13/2018

      Hello folks! As some things are being fixed, we'll keep you updated. Per hour the Forum Rules don't have a dedicated "Tab", so here is the place that we have our Rules back. New Users Lounge > [READ] - InsanelyMac Forum Rules - The InsanelyMac Staff Team. 
bcc9

Script to patch AppleHDA binary for osx10.7/10.8/10.9

166 posts in this topic

Recommended Posts

@PiSToLBR: Yes, your chip is even listed in the example provided by bcc9

Thanks,

 

 Didn't see that at first. Managed to patch and It worked. Thank you for this good work.

Share this post


Link to post
Share on other sites

@Johanmartin: Yes, PiSToLBR for example two posts before you. Using this script to patch the binary alone is not enough, read the first post.

You might want to take a look at the download section for a patched kext.

Share this post


Link to post
Share on other sites

Here's a new version of patch-hda.pl, version 3.0. This version attempts to auto-detect your system's codec and offers that as a default. Also, you can run the script interactively with a bit more help than the wrapper script had before. For example:

% ./patch-hda.pl
OSX version 10.9 detected
Default target codec: 10ec0892 detected.
Enter codec-id or codec-name for AppleHDA patch.  Eg. 111d7675 or IDT 7675
Press enter for default, or ? for help (Default: 10ec0892)
? <enter>
There are 2 choices for target codec
Choose codec number to patch to (1 thru 2) (default 1)
Choice 1: ALC 885
Choice 2: ADI 1984B
? 2
Patching AppleHDA codec 11d4198b with 10ec0892
1 codec range comparison(s) to patch
Patching range comparison 11d41984
This script requires superuser access to update AppleHDA
Password:
/System/Library/Extensions/AppleHDA.kext/Contents/MacOS/AppleHDA patched successfully.
%
The new command line argument -y allows you to pick up the auto-detected codec without running the script interactively. So the non-interactive equivalent of the above:

sudo ./patch-hda.pl -y -c 2
I think this auto-detection is pretty handy even for more experienced users; (I find it difficult to remember which of one's machines is running which codec when re-applying the AppleHDA binary patch).

 

Technical details: This script grabs the codec out of the ioregistry, which should work assuming AppleHDA is able to start at all. With a little more effort, I could probe the system's PCI devices to get the codec if the ioregistry approach is not sufficient.

 

Edit: script moved to post #1

Share this post


Link to post
Share on other sites
Great Work bcc9,

I think you perfected our conversation and

did efficiently though without a GUI.

I can help in any way with the PCI's device's?

All the best!!

Share this post


Link to post
Share on other sites

Here's a new version of patch-hda.pl, version 3.0. attachicon.gifpatch-hda.3.0.zip This version attempts to auto-detect your system's codec and offers that as a default. Also, you can run the script interactively with a bit more help than the wrapper script had before. For example:

% ./patch-hda.pl
OSX version 10.9 detected
Default target codec: 10ec0892 detected.
Enter codec-id or codec-name for AppleHDA patch.  Eg. 111d7675 or IDT 7675
Press enter for default, or ? for help (Default: 10ec0892)
? <enter>
There are 2 choices for target codec
Choose codec number to patch to (1 thru 2) (default 1)
Choice 1: ALC 885
Choice 2: ADI 1984B
? 2
Patching AppleHDA codec 11d4198b with 10ec0892
1 codec range comparison(s) to patch
Patching range comparison 11d41984
This script requires superuser access to update AppleHDA
Password:
/System/Library/Extensions/AppleHDA.kext/Contents/MacOS/AppleHDA patched successfully.
%
The new command line argument -y allows you to pick up the auto-detected codec without running the script interactively. So the non-interactive equivalent of the above:

sudo ./patch-hda.pl -y -c 2
I think this auto-detection is pretty handy even for more experienced users; (I find it difficult to remember which of one's machines is running which codec when re-applying the AppleHDA binary patch).

 

Technical details: This script grabs the codec out of the ioregistry, which should work assuming AppleHDA is able to start at all. With a little more effort, I could probe the system's PCI devices to get the codec if the ioregistry approach is not sufficient.

 

Can you add a param to allow custom location of AppleHDA.kext?

Share this post


Link to post
Share on other sites

Great Work bcc9,

I think you perfected our conversation and

did efficiently though without a GUI.

I can help in any way with the PCI's device's?

All the best!!

Thanks. I should have mentioned that your private PMs helped to push me to make this latest version a bit more user friendly.

Sure, you could hack up a kext that dumps out the information (similar to the lspci port). Then I can just invoke the kext and parse the result from this script.

Can you add a param to allow custom location of AppleHDA.kext?

The functionality is already in there, I just hadn't documented all the command line switches:

-s <directory> to specify an alternative to /System/Library/Extensions

-r <volume root> to specify an alternate disk volume to use as the root for everything (particularly useful when you have multiple installs of OSX and you want to patch OSX on one of those other volumes.

 

Also, for both of the above the script determines the OS release based upon the AppleHDA kext version. If for some reason the script gets this wrong, there's also

-o <os version number> to override the auto-detected OS version (10.7/10.8/10.9)

And lastly,

-t to run the script in test-only mode, where AppleHDA is not actually patched.

Share this post


Link to post
Share on other sites

Hy there

 

I already have some help from olarila forum, however without sucess, i try dsdt and patched applehda but don't know why the applehda doens't load, only hdacontroller... the finally result is that i never get the sound work

 

I have 10.9 chipset 80821H with audio coded AD1988 (not B) anyone can help me?

 

Thanks

Share this post


Link to post
Share on other sites

I already have some help from olarila forum, however without sucess, i try dsdt and patched applehda but don't know why the applehda doens't load, only hdacontroller... the finally result is that i never get the sound work

 

I have 10.9 chipset 80821H with audio coded AD1988 (not B) anyone can help me?

I haven't heard of 80821H before. I'd first search to see if anyone has already built a pinconfig/pathmap for such an audio chip (seems like maybe that's just an HP part number not an audio chip/codec)?

Else follow the thread I linked to in post #1 in the "What this thread is not" section.

Share this post


Link to post
Share on other sites

The codec is actually Analog Devices AD1988B as stated in the post. As far as I remember the device ID 11D4:198B is already in the binary (little endian 8B19d411 as usual) so you don't even need to use the script from this thread for that particular codec. Should be fairly easy to get a semi working pathmap and pinconfig data for it and further fine tune it.

Share this post


Link to post
Share on other sites

@BCC9 the 80821h is the intelchipset 8r from the board, the audio codec is AD1988 (not AD 1998B @TimeWalker75a) and that is my main problem, i only find patch versions for AD1998B and that versions don't work with mine :(

 

This is my board, http://www.asus.com/Motherboards/P5BPlus_Vista_Edition/#specifications and no i don't believe it is easy to get it to work... mirone already try help me and we can't put put it to work..

Share this post


Link to post
Share on other sites

You need to be more careful with your reading, I never mentioned 1998B. Your codec is a legacy AD1988A (that's revision A) then and nobody has ever made it work with AppleHDA due to reasons unknown. Back in the day only line-out was possible through use of Azalia. Your best bet right now would be Voodoo, but that's way off topic here.

Share this post


Link to post
Share on other sites

The codec is actually Analog Devices AD1988B as stated in the post. As far as I remember the device ID 11D4:198B is already in the binary (little endian 8B19d411 as usual) so you don't even need to use the script from this thread for that particular codec. Should be fairly easy to get a semi working pathmap and pinconfig data for it and further fine tune it.

I see a B there :P and i type the wrong number :P

Anyway thanks for your help, i'm try both of them (at a time of course...) but can't put it work with anyone of them..

Share this post


Link to post
Share on other sites
I even tried

Fix AppleHDA for your ADI1988 codec.

unsuccessfully, the pathmaps / pinconfigs are etamentes

such as ADI1988B itself but still does not work.

in your DSDT had no device HDEF and added myself to it.

there is something strange'm still analyzing.

Share this post


Link to post
Share on other sites

Please make Your works public.

Here are others too which have  

 

  "ADI® AD1988B 8 -Channel High-Definition Audio CODEC"

 

T  -.-

Share this post


Link to post
Share on other sites

Can I use this for Realtek ALC275 and the HDMI audio out for my Laptop? Thanks.

 

I also have RealTek ALC275

 

To date I've been using an old Snow Leopard AppleHDA patched for ALC275 which does work under ML & Mavericks but would love to get a native 10.9.0 AppleHDA working, has anybody had any success using this tool for ALC275 ?

 

Cheers

Jay 

Share this post


Link to post
Share on other sites

I also have RealTek ALC275

 

To date I've been using an old Snow Leopard AppleHDA patched for ALC275 which does work under ML & Mavericks but would love to get a native 10.9.0 AppleHDA working, has anybody had any success using this tool for ALC275 ?

 

Cheers

Jay

Show me the patch you used for 10.7 for alc275 and we can add it to patch-hda-codecs.pl. Probably it works with the default choice of adi1984, and you can just test that for us and report back.

You do of course need to migrate your layout/pathmap to the new format. That should be straightforward if you really have a working AppleHDA config already. But this thread isn't for layout/pathmap discussion, there are plenty of existing threads for that.

Share this post


Link to post
Share on other sites

Show me the patch you used for 10.7 for alc275 and we can add it to patch-hda-codecs.pl. Probably it works with the default choice of adi1984, and you can just test that for us and report back.

You do of course need to migrate your layout/pathmap to the new format. That should be straightforward if you really have a working AppleHDA config already. But this thread isn't for layout/pathmap discussion, there are plenty of existing threads for that.

 

@Bc9,

 

That would be great and i'll be happy to test and report back for you. The attached archive has my latest codec dump from Linux as well as my old but working SL solution and my current DSDT. I'm still having a hard time getting my head around the layout/pathmap edits, can you recommend a good guide ?. I've tried many times to copy the layout/pathmap from the old (working) SL solution but none of the guides really show how to convert it, as the verb info seems to be in a totally different format ?.

 

It would be great to get to the stage where i have the tools and edits in order to patch a new AppleHDA as and when they come out, even more so now that Mavericks is here which is the target platform for me at the moment.

 

I'm pretty confident in most area's of working on HackingTosh such as DSDT editing/patching and kext/plist edits ..etc. However,  ApplHDA just seems to continually confound me, there are many guides but the ones i've used so far don't go into quite enough detail for me to understand the whole process, I think this is partly to do with the fact that ALC275 is not so common. I think its really great that your creating a tool that helps to automate the binary patching side of things.

 

Cheers

Jay

Sony-SE_ALC275.zip

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now


  • Recently Browsing   0 members

    No registered users viewing this page.



×