[HOW TO] Patch AppleHDA - Knowledge Base, Guide for how to fix/use original AppleHDA |
|
|

Jan 9 2011, 05:42 AM

- Initiate
- Group: Comrade
- Posts: 19
QUOTE (bcc9 @ Jan 8 2011, 06:06 PM)

Wish I could get the AppleHDAEngineOutputDP node to attach on my 9400m/mcp79 system. I went back and tried 10.6.4 AppleHDA and it made no difference. If you know of some trick, I'd love to hear it.
I sold my 09 mac mini before I figured out how this works for the 9400. Please reply with the following device_ids from your IOReg:
In HDAU: device-id =
in AppleHDAController: CodecList =
What product is your 9400 in?

Jan 11 2011, 01:37 AM



- Advanced Member
- Group: Comrade
- Posts: 112
QUOTE (toleda @ Jan 8 2011, 09:42 PM)

I sold my 09 mac mini before I figured out how this works for the 9400. Please reply with the following device_ids from your IOReg:
In HDAU: device-id =
in AppleHDAController: CodecList =
What product is your 9400 in?
My system is a dell studio xps 1340 laptop, which includes the mcp79 chipset and thus the 9400m gpu.
This system has no HDAU entry in the DSDT. However it does have an HDEF node and an IGPU node. I added the hda-gfx injection to both of those nodes in the DSDT.
In the ioregistry, my applehdacontroller related nodes look like the attached.
For HDMI, I am missing the engine being attached under IOHDACodecDevice@8,3
ioreg.txt ( 48.61K )
Number of downloads: 50
Reason for edit: attachment added

Jan 21 2011, 11:02 AM


- Member
- Group: Comrade
- Posts: 28
(Hi all ,
Now i got Speaker and HP and Internal Mic Working on my nforce 680i (Alc 885). The difference to 889a is that the codec Adress is 0.
My problem is Spdif Out doesn't work, it's an optical port but, in windows ( also in Linux Dump) its shown as RCA.
It tried Combo /RCA / Optical nothing worked. The nodes also look correct.
Now my question: Is there any other thing that is important to get it working.)I just started from 0 and i got it working (ATM with patched 10.6.2 AppleHDA) i still don't understand why it won't work with vanillia 10.6.6. Are there any subsystem IDS to patch?
Working:Speaker
HpRear MicLine in(Digital out)Line outNot Working:Front micDownload:
ALC885_for_nForce_680i.zip ( 1.31MB )
Number of downloads: 58 This post has been edited by iLeopod: Feb 6 2011, 09:47 AM

Jan 25 2011, 03:07 PM

- Initiate
- Group: Comrade
- Posts: 7
I got finaly Mic Int, Mic Ext and HP working except Speakers. Sys Prof and Sys Prefs show all INs and OUTs. Don't know why no sound from speakers, could someone help me?
ALC269_dump.zip ( 3.36K )
Number of downloads: 38
Windows 7 x64/ML 10.8.2/SL 10.6.8
Samsung R780-JS03: Core i5 520M 2,4GHz, 8GB RAM, ALC269, GeForce GT330M 1GB, WiFi Atheros 9280 (Dell1515), ETH Yukon 88E8059, BT BCM2046

Feb 2 2011, 08:11 PM

- Initiate
- Group: Comrade
- Posts: 24
Well, I'm messing with my AD1981HD, as VoodooHDA is somewhat weird (noise, volume changes etc). So I binary patched my AppleHDA with ID and carefully analyzed King's amazing tutorial (really, great work, finally understod all those audio things), as well as Taruga's.
As start, I am just trying to enable internal speakers. I have following questions, and I would be grateful if someone could point me:
AppleHDAHardwareDriver.kextIf I understood correctly, there are two nodes in plist which I need to fix:
- Layout
LayoutID needs to be same as in DSDT (12) and in AppleHDAHardwareConfogDriver. CodecID changed to mine. I just leaved InternalSpeaker as Outputs and config for beggining ... correct? PathMapID points to ID avalible in PathMap part ... correct?
CODE
<key>Layouts</key>
<array>
<dict>
<key>LayoutID</key>
<integer>12</integer>
<key>PathMapRef</key>
<array>
<dict>
<key>CodecID</key>
<array>
<integer>299112833</integer>
</array>
<key>IntSpeaker</key>
<dict>
<key>MaximumBootBeepValue</key>
<integer>64</integer>
<key>MuteGPIO</key>
<integer>0</integer>
<key>SignalProcessing</key>
<dict>…</dict>
</dict>
<key>Outputs</key>
<array>
<string>IntSpeaker</string>
</array>
<key>PathMapID</key>
<integer>9</integer>
</dict>
</array>
</dict>
</array>
- PathMaps
This sounds to be source of problems, according to assertion errors
I jeft just this one:
CODE
<dict>
<key>PathMap</key>
<array>
<array>
<array>
<array>
<dict>
<key>Amp</key>
<dict>
<key>Channels</key>
<array>
<dict>
<key>Bind</key>
<integer>1</integer>
<key>Channel</key>
<integer>1</integer>
</dict>
<dict>
<key>Bind</key>
<integer>2</integer>
<key>Channel</key>
<integer>2</integer>
</dict>
</array>
<key>MuteInputAmp</key>
<true/>
<key>PublishMute</key>
<true/>
<key>PublishVolume</key>
<true/>
<key>VolumeInputAmp</key>
<true/>
</dict>
<key>NodeID</key>
<integer>3</integer>
</dict>
<dict>
<key>NodeID</key>
<integer>14</integer>
</dict>
<dict>
<key>NodeID</key>
<integer>5</integer>
</dict>
</array>
</array>
</array>
</array>
<key>PathMapID</key>
<integer>9</integer>
</dict>
Now, according to Taruga, first NodeID is AudioOutput from codec, second one is mixer, and third one is jack (same ID as in codec verbs). I tried to detect Audio Output and mixer from codec graph (3 points to 5 with dotted gray line, 5 points to 14 ...) Is this reasoning OK? As it is not working ...
I posted my dumps. Thank you in advance

HDA.zip ( 35.85K )
Number of downloads: 39 This post has been edited by pyildirim: Feb 2 2011, 08:12 PM

Feb 2 2011, 09:00 PM


- Member
- Group: Comrade
- Posts: 28
when i understand it right then u have the wrong order:
outputs first 5 [PIN] then 14 [Mixer] and then 3 [output]

Feb 3 2011, 01:46 AM

- Initiate
- Group: Comrade
- Posts: 21
Hi bcc9,
I have a ZBOX HD22 with alc888 and 9400M.
With AppleHDA 10.6.2 and appropriate DSDT audio, the 9400M will handshake with my HDMI devices TV/receiver and opens an audio stream, but silence and occasional itunes crash (div by zero error). When I look at pinconfig in ioreg it seems different from my 9400 codec dump on node 5. You may have more success than me.
The imac 10,1 with 9400M has audio out over the display port, but I'm unable to find a ioreg,codec,dsdt dump for this machine (all imac10,1 dumps are for the ati graphics machines).
The CodecAddressMask is interesting since it seems to apply only to the 9400M variations 0x10de0ac0 and when you match the layout ID in dsdt only layout 0x41 works because its mask is 0x09 as you already explained. I bet this is to differenetiate the imac10,1 from other 9400M machines.
AppleHDA 10.6.3 fails to identify my 9400M without patching AppleHDAController, so something changed there, seems like this is when 320M became supported as the controller now has 0x10de000c when looking with HexEdit.
Not sure this helps much though.

Feb 5 2011, 08:17 PM

- Initiate
- Group: Comrade
- Posts: 24
QUOTE (iLeopod @ Feb 2 2011, 10:00 PM)

when i understand it right then u have the wrong order:
outputs first 5 [PIN] then 14 [Mixer] and then 3 [output]
I've tried, no luck

It seems that Silencer@applelife.ru tried also, and it seems that AD1981 is impossible because some limitations within AppleHDA itself ... pity ...
At least I succeeded with VoodooHDA ... just check Vectorize within Info.plist

Feb 6 2011, 09:39 AM


- Member
- Group: Comrade
- Posts: 28
yes the new apple hda kext is strange , even my supported codec is not working with the newest version. Im still at one from 10.6.2.

Feb 13 2011, 05:29 PM

- Initiate
- Group: Comrade
- Posts: 7
@bcc9
Could you please check the following entrys in your DSDT? You have to add this two Devices under Device (XVR0) or Device (RP01) if you're using Mac Device Names:
CODE
Device (GFX0)
{
Name (_ADR, Zero)
Method (_DSM, 4, NotSerialized)
{
Store (Package (0x02)
{
"hda-gfx",
Buffer (0x0A)
{
"onboard-1"
}
}, Local0)
DTGP (Arg0, Arg1, Arg2, Arg3, RefOf (Local0))
Return (Local0)
}
}
Device (HDAU)
{
Name (_ADR, One)
Method (_DSM, 4, NotSerialized)
{
Store (Package (0x02)
{
"hda-gfx",
Buffer (0x0A)
{
"onboard-1"
}
}, Local0)
DTGP (Arg0, Arg1, Arg2, Arg3, RefOf (Local0))
Return (Local0)
}
}
Furthermore you have to put the "hda-gfx" string into HDEF and IGPU section like described by The King on this
post: The result should look like this ...

Unfortunately I still have no Sound using HDMI but I guess it's something kext related.
This post has been edited by e60: Feb 13 2011, 07:51 PM
Mobo: Gigabyte GA-E7AUM-DS2H Bios: Original F4 CPU: C2D E8400 RAM: 8GB G.E.I.L. Black Dragon HDD: Samsung Spinpoint F1 1TB VGA: Onboard NVIDA 9400

Feb 14 2011, 01:48 AM



- Advanced Member
- Group: Comrade
- Posts: 112
QUOTE (e60 @ Feb 13 2011, 09:29 AM)

@bcc9
Could you please check the following entrys in your DSDT? You have to add this two Devices under Device (XVR0) or Device (RP01) if you're using Mac Device Names:
I have the hda-gfx EFI string injected for the HDEF node, and my IGPU node.
There is no HDAU node at PCI graphics device's function #1, as the 9400m video controller is an integrated part whose HDMI audio codec shares the audio controller with the mainboard's IDT audio codec.
Instructions which refer to adding an hda-gfx injection string for an HDAU node pertain to systems with a discrete graphics card that have their own audio controller.
For example desktop pci-e graphics cards.
QUOTE (e60 @ Feb 13 2011, 09:29 AM)

Furthermore you have to put the "hda-gfx" string into HDEF and IGPU section like described by The King on this
post:
Well aware of those recommendations, unfortunately while they may be a necessary step for HDMI audio it doesn't seem to be sufficient.
Also my ioregistry HDEF sub-tree has the DigitalAudioCapabilities node with two sub-nodes you site, under both IOHDACodecDevice@8,0 and IOHDACodecDevice@8,3. The missing part is the AppleHDAEngineOutputDP node under IOHDACodecDevice@8,3.
This post has been edited by bcc9: Feb 14 2011, 01:54 AM

Feb 14 2011, 09:09 AM

- Initiate
- Group: Comrade
- Posts: 7
QUOTE (bcc9)
I have the hda-gfx EFI string injected for the HDEF node, and my IGPU node.
There is no HDAU node at PCI graphics device's function #1, as the 9400m video controller is an integrated part whose HDMI audio codec shares the audio controller with the mainboard's IDT audio codec.
Instructions which refer to adding an hda-gfx injection string for an HDAU node pertain to systems with a discrete graphics card that have their own audio controller.
For example desktop pci-e graphics cards.
I’ve attached the original DSDT strings extracted from the Nvidia iMac 10.1. I mean the one which is also using the 9400 GPU, not the ATI one. If you take a look at them, you’ll see that there is also a Device (GFX0) and a Device (HDAU) located on Device (RP01). So it seems to me that we also need both Devices in DSDT, or am I getting something wrong?
Device (RP01)
Device__RP01_.txt ( 20.95K )
Number of downloads: 47Device (HDEF)
iMac_HDEF.txt ( 1.76K )
Number of downloads: 65
Mobo: Gigabyte GA-E7AUM-DS2H Bios: Original F4 CPU: C2D E8400 RAM: 8GB G.E.I.L. Black Dragon HDD: Samsung Spinpoint F1 1TB VGA: Onboard NVIDA 9400

Feb 14 2011, 09:22 AM



- Advanced Member
- Group: Comrade
- Posts: 112
QUOTE (e60 @ Feb 14 2011, 01:09 AM)

I’ve attached the original DSDT strings extracted from the Nvidia iMac 10.1. I mean the one which is also using the 9400 GPU, not the ATI one. If you take a look at them, you’ll see that there is also a Device (GFX0) and a Device (HDAU) located on Device (RP01). So it seems to me that we also need both Devices in DSDT, or am I getting something wrong?
I checked your ioregistry and dsdt dump you posted previously, and while the DSDT does contain 4 different devices with hda-gfx injection strings, 2 of those are for the discrete ATI card. Notice that those 2 (GFX0 & HDAU) do not appear in your ioregistry dump (as the hardware is not present). Consequently the strings are not injected and their presence in the DSDT is a no-op.
Presumably apple is simply using 1 DSDT for the two different configs for that imac model. It would certainly help them keep their assembly process simple.
This post has been edited by bcc9: Feb 14 2011, 09:24 AM

Feb 14 2011, 10:14 AM

- Initiate
- Group: Comrade
- Posts: 7
QUOTE (bcc9 @ Feb 14 2011, 10:22 AM)

I checked your ioregistry and dsdt dump you posted previously, and while the DSDT does contain 4 different devices with hda-gfx injection strings, 2 of those are for the discrete ATI card. Notice that those 2 (GFX0 & HDAU) do not appear in your ioregistry dump (as the hardware is not present). Consequently the strings are not injected and their presence in the DSDT is a no-op.
Presumably apple is simply using 1 DSDT for the two different configs for that imac model. It would certainly help them keep their assembly process simple.
Ah... ok! Thank you for the info! I was hoping that much these two Devices would help to solve the HDMI issue, that I didn’t realise that they are missing in IOReg. Sorry about that. So how do you inject the HDMI port in DSDT?
Mobo: Gigabyte GA-E7AUM-DS2H Bios: Original F4 CPU: C2D E8400 RAM: 8GB G.E.I.L. Black Dragon HDD: Samsung Spinpoint F1 1TB VGA: Onboard NVIDA 9400

Feb 14 2011, 06:20 PM



- Advanced Member
- Group: Comrade
- Posts: 112
QUOTE (e60 @ Feb 14 2011, 02:14 AM)

So how do you inject the HDMI port in DSDT?
For systems with integrated graphics, there would typically be 1 on-board audio controller and the 1 on-board graphics device. These two devices would show up on separate PCI bus slots, with no additional audio controller built-in to the graphics device at PCI function #1. So in this case you inject hda-gfx string into:
1) the HDEF device (or whatever the motherboard manufacturer named it in the DSDT such as AZA).
2) the graphics device (typically called IGPU in the DSDT)
For systems with a discrete graphics card, where the graphics card supports HDMI audio, the graphics card would occupy a PCI slot with 2 function slots, where slot 0 is the graphics and slot 1 is an HDMI audio controller. If this is an add-on card you typically have no DSDT entries for these and you have to first add both devices, customarily a GFX0 device for the graphics and an HDAU device for the HDMI audio controller. You also add the hda-gfx injection string to these two new devices.
For my desktop system, lspci -nnv shows:
CODE
00:1b.0 Audio device [0403]: Intel Corporation 82801I (ICH9 Family) HD Audio Controller [8086:293e] (rev 02)
Subsystem: Giga-byte Technology Device [1458:a002]
Flags: bus master, fast devsel, latency 0, IRQ 43
Memory at f8200000 (64-bit, non-prefetchable) [size=16K]
Capabilities: <access denied>
Kernel driver in use: HDA Intel
Kernel modules: snd-hda-intel
...
01:00.0 VGA compatible controller [0300]: ATI Technologies Inc Redwood [Radeon HD 5670] [1002:68d8] (prog-if 00 [VGA controller])
Subsystem: PC Partner Limited Device [174b:e151]
Flags: bus master, fast devsel, latency 0, IRQ 42
Memory at e0000000 (64-bit, prefetchable) [size=256M]
Memory at f5000000 (64-bit, non-prefetchable) [size=128K]
I/O ports at b000 [size=256]
[virtual] Expansion ROM at f4000000 [disabled] [size=128K]
Capabilities: <access denied>
Kernel driver in use: radeon
Kernel modules: fglrx, radeon
01:00.1 Audio device [0403]: ATI Technologies Inc Redwood HDMI Audio [Radeon HD 5600 Series] [1002:aa60]
Subsystem: PC Partner Limited Device [174b:aa60]
Flags: bus master, fast devsel, latency 0, IRQ 44
Memory at f5020000 (64-bit, non-prefetchable) [size=16K]
Capabilities: <access denied>
Kernel driver in use: HDA Intel
Kernel modules: snd-hda-intel
This is the discrete card with HDMI audio case.
Thus I added GFX0 and HDAU devices to my DSDT for PCI addresses 01:00.0 and 01:00.1 respectively.
For my dell xps 1340 with integrated 9400M GPU:
CODE
00:08.0 Audio device [0403]: nVidia Corporation Device [10de:0ac0] (rev b1)
Subsystem: Dell Device [1028:0271]
Flags: bus master, 66MHz, fast devsel, latency 0, IRQ 17
Memory at f0880000 (32-bit, non-prefetchable) [size=16K]
Capabilities: [44] Power Management version 2
Kernel driver in use: HDA Intel
Kernel modules: snd-hda-intel
...
03:00.0 VGA compatible controller [0300]: nVidia Corporation Device [10de:0866] (rev b1) (prog-if 00 [VGA controller])
Subsystem: Dell Device [1028:0271]
Flags: bus master, fast devsel, latency 0, IRQ 18
Memory at cc000000 (32-bit, non-prefetchable) [size=16M]
Memory at d0000000 (64-bit, prefetchable) [size=256M]
Memory at ce000000 (64-bit, prefetchable) [size=32M]
I/O ports at 4000 [size=128]
Capabilities: [60] Power Management version 2
Capabilities: [68] Message Signalled Interrupts: Mask- 64bit+ Count=1/1 Enable-
Kernel driver in use: nvidia
Kernel modules: nvidiafb, nvidia
This is the integrated video case with just 1 audio controller for the whole system. So I added the hda-gfx strings to the existing HDEF and IGPU devices in the dsdt.

Feb 15 2011, 08:14 AM

- Initiate
- Group: Comrade
- Posts: 7
Thank you for the detailed informations.

I’ve deleted the aditional code from my DSDT and now I’m only using The King’s recommended injections in HDEF and IGPU. And guess what, you were totally right!

I still have the DigitalAudioCapabilities in my IOReg.

Once again, sorry for the noobish behavior. Next time I have to think first before I write such postings.
Mobo: Gigabyte GA-E7AUM-DS2H Bios: Original F4 CPU: C2D E8400 RAM: 8GB G.E.I.L. Black Dragon HDD: Samsung Spinpoint F1 1TB VGA: Onboard NVIDA 9400

Feb 15 2011, 08:43 PM



- Advanced Member
- Group: Comrade
- Posts: 112
QUOTE (e60 @ Feb 15 2011, 12:14 AM)

Thank you for the detailed informations.

I’ve deleted the aditional code from my DSDT and now I’m only using The King’s recommended injections in HDEF and IGPU. And guess what, you were totally right!

I still have the DigitalAudioCapabilities in my IOReg.

Once again, sorry for the noobish behavior. Next time I have to think first before I write such postings.

Well after all that, let me know if you can get your hdmi device to show up under sound preferences, as I still can't.

Feb 18 2011, 10:38 AM



- Member
- Group: Comrade
- Posts: 55
@the king
I must say this is a great guide. Thanks for this guide I got my sound card working on OS X. But there are a few things remain unsolved.
no.1 When waking from sleep there is a big crack sound occures before it goes narmal.
no.2 Restart will not working after waking from sleep.
no.3 No instruction about singnal processing patch.
This is the flaws that I found of this guide. Maybe you or someone else here have figuered out but forget to
reversion this guide. I hope someone can make this flaws gone.
regards
aux
Windows 7 SP1+ Snow leopard 10.6.8
CPU : T2390 Ram : 2G=2*1G Graphics : Intel X3100 Ethernet: BCM5906 Wireless: BCM4312 Audio Card: ALC861-VD (Fully working)
.

Mar 29 2011, 05:19 AM

- Initiate
- Group: Comrade
- Posts: 19
Nvidia (Fermi) HDMI Audio working with OSX 10.6.5 and later. Example: GTX 460
Credit to bcc9
Start with a virgin AppleHDA.kext (v. 1.9.9) on a GTX460. (10.6.5 or 10.6.6 or 10.6.7 is fine)
1. Patch AppleHDA.kext
AppleHDA binary - From 0a 00 de 10 to 12 00 de 10 (4x)
AppleHDAController binary - From de 10 e2 0b to de 10 eb 0b (2x)
2. Add this to GFX0 in DSDT
"@1,connector-type",
Buffer (0x04)
{
0x00, 0x08, 0x00, 0x00
},
Note, you have to add 2 bytes to "Store (Package(0x1a)" , i.e., "Store (Package(0x1c)"
3. Verify com.apple.Boot.plist is set to:
GraphicsEnabler=No
4. Reboot.
Works on my GTX460 and GT425M and 10.6.6.
Example: GTX 460 PEGP/GFX0/HDAU DSDT - HDMI Audio edit (never complied)
CODE
Device (PEGP)
{
Name (_ADR, 0x00030000)
Name (_PRW, Package (0x02)
{
0x09,
0x05
})
Device (GFX0)
{
Name (_ADR, Zero)
Method (_DSM, 4, NotSerialized)
{
Store (Package (0x1c)
{
"AAPL,slot-name",
"PCI x16",
"@0,compatible",
Buffer (0x0B)
{
"NVDA,NVMac"
},
"@0,device_type",
Buffer (0x08)
{
"display"
},
"@0,name",
Buffer (0x0F)
{
"NVDA,Display-A"
},
"@1,compatible",
Buffer (0x0B)
{
"NVDA,NVMac"
},
"@1,connector-type",
Buffer (0x04)
{
0x00, 0x08, 0x00, 0x00
},
"@1,device_type",
Buffer (0x08)
{
"display"
},
"@1,name",
Buffer (0x0F)
{
"NVDA,Display-B"
},
"NVCAP",
Buffer (0x18)
{
/* 0000 */ 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00,
/* 0008 */ 0x1c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0A,
/* 0010 */ 0x00, 0x00, 0x00, 0x00
},
"VRAM,totalsize",
Buffer (0x04)
{
0x00, 0x00, 0x00, 0x40
},
"device_type",
Buffer (0x0C)
{
"NVDA,Parent"
},
"model",
Buffer (0x10)
{
"GeForce GTX 460"
},
"rom-revision",
Buffer (0x0e)
{
"70.08.29.00.30"
},
"hda-gfx",
Buffer (0x0A)
{
"onboard-1"
}
}, Local0)
DTGP (Arg0, Arg1, Arg2, Arg3, RefOf (Local0))
Return (Local0)
}
}
Device (HDAU)
{
Name (_ADR, One)
Method (_DSM, 4, NotSerialized)
{
Store (Package (0x02)
{
"hda-gfx",
Buffer (0x0A)
{
"onboard-1"
}
}, Local0)
DTGP (Arg0, Arg1, Arg2, Arg3, RefOf (Local0))
Return (Local0)
}
}
}
This post has been edited by toleda: Mar 30 2011, 06:01 AM

Mar 29 2011, 06:20 AM



- Advanced Member
- Group: Comrade
- Posts: 112
QUOTE (toleda @ Mar 28 2011, 10:19 PM)

Nvidia HDMI Audio working with OSX 10.6.5 and later. Example: GTX 460
Note that injecting the connector-type to fix this doesn't work if av-signal-type is not already 0x8. So it doesn't work for some nvidia platforms with hdmi, such as dell laptops with 9400m.