Jump to content

AppleHDA Patching in 10.9 Mavericks

applehda binary patch

  • Please log in to reply
148 replies to this topic

#1
nyolc8

nyolc8

    InsanelyMac Legend

  • Members
  • PipPipPipPipPipPipPip
  • 802 posts
  • Gender:Male
  • Location:Budapest, Hungary

Hi all,

I started this topic to get some infos and things about applehda binary patching in Mavericks.

 

 

I got this for my alc662 in 10.8:

//codec patch:
sudo perl -pi -e 's|\xff\x87\xec\x1a\x0f\x8f\x53\x01\x00\x00|\x62\x06\xec\x10\x0f\x84\x18\x01\x00\x00|g' AppleHDA

//widget patch:
sudo perl -pi -e 's|\xff\x87\xec\x1a\x0f\x8f\x2f\x01\x00\x00|\x62\x06\xec\x10\x0f\x84\xf4\x00\x00\x00|g' AppleHDA

So far I only see that in 10.9 applehda, they somehow split the "ff87ec1a"(device to replace) from the "0f8f53010000"(I don't know what is this, could someone tell me?) and the "0f8f53010000" is not exist, just some similar things found.



#2
joshhh

joshhh

    InsanelyMac Geek

  • Members
  • PipPipPipPip
  • 210 posts
  • Gender:Male
  • Location:Russia, Israel

Replace AD1984 to ALC662, and ALC884 to zero

 

8419d411 > 6206ec10
8408ec10 > 00000000
 



#3
nyolc8

nyolc8

    InsanelyMac Legend

  • Members
  • PipPipPipPipPipPipPip
  • 802 posts
  • Gender:Male
  • Location:Budapest, Hungary

Thank you, I'll try it in a moment... :)

 

Could you tell me what does this "zeroing" does? It forces applehda to skip the alc884 or something like this?

 

edit: it worked! I got sound with 2.4.9 applehda :D But I'm getting these in every minute:

2013.06.14. 14:22:18,000 kernel[0]: Sound assertion in AppleHDAWidget at line 2167
2013.06.14. 14:22:18,000 kernel[0]: Sound assertion in AppleHDAWidget at line 2167
2013.06.14. 14:22:18,000 kernel[0]: Sound assertion in AppleHDAWidget at line 2167

Any idea how to get rid of them? Before, this was fixed by bin patch (the "0f8f53010000" section in the bin patch)...

So what else should I patch/replace to get rid of these sound assertions?

 

edit:

what happens if I patch the ff87ec1a like before and zeroing alc884? Why I need to patch ad1984 exactly? I patched another(ff87ec1a) device before... And I still don't getting why I need to zeroing out alc884... There is alc885 too, why that can stay there and why alc884 not? Could you tell me these things somehow? I just want to understand it...



#4
nyolc8

nyolc8

    InsanelyMac Legend

  • Members
  • PipPipPipPipPipPipPip
  • 802 posts
  • Gender:Male
  • Location:Budapest, Hungary

I'm trying to understand how this thing works, so I tried to seperate things in the binary. The following code is the codec section in the binary, it's continous, I just seperated it to get a formated view of it. I recognize the codecs and some codec have "0F ...." thing, but some codec got these "77 5F" and such. So... the "77 5F" things are basically tells to use the "0F ...." from above it? Or am I completly wrong?  :lol:

		0F 84 C4 00 00 00 	8B 07 
3D 7F 76 84 83 	77 5F 
3D 04 28 86 80 	77 6F 
3D FF 87 EC 1A 	77 7F 
3D 74 19 AD 15 	0F 87 C1 00 00 00
3D 05 42 13 10 	0F 87 C6 00 00 00 
3D 01 AA 02 10 	0F 85 F2 01 00 00 	8B 47 08 
3D AF AA 00 00 	0F 87 04 01 00 00 
3D 37 AA 00 00 	0F 87 62 01 00 00 
3D 30 AA 00 00 	0F 85 A4 02 00 00 	48 8D 05 9C A8 03 00 E9 E4 01 00 00 
3D 80 76 84 83 	0F 85 B7 01 00 00 	48 8D 05 85 4A 03 00 E9 CD 01 00 00 	8D 88 FB D7 79 7F 83 F9 02 73 23 
					48 8D 05 6E 0C 04 00 E9 B6 01 00 00 
3D 00 88 EC 1A 	0F 85 89 01 00 00 	48 8D 05 B7 94 03 00 E9 9F 01 00 00 
3D 07 28 86 80 	0F 85 72 01 00 00 	48 8D 05 90 3F 04 00 E9 88 01 00 00 
					48 8D 
3D 39 53 02 00 				48 8D 35 C2 6D 02 00 BA 33 00 00 00 	30 C0 E8 00 00 00 00 E9 1D 02 00 00 
3D 75 19 AD 15 	0F 85 3C 01 00 00 	E9 FF 00 00 00 
3D 06 00 DE 10 	77 13 
3D 06 42 13 10 	75 59 			48 8D 05 E7 8E 03 00 E9 3F 01 00 00 
3D 61 02 EC 10 	77 5D 
3D 3F 00 DE 10 	0F 87 AF 00 00 00 	8D 88 F9 FF 21 EF 83 F9 15 
		0F 87 FC 00 00 00 	48 8D 15 EE 01 00 00 48 63 0C 8A 48 01 D1 FF E1 
					48 8D 05 2A 11 04 00 E9 02 01 00 00 
3D B0 AA 00 00 	0F 84 83 01 00 00 	E9 A6 01 00 00 
3D 08 42 13 10 	0F 85 C5 00 00 00 	48 8D 05 93 8E 02 00 E9 DB 00 00 00 
3D 84 08 EC 10 	77 63 
3D 62 02 EC 10 	0F 85 A7 00 00 00 	8A 4F 04 B8 08 00 00 00 D3 E8 
		0F B6 C0 83 F8 02 
		0F 87 67 01 00 00 	BF F0 00 00 00 E8 00 00 00 00 48 89 C3 48 89 DF E8 F3 3F 00 00 E9 A8 00 00 00 
3D 3F AA 00 00 	77 41 
3D 38 AA 00 00 	0F 85 3B 01 00 00 	48 8D 05 13 E4 03 00 EB 7E 	8D 88 C0 FF 21 EF 83 F9 05 73 51 EB 61 
3D 85 08 EC 10 	74 10
3D 84 19 D4 11 	75 31 			48 8D 05 5F 61 03 00 EB 5A 
					48 8D 05 66 41 03 00 EB 51 
3D 4F AA 00 00 	0F 87 83 00 00 00 
3D 40 AA 00 00 	0F 85 EF 00 00 00 	48 8D 05 57 DE 03 00 EB 32 
3D 8B 19 D4 11 	75 09 			48 8D 05 97 66 03 00 EB 22 	F6 47 10 01 74 15 25 00 00 FF FF ...
…
…
…

Please someone explain this binary thing. :rolleyes:



#5
VCH888

VCH888

    InsanelyMac Legend

  • Members
  • PipPipPipPipPipPipPip
  • 585 posts
sudo perl -pi -e 's|\x85\x08\xec\x10|\x62\x06\xec\x10|g' /System/Library/Extensions/AppleHDA.kext/Contents/MacOS/AppleHDA
sudo perl -pi -e 's|\x84\x08\xec\x10|\x61\x06\xec\x10|g' /System/Library/Extensions/AppleHDA.kext/Contents/MacOS/AppleHDA

Don't ask me how.   :whistle:

 

may have "Sound assertion in AppleHDAEngine at line 581" in log that I really don't know about it.



#6
nyolc8

nyolc8

    InsanelyMac Legend

  • Members
  • PipPipPipPipPipPipPip
  • 802 posts
  • Gender:Male
  • Location:Budapest, Hungary

I tried and got the 581 assertion but it looks like it just appears once at login, so it's not bad  :D  Thank you!

 

It looks like alc885 is the key for alc662. (because my older patch was based on "jump to alc855" - don't ask what is this means lol -  method too)



#7
truesoldier

truesoldier

    InsanelyMac Geek

  • Members
  • PipPipPip
  • 170 posts

hi guys, i patch my AppleHDA with this code for ALC887

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

this works perfect on 10.8.x , in 10.9 also works but after 10min listen to music with itunes sound crached and pc restart alone.

 

anyone an idea?

 

Thanks in advance

sorry for my bad english



#8
nyolc8

nyolc8

    InsanelyMac Legend

  • Members
  • PipPipPipPipPipPipPip
  • 802 posts
  • Gender:Male
  • Location:Budapest, Hungary

It doesn't feel like a problem with applehda. Did you check the console?



#9
truesoldier

truesoldier

    InsanelyMac Geek

  • Members
  • PipPipPip
  • 170 posts

yes but no errors or so?

but AppleHDAHardwareConfigDriver.kext is no longer loaded after a time.



#10
nyolc8

nyolc8

    InsanelyMac Legend

  • Members
  • PipPipPipPipPipPipPip
  • 802 posts
  • Gender:Male
  • Location:Budapest, Hungary

Try using patched applehda from 10.8, to see if it crashes then.



#11
truesoldier

truesoldier

    InsanelyMac Geek

  • Members
  • PipPipPip
  • 170 posts

AppleHDA from 10.8.4 works fine. no crach .

 

anyone other idea?



#12
EvgeniX

EvgeniX

    InsanelyMac Protégé

  • Members
  • PipPip
  • 95 posts
  • Gender:Male
Can anyone help with patch for ALC898/899? For z77x-ud5h...

#13
Maniac10

Maniac10

    InsanelyMac Legend

  • Members
  • PipPipPipPipPipPipPipPip
  • 1,070 posts
  • Gender:Not Telling

My patched AppleHDA for 889 crashes Mavericks here (not sure though, there's no log whatsoever). Will try restoring the kext from 10.8.4 later.

 

EDIT: reinstalled the system and now there's no audio related problem anymore  :ph34r:



#14
truesoldier

truesoldier

    InsanelyMac Geek

  • Members
  • PipPipPip
  • 170 posts

i test 10.8.5 12F9 AppleHDA 2.4.6fc7 is exactly the same as 10.9 is really strange!!??

and IORegistryExplorer under HDEF hav a new comatible section luck here.

has something to do with it?

Attached Files

  • Attached File  HDEF.png   278.96KB   21 downloads


#15
Alex Auditore

Alex Auditore

    InsanelyMac Legend

  • Donators
  • 698 posts
  • Gender:Male

Hello guys I also working for may patch in mavericks.

And for the time being I decided to attache untouched AppleHDA becuase we can make so many actions and remove native driver accidentally.

That afyer it can  complicate situation.

Attached Files



#16
Alex Auditore

Alex Auditore

    InsanelyMac Legend

  • Donators
  • 698 posts
  • Gender:Male

Here the driver for ALC670 from Mavericks(thanks for help to user Sergey_Galan).

http://www.insanelym...-and-mavericks/

Maybe these patches will be useful for other cards(two of them)



#17
truesoldier

truesoldier

    InsanelyMac Geek

  • Members
  • PipPipPip
  • 170 posts

hi Alex Auditore,

how i can use these patches for my ALC887?

 

thanks in advance



#18
Alex Auditore

Alex Auditore

    InsanelyMac Legend

  • Donators
  • 698 posts
  • Gender:Male

hi Alex Auditore,
how i can use these patches for my ALC887?

thanks in advance

Hi, Maybe you should edit plist of AppleHDAHardwareConfigDriver as well
As layout 12(ALC885) was at twelth array in ML, now it is at thirteenth in Mavericks
Attached File  image.jpg   43.6KB   42 downloads
For ALC670 and ALC883 it helped

#19
truesoldier

truesoldier

    InsanelyMac Geek

  • Members
  • PipPipPip
  • 170 posts

thanks for replay,i dont use layout 12 i use 99,and i have alredy edit plist of AppleHDAHardwareConfigDriver.

the problem is a binpatch.i patched it with this

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

mine is different than yours. has something  with it ?

 

 

 
sudo perl -pi -e 's|\xff\x87\xec\x1a\x0f\x8f\x53\x01\x00\x00|\x70\x06\xec\x10\x0f\x84\x2a\x01\x00\x00|g' AppleHDA
sudo perl -pi -e 's|\xff\x87\xec\x1a\x0f\x8f\x2f\x01\x00\x00|\x70\x06\xec\x10\x0f\x84\x06\x01\x00\x00|g' AppleHDA

thanks :)

Attached Files



#20
Alex Auditore

Alex Auditore

    InsanelyMac Legend

  • Donators
  • 698 posts
  • Gender:Male
Give me your AppleHDA which worked at ML. Tomorrow I will try to make a driver for Mavericks.
And by the way, does the driver from ML work? Just to make the information more accurate.





Also tagged with one or more of these keywords: applehda, binary patch


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