Jump to content

HDA Wizard - Simple tool for AppleHDA.kext

wizard HDA Sound

  • Please log in to reply
148 replies to this topic

#21
MacKonsti

MacKonsti

    InsanelyMac Geek

  • Members
  • PipPipPipPip
  • 228 posts
  • Gender:Male
  • Location:Muppet Show
Sorry, forgot to post my bin-patching command for Realtek ALC888:

find hex 0x85, 0x08, 0xEC, 0x10
patch to 0x88, 0x08, 0xEC, 0x10

cd /System/Library/Extensions/AppleHDA.kext/Contents/MacOS/
sudo cp -pX AppleHDA ~AppleHDA
sudo perl -pi -e 's|\x85\x08\xec\x10|\x88\x08\xec\x10|g' AppleHDA

Better make a copy of the original binary, as well. Please also don't forget we need to rebuild caches from /S/L/E...

Janek202, are you also keeping a safe copy of Platforms.xml? Introducing layoutXXX.xml is easy; just put it in /Resources. But how are you editing Platforms.xml? I tried decyphering the contents to see what people changed to my working ALC888 Platforms.xml and it has nothing to do with the original (XML tags relocated...)

Cheers!

#22
Cyrus the Great

Cyrus the Great

    InsanelyMac Sage

  • Members
  • PipPipPipPipPip
  • 276 posts
  • Gender:Male
  • Location:tehran
its seems that bin patching part not work for me and also may be for other idt user
this is script from bcc9 that i replace the codec id with my own 111D7603
and its work,i am attached the script may be possible to integrate it to app.
thanks

Attached Files



#23
janek202

janek202

    InsanelyMac Sage

  • Developers
  • 310 posts
  • Gender:Male
  • Location:Poland

And a "Repository" (for store) inside the .app the .xml & .plist (Resources folder??)

It would be easy and more efficent for final user apply the patch w/o searching the file for his controller (Layout-Platform-Info)



I thought about it. But it will be hard. It's not a coding issue, because I arleady done that in Chameleon Wizard. Simply there's too many codecs, and sometimes patches are different for the same codec (for example ALC889 in MSI and Gigabyte motherboards). I don't have so much free time to take care of adding new codes info and updating it. If anyone else wants to do that (for example on dropbox, or website) I can add support for it. (But, to make code simple and fast I would choose plist files).

#24
JBraddock

JBraddock

    Ph.D (Can) in Human Rights

  • Members
  • PipPipPipPipPipPipPip
  • 549 posts
  • Location:UK
Here is the audio patch for ALC883 (Asus P5K SE). It might work for other mobos as well.
Patch:
sudo perl -pi -e 's|\x85\x08\xec\x10|\x83\x08\xec\x10|g' /System/Library/Extensions/AppleHDA.kext/Contents/MacOS/AppleHDA

Attached File  ALC883.zip   13.7KB   347 downloads
-Info.plist
-layout12.xml
-Platforms.xml
And finally HDEF in DSDT.
Device (HDEF)            {                Name (_ADR, 0x001B0000)                Method (_PRW, 0, NotSerialized)                {                    Return (Package (0x02)                    {                        0x0D,                         0x05                    })                }                Method (_DSM, 4, NotSerialized)                {                    Store (Package (0x08)                        {                            "codec-id",                             Buffer (0x04)                            {                                0x83, 0x08, 0xEC, 0x10                            },                             "layout-id",                             Buffer (0x04)                            {                                0x0C, 0x00, 0x00, 0x00                            },                             "device-type",                             Buffer (0x0F)                            {                                "Realtek ALC883"                            },                             "PinConfigurations",                             Buffer (One)                            {                                0x00                            }                        }, Local0)                    DTGP (Arg0, Arg1, Arg2, Arg3, RefOf (Local0))                    Return (Local0)                }            }

The original kext, created for Aspire 9420, belongs to Kizwan so the credit goes to him.
I just modified the kext for the new AppleHDA.

Thanks.

#25
JUN Ho

JUN Ho

    InsanelyMac Protégé

  • Members
  • Pip
  • 41 posts
Thank you, janek202.

Here is the patch for AD1988B (P5K-E) audio.

I attach info.plist, layout12.xml, platforms.xml, and 2 dsdt patchs.

This one don't need any binpatch.

Attached Files



#26
helob

helob

    InsanelyMac Geek

  • Members
  • PipPipPipPip
  • 216 posts
janek202,
Great work.
Newbie here.
Where to get the required Platforms.xml, layoutxxx.xml & info.plist files for any particular ALC device?
TQ

#27
iSoprano

iSoprano

    InsanelyMac Protégé

  • Members
  • PipPip
  • 59 posts
  • Gender:Male

its seems that bin patching part not work for me and also may be for other idt user
this is script from bcc9 that i replace the codec id with my own 111D7603
and its work,i am attached the script may be possible to integrate it to app.
thanks


Hi Cyrus, Could you upload your patched AppleHDA.kext mate? Also do u have audio after wake from sleep using Apple HDA?

#28
Cyrus the Great

Cyrus the Great

    InsanelyMac Sage

  • Members
  • PipPipPipPipPip
  • 276 posts
  • Gender:Male
  • Location:tehran

Hi Cyrus, Could you upload your patched AppleHDA.kext mate? Also do u have audio after wake from sleep using Apple HDA?

audio after sleep i must say no!! i try every possible solution but not working.
its seem that exist a bug in our board (intel pm45)that cause graphics and sound problem after wake up.i can get my sound fully function with voodoohda i post a patched one in mammoth topic you can find it.
anyway this is patched applehda

Attached Files



#29
Andrew180

Andrew180

    InsanelyMac Protégé

  • Members
  • PipPip
  • 55 posts
  • Gender:Male
  • Location:Slovakia

Sorry, forgot to post my bin-patching command for Realtek ALC888:

find hex 0x85, 0x08, 0xEC, 0x10
patch to 0x88, 0x08, 0xEC, 0x10

cd /System/Library/Extensions/AppleHDA.kext/Contents/MacOS/
sudo cp -pX AppleHDA ~AppleHDA
sudo perl -pi -e 's|\x85\x08\xec\x10|\x88\x08\xec\x10|g' AppleHDA

Can you please post your HDEF? This is mine:
Device (HDEF)
			{
				Name (_ADR, 0x001B0000)
				Method (_PRW, 0, NotSerialized)
				{
					Return (Package (0x02)
					{
						0x0D, 
						0x05
					})
				}

				Method (_DSM, 4, NotSerialized)
				{
					Store (Package (0x04)
						{
							"layout-id", 
							Buffer (0x04)
							{
								0x78, 0x03, 0x00, 0x00
							}, 

							"PinConfigurations", 
							Buffer (Zero) {}
						}, Local0)
					MCDP (Arg2, RefOf (Local0))
					Return (Local0)
				}
			}
I tried binpatch along with ALC8xxHDA.kext but with no luck. Sound assertion at startup and no I/Os in System Preferences. Thanks.

#30
chibchan

chibchan

    InsanelyMac Protégé

  • Members
  • Pip
  • 29 posts
bin patching for 888 not working. layout.xml, platforms.xml and info.plist are installed by hda wizard. Will work after patch is applied thru terminal.

#31
manmal

manmal

    InsanelyMac Sage

  • Members
  • PipPipPipPipPipPip
  • 437 posts
hi!
very useful utility, thanks a lot!

I don't know if you already thought about that, but it would be a nice feature to load an older version of patched AppleHDA.kext and the dsdt.dsl file, and it recognizes itself the necessary files to patch with the new version of AppleHDA installed ...

Thanks!
Mal

#32
tdtran1025

tdtran1025

    InsanelyMac Sage

  • Members
  • PipPipPipPipPip
  • 353 posts
I am a total NOOB on this topic, thus have 2 questions:
- Where do I select the proper layoutxxx.xml? From the previously patched AppleHDA.kext? The current version after any update does not have the ALC888 layout.
- With the previous patched version, I always had to have Taruga's HDAEnabler.kext to make the patched HDA work. So after patching the current version, do I still need HDAEnabler?
Thank you!

#33
janek202

janek202

    InsanelyMac Sage

  • Developers
  • 310 posts
  • Gender:Male
  • Location:Poland

I don't know if you already thought about that, but it would be a nice feature to load an older version of patched AppleHDA.kext and the dsdt.dsl file, and it recognizes itself the necessary files to patch with the new version of AppleHDA installed ...


Requires too much work.
This utility is designed only for quick sound fixing after update. It just puts files in correct places, binhacks, sets permissions and rebuild cache. That's it. No automatic patching.

- Where do I select the proper layoutxxx.xml? From the previously patched AppleHDA.kext? The current version after any update does not have the ALC888 layout.

I don't know which version you mean by "previously patched AppleHDA.kext".

- With the previous patched version, I always had to have Taruga's HDAEnabler.kext to make the patched HDA work. So after patching the current version, do I still need HDAEnabler?


HDAEnabler or DSDT Patch.

bin patching for 888 not working. layout.xml, platforms.xml and info.plist are installed by hda wizard.

Check the console. Some people said that binpathing works ok. I will look at it. It's the same code no matter which codec you select...


Edit:
This test version should properly patch AppleHDA on any supported system. Please check how it works. My ALC262 doesn't need any patching. MD5 sum was changing.
http://dl.dropbox.co...izard/HW_TV.zip

#34
prcmelo

prcmelo

    InsanelyMac Protégé

  • Members
  • PipPip
  • 70 posts
  • Gender:Male
  • Location:Rio de Janeiro

Check the console. Some people said that binpathing works ok. I will look at it. It's the same code no matter which codec you select...


I'm sorry but I do not quite understand ... When you say "It's the same code no matter which codec you select..." , you mean I can use a ALC888 patch for my ALC888B? I'm trying to patch "manually" my ALC888B a few days ago and I is not working.

#35
janek202

janek202

    InsanelyMac Sage

  • Developers
  • 310 posts
  • Gender:Male
  • Location:Poland
I meant the same Obj-C code (functions).
It should work now in this test version:
http://dl.dropbox.co...izard/HW_TV.zip

#36
tdtran1025

tdtran1025

    InsanelyMac Sage

  • Members
  • PipPipPipPipPip
  • 353 posts
Janek wrote:"I don't know which version you mean by "previously patched AppleHDA.kext".

-Version 1.8.4fc3-
The point is, with any update, the new AppleHDA.kext does not have ALC888 layout.xml or the right platform.xml. My question was whether I choose the layout.xml, platform.xml and info.plist from the working kext?
If this is the case, I don;t see the merit of patching new kext vs. using the old kext. Perhaps you can enlighten me on this Janek.

What I do is save AppleHDA.kext . After an update, I just replace this kext and everything would be OK.
In your applet, one has to seek out info.plist, platform.xml and layout.xml to perform the patch, all to the end having the same effect as replacingwhatever HDA kext with the old one. I am still too dense on this, for my logic fails.

#37
MacKonsti

MacKonsti

    InsanelyMac Geek

  • Members
  • PipPipPipPip
  • 228 posts
  • Gender:Male
  • Location:Muppet Show
OK guys, this is the full monty for the ALC888 (running perfectly on my Shuttle XPC SG31G2V2):

find hex 0x85, 0x08, 0xEC, 0x10
patch to 0x88, 0x08, 0xEC, 0x10

cd /System/Library/Extensions/AppleHDA.kext/Contents/MacOS/
sudo cp -pX AppleHDA ~AppleHDA
sudo perl -pi -e 's|\x85\x08\xec\x10|\x88\x08\xec\x10|g' AppleHDA

/* Fixed */ Device (HDEF)
			{
				Name (_ADR, 0x001B0000)
				Method (_PRW, 0, NotSerialized)
				{
					Return (Package (0x02)
					{
						0x05,
						0x04  // Original value 0x05
					})
				}

				Method (_DSM, 4, NotSerialized)
				{
					Store (Package (0x0E)
					{
						"codec-id",
							Buffer (0x04) {0x88, 0x08, 0xEC, 0x10},  // Codec ALC888 = 0x10EC0888 (283904136)
						"device_type",
							Buffer (0x06) {"audio"},
						"layout-id",
							Buffer (0x04) {0x78, 0x03, 0x00, 0x00},  // Layout ALC888 = 0x00000378
//					  "model",
//						  Buffer (0x1A) {"Realtek ALC888 Controller"},
						"subsystem-vendor-id",
							Buffer (0x04) {0x6B, 0x10, 0x00, 0x00},  // Subsystem = [106b:00a0] Apple device
						"subsystem-id",
							Buffer (0x04) {0xA0, 0x00, 0x00, 0x00},  // Subsystem = [106b:00a0] Apple device
						"platformFamily",
							Buffer (0x01) {Zero},
						"PinConfigurations",
							Buffer (0x01) {Zero}
					}, Local0)
					MCDP (Arg2, RefOf (Local0))
					Return (Local0)
				}
			}

So janek202, this proggie only loads what users here send you, right? It doesn't actually insert stuff into Platforms.xml but rather replaces the needed files, correct? The only thing it does by itself is to bin-patch?

Attached layout888.xml and Platforms.xml as well.

Thank you and all members here.

Attached Files



#38
tdtran1025

tdtran1025

    InsanelyMac Sage

  • Members
  • PipPipPipPipPip
  • 353 posts
On another side note that entails audio routing to Display Port, I have a question, too.
My video card is gtx460 with Display Port instead of HDMI. Whatever the working patched I used, it conflicts with the current Lion's video kext for this device, resulting failure to route audio to DP (it also registers this conflict during verbose boot.
I have been searching for weeks to remedy it, but to no avail.
Does anyone have a solution?

#39
janek202

janek202

    InsanelyMac Sage

  • Developers
  • 310 posts
  • Gender:Male
  • Location:Poland

It doesn't actually insert stuff into Platforms.xml but rather replaces the needed files, correct? The only thing it does by itself is to bin-patch?


Yes. It replaces or inserts as new file Platforms, layout and Info. It doesn't edit this files in any way.

#40
prcmelo

prcmelo

    InsanelyMac Protégé

  • Members
  • PipPip
  • 70 posts
  • Gender:Male
  • Location:Rio de Janeiro
Trying 0x85, 0x08, 0xEC, 0x10 patch to 0x87, 0x08, 0xEC, 0x10 (0x87 for ALC888B, same as ALC887) and still no luck... Also tried 0x88 and nothing... :)

Anyone had success patching or am I the only one with ALC888B? :unsure:






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