Jump to content

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

AppleHDA binary patch

  • Please log in to reply
143 replies to this topic

#21
Mirone

Mirone

    InsanelyMac Deity

  • Local Moderators
  • 1,842 posts
  • Gender:Male
  • Location:Brazil

Exactly. Presumably the changes are a few added lines to patch-hda-codecs.pl, and you can either just post the lines you added or the whole new version, and I'll add them to the .zip.
Seems like a default wildcard for realtek codecs: 10ec:* => alc885 might be in order.

In the case of ALC272, 270 I applied the patch in ADI1984 ie the same thing that your script makes for ALC269 on lion replaces 8419d11 to 6902ec10 and zeroed the ALC884 ie 8408ec10 to 00000000 and it worked like a charm. in Mountain lion and Lion.

#22
bcc9

bcc9

    InsanelyMac Legend

  • Coders
  • 1,278 posts
  • Gender:Male

In the case of ALC272, 270 I applied the patch in ADI1984 ie the same thing that your script makes for ALC269 on lion replaces 8419d11 to 6902ec10 and zeroed the ALC884 ie 8408ec10 to 00000000 and it worked like a charm. in Mountain lion and Lion.

Not clear *exactly* what changes you're proposing for patch-hda-codecs.pl. You mention alc272 & alc270 which I should think would be 10ec0272 & 10ec0270 but you only list one target hex value that doesn't match either of those.
Again, if you want to post the lines you added to the script or the whole new version, I can add them to the copy in post #1.


#23
Mirone

Mirone

    InsanelyMac Deity

  • Local Moderators
  • 1,842 posts
  • Gender:Male
  • Location:Brazil

Not clear *exactly* what changes you're proposing for patch-hda-codecs.pl. You mention alc272 & alc270 which I should think would be 10ec0272 & 10ec0270 but you only list one target hex value that doesn't match either of those.
Again, if you want to post the lines you added to the script or the whole new version, I can add them to the copy in post #1.



bcc9 hi, well I did this in two ways:
1-I ran your script to correct ALC269 (0x10ec0269) then after replacing the line already corrected for 6902ec10 to 7002ec10 (ALC270) it worked for ALC272.
both codecs worked well.
2-I just changed the line ADI1984 (0x11d41984) for ALC270, ALC269 and zeroed checking 84 08 ec 10 worked very well.

#24
plsh2me

plsh2me

    InsanelyMac Geek

  • Members
  • PipPipPipPip
  • 179 posts
  • Gender:Male
  • Location:Bangladesh
Hi bcc9,
I have got following error while run the script on 10.7.5
Attached File  IDT 7605.png   109.54KB   204 downloads
Attached File  111d7605.png   46.54KB   188 downloads

Thank you

#25
bcc9

bcc9

    InsanelyMac Legend

  • Coders
  • 1,278 posts
  • Gender:Male

bcc9 hi, well I did this in two ways:
1-I ran your script to correct ALC269 (0x10ec0269) then after replacing the line already corrected for 6902ec10 to 7002ec10 (ALC270) it worked for ALC272.
both codecs worked well.
2-I just changed the line ADI1984 (0x11d41984) for ALC270, ALC269 and zeroed checking 84 08 ec 10 worked very well.

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 => 0x11d41984        #ADI 1984
    },
    { name => 'Realtek ALC272',
      target_id => 0x10ec0272,
      patch_id => 0x11d41984        #ADI 1984
    },
to patch-hda-codecs.pl
?


#26
Mirone

Mirone

    InsanelyMac Deity

  • Local Moderators
  • 1,842 posts
  • Gender:Male
  • Location:Brazil

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:

#27
bcc9

bcc9

    InsanelyMac Legend

  • Coders
  • 1,278 posts
  • Gender:Male

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.


#28
Mirone

Mirone

    InsanelyMac Deity

  • Local Moderators
  • 1,842 posts
  • Gender:Male
  • Location:Brazil

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:

#29
plsh2me

plsh2me

    InsanelyMac Geek

  • Members
  • PipPipPipPip
  • 179 posts
  • Gender:Male
  • Location:Bangladesh

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 Attached File  Info dump.zip   29.32KB   17 downloads


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

#30
Mirone

Mirone

    InsanelyMac Deity

  • Local Moderators
  • 1,842 posts
  • Gender:Male
  • Location:Brazil
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

#31
bcc9

bcc9

    InsanelyMac Legend

  • Coders
  • 1,278 posts
  • Gender:Male
@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.


#32
Dreamwatcher

Dreamwatcher

    InsanelyMac Protégé

  • Members
  • PipPip
  • 61 posts
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


#33
pcnewpinky

pcnewpinky

    InsanelyMac Protégé

  • Members
  • Pip
  • 16 posts
  • Gender:Male
  • Location:Hackintosh
  • Interests:OS X

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



#34
TimeWalker75a

TimeWalker75a

    InsanelyMac Legend

  • Gurus
  • 1,115 posts
  • Gender:Male
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.

#35
THe KiNG

THe KiNG

    InsanelyMac Legend

  • Retired Developers
  • 755 posts
  • Gender:Male

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.

#36
XITE666

XITE666

    InsanelyMac Protégé

  • Members
  • Pip
  • 45 posts
  • Location:RUSSIA

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


#37
jl4c

jl4c

    InsanelyMac Geek

  • Members
  • PipPipPipPip
  • 185 posts
  • Gender:Male
  • Location:Chile
Hi all,
The ALC262 codec need to be patched to work?
Gracias

#38
Mirone

Mirone

    InsanelyMac Deity

  • Local Moderators
  • 1,842 posts
  • Gender:Male
  • Location:Brazil
hi bcc9
add another codec to the script
ALC898

This:

{ name => 'Realtek ALC898',
target_id => 0x10ec0899,
patch_id => 0x11d41984 #ADI1984
},

#39
Mirone

Mirone

    InsanelyMac Deity

  • Local Moderators
  • 1,842 posts
  • Gender:Male
  • Location:Brazil
Updated the script
added 2 new codec ALC262, ALC898, I hope you do not mind bcc9.

http://cl.ly/3e1W2F091g2S


#40
Eloi Bermejo

Eloi Bermejo

    InsanelyMac Protégé

  • Members
  • Pip
  • 5 posts
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!!!





0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users

© 2014 InsanelyMac  |   News  |   Forum  |   Downloads  |   OSx86 Wiki  |   Mac Netbook  |   PHP hosting by CatN  |   Designed by Ed Gain  |   Logo by irfan  |   Privacy Policy