Jump to content
bcc9

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

168 posts in this topic

Recommended Posts

I'm still not sure I understand your writing.

I think what you mean is that we should add:

 { name => 'Realtek ALC270',
target_id => 0x10ec0270,
patch_id => 0x10ec0885 #ALC 885
},
{ name => 'Realtek ALC272',
target_id => 0x10ec0272,
patch_id => 0x10ec0885 #ALC 885
},

to patch-hda-codecs.pl

?

This:

 { name => 'Realtek ALC270',
target_id => 0x10ec0270,
patch_id => 0x11d41984      #ADI1984
},
{ name => 'Realtek ALC272',
target_id => 0x10ec0272,
patch_id => 0x11d41984      #ADI1984
},

to patch-hda-codecs.pl

:thumbsup_anim:

Share this post


Link to post
Share on other sites
Advertisement

o patch-hda-codecs.pl

:thumbsup_anim:

Got it, done.

 

 

Hi bcc9,

I have got following error while run the script on 10.7.5

In your first screen capture, it's failing because the script wrapper is mishandling the space character you typed. Fixed in version 1.0, new version in post #1.

In your second screen capture, it looks like your AppleHDA had already been patched somehow. Patching IDT 7605 under OSX 10.7 works for me.

Did you try reverting to the genuine version of AppleHDA before patching?

 

PS: You can just cut&paste text from a terminal window; no need for a screen capture.

 

Share this post


Link to post
Share on other sites

Got it, done.

 

 

In your first screen capture, it's failing because the script wrapper is mishandling the space character you typed. Fixed in version 1.0, new version in post #1.

In your second screen capture, it looks like your AppleHDA had already been patched somehow. Patching IDT 7605 under OSX 10.7 works for me.

Did you try reverting to the genuine version of AppleHDA before patching?

 

PS: You can just cut&paste text from a terminal window; no need for a screen capture.

Thanks bcc9 :thumbsup_anim:

Share this post


Link to post
Share on other sites

In your first screen capture, it's failing because the script wrapper is mishandling the space character you typed. Fixed in version 1.0, new version in post #1.

In your second screen capture, it looks like your AppleHDA had already been patched somehow. Patching IDT 7605 under OSX 10.7 works for me.

Did you try reverting to the genuine version of AppleHDA before patching?

 

PS: You can just cut&paste text from a terminal window; no need for a screen capture.

 

Thank you for answering me.

Before to do this I have reserved the kexts (which necessary).

So this time I have do this one time more.

Delete old AppleHDA install original one, restart.

Then downloaded new patch & run the patch. AppleHDA not patched !!!

 

On terminal -

 

Last login: Tue Nov 13 23:03:31 on ttys000

Palashs-iMac:~ palash$ /Users/palash/Desktop/patch-hda/patch-hda ; exit;

Codec-id or codec-name to patch (eg 111d7675 or IDT 7675)? 111d7605

OSX version 10.7.5 detected

Patching AppleHDA codec 11d4198b with 111d7605

2 codec range comparison(s) to patch

Patching range comparison 11d41983

Patching range comparison 11d41984

Unexpected codec range match count: 4 (8 expected)

Aborting with AppleHDA NOT patched

logout

 

[Process completed]

 

I thing this time nothing done wrong.

If you need additional information all included here Info dump.zip

 

 

N.B. I have DSDT injected for HDEF. But with original kext device not found, not showing on preference pane.

Share this post


Link to post
Share on other sites

hi bcc9

I have a ALC887

it does not work with the patch on ALC885 codec (0x10ec0885) but on ADI1984B (0x11d4198b)

 

 

},

{ name => 'Realtek ALC887',

target_id => 0x10ec0887,

patch_id => 0x11d4198b #ADI 1984B

Share this post


Link to post
Share on other sites

@plsh2me:

I should have looked more closely at the 10.7.5 case; you're right it wasn't working. I never installed 10.7.5 as 10.8 came out first.

Apple's release folks must have started using the new compiler on their 10.7.5 builds, and so the new matching table for 10.8 applies to 10.7.5 as well. Fixed in the script. New version 1.1 at post #1.

I've also changed the alc887 entry per mirone23.

 

Share this post


Link to post
Share on other sites

i have GIGABYTE H77N-WIFI with ALC892.

 

i applied this script patch to 10.7.5 , ALC892 is detected, but lineout is no sounds.

so, i tried the following patch, ALC892 is detected, lineout is sounds.

 

sudo perl -pi -e 's|\x84\x19\xd4\x11|\x92\x08\xec\x10|g' /System/Library/Extensions/AppleHDA.kext/Contents/MacOS/AppleHDA

Share this post


Link to post
Share on other sites

this script patches my AppleHDA "ALC269" but there is no sound and sound assertion can be found in Log file. Any suggestion what should i do ?

 

tnx all

Share this post


Link to post
Share on other sites

i have GIGABYTE H77N-WIFI with ALC892.

 

i applied this script patch to 10.7.5 , ALC892 is detected, but lineout is no sounds.

so, i tried the following patch, ALC892 is detected, lineout is sounds.

 

sudo perl -pi -e 's|\x84\x19\xd4\x11|\x92\x08\xec\x10|g' /System/Library/Extensions/AppleHDA.kext/Contents/MacOS/AppleHDA

patch the rest of the files, not rely just on the binary patch that is performed by this scrip.

same goes to the person who posted above you.

Dreamwatcher is right, even on bad engrish, using ALC885 ID for ALC892 is bad at least on Gigabyte boards that I have, everything looks OK, no sound assertions, but there is a loop b/w Internal Speaker and Headphones(keep switching b/w those) system is very low in response, and remain like that even the working ID(AD1984) is used for patching after, until cold boot...

Using AD1984 ID instead, works(after cold boot), with the lose of Encoded Digital Audio and with some sound assertions errors.

Share this post


Link to post
Share on other sites

Realtek ALC887

 

Gigabyte

 

 

11 D4 19 8B -> 10 EC 08 87

 

 

 

worked very well

:moil:

 

another option

FF 87 EC 1A 0F 8F 53 01 -> 89 08 EC 10 0F 84 8F 02

FF 87 EC 1A 0F 8F 2F 01 -> 89 08 EC 10 0F 84 53 02

Share this post


Link to post
Share on other sites

Hello!!

Can I use this script for patching for ALC268??? I tried every possible combination on the script, but no result, and every patched AppleHDA around available for ML is actually from Lion...

Thanks!!!

Share this post


Link to post
Share on other sites

Hello!!

Can I use this script for patching for ALC268??? I tried every possible combination on the script, but no result, and every patched AppleHDA around available for ML is actually from Lion...

Thanks!!!

 

For ALC268:

replace 8b19d411 -> 6802ec10

replace: 8419d411 -> 00000000

Share this post


Link to post
Share on other sites

Thanks, hope it works out that way. It can if the codec list gets further contributions.

bcc9, this is not working on my VIA VT2021 of my motherboard.

Share this post


Link to post
Share on other sites

bcc9, this is not working on my VIA VT2021 of my motherboard.

This script can patch the AppleHDA binary for the via vt2021 codec; I've tested it with a gigabyte z77mx-d3h system.  Of course you do also have to patch your Platforms.xml & layout xml as part of a complete solution.  This script makes upgrading between OSX releases easy in that you only have to copy over your xml changes and re-run the script to migrate to the latest AppleHDA.

Share this post


Link to post
Share on other sites

This script can patch the AppleHDA binary for the via vt2021 codec; I've tested it with a gigabyte z77mx-d3h system.  Of course you do also have to patch your Platforms.xml & layout xml as part of a complete solution.  This script makes upgrading between OSX releases easy in that you only have to copy over your xml changes and re-run the script to migrate to the latest AppleHDA.

I got this but I don't know how to apply on xml

 

post-230825-0-36076000-1372233144.png

 

 

could you help me patch the xml..

 

or maybe just point me how to next

 

thanks

Share this post


Link to post
Share on other sites

could you help me patch the xml..

 

or maybe just point me how to next

Writing the pathmap from scratch is time consuming and beyond the scope of this thread, I referenced a starting point in post #1. For ordinary users who do not wish to read up on the details, you can usually search and find someone who has already written the xml for your exact model of motherboard.

 

There are several existing configs posted for via vt2021 codec systems. Once someone has written the first one for a codec, the tweaks required to support different layouts for different hardware using the same codec are usually simple enough for people to make without starting from scratch. But even that's beyond the scope of this thread and I don't have time to help on that.

Share this post


Link to post
Share on other sites

What about alc 271x?

If someone has that codec working, they can contribute the change to patch-hda-codecs.pl here.

Notice that all the current ALC codecs in the patch database either use ALC 885 or ADI 1984, so those would be the obvious choices to test against.

Share this post


Link to post
Share on other sites

Here's a new version of my AppleHDA binary patching script.   This version has 3 main improvements

  • The codec config database, patch-hda-codecs.pl has been simplified, so that it should be easier for users to make additions.  There are now two tables to maintain. First there is the codec_names_to_num table which provides the simple mapping between codec names and their codec id.  Second is codecs_map which maps one's hackintosh codec name to the runtime AppleHDA codec (target codec), again referenced by name.  This second table allows for multiple choices, so for example, the hackintosh realtek alc889 can be patched to either alc 885 or adi 1984.  -c 1 lets you select choice #1 (the default), -c 2 the second choice, and so on.
  • The internal codec match lists have been updated to include 10.9 support.
  • You can now specify a codec ID that is not already in patch-hda-codecs.pl, and the script will attempt to patch your codec to use the ADI 1984 choice (the most common).  For example, the following would patch a realtek alc801 codec

    ./patch-hda.pl 0x10ec0801
    OSX version 10.8 detected
    Couldn't find a codec map to apply for '0x10ec0801'.
    Would you like to try using ADI 1984 (the default) (Y/N)? y
    Patching AppleHDA codec 11d41984 with 10ec0801
    2 codec range comparison(s) to patch
    Patching range comparison 10ec0884
    Patching range comparison 10ec0885
    AppleHDA patched successfully.
    
I could use a little feedback, and assuming everything's fine, I'll then clean up post #1 with this version.

 

Update: Moved to post #1. See new version there.

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.

×