Jump to content

AppleHDA: ALC880 / ICH7 working, Guide to adapt


macdanger
 Share

47 posts in this topic

Recommended Posts

Hi guys,

 

after being desperate on trying every hint and hack, every kext and following the guide of Taruga. I still had no luck. The AppleHDAControler seemed to load but not the AppleHDADriver.

So I decided to do a little 2 weeks research by myself, and eventually it works!

 

I can't upload, so the kext can be found here:

http://www.mediafire.com/?3fgnmmiv0yb

 

Disclaimer:

• This kext is based on Apples current Audio Update for 10.4.10 (kext version 1.3.3). It may work on older systems or not.

• Another thing: it seems to be very difficult to write a generic driver for the audio codecs, because the pathmaps seem to differ depending on the number of jacks you have on your board.

• One last thing: you should mute your speakers while the initialization (at booting the OSX) there are some cracking noise. Until now, I couldn't find out how to suppress this.

 

First, thanks to Taruga who has made a very good guide for AppleHDA hacking.

 

Things to do:

• If someone could help me, I would pack this one into an Installer package. Maybe skippyretard will add a package to his thread...

• not all jacks the codec supports are in the pathmap right now, because I only have 4 rear jacks to test

• 5.1 sound? I can't imagine how one could realize 5.1 sound with only 3 analogue jacks and one spdif, but this maybe possible somehow :-)

 

What is supported:

• commell LV-677 utilizing an intel 945GM/ICH7 with 3 Jacks (Line-in, Mic, Line-out) and SPDIF-out (optical)

• As the codec is documented I guess at least all boards with ICH7 and Realtek ALC880 Codec should work.

 

What's working by now:

• line-out with full volume and balance control

• spdif out

• line-in with gain control

• mic with gain control and ambient noise reduction. Mic is pre-amp'ed

 

What do you need:

• ALCInject

• this AppleHDA.kext

• luck :-)

 

The easiest way to install this:

• Use one of the alc88x packages to install ALCInject (e.g. http://forum.insanelymac.com/index.php?sho...&hl=alc883)

• Change the string DAAAAA== to NAAAAA==

• remove AppleAzaliaAudio.kext and AppleHDA.kext from your /System/Library/Extensions folder

• copy the AppleHDA.kext to your /System/Library/Extensions folder

• repair permissions, restart and cross fingers :-)

 

 

Documentation used:

• a self created codec dump of my sound codec using knoppix (cat /proc/asound/codec#0 >codec.dump)

• Taruga's HDA guide http://forum.insanelymac.com/index.php?sho...9&hl=alc883

• Documentation (Datasheet) from Realtek: http://www.realtek.com.tw/downloads/downlo...;Downloads=true

 

For the ones who want to adapt this kext to other codecs, here is what I've done:

• AppleHDA binary:

As described in Toruga's guide you have to patch the binary to match your codec. In my case exchanging the 2 occurrences of the original ALC885 codec (0x10EC0885) didn't work. So I tried something else. I changed the 3 occurrences of the sigmatel codec (0x83847680, search for 80768483) to the one of the realtek acl880 (0x10EC0880, insert 8008EC10).

• AppleHDAControler plist:

The original AppleHDAController plist already contained an entry for ICH7 but the codec ID was a Sigmatel (0x83847680, decimal: -2088470912 or 2206496384). So I changed this to the realtek alc880 (0x10EC0880, decimal: 283904128).

• ALCInject:

I tried all LayoutID's and injected them with ALCInject. I found only one that at least loaded the AppleHDADriver and gave some cracking noise to the speakers. Now I knew, I'm almost there :-). It was LayoutID 52 (0x34)

• AppleHDA plist:

I copied the Pathmap of LayoutID 52 (pathmap 18) to a new pathmap 19 and pointed the Layout 52 to it. Then I did some trial and error and used Taruga's Guide and my linux codec#0 dump to add more and more parts of the codec.

 

Greetings MacDanger

Link to comment
Share on other sites

Macdanger,

 

Well done. It's great to know that someone could do one more successful step to get sound working.

 

I'm trying to do the same on AD1986a codec (0x11d41986) + ICH7M controller (0x808627d8).

Unfortunately, without any success yet.

 

Could you post some more details on the steps you've made (including modification of all Info.plist files)?

I've noticed in your kext some changes that are not described in the tutorial.

For example, you have changed almost all codec IDs in AppleHDA.kext Info.plist and also LayoutIDs in Info.plist of AppleHDAController.kext

 

Thanks in advance.

MaX

Link to comment
Share on other sites

Loccy,

 

Change the string DAAAAA== to NAAAAA== means changing the value of the key layout-id in Info.plist of ALCinject.kext.

You see the value DAAAAA== only if you use a kind of text editor to edit Info.plist which is not the best idea.

 

If you use Property List Editor (link can be found on this site) the value will be seen in it as <0c000000 > which actually stands for 12 (decimal).

According to Macdanger's tutorial it should be changed to <34000000 >

 

Regards,

MaX

Link to comment
Share on other sites

Yes, this extension really only apply to alc880 with the ID 0x10ec0880. It may be possible to compile one kext for all realtek codecs and many chipset vendors, but this is alot of work. When i have the time, i will try to do so. The Problem is that it is not guarantied that every realtek codec may work. Apple has already support for some alc88x codecs in the kext but we don't know if all realtek codecs will get initialized the same way.

 

Greetings MacDanger

Link to comment
Share on other sites

Hey Mac Danger, that is very good news !!!

 

I was getting desperate with some codecs, today I had the opportunity to test an Asus P5GD1-VM with Realtek ALC861, sound output is working atm.

With a little more time I will make it fully working.

 

So, it seems we have now 2 more sound codecs supported.

 

ALC861 was a pain in the ass to figure it out !!!!!

Link to comment
Share on other sites

Hey Mac Danger, that is very good news !!!

 

I was getting desperate with some codecs, today I had the opportunity to test an Asus P5GD1-VM with Realtek ALC861, sound output is working atm.

With a little more time I will make it fully working.

 

So, it seems we have now 2 more sound codecs supported.

 

ALC861 was a pain in the ass to figure it out !!!!!

 

Hi Taruga,

could you explain me how to get sound output working in Asus F3Jc laptop (ALC861) ?

 

Thanks.

Link to comment
Share on other sites

Hi Taruga,

could you explain me how to get sound output working in Asus F3Jc laptop (ALC861) ?

 

Thanks.

 

He's working on it. Let's wait and hope. I'm not religious, but I'm going to light a candle to Saint Taruga :censored2:

Link to comment
Share on other sites

Another big candle to Saint Taruga, lets see if miracles happen.

:)

 

Man, we're starting a cult here! All hail Saint Taruga, defender of the silenced ones - especially the ones with Asus F3Jc laptops and ALC861 sound codecs :)

Link to comment
Share on other sites

Hi Taruga,

could you explain me how to get sound output working in Asus F3Jc laptop (ALC861) ?

 

Thanks.

 

Soon I will post it, I have 2 very different versions of ALC861 codec to work, one is working already, the other (the one you need) is in testing. May a couple of days and it will be ready (or not) :)

Lets keep our fingers crossed.

Link to comment
Share on other sites

I am on Intel915GAVL mobo with Realtek HD Audio 880 + ICH6

 

I've edited alcinject for LayoutID 52, and added ich6 to HDAcontroller.

All kexts loads now finally and i was able to record my voice with an external microphone.

Mic-In Works :wacko:

Output is still dead, but it is listed in Sound preferences.

Im hearing some cracking noise (3 times after the alcinject loads) when system boots up.

I guess i need to find the right pin configurations and Output should work too. :)

Now, i going to study how these pin configs/pathmaps/layouts works. :)

Btw, volume slider finally works too with appleHDA. :)

If someone will able to help about fixing the output then i can attach codecdump and ioregs.

 

Thanks to macdanger, Taruga and all who helped on this project.

 

flama

 

EDIT: Input and output works :)

See http://forum.insanelymac.com/index.php?showtopic=32859

Link to comment
Share on other sites

My first post here, want to thank everyone for their contributions. I wouldn't have this going like it is without everyones help!

 

I have a laptop with (what I assume) is an ALC880 chipset for audio, except its owned by Intel (pulled with scanpci in linux):

pci bus 0x0000 cardnum 0x1b function 0x00: vendor 0x8086 device 0x2668
Intel Corporation 82801FB/FBM/FR/FW/FRW (ICH6 Family) High Definition Audio Controller

 

But a pull from a working Linux codec (which doesn't quite match the codec layouts I see on Tarugas pathcher page:

Codec: Realtek ALC880
Address: 0
Vendor Id: 0x10ec0880
Subsystem Id: 0x8800000
Revision Id: 0x90500
Default PCM:
rates [0x560]: 44100 48000 96000 192000
bits [0xe]: 16 20 24
formats [0x1]: PCM
Default Amp-In caps: N/A
Default Amp-Out caps: N/A
Node 0x02 [Audio Output] wcaps 0x411: Stereo
 PCM:
rates [0x560]: 44100 48000 96000 192000
bits [0xe]: 16 20 24
formats [0x1]: PCM
 Power: 0x0
Node 0x03 [Audio Output] wcaps 0x411: Stereo
 PCM:
rates [0x560]: 44100 48000 96000 192000
bits [0xe]: 16 20 24
formats [0x1]: PCM
 Power: 0x0
Node 0x04 [Audio Output] wcaps 0x411: Stereo
 PCM:
rates [0x160]: 44100 48000 96000
bits [0xe]: 16 20 24
formats [0x1]: PCM
 Power: 0x0
Node 0x05 [Audio Output] wcaps 0x411: Stereo
 PCM:
rates [0x160]: 44100 48000 96000
bits [0xe]: 16 20 24
formats [0x1]: PCM
 Power: 0x0
Node 0x06 [Audio Output] wcaps 0x211: Stereo Digital
 PCM:
rates [0x160]: 44100 48000 96000
bits [0x1e]: 16 20 24 32
formats [0x1]: PCM
Node 0x07 [Audio Input] wcaps 0x10051b: Stereo Amp-In
 Amp-In caps: ofs=0x00, nsteps=0x23, stepsize=0x03, mute=1
 Amp-In vals:  [0x00 0x00] [0x00 0x00] [0x00 0x00] [0x00 0x00] [0x00 0x00] [0x00 0x00] [0x00 0x00]
 PCM:
rates [0x160]: 44100 48000 96000
bits [0x6]: 16 20
formats [0x1]: PCM
 Power: 0x0
 Connection: 7
 0x18* 0x19 0x1a 0x1b 0x1c 0x14 0x15
Node 0x08 [Audio Input] wcaps 0x10051b: Stereo Amp-In
 Amp-In caps: ofs=0x00, nsteps=0x23, stepsize=0x03, mute=1
 Amp-In vals:  [0x00 0x00] [0x00 0x00] [0x00 0x00] [0x00 0x00] [0x00 0x00] [0x00 0x00] [0x00 0x00]
 PCM:
rates [0x160]: 44100 48000 96000
bits [0x6]: 16 20
formats [0x1]: PCM
 Power: 0x0
 Connection: 7
 0x18* 0x19 0x1a 0x1b 0x1c 0x14 0x15
Node 0x09 [Audio Input] wcaps 0x10051b: Stereo Amp-In
 Amp-In caps: ofs=0x00, nsteps=0x23, stepsize=0x03, mute=1
 Amp-In vals:  [0x00 0x00] [0x00 0x00] [0x00 0x00] [0x00 0x00] [0x00 0x00] [0x00 0x00] [0x00 0x00] [0x00 0x00] [0x00 0x00] [0x00 0x00]
 PCM:
rates [0x160]: 44100 48000 96000
bits [0x6]: 16 20
formats [0x1]: PCM
 Power: 0x0
 Connection: 10
 0x18* 0x19 0x1a 0x1b 0x1c 0x0b 0x14 0x15 0x16 0x17
Node 0x0a [Audio Input] wcaps 0x100391: Stereo Digital
 PCM:
rates [0x160]: 44100 48000 96000
bits [0x1e]: 16 20 24 32
formats [0x1]: PCM
 Connection: 1
 0x1f
Node 0x0b [Audio Mixer] wcaps 0x20010b: Stereo Amp-In
 Amp-In caps: ofs=0x23, nsteps=0x41, stepsize=0x03, mute=1
 Amp-In vals:  [0x00 0x00] [0x00 0x00] [0x00 0x00] [0x00 0x00] [0x00 0x00] [0xa3 0xa3] [0xa3 0xa3] [0xa3 0xa3]
 Connection: 8
 0x18 0x19 0x1a 0x1b 0x1c 0x1d 0x14 0x15
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=0x40, nsteps=0x40, stepsize=0x03, mute=0
 Amp-Out vals:  [0x31 0x31]
 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:  [0x80 0x80] [0x80 0x80]
 Amp-Out caps: ofs=0x40, nsteps=0x40, stepsize=0x03, 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
 Amp-In vals:  [0x80 0x80] [0x80 0x80]
 Amp-Out caps: ofs=0x40, nsteps=0x40, stepsize=0x03, 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:  [0x80 0x80] [0x80 0x80]
 Amp-Out caps: ofs=0x40, nsteps=0x40, stepsize=0x03, mute=0
 Amp-Out vals:  [0x00 0x00]
 Connection: 2
 0x05 0x0b
Node 0x10 [Audio Selector] wcaps 0x300101: Stereo
 Connection: 4
 0x0c 0x0d 0x0e* 0x0f
Node 0x11 [Audio Selector] wcaps 0x300101: Stereo
 Connection: 4
 0x0c* 0x0d 0x0e 0x0f
Node 0x12 [Audio Selector] wcaps 0x300101: Stereo
 Connection: 4
 0x0c 0x0d* 0x0e 0x0f
Node 0x13 [Audio Selector] wcaps 0x300101: Stereo
 Connection: 4
 0x0c* 0x0d 0x0e 0x0f
Node 0x14 [Pin Complex] wcaps 0x40018d: Stereo Amp-Out
 Amp-Out caps: ofs=0x00, nsteps=0x00, stepsize=0x00, mute=1
 Amp-Out vals:  [0x00 0x00]
 Pincap 0x083f: IN OUT HP Detect
 Pin Default 0x01014120: [Jack] Line Out at Ext Rear
Conn = 1/8, Color = Green
 Pin-ctls: 0xc0: OUT HP
 Connection: 1
 0x0c
Node 0x15 [Pin Complex] wcaps 0x40018d: Stereo Amp-Out
 Amp-Out caps: ofs=0x00, nsteps=0x00, stepsize=0x00, mute=1
 Amp-Out vals:  [0x80 0x80]
 Pincap 0x083f: IN OUT HP Detect
 Pin Default 0x01011121: [Jack] Line Out at Ext Rear
Conn = 1/8, Color = Black
 Pin-ctls: 0x40: OUT
 Connection: 1
 0x0d
Node 0x16 [Pin Complex] wcaps 0x40018d: Stereo Amp-Out
 Amp-Out caps: ofs=0x00, nsteps=0x00, stepsize=0x00, mute=1
 Amp-Out vals:  [0x80 0x80]
 Pincap 0x083f: IN OUT HP Detect
 Pin Default 0x01016122: [Jack] Line Out at Ext Rear
Conn = 1/8, Color = Orange
 Pin-ctls: 0x40: OUT
 Connection: 1
 0x0e
Node 0x17 [Pin Complex] wcaps 0x40018d: Stereo Amp-Out
 Amp-Out caps: ofs=0x00, nsteps=0x00, stepsize=0x00, mute=1
 Amp-Out vals:  [0x80 0x80]
 Pincap 0x083f: IN OUT HP Detect
 Pin Default 0x40000000: [N/A] Line Out at Ext N/A
Conn = Unknown, Color = Unknown
 Pin-ctls: 0x40: OUT
 Connection: 1
 0x0f
Node 0x18 [Pin Complex] wcaps 0x40018d: Stereo Amp-Out
 Amp-Out caps: ofs=0x00, nsteps=0x00, stepsize=0x00, mute=1
 Amp-Out vals:  [0x80 0x80]
 Pincap 0x08133f: IN OUT HP Detect
 Pin Default 0x01a19140: [Jack] Mic at Ext Rear
Conn = 1/8, Color = Pink
 Pin-ctls: 0x24: IN
 Connection: 1
 0x10
Node 0x19 [Pin Complex] wcaps 0x40018d: Stereo Amp-Out
 Amp-Out caps: ofs=0x00, nsteps=0x00, stepsize=0x00, mute=1
 Amp-Out vals:  [0x80 0x80]
 Pincap 0x08133f: IN OUT HP Detect
 Pin Default 0x02a19160: [Jack] Mic at Ext Front
Conn = 1/8, Color = Pink
 Pin-ctls: 0x24: IN
 Connection: 1
 0x11
Node 0x1a [Pin Complex] wcaps 0x40018d: Stereo Amp-Out
 Amp-Out caps: ofs=0x00, nsteps=0x00, stepsize=0x00, mute=1
 Amp-Out vals:  [0x80 0x80]
 Pincap 0x08133f: IN OUT HP Detect
 Pin Default 0x01813130: [Jack] Line In at Ext Rear
Conn = 1/8, Color = Blue
 Pin-ctls: 0x20: IN
 Connection: 1
 0x12
Node 0x1b [Pin Complex] wcaps 0x40018d: Stereo Amp-Out
 Amp-Out caps: ofs=0x00, nsteps=0x00, stepsize=0x00, mute=1
 Amp-Out vals:  [0x80 0x80]
 Pincap 0x08133f: IN OUT HP Detect
 Pin Default 0x02214150: [Jack] HP Out at Ext Front
Conn = 1/8, Color = Green
 Pin-ctls: 0x40: OUT
 Connection: 1
 0x13
Node 0x1c [Pin Complex] wcaps 0x400001: Stereo
 Pincap 0x0820: IN
 Pin Default 0x99331100: [Fixed] CD at Int ATAPI
Conn = ATAPI, Color = Black
 Pin-ctls: 0x00:
Node 0x1d [Pin Complex] wcaps 0x400000: Mono
 Pincap 0x0820: IN
 Pin Default 0x40000000: [N/A] Line Out at Ext N/A
Conn = Unknown, Color = Unknown
 Pin-ctls: 0x00:
Node 0x1e [Pin Complex] wcaps 0x400300: Mono Digital
 Pincap 0x0810: OUT
 Pin Default 0x01451110: [Jack] SPDIF Out at Ext Rear
Conn = Optical, Color = Black
 Pin-ctls: 0x00:
 Connection: 1
 0x06
Node 0x1f [Pin Complex] wcaps 0x400200: Mono Digital
 Pincap 0x0820: IN
 Pin Default 0x40000000: [N/A] Line Out at Ext N/A
Conn = Unknown, Color = Unknown
 Pin-ctls: 0x00:
Node 0x20 [Vendor Defined Widget] wcaps 0xf00040: Mono
Node 0x21 [Volume Knob Widget] wcaps 0x600080: Mono

 

Where I am confused is with two things:

 

1) Is the codec Vendor different than the physical card?

 

2)Unfortunately your ALC880 kexts dont load at startup. If I manually request them to load, they will, but the AppleHDA.kext will unload after some idle time (I think the kernel assumes its not needed?)

 

I made sure to adjust the controller under ICH7 to include my vendor. I didn't think I would need to edit the binary as you did that, and your codec matches mine (according to linux).

 

Any ideas on how to get my card working? If I can at least get it to load up, I can fiddle with the codec following the guide until I get something working.

 

Thanks for all your help!

 

Tyler

Link to comment
Share on other sites

 Share

×
×
  • Create New...