Mac OS X on x86 Hardware 2008–2024 Technical Archive
InfiniteMac OSx86 › Snow Leopard 10.6 › (Solved)Patching New AppleHDA Kext
77,491 reads · 2009-08-30 – 2010-03-18
Report Snow Leopard 10.6 ALC889a / Audio

(Solved)Patching New AppleHDA Kext

I'm trying to get my IDT audio working by patching AppleHDA like in leopard but it happens to be that Apple changed the structure of AppleHDA kext. So if anyone can help out please let me know.

Primary Author
@NIZGTR Published 2009-08-30
Collection
Snow Leopard 10.6
Archival Footprint
77,491 historical reads · 18 curated field notes (from 31 dispatches) · 2009-08-30 – 2010-03-18
Credited Voices (11)
@NIZGTR (10)@mormegil (8)@scififan68 (3)@timmyj9 (2)@chris7519 (2)@waneto2005@Chrysaor@airwalk776@msf5042@cmyhh110@Goten

I'm trying to get my IDT audio working by patching AppleHDA like in leopard but it happens to be that Apple changed the structure of AppleHDA kext. So if anyone can help out please let me know.

Author Updates & Technical Revisions

Follow-up dispatches by @NIZGTR

Author Update #1 @NIZGTR 2009-08-30 ↳ Re: @scififan68
@scififan68have you tired using voodoohda? it seems to support alot of codecs.

yes, thats what i'm using now, but its not very good becaus i cant change volume or mute it

Author Update #2 @NIZGTR 2009-08-30 ↳ Re: @mormegil
@mormegilWhat is your audio codec and what change of structure do you mean?

my codec is IDT and i'm tryin to insert my codec verb, config id, and my node layout, bu the structure of applehda has changed since leopard.

Author Update #3 @NIZGTR 2009-08-30 ↳ Re: @scififan68
@scififan68Are you on amd because you need to patch the /System folder with marvin's amd patcher to be able to change the volume and mute doesnt work.

no i'm on intel

Author Update #5 @NIZGTR 2009-08-30 ↳ Re: @mormegil
@mormegil1. Hex edit AppleHDA binary with your codec id 2. Edit Info.plist in AppleHDAHardwareConfigDriver.kext and AppleHDAPlatformDriver.kext 3. ConfigData goes into AppleHDAHardwareConfigDriver.kext 4. Layouts and PathMaps go into AppleHDAPlatformDriver.kext I use PlistEdit Pro and just copy/paste data from my working Leopard kexts into the…

i've been trying that all day yesterday but for some reason it wouldn't work. could you try it if i give you my working leopard applehda? that'd be great, let me know

Author Update #6 @NIZGTR 2009-08-30 ↳ Re: @mormegil
@mormegilI can try. I will need to know your full codec id too.

ok thx heres my working leopard AppleHDA attached and my codec id is:

287143602 

and my config data is:

AKccHwCnHUAApx4rAKcfAgGHHFABhx0QAYce
oAGHH5AAtxwgALcdMAC3HosAtx8CAMcc8ADH
HQAAxx7xAMcfQADXHEAA1x0BANceEADXH5AA
5xzyAOcdAADnHvEA5x9AAPcc9wD3HQAA9x7x
APcfQAEHHGABBx3gAQceSwEHHwEBFxwwARcd
4AEXHssBFx8B

let me know if you need anything else

Author Update #7 @NIZGTR 2009-08-30 ↳ Re: @mormegil
@mormegil1.7.4a1 AppleHDA.kext (Snow Leopard) patched for IDT device id = 0x111D76B2 Hope it works

it loads and shows this in system profiler:

Intel High Definition Audio:

  Device ID:	0x10280251
  Audio ID:	12
  Available Devices:

but no sound.

in leopard it shows this:

Intel High Definition Audio:

  Device ID:	0x10280251
  Audio ID:	12
  Available Devices:
  Headphone:
  Connection:	Combo
  Internal Microphone:
  Connection:	Internal
  Line In:
  Connection:	Combo
  Speaker:
  Connection:	Internal
  S/P-DIF Out:
  Connection:	Combo
  S/P-DIF In:
  Connection:	Combo

any idea whats stopping it?

Author Update #8 @NIZGTR 2009-08-30 ↳ Re: @mormegil
@mormegilAre you using HDAenabler or DSDT to inject your audio?

x64 hdaenabler but i'd like to try the dsdt method.

Author Update #9 @NIZGTR 2009-08-31 ↳ Re: @mormegil
@mormegilCheck out Snow's thread. There's a link on how to inject by DSDT and how to patch AppleHDA.

ok i did the DSDT method and everything works perfect. thanks alot. now all i got left is my 575x broadcom ethernet to get working

Synthesized Community Field Notes

18 technical responses curated from 31 original dispatches

Field Note #1 @scififan68 2009-08-30

have you tired using voodoohda? it seems to support alot of codecs.

Field Note #2 @mormegil 2009-08-30

What is your audio codec and what change of structure do you mean?

Field Note #3 @scififan68 2009-08-30

Are you on amd because you need to patch the /System folder with marvin's amd patcher to be able to change the volume and mute doesnt work.

Field Note #5 @mormegil 2009-08-30

1. Hex edit AppleHDA binary with your codec id
2. Edit Info.plist in AppleHDAHardwareConfigDriver.kext and AppleHDAPlatformDriver.kext
3. ConfigData goes into AppleHDAHardwareConfigDriver.kext
4. Layouts and PathMaps go into AppleHDAPlatformDriver.kext

I use PlistEdit Pro and just copy/paste data from my working Leopard kexts into the right places of SL kexts.

Field Note #6 @mormegil 2009-08-30

I can try. I will need to know your full codec id too.

Field Note #7 @mormegil 2009-08-30

1.7.4a1 AppleHDA.kext (Snow Leopard) patched for IDT device id = 0x111D76B2

Hope it works

Field Note #8 @mormegil 2009-08-30

Are you using HDAenabler or DSDT to inject your audio?

Field Note #9 @mormegil 2009-08-30

Check out Snow's thread →. There's a link on how to inject by DSDT and how to patch AppleHDA.

Field Note #10 @waneto2005 2009-09-01

I have a ALC272 audio, anybody have this legacyHDA drviers?

Field Note #11 @timmyj9 2009-09-01

if someone could mod the snow leopard kext like this leopard one i would be very grateful using the method in this forum
ty

Field Note #12 @mormegil 2009-09-01

Inject your audio by DSDT. See here ↗ for instructions.

Field Note #13 @chris7519 2009-09-06 ↳ Re: @mormegil
@mormegil1.7.4a1 AppleHDA.kext (Snow Leopard) patched for IDT device id = 0x111D76B2 Hope it works

I have the same Intel IDT audio device and I'm attempting to patch my DSDT, but for the life of me I can't find it. I only have one insert of AZLA and it's "AZLA, 8," and not listed anywhere else. I tried searching for 0x001B0000 but no dice... What other steps can I take? TIA!

Field Note #14 @mormegil 2009-09-06

If it's not there, just insert the HDEF code under Device (PCI0)

Field Note #15 @Chrysaor 2009-09-07 ↳ Re: @mormegil
@mormegilInject your audio by DSDT. See here (http://www.projectosx.com/forum/index.php?showtopic=465… ↗) for instructions.

Hi.
Thanks but unfortunately M1530/Sigmatel 9228 kext doesn't work for some reason.
Audio is injected from DSDT, used to work in Leopard with previously posted old kext, which worked excellent except the internal mic.
I saw you edited the codec id to the binary, put the pinconfigs to the HardwareConfigDriver and layouts to the PlatformDriver, not sure whats missing.

Here are the pinconfigs:

00a71c10 00a71d10 00a71e21 00a71f02 00b71cf0 00b71d00 00b71ef0 00b71f40 00c71cf0 00c71d00 00c71ef0 00c71f40 00d71c10 00d71d01 00d71e17 00d71f90 00e71c20 00e71d10 00e71ea1 00e71f02 00f71c30 00f71d10 00f71e01 00f71f02 01071cf0 01071d00 01071ef0 01071f40 01171cf0 01171d00 01171ef0 01171f40 01271cf0 01271d00 01271ef0 01271f40 01371c20 01371d01 01371ea6 01371f90 01471cf0 01471d00 01471ef0 01471f40 02171ca0 02171d10 02171e56 02171f98 02271cf0 02271d00 02271ef0 02271f40

Codec dump is attached.

Field Note #16 @chris7519 2009-09-07 ↳ Re: @mormegil
@mormegilIf it's not there, just insert the HDEF code under Device (PCI0)

Thanks for the advice mormegil! Got audio up and running... however, I'm running into the no sound after sleep issue. Is it possible to fix this through the DSDT? I thought maybe inserting "Notify (\_SB.PCI0.HDEF, 0x02)" into the Method (_L05... or Method (_L0D... section might work, but so far unsuccessful.

Scope (GPE) section:

Scope (_GPE)
    {
        Method (_L01, 0, NotSerialized)
        {
            Add (L01C, One, L01C)
            P8XH (Zero, One)
            P8XH (One, L01C)
            TRAP (TRTI, 0xA1)
            If (LAnd (LEqual (RP1D, Zero), \_SB.PCI0.EXP1.HPSX))
            {
                Sleep (0x64)
                If (\_SB.PCI0.EXP1.PDCX)
                {
                    Store (One, \_SB.PCI0.EXP1.PDCX)
                    Store (One, \_SB.PCI0.EXP1.HPSX)
                    Notify (\_SB.PCI0.EXP1, Zero)
                    Store (One, PRM0)
                    Store (PEHS, SSMP)
                }
                Else
                {
                    Store (One, \_SB.PCI0.EXP1.HPSX)
                }
            }

            If (LAnd (LEqual (RP2D, Zero), \_SB.PCI0.EXP2.HPSX))
            {
                Sleep (0x64)
                If (\_SB.PCI0.EXP2.PDCX)
                {
                    Store (One, \_SB.PCI0.EXP2.PDCX)
                    Store (One, \_SB.PCI0.EXP2.HPSX)
                    Notify (\_SB.PCI0.EXP2, Zero)
                    Store (0x02, PRM0)
                    Store (PEHS, SSMP)
                }
                Else
                {
                    Store (One, \_SB.PCI0.EXP2.HPSX)
                }
            }

            If (LAnd (LEqual (RP4D, Zero), \_SB.PCI0.EXP4.HPSX))
            {
                Sleep (0x64)
                If (\_SB.PCI0.EXP4.PDCX)
                {
                    Store (One, \_SB.PCI0.EXP4.PDCX)
                    Store (One, \_SB.PCI0.EXP4.HPSX)
                    Notify (\_SB.PCI0.EXP4, Zero)
                    Store (0x04, PRM0)
                    Store (PEHS, SSMP)
                }
                Else
                {
                    Store (One, \_SB.PCI0.EXP4.HPSX)
                }
            }

            If (LAnd (LEqual (CRPS, One), LGreaterEqual (MCHD, 0x04)))
            {
                If (LAnd (LEqual (RP5D, Zero), \_SB.PCI0.EXP5.HPSX))
                {
                    Sleep (0x64)
                    If (\_SB.PCI0.EXP5.PDCX)
                    {
                        Store (One, \_SB.PCI0.EXP5.PDCX)
                        Store (One, \_SB.PCI0.EXP5.HPSX)
                        If (\_SB.PCI0.EXP5.PDSX)
                        {
                            TRAP (TRTI, 0x5A)
                            CMSW (0x75, Zero)
                            If (And (One, \_SB.PCI0.LPC.EC0.SW2S))
                            {
                                CMSW (0x75, 0xAA)
                                Store (Zero, \_SB.PCI0.EXP5.J380.D3EF)
                            }
                        }

                        Notify (\_SB.PCI0.EXP5, Zero)
                        Store (0x05, PRM0)
                        Store (PEHS, SSMP)
                    }
                    Else
                    {
                        Store (One, \_SB.PCI0.EXP5.HPSX)
                    }
                }
            }

            If (LAnd (LEqual (RP6D, Zero), \_SB.PCI0.EXP6.HPSX))
            {
                Sleep (0x64)
                If (\_SB.PCI0.EXP6.PDCX)
                {
                    Store (One, \_SB.PCI0.EXP6.PDCX)
                    Store (One, \_SB.PCI0.EXP6.HPSX)
                    Notify (\_SB.PCI0.EXP6, Zero)
                    Store (0x06, PRM0)
                    Store (PEHS, SSMP)
                }
                Else
                {
                    Store (One, \_SB.PCI0.EXP6.HPSX)
                }
            }
        }

        Method (_L06, 0, NotSerialized)
        {
            If (LAnd (\_SB.PCI0.OVGA.GSSE, LNot (GSMI)))
            {
                \_SB.PCI0.OVGA.GSCI ()
            }
            Else
            {
                If (LEqual (And (\_SB.PCI0.ESCS, 0x08), 0x08))
                {
                    Store (One, Local0)
                    Store (\_SB.PCI0.T0IS, \_SB.PCI0.T0IS)
                    Store (\_SB.PCI0.T0IS, Local0)
                    Store (\_SB.PCI0.T1IS, \_SB.PCI0.T1IS)
                    Store (\_SB.PCI0.T1IS, Local0)
                    Store (One, SCIS)
                    Store (One, \_SB.PCI0.GTSE)
                }
                Else
                {
                    Store (One, SCIS)
                }
            }
        }

        Method (_L07, 0, NotSerialized)
        {
        }

        Method (_L08, 0, NotSerialized)
        {
        }

        Method (_L0B, 0, NotSerialized)
        {
            Notify (\_SB.PCI0.P32, 0x02)
        }

        Method (_L03, 0, NotSerialized)
        {
            Notify (\_SB.PCI0.UHC1, 0x02)
        }

        Method (_L04, 0, NotSerialized)
        {
            Notify (\_SB.PCI0.UHC2, 0x02)
        }

        Method (_L0C, 0, NotSerialized)
        {
            Notify (\_SB.PCI0.UHC3, 0x02)
        }

        Method (_L20, 0, NotSerialized)
        {
        }

        Method (_L0D, 0, NotSerialized)
        {
        }

        Method (_L0E, 0, NotSerialized)
        {
        }

        Method (_L05, 0, NotSerialized)
        {
            Notify (\_SB.PCI0.HDEF, 0x02)
        }
    }
Field Note #17 @airwalk776 2009-10-23

mormegil…

So this is what I have so: EVGA x58 SLI board which has a realtek audio chipset.

Worked great in 32 bit mode. because I am running my old applehda.kext from 10.5.7. However it wont work in 64 bit mode of course. Could you help me patch the SL applehda.kext with the info from my old 1.5.7 applehda.kext

I am not running hda enabler but I do have the dsdt patched with the following data. and with the dsdt along with my applehda.kext from 10.5.7 it works in SL 32bit mode.

codec-id",
Buffer (0x04)
{
0x89, 0x08, 0xEC, 0x10
},

"layout-id",
/**** Is ResourceTemplate, but EndTag not at buffer end ****/ Buffer (0x04)
{
0x79, 0x03, 0x00, 0x00

Field Note #18 @Goten 2010-03-18

Snow Apple HDA IDT 0x103C3603

i tried to use Snow AppleHDA by mormegil. Audio seems to work fine but there are two problem:
1) at startup appears some messages like this: Sound assertion "0 == entry" failed in "/SourceCache/AppleHDA/AppleHDA-157.1.24/AppleHDA/AppleHDAEngine.cpp" at line 2363 goto Exit

2) about 20 seconds after any sound event speakers generate a crackle.

how can I resolve them?

Corroborated & Participated: @timmyj9 @msf5042 @cmyhh110
Sources & Contributor Provenance (11 credited usernames · Thread #3835)
UsernameDossier ContributionDispatchesActive Window
@NIZGTRPrimary Author102009-08-30 → 2009-08-31
@mormegilCore Contributor82009-08-30 → 2009-09-06
@scififan68Core Contributor32009-08-30
@timmyj9Contributor22009-09-01
@chris7519Contributor22009-09-06 → 2009-09-07
@waneto2005Contributor12009-09-01
@ChrysaorContributor12009-09-07
@airwalk776Contributor12009-10-23
@msf5042Contributor12009-10-23
@cmyhh110Contributor12010-02-17
@GotenContributor12010-03-18