Sie sind auf Seite 1von 12

AppleHDA Guide by Taruga

This is a guide of what I´ve done and told others to how to accomplish this.

• Page 2 - What you´ll need

• Page 3 - Linux Codec dump example of ALC882

• Page 7 - PathMap from AppleHDA.kext Info.plist


AppleHDA Guide by Taruga

What you´ll need:

• Linux LiveCD Distro to get a dump of codec#0 (see page 3)

• Hex Editor to change AppleHDA binary codec match

• ALCinject.kext to force injecting layout-id, otherway AppleHDA.kext won´t load

PathMap Example: (see page 7)

The important thing about pathmaps with the corrects nodes to your linux dump
Compare the nodes I´m using with the nodes from linux codec dump above.
On Info.plist NodeID´s numbers are decimal values, on linux codec dump they are hexa-
decimal (you can use OSX Calculator to convert them)

It´s like this, you need:

• -an input/ouput node


• a mixer
• a jack

On this part, you have nodes:

• 7 (0x07) - NodeID 7 is an Input


• 36 (0x24) - NodeID 36 is a Mixer
24 (0x18) - NodeID 24 is the Pink Rear Mic Jack

This sets up Mic Input

To find and replace you codec ID in AppleHDA binary, you should look for:

8508ec10 - They appear with reversed bytes

Original AppleHDA kext comes with 10ec0885 (ALC885)


So I searched with hex editor for:

8508ec10 and changed it to 8208ec10 (10ec0882 ALC882)


AppleHDA Guide by Taruga

Linux codec#0 dump

Codec: Realtek ALC882


Address: 0
Vendor Id: 0x10ec0882
Subsystem Id: 0x10430000
Revision Id: 0x100101
Default PCM: rates 0x560, bits 0x0e, types 0x1
Default Amp-In caps: N/A
Default Amp-Out caps: N/A
Node 0x02 [Audio Output] wcaps 0x11: Stereo
PCM: rates 0x560, bits 0x0e, types 0x1
Node 0x03 [Audio Output] wcaps 0x11: Stereo
PCM: rates 0x560, bits 0x0e, types 0x1
Node 0x04 [Audio Output] wcaps 0x11: Stereo
PCM: rates 0x560, bits 0x0e, types 0x1
Node 0x05 [Audio Output] wcaps 0x11: Stereo
PCM: rates 0x560, bits 0x0e, types 0x1
Node 0x06 [Audio Output] wcaps 0x211: Stereo Digital
PCM: rates 0x560, bits 0x1e, types 0x1
Node 0x07 [Audio Input] wcaps 0x10011b: Stereo Amp-In
Amp-In caps: ofs=0x08, nsteps=0x1f, stepsize=0x05, mute=1
Amp-In vals: [0x00 0x00]
PCM: rates 0x160, bits 0x06, types 0x1
Connection: 1
0x24
Node 0x08 [Audio Input] wcaps 0x10011b: Stereo Amp-In
Amp-In caps: ofs=0x08, nsteps=0x1f, stepsize=0x05, mute=1
Amp-In vals: [0x00 0x00]
PCM: rates 0x160, bits 0x06, types 0x1
Connection: 1
0x23
Node 0x09 [Audio Input] wcaps 0x10011b: Stereo Amp-In
Amp-In caps: ofs=0x08, nsteps=0x1f, stepsize=0x05, mute=1
Amp-In vals: [0x00 0x00]
PCM: rates 0x160, bits 0x06, types 0x1
Connection: 1
0x22
Node 0x0a [Audio Input] wcaps 0x100391: Stereo Digital
PCM: rates 0x560, bits 0x1e, types 0x1
Connection: 1
0x1f
Node 0x0b [Audio Mixer] wcaps 0x20010b: Stereo Amp-In
Amp-In caps: ofs=0x17, nsteps=0x1f, stepsize=0x05, mute=1
Amp-In vals: [0x00 0x00] [0x00 0x00] [0x00 0x00] [0x00 0x00] [0x00 0x00] [0x97 0x97]
[0x97 0x97] [0x97 0x97] [0x97 0x97] [0x97 0x97]
Connection: 10
0x18 0x19 0x1a 0x1b 0x1c 0x1d 0x14 0x15 0x16 0x17
Node 0x0c [Audio Mixer] wcaps 0x20010f: Stereo Amp-In Amp-Out
Amp-In caps: ofs=0x00, nsteps=0x00, stepsize=0x00, mute=1
Amp-In vals: [0x00 0x00] [0x00 0x00]
Amp-Out caps: ofs=0x1f, nsteps=0x1f, stepsize=0x05, mute=0
Amp-Out vals: [0x00 0x00]
Connection: 2
0x02 0x0b
Node 0x0d [Audio Mixer] wcaps 0x20010f: Stereo Amp-In Amp-Out
Amp-In caps: ofs=0x00, nsteps=0x00, stepsize=0x00, mute=1
Amp-In vals: [0x00 0x00] [0x00 0x00]
Amp-Out caps: ofs=0x1f, nsteps=0x1f, stepsize=0x05, mute=0
Amp-Out vals: [0x00 0x00]
Connection: 2
0x03 0x0b
Node 0x0e [Audio Mixer] wcaps 0x20010f: Stereo Amp-In Amp-Out
Amp-In caps: ofs=0x00, nsteps=0x00, stepsize=0x00, mute=1
AppleHDA Guide by Taruga

Amp-In vals: [0x00 0x00] [0x00 0x00]


Amp-Out caps: ofs=0x1f, nsteps=0x1f, stepsize=0x05, mute=0
Amp-Out vals: [0x00 0x00]
Connection: 2
0x04 0x0b
Node 0x0f [Audio Mixer] wcaps 0x20010f: Stereo Amp-In Amp-Out
Amp-In caps: ofs=0x00, nsteps=0x00, stepsize=0x00, mute=1
Amp-In vals: [0x00 0x00] [0x00 0x00]
Amp-Out caps: ofs=0x1f, nsteps=0x1f, stepsize=0x05, mute=0
Amp-Out vals: [0x00 0x00]
Connection: 2
0x05 0x0b
Node 0x10 [Vendor Defined Widget] wcaps 0xf00000: Mono
Node 0x11 [Vendor Defined Widget] wcaps 0xf00000: Mono
Node 0x12 [Vendor Defined Widget] wcaps 0xf00000: Mono
Node 0x13 [Vendor Defined Widget] wcaps 0xf00000: Mono
Node 0x14 [Pin Complex] wcaps 0x40018f: Stereo Amp-In Amp-Out
Amp-In caps: ofs=0x00, nsteps=0x03, stepsize=0x27, mute=0
Amp-In vals: [0x00 0x00] [0x00 0x00] [0x00 0x00] [0x00 0x00] [0x00 0x00]
Amp-Out caps: ofs=0x00, nsteps=0x00, stepsize=0x00, mute=1
Amp-Out vals: [0x00 0x00]
Pincap 0x083f: IN OUT HP
Pin Default 0x01014c10: [Jack] Line Out at Ext Rear
Conn = 1/8, Color = Green
Pin-ctls: 0x40: OUT
Connection: 5
0x0c* 0x0d 0x0e 0x0f 0x26
Node 0x15 [Pin Complex] wcaps 0x40018f: Stereo Amp-In Amp-Out
Amp-In caps: ofs=0x00, nsteps=0x03, stepsize=0x27, mute=0
Amp-In vals: [0x00 0x00] [0x00 0x00] [0x00 0x00] [0x00 0x00] [0x00 0x00]
Amp-Out caps: ofs=0x00, nsteps=0x00, stepsize=0x00, mute=1
Amp-Out vals: [0x00 0x00]
Pincap 0x083f: IN OUT HP
Pin Default 0x01012c12: [Jack] Line Out at Ext Rear
Conn = 1/8, Color = Grey
Pin-ctls: 0x40: OUT
Connection: 5
0x0c 0x0d* 0x0e 0x0f 0x26
Node 0x16 [Pin Complex] wcaps 0x40018f: Stereo Amp-In Amp-Out
Amp-In caps: ofs=0x00, nsteps=0x03, stepsize=0x27, mute=0
Amp-In vals: [0x00 0x00] [0x00 0x00] [0x00 0x00] [0x00 0x00] [0x00 0x00]
Amp-Out caps: ofs=0x00, nsteps=0x00, stepsize=0x00, mute=1
Amp-Out vals: [0x00 0x00]
Pincap 0x083f: IN OUT HP
Pin Default 0x01016c11: [Jack] Line Out at Ext Rear
Conn = 1/8, Color = Orange
Pin-ctls: 0x40: OUT
Connection: 5
0x0c 0x0d 0x0e* 0x0f 0x26
Node 0x17 [Pin Complex] wcaps 0x40018f: Stereo Amp-In Amp-Out
Amp-In caps: ofs=0x00, nsteps=0x03, stepsize=0x27, mute=0
Amp-In vals: [0x00 0x00] [0x00 0x00] [0x00 0x00] [0x00 0x00] [0x00 0x00]
Amp-Out caps: ofs=0x00, nsteps=0x00, stepsize=0x00, mute=1
Amp-Out vals: [0x00 0x00]
Pincap 0x083f: IN OUT HP
Pin Default 0x01011c14: [Jack] Line Out at Ext Rear
Conn = 1/8, Color = Black
Pin-ctls: 0x40: OUT
Connection: 5
0x0c 0x0d 0x0e 0x0f* 0x26
Node 0x18 [Pin Complex] wcaps 0x40018f: Stereo Amp-In Amp-Out
Amp-In caps: ofs=0x00, nsteps=0x03, stepsize=0x27, mute=0
Amp-In vals: [0x00 0x00] [0x00 0x00] [0x00 0x00] [0x00 0x00] [0x00 0x00]
Amp-Out caps: ofs=0x00, nsteps=0x00, stepsize=0x00, mute=1
AppleHDA Guide by Taruga

Amp-Out vals: [0x80 0x80]


Pincap 0x08173f: IN OUT HP
Pin Default 0x01a19c30: [Jack] Mic at Ext Rear
Conn = 1/8, Color = Pink
Pin-ctls: 0x24: IN
Connection: 5
0x0c* 0x0d 0x0e 0x0f 0x26
Node 0x19 [Pin Complex] wcaps 0x40018f: Stereo Amp-In Amp-Out
Amp-In caps: ofs=0x00, nsteps=0x03, stepsize=0x27, mute=0
Amp-In vals: [0x00 0x00] [0x00 0x00] [0x00 0x00] [0x00 0x00] [0x00 0x00]
Amp-Out caps: ofs=0x00, nsteps=0x00, stepsize=0x00, mute=1
Amp-Out vals: [0x80 0x80]
Pincap 0x08173f: IN OUT HP
Pin Default 0x02a19c40: [Jack] Mic at Ext Front
Conn = 1/8, Color = Pink
Pin-ctls: 0x24: IN
Connection: 5
0x0c* 0x0d 0x0e 0x0f 0x26
Node 0x1a [Pin Complex] wcaps 0x40018f: Stereo Amp-In Amp-Out
Amp-In caps: ofs=0x00, nsteps=0x03, stepsize=0x27, mute=0
Amp-In vals: [0x00 0x00] [0x00 0x00] [0x00 0x00] [0x00 0x00] [0x00 0x00]
Amp-Out caps: ofs=0x00, nsteps=0x00, stepsize=0x00, mute=1
Amp-Out vals: [0x80 0x80]
Pincap 0x08173f: IN OUT HP
Pin Default 0x01813c31: [Jack] Line In at Ext Rear
Conn = 1/8, Color = Blue
Pin-ctls: 0x20: IN
Connection: 5
0x0c* 0x0d 0x0e 0x0f 0x26
Node 0x1b [Pin Complex] wcaps 0x40018f: Stereo Amp-In Amp-Out
Amp-In caps: ofs=0x00, nsteps=0x03, stepsize=0x27, mute=0
Amp-In vals: [0x00 0x00] [0x00 0x00] [0x00 0x00] [0x00 0x00] [0x00 0x00]
Amp-Out caps: ofs=0x00, nsteps=0x00, stepsize=0x00, mute=1
Amp-Out vals: [0x00 0x00]
Pincap 0x08173f: IN OUT HP
Pin Default 0x02214c20: [Jack] HP Out at Ext Front
Conn = 1/8, Color = Green
Pin-ctls: 0xc0: OUT HP
Connection: 5
0x0c* 0x0d 0x0e 0x0f 0x26
Node 0x1c [Pin Complex] wcaps 0x400001: Stereo
Pincap 0x0820: IN
Pin Default 0x99331132: [Fixed] CD at Int ATAPI
Conn = ATAPI, Color = Black
Pin-ctls: 0x00:
Node 0x1d [Pin Complex] wcaps 0x400000: Mono
Pincap 0x0820: IN
Pin Default 0x411111f0: [N/A] Speaker at Ext Rear
Conn = 1/8, Color = Black
Pin-ctls: 0x00:
Node 0x1e [Pin Complex] wcaps 0x400300: Mono Digital
Pincap 0x0810: OUT
Pin Default 0x014b711e: [Jack] SPDIF Out at Ext Rear
Conn = Comb, Color = Yellow
Pin-ctls: 0x00:
Connection: 1
0x06
Node 0x1f [Pin Complex] wcaps 0x400200: Mono Digital
Pincap 0x0820: IN
Pin Default 0x411161f0: [N/A] Speaker at Ext Rear
Conn = 1/8, Color = Orange
Pin-ctls: 0x00:
Node 0x20 [Vendor Defined Widget] wcaps 0xf00040: Mono
Node 0x21 [Volume Knob Widget] wcaps 0x600080: Mono
AppleHDA Guide by Taruga

Node 0x22 [Audio Mixer] wcaps 0x20010f: Stereo Amp-In Amp-Out


Amp-In caps: ofs=0x00, nsteps=0x00, stepsize=0x00, mute=1
Amp-In vals: [0x00 0x00] [0x80 0x80] [0x80 0x80] [0x80 0x80] [0x80 0x80] [0x80 0x80]
[0x80 0x80] [0x80 0x80] [0x80 0x80] [0x80 0x80] [0x80 0x80]
Amp-Out caps: N/A
Amp-Out vals: [0x00 0x00]
Connection: 11
0x18 0x19 0x1a 0x1b 0x1c 0x1d 0x14 0x15 0x16 0x17 0x0b
Node 0x23 [Audio Mixer] wcaps 0x20010f: Stereo Amp-In Amp-Out
Amp-In caps: ofs=0x00, nsteps=0x00, stepsize=0x00, mute=1
Amp-In vals: [0x00 0x00] [0x80 0x80] [0x80 0x80] [0x80 0x80] [0x80 0x80] [0x80 0x80]
[0x80 0x80] [0x80 0x80] [0x80 0x80] [0x80 0x80] [0x80 0x80]
Amp-Out caps: N/A
Amp-Out vals: [0x00 0x00]
Connection: 11
0x18 0x19 0x1a 0x1b 0x1c 0x1d 0x14 0x15 0x16 0x17 0x0b
Node 0x24 [Audio Mixer] wcaps 0x20010f: Stereo Amp-In Amp-Out
Amp-In caps: ofs=0x00, nsteps=0x00, stepsize=0x00, mute=1
Amp-In vals: [0x00 0x00] [0x80 0x80] [0x80 0x80] [0x80 0x80] [0x80 0x80] [0x80 0x80]
[0x80 0x80] [0x80 0x80] [0x80 0x80] [0x80 0x80] [0x80 0x80]
Amp-Out caps: N/A
Amp-Out vals: [0x00 0x00]
Connection: 11
0x18 0x19 0x1a 0x1b 0x1c 0x1d 0x14 0x15 0x16 0x17 0x0b
Node 0x25 [Audio Output] wcaps 0x11: Stereo
PCM: rates 0x560, bits 0x0e, types 0x1
Node 0x26 [Audio Mixer] wcaps 0x20010f: Stereo Amp-In Amp-Out
Amp-In caps: ofs=0x00, nsteps=0x00, stepsize=0x00, mute=1
Amp-In vals: [0x00 0x00] [0x00 0x00]
Amp-Out caps: ofs=0x1f, nsteps=0x1f, stepsize=0x05, mute=0
Amp-Out vals: [0x1f 0x1f]
Connection: 2
0x25 0x0b
AppleHDA Guide by Taruga

Mic Setup




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









<key>NodeID</key>
Node 0x07 [Audio









<integer>7</integer>
Input]









<key>ProcessingState</key>










<true/>









</dict>
NodeID 36








<dict>
Node 0x24 [Audio









<key>NodeID</key>
Mixer]









<integer>36</integer>









</dict>
Boost








<dict>
To give Mic more amp









<key>Boost</key>
power









<integer>3</integer>










<key>NodeID</key>










<integer>24</integer>
NodeID 24









<key>VREF</key>
Node 0x18 [Pin Com-









<integer>80</integer>
plex]








</dict>
Pin Default







</array>
0x01a19c30: [Jack]






</array>




Mic at Ext Rear





</array>
Conn = 1/8,

Color = Pink
Pin-ctls: 0x24: IN
AppleHDA Guide by Taruga

Line In Setup









<array>







<array>








<array>



















<dict>










<key>Amp</key>










<dict>











<key>Channels</key>











<array>












<dict>













<key>Bind</key>













<integer>0</integer>













<key>Channel</key>













<integer>1</integer>












</dict>












<dict>













<key>Bind</key>













<integer>0</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>
NodeID 8









<key>NodeID</key>
Node 0x08 [Audio









<integer>8</integer>
Input]








</dict>









<dict>
NodeID 35









<key>NodeID</key>
Node 0x23 [Audio









<integer>35</integer>
Mixer]








</dict>









<dict>










<key>NodeID</key>
NodeID 26









<integer>26</integer>
Node 0x1a [Pin Com-








</dict>
plex]







</array>
Pin Default






</array>
0x01813132: [Jack]





</array>
Line In at Ext Rear




Conn = 1/8,




Color = Blue





Pin-ctls: 0x20: IN






AppleHDA Guide by Taruga








Line Out Setup






<array>







<array>








<array>









<dict>
NodeID 20









<key>NodeID</key>
Node 0x14 [Pin Com-









<integer>20</integer>
plex]








</dict>
Pin Default








<dict>
0x01014c10: [Jack]









<key>Amp</key>
Line Out at Ext Rear









<dict>
Conn = 1/8,










<key>Channels</key>
Color = Green










<array>
Pin-ctls: 0x40: OUT











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











<false/>










</dict>











NodeID 12









<key>NodeID</key>
Node 0x0b [Audio









<integer>12</integer>
Mixer]









</dict>










<dict>










<key>NodeID</key>
NodeID 2










<integer>2</integer>
Node 0x02 [Audio









</dict>







Output]
























</array>







</array>






</array>














AppleHDA Guide by Taruga

HeadPhones Setup












<array>







<array>








<array>









<dict>
NodeID 27









<key>NodeID</key>
Node 0x1b [Pin Com-









<integer>27</integer>
plex]








</dict>
Pin Default








<dict>
0x02214c20: [Jack] HP









<key>Amp</key>
Out at Ext Front









<dict>
Conn = 1/8,










<key>Channels</key>
Color = Green










<array>
Pin-ctls: 0xc0: OUT











<dict>
HP












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











<false/>










</dict>
NodeID 15









<key>NodeID</key>
Node 0x0f [Audio









<integer>15</integer>
Mixer]








</dict>









<dict>










<key>NodeID</key>
NodeID 5










<integer>5</integer>
Node 0x05 [Audio









</dict>
Output]








</array>







</array>













</array>
AppleHDA Guide by Taruga







<array>







<array>








<array>









<dict>










<key>DetectDelegate</key>
NodeID 30









<integer>22</integer>
Node 0x1e [Pin Com-









<key>NodeID</key>
plex]









<integer>30</integer>
Pin Default 0x014b711e:









<key>ProcessingState</key>
[Jack] SPDIF Out at Ext









<true/>
Rear








</dict>
Conn = Comb, Color =









Yellow








<dict>










<key>NodeID</key>










<integer>6</integer>
NodeID 6









</dict>
Node 0x06 [Audio










Output] Stereo Digi-








</array>
tal







</array>






</array>



















</array>
PathMap ID 9




<key>PathMapID</key>





<integer>9</integer>




</dict>
AppleHDA Guide by Taruga

Each LayoutID points to a PathMap, I´m using LayoutID 12 that points to PathMap 9
LayoutID setup is done in Info.plist of ALCInject.kext

Use xcode Property List Editor to change LayoutID´s, by default is <0c000000>


0x0c = 12 decimal

You can use xcode otool to check for alc codec match in AppleHDA binary:

cd /System/Library/Extensions/AppleHDA.kext/Contents/MacOS/
otool -tV AppleHDA |grep 10ec

0001f2c4 cmpl $0x10ec0882,%eax


000203d0 cmpl $0x10ec0882,%eax

Or for sigmatel check:

otool -tV AppleHDA |grep 8384


0001f2cb cmpl $0x83847680,%eax
000203d7 cmpl $0x83847680,%eax

There is always two matches, if that´s not your case, then hex edit , look for it with bytes
reversed (10ec0882 will be 8208ec10 and 83847680 will be 80768483) and change it to
yours.

Hope I helped you to understand things better and that you have good results as I did,
and others are getting.

Taruga

IRC: irc.macspeak.net #ALC88x

http://forum.insanelymac.com/index.php?s=f4bc78529c1f9aefbda9ffb3c7ac449c&showtopic=32859

Das könnte Ihnen auch gefallen