Microphone not working on Apple Macbook Air 1,1 (Early 2008; A1237) under Linux

3

2

I'm running Linux on the MBA. I can't make the microphone work.

I test using alsamixer and arecord -Dhw -fdat -vv mic.wav together with aplay -Dhw -vv mic.wav

It seems there is a problem with Linux kernel trying to decipher Apple corrupted 'BIOS', in particular the mic pins are not seen/wrongly assigned.

As far as we are concerned here, is there any difference between using rEFIt 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) and between, say, Ubuntu and Arch?

A nice proposal would be to compile the latest Linux kernel and run hda-jack-retask or a similar patching program, 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.

The MAIN PROBLEM here seems the lack of data on how Apple implements and controls the codec, namely whether they have the mic pins as virtual pins, or something else.


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 HP connnected)

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 , even though there seems to be a mismatch with what OS X sees as the mic pins and what happens under Linux (Here help would be mostly required)

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

Here for the first time support to audio (except mic) for MBA2,1 (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

This guys might have done a similar job, though to a more recent version and for sound globally, not just mic: http://blogs.aerys.in/jeanmarc-leroux/2013/09/15/fixing-2013-macbook-air-ubuntu-sound-issue/ and https://bugzilla.kernel.org/show_bug.cgi?id=60811

Note: Mic's the only thing that doesn't work for the MBA1,1 under Linux, while the remaining part of audio works just fine.

jj_p

Posted 2013-09-17T09:52:49.643

Reputation: 53

1This is one of the best, most well researched questions I have seen, bravo! – Journeyman Geek – 2013-11-07T12:43:47.607

Thanks; perhaps it is not of so much interest for many users :) – jj_p – 2013-11-07T14:51:58.917

actually, I've been using this post to record my progress (little, up to now) in addressing the issue – jj_p – 2013-11-07T21:15:14.183

Answers

1

I might can't help you with that kernel-patch, but I would recommend you to try PulseAudio. It should make your microphones work again and should solve/workaround your problem.

enter image description here

PulseAudio is a sound system for POSIX OSes, meaning that it is a proxy for your sound applications. It allows you to do advanced operations on your sound data as it passes between your application and your hardware. Things like transferring the audio to a different machine, changing the sample format or channel count and mixing several sounds into one are easily achieved using a sound server.

PulseAudio is designed for Linux systems. It has also been ported to and tested on Solaris, FreeBSD, NetBSD, MacOS X, Windows 2000 and Windows XP.

PulseAudio is an integral part of all relevant modern Linux distributions and used in various mobile devices by multiple vendors.

Christian

Posted 2013-09-17T09:52:49.643

Reputation: 6 571

thanks for your answer; unfortunately, I already run pulseaudio (e.g. it allows you to run sound from multiple applications), but the fact is that no microphone is detected at a lower level – jj_p – 2013-11-07T14:53:12.253