Jump to content

AppleHDA patching in Mountain Lion


nyolc8
 Share

239 posts in this topic

Recommended Posts

Hi i have a realtek 892 but i have noticed that there is 2 versions of this codec one is DTS-CG and the other is CG i have tried the Patched one and the perl script but i can not get a single bit of sound from either nor can i with voodoohda.

 

If i upload the codec_dump.txt from ubuntu and the Verbs from windows would someone be able to help me out.

 

 

Here is the files

codec_dump.txt

892 verb.zip

Link to comment
Share on other sites

  • 2 weeks later...

Hi all.

I have ALC269VC on my laptop, headphones and mic working but there is no sound from internal speakers. Have you guys any suggestions?

 

I've used following config data;

 

From

 

Node 0x12 411111f0

Node 0x14 411111f0, EAPD 0x02

Node 0x15 0321101f, EAPD 0x02

Node 0x17 90170120

Node 0x18 03a11830

Node 0x19 90a70940

Node 0x1a 411111f0

Node 0x1b 90170110

Node 0x1d 4006a21d

Node 0x1e 411111f0

 

To

 

Node 12 : f0 11 11 41 - N/A

Node 14: f0 11 11 41 - N/A

Node 15: 1f 10 21 03-> 10 10 21 03 (Corrected sequence)

Node 17: 20 01 17 90 -> - N/A

Node 18: 30 18 a1 03 ->30 10 81 03 (Corrected Ext mic to LineIn)

Node 19: 40 09 a7 90 -> 40 01 a0 90 (Corrected IntMic Conn type and DSP)

Node 1a: f0 11 11 41 - N/A

Node 1b: 10 01 17 90-> 20 01 17 90 (Corrected Association)

Node 1d: 1d a2 06 40 - N/A

Node 1e: f0 11 11 41 - N/A

 

Node 14 EAPD : 02 - N/A

Node 15 EAPD : 02 - Headphone contains EAPD

 

<01571c40 01571d10 01571e21 01571f03 01871c20 01871d10 01871e81 01871f03 01971c30 01971d01 01971ea0 01971f90 01b71c10 01b71d01 01b71e17 01b71f90 01570c02>

 

in dsdt

 

Method (_DSM, 4, NotSerialized)
		{
			Store (Package (0x06)
				{
					"hda-gfx",
					Buffer (0x0A)
					{
						"onboard-1"
					},

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

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

 

and attached files for patching

 

AppleHDA, codec dump, layout28.xml, Platforms.xml, Info.plist attached.

 

I have also sound assertion

 

14/09/2012 20:48:05.000 kernel[0]: Sound assertion in AppleHDAController at line 1294
14/09/2012 21:38:31.000 kernel[0]: Sound assertion in AppleHDAController at line 1294
14/09/2012 21:38:37.000 kernel[0]: Sound assertion in AppleHDAEngine at line 6611
14/09/2012 21:38:37.000 kernel[0]: Sound assertion in AppleHDAEngine at line 748
14/09/2012 21:38:37.000 kernel[0]: Sound assertion in AppleHDADriver at line 2285
14/09/2012 21:38:37.000 kernel[0]: Sound assertion in AppleHDADriver at line 217
14/09/2012 21:38:37.000 kernel[0]: Sound assertion in AppleHDADriver at line 1055
14/09/2012 21:48:16.000 kernel[0]: Sound assertion in AppleHDAController at line 1294

FILES.zip

Link to comment
Share on other sites

Hi Marsus,

 

In your DSDT I noticed that your layout ID has:

"layout-id",
											Buffer (0x04)
											{
												    [color=#ff0000][b]0x1C,[/b][/color] 0x00, 0x00, 0x00 // Should the highlighted value not be [color=#ff0000]0x0C[/color] or 12 instead of 28 (0x1c)?
											},

 

Just making sure I am a noob when it come to DSDT editing.

 

Thanks

Link to comment
Share on other sites

I'm kind of lazy this evening (its 11PM here) .. but at first glance ...

Your internal stereo speaker appears to be at node 0x1b

 


Node 0x1b [Pin Complex] wcaps 0x40058f: Stereo Amp-In Amp-Out
 Control: name="Speaker Playback Switch", index=0, device=0
ControlAmp: chs=3, dir=Out, idx=0, ofs=0
 Amp-In caps: ofs=0x00, nsteps=0x03, stepsize=0x27, mute=0
 Amp-In vals:  [0x00 0x00]
 Amp-Out caps: ofs=0x00, nsteps=0x00, stepsize=0x00, mute=1
 Amp-Out vals:  [0x00 0x00]
 Pincap 0x00003734: IN OUT Detect
Vref caps: HIZ 50 GRD 80 100
 Pin Default 0x90170110: [Fixed] Speaker at Int N/A
Conn = Analog, Color = Unknown
DefAssociation = 0x1, Sequence = 0x0
Misc = NO_PRESENCE
 Pin-ctls: 0x40: OUT VREF_HIZ
 Unsolicited: tag=00, enabled=0
 Power states:  D0 D1 D2 D3 EPSS
 Power: setting=D0, actual=D0
 Connection: 2
 0x0c 0x0d*

 

But there's also a Mono speaker there? I have never seen a dump of 269 with such an option. S/PDIF - sure, but extra speaker?

 


Node 0x17 [Pin Complex] wcaps 0x40050c: Mono Amp-Out
 Control: name="Bass Speaker Playback Switch", index=0, device=0
ControlAmp: chs=3, dir=Out, idx=0, ofs=0
 Amp-Out caps: ofs=0x00, nsteps=0x00, stepsize=0x00, mute=1
 Amp-Out vals:  [0x00]
 Pincap 0x00000010: OUT
 Pin Default 0x90170120: [Fixed] Speaker at Int N/A
Conn = Analog, Color = Unknown
DefAssociation = 0x2, Sequence = 0x0
Misc = NO_PRESENCE
 Pin-ctls: 0x40: OUT
 Power states:  D0 D1 D2 D3 EPSS
 Power: setting=D0, actual=D0
 Connection: 1
 0x0f

If you can see the output in system preferences > Sound then you are missing something in the patmaps\pinconfig.

Try using 01B71C40 01B71D01 01B71E10 01B71F90 and just for the sakes of it try adding EAPD 01B70C02 , since HP and speakers are usually tied together.

As for layout-id its pretty much up to you what you use. I prefer 28 (1C) for no apparent reason other than MBP8,1 uses this number and I'm conveniently faking this model.

Link to comment
Share on other sites

TimeWalker75a thanks for your replay

 

If you can see the output in system preferences > Sound then you are missing something in the patmaps\pinconfig.

 

There is no way to miss something, checked twice. Looks ok, but isn't because as im mentioned is no sound from speakers.

 

 

screenshot20120917at203.png

screenshot20120913at215.png

 

Try using 01B71C40 01B71D01 01B71E10 01B71F90 and just for the sakes of it try adding EAPD 01B70C02

 

Unfortunately didn't work.

 

I'm out of ideas.

Link to comment
Share on other sites

I've updated my AppleHDA patch script to handle multiple codec ids and also dynamically figure out which extra comparisons should be patched to get the matching to work properly. The script supports osx 10.7 and osx 10.8.

 

The script works by continuing my idea of patching the codec comparisons by zeroing out the codec ids found as operands to the applicable comparison instructions. This is easier to do in a script than trying to compute a new jump location as the script does not even need to parse AppleHDA's match routine's instructions (see ati-personality.pl for an example of that kind of processing).

 

I think maintaining a script like this will be more generally useful & easier to maintain than a bunch of perl one-liner posts.

 

This script resembles the concept of HDA wizard http://www.insanelym...howtopic=266531 but instead of being GUI focused, it focuses on getting the AppleHDA binary patching done automatic&right across osx releases.

 

I've only added support for a few codecs that I've used on hackintoshes (idt 7675, alc 889 and alc992). I could try to fold in the codecs from HDA wizard, as well as this thread, if this looks good.

 

Examples, under 10.7:

 

% ./patch-hda.pl 111d7675
Patching AppleHDA codec 11d41984 with 111d7675
1 codec range comparison(s) to patch
Patching range comparison 11d41983
AppleHDA patched successfully.

under 10.8:

% ./patch-hda.pl 111d7675
Patching AppleHDA codec 11d41984 with 111d7675
No codec range comparisons require patching
AppleHDA patched successfully.
% ./patch-hda.pl 10ec0889
Patching AppleHDA codec 10ec0885 with 10ec0889
No codec range comparisons require patching
AppleHDA patched successfully.
% ./patch-hda.pl 'Realtek ALC889+inputs'
Patching AppleHDA codec 11d41984 with 10ec0889
No codec range comparisons require patching
AppleHDA patched successfully.
% ./patch-hda.pl
Usage: patch-hda.pl <codec-id>|<codec-name>
Examples: patch-hda.pl 111d7675
Examples: patch-hda.pl 'IDT 7675'
Supported codecs:
Target		 Patch		 Name
Codec ID		Codec ID
-------------------------------------------
111d7675		11d41984		IDT 7675
10ec0889		10ec0885		Realtek ALC889
10ec0889		11d41984		Realtek ALC889+inputs
10ec0892		10ec0885		Realtek ALC892

%

 

Note: Since there is debate as to which codec to use for alc889, I offer two choices above. I could just take the patch codec id as an optional argument, what do people think?

 

Update: I added a bunch more codecs (including all the codecs that HDA wizard had).

 

Why no permission for this? I would like to get my ALC889 running and want to look at this, is it there?

Link to comment
Share on other sites

Why no permission for this? I would like to get my ALC889 running and want to look at this, is it there?

Something is wrong with the forum software, I had to move the attachment to within post #1 to get it to be downloadable again.

 

Link to comment
Share on other sites

Thanks to this I finally have the current AppleHDA working with my ALC883 :)

 

I guess ALC885 must have some checks in place too, or has been nerfed in some other way. Binpatching ALC262 instead has got it working. Thanks for the info!

 

Hello, thx for your ALC883 AppleHda !

working perfekt with my Asus P5K-Pro and behind edits with my Nvidia GTS450 too.

 

But now i´ve got a GTX650 and i have to patch your Applehda again.

 

do you know the hex value´s i have to change to get my GTX650 HDMI working (dsdt edits are done so far)?

               Device (HDAU)
               {
                   Name (_ADR, One)
                   Method (_DSM, 4, NotSerialized)
                   {
                       Store (Package (0x02)
                           {
                               "hda-gfx",
                               Buffer (0x0A)
                               {
                                   "onboard-1"
                               }
                           }, Local0)
                       MCDP (Arg2, RefOf (Local0))
                       Return (Local0)
                   }
               }

 

 

i tried to get the 10.8.2 Hda.hext working with no luck. could you please so kind and post your terminal patch vor ALC883 ?

 

thx in advance

 

edit:

is find and replace AppleHDA:

de 10 e4 0b

de 10 1b 0e

 

AppleHDAControler

07 00 de 10

42 00 de 10

 

right for the gtx650?

Carstimann.ioreg.zip

Link to comment
Share on other sites

Hello, thx for your ALC883 AppleHda !

working perfekt with my Asus P5K-Pro and behind edits with my Nvidia GTS450 too.

 

But now i´ve got a GTX650 and i have to patch your Applehda again.

 

do you know the hex value´s i have to change to get my GTX650 HDMI working (dsdt edits are done so far)?

 

i tried to get the 10.8.2 Hda.hext working with no luck. could you please so kind and post your terminal patch vor ALC883 ?

No AppleHDA.kext edits are required for Nvidia HDMI audio in 10.8. As a matter of fact, with the layout-id of 12 and the proper HDMI audio dsdt edits, Nvidia HDMI audio works with the native AppleHDA.kext. In addition, working onboard audio is not necessary for HDMI audio in ML. Your HDMI audio problem is missing dsdt/P0P2/GFX0 edits. Add GFX0 to your dsdt per the example below. For onboard audio, you will need an 883 edited 10.8 AppleHDA.kext.

 

	 Device (P0P2) /** Existing Code **/
	 {
		 Name (_ADR, 0x00010000)
		 Name (_PRW, Package (0x02) /** Optional **/
		 {
			 0x09,
			 0x05
		 })
		 Device (GFX0) /** Add GFX0 Code **/
		 {
			 Name (_ADR, Zero)
			 Name (_SUN, One)
			 Method (_DSM, 4, NotSerialized)
			 {
				 Store (Package (0x06)
					 {
						 "@0,connector-type",
						 Buffer (0x04)
						 {
							 0x00, 0x08, 0x00, 0x00
						 },
						 "@1,connector-type",
						 Buffer (0x04)
						 {
							 0x00, 0x08, 0x00, 0x00
						 },
						 "hda-gfx",
						 Buffer (0x0A)
						 {
							 "onboard-1"
						 }
					 }, Local0)
				 DTGP (Arg0, Arg1, Arg2, Arg3, RefOf (Local0))
				 Return (Local0)
			 }
		 }
		 Device (HDAU) /** Existing Code **/

Link to comment
Share on other sites

hello, thx for reply. my Nvidia GTS450 ist working 100% without any errors with my Asus P5K-Pro, Riley Freeman´s patches ALC883 Applehda.kext and HDMI bin patch

 

#!/bin/bash
# Patch 10.6.4 AppleHDA & AppleHDAController for HDMI Audio - GeForce GTS 450
# Copyright (C) tonymacx86 LLC
perl -pi -0777 -e 's|\x07\x00\xde\x10|\x11\x00\xde\x10|g' "${3}/System/Library/Extensions/AppleHDA.kext/Contents/MacOS/AppleHDA"
perl -pi -0777 -e 's|\xde\x10\xe4\x0b|\xde\x10\xe9\x0b|g' "${3}/System/Library/Extensions/AppleHDA.kext/Contents/PlugIns/AppleHDAController.kext/Contents/MacOS/AppleHDAController"
touch "${3}/System/Library/Extensions/"
exit

post-282470-0-11543400-1349175536_thumb.png

post-282470-0-67214400-1349176070_thumb.png

post-282470-0-02885400-1349198128_thumb.png

Link to comment
Share on other sites

hello, thx for reply. my Nvidia GTS450 ist working 100% without any errors with my Asus P5K-Pro, Riley Freeman´s patches ALC883 Applehda.kext and HDMI bin patch

 

GTX650 give this error:

Sound assertion in AppleHDAController at line 1294

 

so is find and replace de 10 e4 0b to de 10 1b 0e rigt for the AppleHDAController GTX650/10.8.2 ?

 

i ad GFX0 to my dsdt but i´ve got some mistakes inside so it won´t recognize right.

would be great if you could help

 

Nvidia HDMI audio AppleHDA.kext patches for Snow Leopard and Lion are not necessary in Mountain Lion. Of course it worked for your GTS450 because it works without any edits.

 

How do you know the sound assertion is related to the GTX650? At the risk of repeating myself, device_id edits in ML AppleHDA are not necessary.

 

Regarding your dsdt/GFX0 edits, I do not know what is wrong, however, I can say it won't give you HDMI audio. You must add connector-type injection.

 

Something else you may not know, all Nvidia Kepler graphics cards are fully enabled in ML with GE=No (no dsdt/GFX0 edits necessary). To solve your GFX0 problem, edit GFX0 as described in my previous reply to you. If there is nothing else wrong, you will have HDMI audio on your fully enabled GTX650, the easy way.

Link to comment
Share on other sites

  • 3 weeks later...

I've updated my AppleHDA patch script to handle multiple codec ids and also dynamically figure out which extra comparisons should be patched to get the matching to work properly. The script supports osx 10.7 and osx 10.8.:

 

The script works by continuing my idea of patching the codec comparisons by zeroing out the codec ids found as operands to the applicable comparison instructions. This is easier to do in a script than trying to compute a new jump location as the script does not even need to parse AppleHDA's match routine's instructions (see ati-personality.pl for an example of that kind of processing).

 

I think maintaining a script like this will be more generally useful & easier to maintain than a bunch of perl one-liner posts.

 

This script resembles the concept of HDA wizard http://www.insanelym...howtopic=266531 but instead of being GUI focused, it focuses on getting the AppleHDA binary patching done automatic&right across osx releases.

 

I've only added support for a few codecs that I've used on hackintoshes (idt 7675, alc 889 and alc992). I could try to fold in the codecs from HDA wizard, as well as this thread, if this looks good.

 

Examples, under 10.7:

 

% ./patch-hda.pl 111d7675
Patching AppleHDA codec 11d41984 with 111d7675
1 codec range comparison(s) to patch
Patching range comparison 11d41983
AppleHDA patched successfully.

under 10.8:

% ./patch-hda.pl 111d7675
Patching AppleHDA codec 11d41984 with 111d7675
No codec range comparisons require patching
AppleHDA patched successfully.
% ./patch-hda.pl 10ec0889
Patching AppleHDA codec 10ec0885 with 10ec0889
No codec range comparisons require patching
AppleHDA patched successfully.
% ./patch-hda.pl 'Realtek ALC889+inputs'
Patching AppleHDA codec 11d41984 with 10ec0889
No codec range comparisons require patching
AppleHDA patched successfully.
% ./patch-hda.pl
Usage: patch-hda.pl <codec-id>|<codec-name>
Examples: patch-hda.pl 111d7675
Examples: patch-hda.pl 'IDT 7675'
Supported codecs:
Target Patch Name
Codec ID Codec ID
-------------------------------------------
111d7675 11d41984 IDT 7675
10ec0889 10ec0885 Realtek ALC889
10ec0889 11d41984 Realtek ALC889+inputs
10ec0892 10ec0885 Realtek ALC892

%

 

Note: Since there is debate as to which codec to use for alc889, I offer two choices above. I could just take the patch codec id as an optional argument, what do people think?

 

Update: I added a bunch more codecs (including all the codecs that HDA wizard had).

Thanks bcc9,

I have now a new AppleHDA.kext Mountain Lion version, for IDT 111d:76e0 aka 92HD91BXX :thumbsup_anim: .

 

To do this, I replaced in your patch_hda.pl all instance of 111d7605 codec!

{ name => 'IDT 76E0', #aka 92HD91BXX
 target_id => 0x111d76e0		 ,
 patch_id => 0x11d4198b #ADI 1984B
},

 

I confirm that this works, please consider adding to your script. :wink2:

 

 

Just a question, do you think we can use another id, different from ADI 1984 and ADI 1984B, for patching an IDT codecs?

I have made ​​in the past an AppleHDA.kext with 111d7605 codec, and since I have in my plans to build an installer for HP DV6/7 6000 and new 7000 series using the two codecs I mentioned:

 

my intention is to do live nr 2 IDT codecs in the same binary: 111d7605+111d76e0

 

I'm saying nonsense, or you think it's possible?

 

Micky

Link to comment
Share on other sites

Can someone help me with my Y530 - ALC888 ICH9 (HDAUDIO\FUNC_01&VEN_10EC&DEV_0888&SUBSYS_17AA3D78&REV_1002)

I want to make such patch but after reading 8 pages of this thread I can't find anything what suits to my laptop.

Link to comment
Share on other sites

I have now a new AppleHDA.kext Mountain Lion version, for IDT 111d:76e0

Thanks, I've just added it to the script. I've also added via vt2021 support as I've personally tested that and it's working.

Just a question, do you think we can use another id, different from ADI 1984 and ADI 1984B, for patching an IDT codecs?

Yes, I suspect several different codecs would match correctly, just like it has in the past for hackintosh support of other IDT codecs. However, as was noted for the alc889, different codecs may yield slightly different results (frequency of assertion failure messages, and perhaps some broken nodes). Best to keep the list organized with what is known/believed to work.

 

Should I move this applehda binary patching info http://www.insanelymac.com/forum/topic/280468-applehda-patching-in-mountain-lion/page__st__60#entry1840394

to a separate thread? It seems to be getting a bit buried here with support requests for pathmap/pinconfig layout help.

Link to comment
Share on other sites

Thanks for adding my codec and consulence!

 

Your script, deserves a place more visible, this could help many people ..... a new Topic for explain to everyone the "range comparisons" and why do.....would be nice!

...This only depends on your will! :)

 

Micky

 

 

P.S.

 

I immediately put the reference to your eventual new Topic here:

 

Under Costruction

http://www.insanelym...-idt-92hd91bxx/

 

:lol:

Link to comment
Share on other sites

Should I move this applehda binary patching info http://www.insanelym...60#entry1840394

to a separate thread? It seems to be getting a bit buried here with support requests for pathmap/pinconfig layout help.

I see You added ALC888 - i fired Your script and it worked (returned "patched successfully") ... am I suppose to do something else? Because after ONLY this patch - no sound ... :/

Link to comment
Share on other sites

Thanks for adding my codec and consulence!

 

Your script, deserves a place more visible, this could help many people ..... a new Topic for explain to everyone the "range comparisons" and why do.....would be nice!

...This only depends on your will! :)

 

Micky

 

 

 

P.S.

 

I immediately put the reference to your eventual new Topic here:

 

Under Costruction

http://www.insanelymac.com/forum/topic/283754-patched-applehdakext-for-codecs-idt-92hd81b1x5-idt-92hd91bxx/

 

:lol:

 

Does this also working with ALC268?

Link to comment
Share on other sites

 Share

×
×
  • Create New...