Jump to content

AppleHDA patching in Mountain Lion

AppleHDA ML .xml.zlib

  • Please log in to reply
237 replies to this topic

#141
Carstiman

Carstiman

    InsanelyMac Geek

  • Members
  • PipPipPip
  • 117 posts
  • Gender:Male
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

Attached Files



#142
toleda

toleda

    InsanelyMac Legend

  • Gurus
  • 1,102 posts
  • Gender:Male

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.

#143
Carstiman

Carstiman

    InsanelyMac Geek

  • Members
  • PipPipPip
  • 117 posts
  • Gender:Male
now i insert your code and it is 100 % working with the GTX650 and my dsdt.aml

Thanks a lot for your time and help !

#144
Micky1979

Micky1979

    I realized that I am lucky

  • Moderators
  • 1,817 posts
  • Gender:Male
  • Location:a 100m dal Tevere, vicino a Peppe

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!
Spoiler

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

#145
barat

barat

    InsanelyMac Protégé

  • Members
  • Pip
  • 10 posts
  • Gender:Male
  • Location:Poland
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.

#146
bcc9

bcc9

    InsanelyMac Legend

  • Coders
  • 1,278 posts
  • Gender:Male

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.insanelym...60#entry1840394
to a separate thread? It seems to be getting a bit buried here with support requests for pathmap/pinconfig layout help.

#147
Micky1979

Micky1979

    I realized that I am lucky

  • Moderators
  • 1,817 posts
  • Gender:Male
  • Location:a 100m dal Tevere, vicino a Peppe
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:

#148
barat

barat

    InsanelyMac Protégé

  • Members
  • Pip
  • 10 posts
  • Gender:Male
  • Location:Poland

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

#149
plsh2me

plsh2me

    InsanelyMac Geek

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

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

:lol:

Yes.............
This is what I am looking for.
Waiting for your finalization......
Thanks in advance ;)

#150
dsTny

dsTny

    InsanelyMac Protégé

  • Members
  • Pip
  • 47 posts

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:


Does this also working with ALC268?

#151
Micky1979

Micky1979

    I realized that I am lucky

  • Moderators
  • 1,817 posts
  • Gender:Male
  • Location:a 100m dal Tevere, vicino a Peppe

Yes.............
This is what I am looking for.
Waiting for your finalization......
Thanks in advance ;)

AppleHDA.kext.zip

IDT 92HD81B1X5 ML


Sorry I'm writing from my tablet....copy/paste here link to "beta" version of this kext from Italian forum

....



Since your is a laptop, maybe works ... try

#152
Micky1979

Micky1979

    I realized that I am lucky

  • Moderators
  • 1,817 posts
  • Gender:Male
  • Location:a 100m dal Tevere, vicino a Peppe

Does this also working with ALC268?

Your speaker are at Node 21, but you must compile your Platforms.xml and your layout28.xml...... from scrach

...you are everywhere on the web :P
Acer Aspire 7720G
CPU
Intel Core 2 Duo T9300 (2x2.5 Ghz)
Graphics
NVIDIA GeForce 9500M GS
right?

Micky

#153
dsTny

dsTny

    InsanelyMac Protégé

  • Members
  • Pip
  • 47 posts
Hello,

my Speakers ("Speaker Playback Switch") is at Node 15. See attachments at http://www.insanelym...d/#entry1858959
I tried to patch AppleHDA with no success.

Yeah I know that I am everywhere on the web because I am searching for a working 268 Kext / Patch for Mountain Lion a while.. But nobody can help me :/

#154
Micky1979

Micky1979

    I realized that I am lucky

  • Moderators
  • 1,817 posts
  • Gender:Male
  • Location:a 100m dal Tevere, vicino a Peppe

Hello,

my Speakers ("Speaker Playback Switch") is at Node 15. See attachments at http://www.insanelym...d/#entry1858959
I tried to patch AppleHDA with no success.

Yeah I know that I am everywhere on the web because I am searching for a working 268 Kext / Patch for Mountain Lion a while.. But nobody can help me :/

Confirm Node 21 for speaker, 15 is Audio mixer...

try this kext attached, I hope showing signs of life, if he does not work I can not help more, but you have base now.
I hope to help you.

10.8.2 version, patched codec 10ec0885 with 10ec0268
1 codec (range comparison 10ec0884)


Let me know if it works

Micky


EDIT

Sorry, I forgot to mention that you have to use layout12 in dsdt

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

...or copy paste from this example= Audio .dsl

Attached Files



#155
plsh2me

plsh2me

    InsanelyMac Geek

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

AppleHDA.kext.zip

IDT 92HD81B1X5 ML


Sorry I'm writing from my tablet....copy/paste here link to "beta" version of this kext from Italian forum

....



Since your is a laptop, maybe works ... try

Ok I have tried your sended kext. Device is recognised , but no sound at all :( .
Attached File  2012-10-23_20-15-41.jpg   279.28KB   35 downloads
Anyway thank you...
I would like to wait for your post.
Till now I have prepared the things as per you shared.
You can see at a glance...
Attached File  Now Have.zip   40.94KB   8 downloads
Am I on right track?

#156
dsTny

dsTny

    InsanelyMac Protégé

  • Members
  • Pip
  • 47 posts
Hello,

thank you for help! :)

I have following audio injection in my dsdt (see attachment for dsdt file and audio information):
		 Device (HDEF)
		 {
			 Name (_ADR, 0x001B0000)
			 OperationRegion (HDCS, PCI_Config, 0x54, 0x04)
			 Field (HDCS, DWordAcc, NoLock, Preserve)
			 {
					 , 15,
				 PMES, 1
			 }
			 Method (_PRW, 0, NotSerialized)
			 {
				 If (LEqual (WKMD, One))
				 {
					 Return (Package (0x02)
					 {
						 0x0D,
						 0x04
					 })
				 }
				 Else
				 {
					 Return (Package (0x02)
					 {
						 0x0D,
						 Zero
					 })
				 }
			 }
			 Method (_DSM, 4, NotSerialized)
			 {
				 Store (Package (0x06)
					 {
						 "hda-gfx",
						 Buffer (0x0A)
						 {
							 "onboard-1"
						 },
						 "layout-id",
						 Buffer (0x04)
						 {
								 0x0C, 0x00, 0x00, 0x00
						 },
						 "PinConfigurations",
						 Buffer (Zero) {}
					 }, Local0)
				 DTGP (Arg0, Arg1, Arg2, Arg3, RefOf (Local0))
				 Return (Local0)
			 }
		 }

If this is correct, Sound does not work :( It does not recognize my sound card at all :(

Thank you!

Attached Files



#157
Micky1979

Micky1979

    I realized that I am lucky

  • Moderators
  • 1,817 posts
  • Gender:Male
  • Location:a 100m dal Tevere, vicino a Peppe

Ok I have tried your sended kext. Device is recognised , but no sound at all :( .
Attached File  2012-10-23_20-15-41.jpg   279.28KB   35 downloads
Anyway thank you...
I would like to wait for your post.
Till now I have prepared the things as per you shared.
You can see at a glance...
Attached File  Now Have.zip   40.94KB   8 downloads
Am I on right track?

Please wait, i can fix it...your speaker are on node 13..., now I'm going to dinner :wink2:

Hello,

thank you for help! :)

I have following audio injection in my dsdt (see attachment for dsdt file and audio information):

		 Device (HDEF)
		 {
			 Name (_ADR, 0x001B0000)
			 OperationRegion (HDCS, PCI_Config, 0x54, 0x04)
			 Field (HDCS, DWordAcc, NoLock, Preserve)
			 {
					 , 15,
				 PMES, 1
			 }
			 Method (_PRW, 0, NotSerialized)
			 {
				 If (LEqual (WKMD, One))
				 {
					 Return (Package (0x02)
					 {
						 0x0D,
						 0x04
					 })
				 }
				 Else
				 {
					 Return (Package (0x02)
					 {
						 0x0D,
						 Zero
					 })
				 }
			 }
			 Method (_DSM, 4, NotSerialized)
			 {
				 Store (Package (0x06)
					 {
						 "hda-gfx",
						 Buffer (0x0A)
						 {
							 "onboard-1"
						 },
						 "layout-id",
						 Buffer (0x04)
						 {
								 0x0C, 0x00, 0x00, 0x00
						 },
						 "PinConfigurations",
						 Buffer (Zero) {}
					 }, Local0)
				 DTGP (Arg0, Arg1, Arg2, Arg3, RefOf (Local0))
				 Return (Local0)
			 }
		 }

If this is correct, Sound does not work :( It does not recognize my sound card at all :(

Thank you!

Idem

#158
Micky1979

Micky1979

    I realized that I am lucky

  • Moderators
  • 1,817 posts
  • Gender:Male
  • Location:a 100m dal Tevere, vicino a Peppe

Ok I have tried your sended kext. Device is recognised , but no sound at all :( .
Attached File  2012-10-23_20-15-41.jpg   279.28KB   35 downloads
Anyway thank you...
I would like to wait for your post.
Till now I have prepared the things as per you shared.
You can see at a glance...
Attached File  Now Have.zip   40.94KB   8 downloads
Am I on right track?

Try this Attached File  AppleHDA.kext IDT 7605.zip   829.16KB   24 downloads

Micky

#159
barat

barat

    InsanelyMac Protégé

  • Members
  • Pip
  • 10 posts
  • Gender:Male
  • Location:Poland
I have 0x0C too and tried kext above for my alc888 - result:

Posted Image

Device (HDEF)
		    {
			    Name (_ADR, 0x001B0000)
			    Method (_DSM, 4, NotSerialized)
			    {
				    Store (Package (0x08)
					    {
						    "subsystem-id",
						    Buffer (0x04)
						    {
								 0x0D, 0x3A, 0x00, 0x00
						    },
						    "subsystem-vendor-id",
						    Buffer (0x04)
						    {
								 0xAA, 0x17, 0x00, 0x00
						    },
						    "layout-id",
						    Buffer (0x04)
						    {
								 0x0C, 0x00, 0x00, 0x00
						    },
						    "PinConfigurations",
						    Buffer (Zero) {}
					    }, Local0)
				    DTGP (Arg0, Arg1, Arg2, Arg3, RefOf (Local0))
				    Return (Local0)
			    }
			    Method (_PRW, 0, NotSerialized)
			    {
				    Return (GPRW (0x0D, 0x03))
			    }
		    }

Worked perfect on 10.6.8 ...

#160
dsTny

dsTny

    InsanelyMac Protégé

  • Members
  • Pip
  • 47 posts

[...]
Idem


Have you got something for me? :D





Also tagged with one or more of these keywords: AppleHDA, ML, .xml.zlib


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