Microphones not working on Apple macbook Air 1,1 (Early 2008) under Linux
- by jj_p
I'm running Linux on an mba. I can't make the microphones (neither external nor internal) work.
I test using alsamixer and arecord -d 5 test-mic.waw together with aplay test-mic.waw
It seems there is a problem with kernel trying to decipher Apple (intentionally) corrupted 'bios', in particular the mic pins are wrongly assigned.
As far as we are concerned here, is there any difference between using EFI and BIOS-compatibility mode? (see https://wiki.archlinux.org/index.php/MacBook where they claim to have everything working out of the box on mba1,1)
A nice proposal would be to compile the latest Linux kernel and run hda-jack-retask to find the right configuration (in the case of Realtek codec, the missing things I'm supposed to check
are either some vendor-specific COEF verbs, EAPD or GPIO setup.), and then come up with a kernel patch to address the issue.
Since I'm not that familiar with this last part of the story, can anyone help me through this process?
Some useful data:
The output from alsa script run as root http://www.alsa-project.org/db/?f=adae8ebee1007043fe83414ac4972319e02255fa
The command hda-jack-sense-test -a (with external mic in)
Pin 0x14 (Internal Speaker): present = No
Pin 0x15 (Green HP Out): present = Yes
Pin 0x16 (Not connected): present = No
Pin 0x17 (Not connected): present = No
Pin 0x18 (Not connected): present = No
Pin 0x19 (Not connected): present = No
Pin 0x1a (Not connected): present = No
Pin 0x1b (Not connected): present = No
Pin 0x1c (Not connected): present = No
Pin 0x1d (Not connected): present = No
Pin 0x1e (Not connected): present = No
Pin 0x1f (Not connected): present = No
Most likely the chip is Realtek ALC885 (compare also ALC889A) http://guide-images.ifixit.net/igi/bBTSqaeK5JpQ1AWe.large , although at the moment alsa reads it as ALC889A
Takashi Iwai's tutorial
https://www.kernel.org/doc/Documentation/sound/alsa/HD-Audio.txt
Some people researched
the original files from a running OS X installation on this same model
(I think the relevant files are AppleHDA.kext/Contents/MacOS/AppleHDA AppleHDA.kext/Contents/PlugIns/AppleHDAHardwareConfigDriver.kext/Contents/Info.p????list AppleHDA.kext/Contents/Resources/layout12.xml.zlib AppleHDA.kext/Contents/Resources/Platforms.xml.zlib)
http://www.insanelymac.com/forum/topic/220090-alc889a-pin-configuration/#entry1554954
Datasheet http://www.realtek.info/pdf/ALC885_1-1.pdf
(from the same Realtek, one can also try to download Linux driver, but this is just taken from ALSA project, as stated in the readme file.)
Compare with this Arch guy http://www.alsa-project.org/db/?f=3ca8243c0626844f0264a3faad0aa72018bc14f4
Here for the first time support to audio (except mics) for mba1,2 (which is morally the same as 1,1) is patched into the kernel http://www.alsa-project.org/pipermail/alsa-devel/2010-February/025511.html
The same jack supposedly works both for HP and ext MIC, I think it's called TRRS, and it's the same as the one used e.g. for iphones
This guy might have done a similar job, though to a more recent version and for sound globally, not just mics: http://blogs.aerys.in/jeanmarc-leroux/2013/09/15/fixing-2013-macbook-air-ubuntu-sound-issue/
(this is mirror to http://unix.stackexchange.com/questions/73044/microphones-not-working-on-apple-macbook-air-1-1-early-2008-under-linux )