I’ve been using Linux on my Sony VAIO Laptop for some time now and loving it, but there has been this lingering little problem that I’ve been putting off tackling: my microphone. I’ve just never been able to get it to work–until now.
Its a two part problem, the first involving the driver, the second the ALSA mixer and input source.
The Driver
Ubuntu 9.10 ships with ALSA version 1.0.20, and as of this writing, is still using this version. In versions of ALSA prior 1.0.21, the Intel HDA driver incorrectly detects many versions of the RealTek audio card. Version 1.0.21 fixes this–or at least automatically uses a more suitable driver. So to correct this in my Ubuntu install (without having to resort to using the backports), I did the following:
1. Modify the /etc/modprobe.d/alsa-base.conf file:
2. Go to the end of the file and look for a line starting with:
3. Append to this line the following:
Specifically what model you should select varies depending on your particular laptop. I own the VGN-FW351J. Others have had luck with model=vaio.
4. Save the file and reboot.
After my reboot, the sound recording still wasn’t working. I still had one more step to complete.
ALSA Mixer and Input Source
The second problem is that my laptop has two input sources: Microphone and Internal Microphone. I suppose the above changes will work fine if I’m using a headset plugged into the microphone jack, but most of the time I want to use Skype with the built in internal microphone. So to get that working, I had to do the following:
1. Open a terminal window and launch the alsamixer:
2. Once in, hit TAB to switch to the “Capture” settings
3. Right ARROW to select the “Input So” (short for Input Source)
4. Use the UP/DOWN arrow to toggle from “Mic” to “Int Mic”
5. Also, you may want to increase your capture volume while your in there. Some recommend increasing it to 100%. I found that to be too tinny and loud, so mine is set around 70%.
6. Test your recording using the Sound Recording application.
If everything works, you are in business…until you reboot. The problem now is that these new settings will not stick between reboots. This is not uniquely Linux–I’ve had a similar problem on my Vista install on the same laptop–my default input source keeps reverting to the wrong Mic.
To get this to stick, do the following:
1. Open System->Preferences->Startup Applications
2. Click the Add button
3. Give it a name (I use “Set Audio Input Source”) and comment. For the command, use the following:
If you are not sure what values are correct, you can run amixer contents in a terminal to see what values are available, etc.
Thats it. Now each time you log in, your default microphone will be the Internal Mic. Of course, it would be better if there were a driver with Jack-sense that automatically selected the correct Mic based on whether or not something was plugged in, but this will do for now.