Wednesday, July 28, 2010

Microphone not working on Debian laptop

After my recent success in getting video chat via MSN working on Linux (OK, Meebo's success really) I was disappointed to find that the microphone on my laptop wasn't working, and neither was my plug-in microphone, leaving my wife to have to type her answers while she could hear her friend speaking.
I managed to fix the problem later on, with a bit of fiddling. I think the solution I came across first is more complicated than a solution I found later, so I'll describe the easy solution first.
Not all input options are enabled in Volume Control (right-click speaker icon in panel, or use the Terminal command gnome-volume-control) by default. By selecting Edit > Preferences, it's possible to enable more options. The process is described in this tutorial, so I won't repeat it, but I'll add a screenshot.



The solution I actually used involved making changes in alsamixer, although I enabled the microphone just by fiddling with the controls until it worked. Using Volume Control is probably more sensible. Here's how to fiddle, if you must:
Select [Capture] with the tab key.
Select options with the left/right arrow keys.
Enable with the space bar.
Change options with the up/down arrow keys.
I think what worked for me was fiddling with the Input Source options. Here's a screenshot. I'm still not sure what all the option do, and of course the options may differ with different sound cards.


This advice may be helpful if fiddling doesn't work.

Footnote: When I'd got about half way through writing this, I kicked myself- I'd used the Alsa Volume Control a year or so ago in Ubuntu before Ubuntu switched to the PulseAudio system. I must have enabled my microphone under Alsa in Ubuntu and then completely forgotten how I'd done it- one of the reasons I now write this blog. And in the hope that somebody else in the same situation might find it useful.

Update: Some time after installing Debian Squeeze beta (as was) I noticed that my microphone had stopped working again. I managed to fix it using a tip from the ALSA unofficial Wiki page above.
Comment from reader: In my case, with the snd-hda-intel driver there was a mislabeling of capture channels (probably due to incorrectly selected model in snd-hda-intel). The alsamixer capture item labelled "Digital" was controlling the microphone recording volume, while "Capture" and "Capture1" didn't change anything.
I'm not sure whether Squeeze muted the required digital channel or I did it myself.

6 comments:

  1. Fiddling with alsa mixer and gnome mixer controls didn't work for me - but then just for grins I downloaded and installed audacity. Some package that audacity installs (or maybe some setting that audacity overwrote) and now my mic works in with sound recorder, audacity, skype and I'm a happier camper - still some Debian pain in front of me to get other stuff working but that mic was huge.

    ReplyDelete
  2. Thanks for the comment.

    Since writing this, my microphone stopped working sometime after installing Squeeze beta. I managed to get it working by following a link in my own guide and fiddling in a way that would never have occurred to me (probably because of a mislabelling of channels in alsamixer). I thought I'd updated this post, but I'd just posted on the Debian forum about it.

    Now that your comment has jogged my memory, I'll update the post.

    Good luck with whatever it is you need to do.

    ReplyDelete
  3. @Anonymous
    If anyone is having touble with Skype, try putting capture at full volume and disabling skype's automatic mixer.

    ReplyDelete
  4. Thanks for taking the time to put this up. I spent hours looking at problem reports and trying various mixers, then found your how-to.

    ReplyDelete
  5. http://alsa.opensrc.org/index.php?title=Record_from_mic&oldid=3399
    From here

    $ amixer set Capture cap

    this command worked for me !!

    ReplyDelete
  6. Thanks very much for this! I had a similar, rather poorly-documented, issue in Debian that caused my laptop mic to pump its output directly to the speakers. By increasing the gain on the 'Digital'--which, as you mentioned, seems to control mic capture volume--and muting the 'Front mic' output, I was able to solve the problem. Thanks again.

    ReplyDelete