Jump to content
  • 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. 
janek202

HDA Wizard - Simple tool for AppleHDA.kext

151 posts in this topic

Recommended Posts

I wrote a simple tool for AppleHDA.kext in Snow Leopard 10.6.8 and Lion 10.7.
It was designed for quick sound repair after update, without any rollbacks.

It allows you to insert your own layout and Platforms xml files.
It has also binpatch support.
It will set permissions, rebuild cache and prelink kernel.
It has drag and drop support.

It will not create any files, it will only help you to install them.

You still need a DSDT patch, or HDAEnabler.kext with proper LayoutID.

Mountain Lion version: http://www.insanelym...-lion-108-beta/

Download link: http://dl.dropbox.co...d/download.html


Edit: I don't have time to develop this app. It wasn't really popular anyway.
I only needed a quick tool to put Platforms into correct place (ALC262 doesn't need any binpatch).
I published source code. Maybe somebody will use it to give community more tools.
I know that source code isn't perfect, but I made this tool a long time ago, and since then I haven't seen a point in rewriting it.
Feel free to use it in your open source tools.
 

HDAW_Source.zip

Share this post


Link to post
Share on other sites

Can you add this bin patch please for IDT 92HD81B1X5:

 

sudo perl -pi -e 's|\x8b\x19\xd4\x11|\x05\x76\x1d\x11|g' /System/Library/Extensions/AppleHDA.kext/Contents/MacOS/AppleHDA

 

Thanks!

Share this post


Link to post
Share on other sites

Hi janek202.

 

In lot of case is needed a Info.plist too into

 

/System/Library/Extensions/AppleHDA.kext/Contents/PlugIns/AppleHDAHardwareConfigDriver.kext/Contents/Info.plist

 

just for have a complete "patch"

 

Fabio

Share this post


Link to post
Share on other sites
/System/Library/Extensions/AppleHDA.kext/Contents/PlugIns/AppleHDAHardwareConfigDriver.kext/Contents/Info.plist

 

Oh yes, I forgot about it. I made myself a legacy kext. I will add it.

Share this post


Link to post
Share on other sites

Thanks janek202, you are UNSTOPPABLE :wacko:

 

Will try it on my 2 mobos, one with ALC888 and the other with ALC889a/885.

 

Both use new layoutXXX.xml and Platforms.xml and ALC888 also needs a bin-patch of the AppleHDA executable.

 

Only if there was a way to improve that audio card detection delay in 10.6.8 and Lion...

Share this post


Link to post
Share on other sites
Oh yes, I forgot about it. I made myself a legacy kext. I will add it.

 

;)

 

2 Controller for you...

 

AD2000B (Complete)

Info.plist

layout12.xml

Platforms.xml

AD2000B.zip

's|\x8b\x19\xd4\x11|\x9b\x98\xd4\x11|g'

DSDT EDIT is mandatory

			Device (HDEF)
		{
			Name (_ADR, 0x001B0000)
			Method (_PRW, 0, NotSerialized)
			{
				Return (Package (0x02)
				{
					0x0D,
					0x05
				})
			}

			Method (_DSM, 4, NotSerialized)
			{
				Store (Package (0x0C)
					{
						"subsystem-id",
						Buffer (0x04)
						{
							0xA0, 0x00, 0x00, 0x00
						},

						"subsystem-vendor-id",
						Buffer (0x04)
						{
							0x6B, 0x10, 0x00, 0x00
						},

						"codec-id",
						Buffer (0x04)
						{
							0x9B, 0x98, 0xD4, 0x11
						},

						"layout-id",
						Buffer (0x04)
						{
							0x0C, 0x00, 0x00, 0x00
						},

						"platformFamily",
						Buffer (One)
						{
							0x00
						},

						"PinConfigurations",
						Buffer (Zero) {}
					}, Local0)
				DTGP (Arg0, Arg1, Arg2, Arg3, RefOf (Local0))
				Return (Local0)
			}
		}

 

_______________________

 

ALC1200 (Complete)

Info.plist

layout12.xml

Platforms.xml

ALC1200.zip

's|\x85\x08\xec\x10|\x88\x08\xec\x10|g'

DSDT EDIT is mandatory

			Device (HDEF)
		{
			Name (_ADR, 0x001B0000)
			Method (_PRW, 0, NotSerialized)
			{
				Return (Package (0x02)
				{
					0x0D,
					0x05
				})
			}

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

						"platformFamily",
						Buffer (One)
						{
							0x00
						},

						"PinConfigurations",
						Buffer (Zero) {}
					}, Local0)
				DTGP (Arg0, Arg1, Arg2, Arg3, RefOf (Local0))
				Return (Local0)
			}
		}

 

_______________________

 

As always nice idea!

 

Fabio

Share this post


Link to post
Share on other sites

hi

thanks for your work

this is bin patching for IDT 92HD75B3X5

sudo perl -pi -e 's|\x84\x19\xd4\x11|\x03\x76\x1d\x11|g' "/Volumes/Macintosh HD/System/Library/Extensions/AppleHDA.kext/Contents/MacOS/AppleHDA"

and also a request many of user must binpatching graphic kext after updating thier mac i creat a script that do it this is for ati mobility radeon hd 4650 the script:

sudo perl -pi -e 's|\x02\x00\x00\x00\x40\x00\x00\x00\x09\x01\x00\x00\x02\x01\x00\x03|\x02\x00\x00\x00\x40\x00\x00\x00\x09\x01\x00\x00\x12\x00\x00\x07|g' "/Volumes/Macintosh HD/System/Library/Extensions/ATI4600Controller.kext/Contents/MacOS/ATI4600Controller"

sudo perl -pi -e 's|\x02\x00\x00\x00\x00\x01\x00\x00\x09\x01\x00\x00\x20\x01\x02\x02|\x10\x00\x00\x00\x10\x00\x00\x00\x00\x01\x00\x00\x00\x10\x01\x06|g' "/Volumes/Macintosh HD/System/Library/Extensions/ATI4600Controller.kext/Contents/MacOS/ATI4600Controller"

sudo perl -pi -e 's|\x00\x04\x00\x00\x04\x03\x00\x00\x00\x01\x00\x00\x10\x00\x01\x01|\x00\x08\x00\x00\x00\x02\x00\x00\x00\x01\x00\x00\x20\x01\x02\x01|g' "/Volumes/Macintosh HD/System/Library/Extensions/ATI4600Controller.kext/Contents/MacOS/ATI4600Controller"

if you add graphic patching also help to many user.

may be creat a Universal app that include all of your app( kextwizard,chameleon,...)

be good idea.

thanks for your work and your time that spend to help to hackintosh community

Share this post


Link to post
Share on other sites

New 1.1 version.

Added Info.plist modification support.

Added new codecs to binpatch list.

Added binpatch list updater (menu option).

So there's no need to download whole application again. Just select "Update binhack list".

http://dl.dropbox.com/u/7085278/HDA_Wizard/HDA%20Wizard.zip

 

Enjoy.

 

 

Edit:

and also a request many of user must binpatching graphic kext after updating thier mac i creat a script that do it this is for ati mobility radeon hd 4650 the script:

(...)

if you add graphic patching also help to many user.

I think this application will be for AppleHDA only. But I will think about binpatcher for other kexts. I have to modify AppleRTC on Lion.

 

may be creat a Universal app that include all of your app( kextwizard,chameleon,...)

be good idea.

Merging Kext Wizard and Chameleon Wizard into single app would require much work. Kext Wizard was my first application for mac and I would have to change many things in order to make GUI and source compatibile with Chameleon Wizard.

And one more thing: It would be much harder to find out why it's crashing. :(

Share this post


Link to post
Share on other sites

How does one get the binpatch via perl looking for one for Hermosa Conexant High Definition SmartAudio 221.

 

Codec: Conexant CX20561 (Hermosa)
Address: 0
Vendor Id: 0x14f15051
Subsystem Id: 0x103c30d9
Revision Id: 0x100000
Modem Function Group: 0x2
Default PCM:
rates [0x160]: 44100 48000 96000
bits [0xe]: 16 20 24
formats [0x1]: PCM
Default Amp-In caps: N/A
Default Amp-Out caps: N/A
GPIO: io=4, o=0, i=0, unsolicited=1, wake=0
 IO[0]: enable=0, dir=0, wake=0, sticky=0, data=0
 IO[1]: enable=0, dir=0, wake=0, sticky=0, data=0
 IO[2]: enable=0, dir=0, wake=0, sticky=0, data=0
 IO[3]: enable=0, dir=0, wake=0, sticky=0, data=0
16 Node 0x10 [Audio Output] wcaps 0xc1d: Stereo Amp-Out R/L
 Amp-Out caps: ofs=0x4a, nsteps=0x4a, stepsize=0x03, mute=0
 Amp-Out vals:  [0x3c 0x3c]
 Converter: stream=0, channel=0
 PCM:
rates [0x560]: 44100 48000 96000 192000
bits [0xe]: 16 20 24
formats [0x1]: PCM
 Power: setting=D0, actual=D0
17 Node 0x11 [Audio Output] wcaps 0xc1d: Stereo Amp-Out R/L
 Amp-Out caps: ofs=0x4a, nsteps=0x4a, stepsize=0x03, mute=0
 Amp-Out vals:  [0x4a 0x4a]
 Converter: stream=0, channel=0
 PCM:
rates [0x560]: 44100 48000 96000 192000
bits [0xe]: 16 20 24
formats [0x1]: PCM
 Power: setting=D0, actual=D0
18 Node 0x12 [Audio Output] wcaps 0x211: Stereo Digital
 Converter: stream=0, channel=0
 Digital:
 Digital category: 0x0
 PCM:
rates [0x160]: 44100 48000 96000
bits [0xe]: 16 20 24
formats [0x5]: PCM AC3
19 Node 0x13 [Beep Generator Widget] wcaps 0x70000c: Mono Amp-Out
 Amp-Out caps: ofs=0x03, nsteps=0x03, stepsize=0x17, mute=0
 Amp-Out vals:  [0x00]
20 Node 0x14 [Audio Input] wcaps 0x100d1b: Stereo Amp-In R/L
 Amp-In caps: ofs=0x4a, nsteps=0x50, stepsize=0x03, mute=0
 Amp-In vals:  [0x44 0x44] [0x44 0x44]
 Converter: stream=0, channel=0
 SDI-Select: 0
 PCM:
rates [0x160]: 44100 48000 96000
bits [0xe]: 16 20 24
formats [0x1]: PCM
 Power: setting=D0, actual=D0
 Connection: 2
 0x1d* 0x17
21 Node 0x15 [Audio Input] wcaps 0x100d1b: Stereo Amp-In R/L
 Amp-In caps: ofs=0x4a, nsteps=0x50, stepsize=0x03, mute=0
 Amp-In vals:  [0x44 0x44]
 Converter: stream=0, channel=0
 SDI-Select: 0
 PCM:
rates [0x160]: 44100 48000 96000
bits [0xe]: 16 20 24
formats [0x1]: PCM
 Power: setting=D0, actual=D0
 Connection: 1
 0x18
22 Node 0x16 [Pin Complex] wcaps 0x400581: Stereo
 Pincap 0x081c: OUT HP Detect
 Pin Default 0x01214040: [Jack] HP Out at Ext Rear
Conn = 1/8, Color = Green
DefAssociation = 0x4, Sequence = 0x0
 Pin-ctls: 0xc0: OUT HP
 Unsolicited: tag=37, enabled=1
 Power: setting=D0, actual=D0
 Connection: 2
 0x10* 0x11
23 Node 0x17 [Pin Complex] wcaps 0x40048b: Stereo Amp-In
 Amp-In caps: ofs=0x00, nsteps=0x04, stepsize=0x27, mute=0
 Amp-In vals:  [0x03 0x03]
 Pincap 0x081224: IN Detect
Vref caps: 50 80
 Pin Default 0x400001f0: [N/A] Line Out at Ext N/A
Conn = Unknown, Color = Unknown
DefAssociation = 0xf, Sequence = 0x0
Misc = NO_PRESENCE
 Pin-ctls: 0x24: IN VREF_80
 Unsolicited: tag=38, enabled=1
 Power: setting=D0, actual=D0
24 Node 0x18 [Pin Complex] wcaps 0x40048b: Stereo Amp-In
 Amp-In caps: ofs=0x00, nsteps=0x04, stepsize=0x27, mute=0
 Amp-In vals:  [0x03 0x03]
 Pincap 0x081224: IN Detect
Vref caps: 50 80
 Pin Default 0x01a19030: [Jack] Mic at Ext Rear
Conn = 1/8, Color = Pink
DefAssociation = 0x3, Sequence = 0x0
 Pin-ctls: 0x24: IN VREF_80
 Unsolicited: tag=39, enabled=1
 Power: setting=D0, actual=D0
25 Node 0x19 [Pin Complex] wcaps 0x400581: Stereo
 Pincap 0x0814: OUT Detect
 Pin Default 0x400001f0: [N/A] Line Out at Ext N/A
Conn = Unknown, Color = Unknown
DefAssociation = 0xf, Sequence = 0x0
Misc = NO_PRESENCE
 Pin-ctls: 0x40: OUT
 Unsolicited: tag=00, enabled=0
 Power: setting=D0, actual=D0
 Connection: 2
 0x10* 0x11
26 Node 0x1a [Pin Complex] wcaps 0x400501: Stereo
 Pincap 0x0810010: OUT EAPD
 EAPD 0x2: EAPD
 Pin Default 0x92170110: [Fixed] Speaker at Int Front
Conn = Analog, Color = Unknown
DefAssociation = 0x1, Sequence = 0x0
Misc = NO_PRESENCE
 Pin-ctls: 0x40: OUT
 Power: setting=D0, actual=D0
 Connection: 2
 0x10* 0x11
27 Node 0x1b [Pin Complex] wcaps 0x400500: Mono
 Pincap 0x0810010: OUT EAPD
 EAPD 0x2: EAPD
 Pin Default 0x400001f0: [N/A] Line Out at Ext N/A
Conn = Unknown, Color = Unknown
DefAssociation = 0xf, Sequence = 0x0
Misc = NO_PRESENCE
 Pin-ctls: 0x40: OUT
 Power: setting=D0, actual=D0
 Connection: 2
 0x10* 0x11
28 Node 0x1c [Pin Complex] wcaps 0x400701: Stereo Digital
 Pincap 0x0810: OUT
 Pin Default 0x400001f0: [N/A] Line Out at Ext N/A
Conn = Unknown, Color = Unknown
DefAssociation = 0xf, Sequence = 0x0
Misc = NO_PRESENCE
 Pin-ctls: 0x00:
 Power: setting=D0, actual=D0
 Connection: 1
 0x12
29 Node 0x1d [Pin Complex] wcaps 0x40040b: Stereo Amp-In
 Amp-In caps: ofs=0x00, nsteps=0x04, stepsize=0x27, mute=0
 Amp-In vals:  [0x03 0x03]
 Pincap 0x0820: IN
 Pin Default 0x97a70120: [Fixed] Mic at Int Riser
Conn = Analog, Color = Unknown
DefAssociation = 0x2, Sequence = 0x0
Misc = NO_PRESENCE
 Pin-ctls: 0x20: IN
 Power: setting=D0, actual=D0
30 Node 0x1e [Vendor Defined Widget] wcaps 0xf00000: Mono

ConexantCX20561XML.zip

Conexant_CX20561_0x14f15051.zip

Share this post


Link to post
Share on other sites

ALC662

 

sudo perl -pi -e 's|\x85\x08\xec\x10|\x62\x06\xec\x10|g' /System/Library/Extensions/AppleHDA.kext/Contents/MacOS/AppleHDA

Share this post


Link to post
Share on other sites
New 1.1 version.

Added Info.plist modification support.

Added new codecs to binpatch list.

Added binpatch list updater (menu option).

So there's no need to download whole application again. Just select "Update binhack list".

http://dl.dropbox.com/u/7085278/HDA_Wizard/HDA%20Wizard.zip

 

Enjoy.

 

Would be nice the option to select "Target" partition (in this case AppleHDA)...

 

I do most of the modification from other partition, not always from current using system.

 

Fabio

Share this post


Link to post
Share on other sites
Would be nice the option to select "Target" partition (in this case AppleHDA)...

 

I do most of the modification from other partition, not always from current using system.

 

I thought about it.

But I want to keep is simple. This app will be used mostly after updating the system before restart.

And I have no idea how to prelink kernel and create kernel cache on other partitions than /.

 

BTW. Added ALC662. Updater should work.

Share this post


Link to post
Share on other sites
I thought about it.

But I want to keep is simple. This app will be used mostly after updating the system before restart.

And I have no idea how to prelink kernel and create kernel cache on other partitions than /.

 

BTW. Added ALC662. Updater should work.

 

I understand :(

 

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)

 

just a idea...

 

Fabio

Share this post


Link to post
Share on other sites

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!

Share this post


Link to post
Share on other sites

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

patch_hda.pl.zip

Share this post


Link to post
Share on other sites
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).

Share this post


Link to post
Share on other sites

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

 

ALC883.zip

-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.

Share this post


Link to post
Share on other sites

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.

1988B.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.

×