Issue as seen on reddit thread: https://www.reddit.com/r/linux/comments/1kccbk/alsa_bug_driving_me_crazy_ple...
A common problem for Apple Macbook Air 5.2 users where microphone does not work after system resume. As users have noted microphone starts working ones again when the volume is changed in alsa-mixer.
alsa-info dumps are attached showing before and after being adjusted (where before causes microphone not to work while in after it does)
IRC user 'debianuser' kindly helped out and found that using the two following commands fix the issue:
amixer -cPCH set "Capture" 0% nocap amixer -cPCH set "Capture" 100% cap
In my experience both are required and they seem to have the same effect as manually changing the volume level in alsamixer, and as such resolve the issue (until another suspend when they have to be run again).
As of now I'm resolving this issue by creating a service that is to run after resume from susspend with the given amixer commands to renable the microphone.
The second issue, which is also in the reddit thread, is that the microphine is mono and when recording only right channel audio is seen. For me this broke programs such as mumble and skype.
A alsa-info output with coefficients is attached.
'debianuser' managed to find a solution to this issue well, resolving it by running the following two commands:
hda-verb /dev/snd/hwC0D0 0x11 SET_COEF_INDEX 2 hda-verb /dev/snd/hwC0D0 0x11 SET_PROC_COEF 0x102a
After one runs them a single time after boot, the channels collectly show and programs issues are resolved. 'debianuser' mentions that the sources for the commands are available in the kernel and applied to the macbook 8.1 model, but not to mine.