NOTE: This was originally entitled “How to get a working microphone on a Toshiba Satellite M305D-S4829.” I have slightly updated the post title and introduction to better reflect the contents of the post.
In a nutshell, consider switching to OSS 4.1 if your sound card has a buggy ALSA driver. My laptop has:
00:14.2 Audio devide: ATI Technologies Inc SBx00 Azalia (Intel HDA)
With the ALSA drivers, I could hear sound but I couldn’t get internal or external microphones to work. After several hours of tinkering with ALSA, switching to OSS 4 was a relief! With minimal setup, it fixed my microphone woes and incidentally gave me better sound quality. I imagine (at least) all Intel HDA sound cards with Conexant Hermosa chipset would benefit from this approach.
Now, if you’ve poked into the sound card support in the kernel before, you might be wondering why a system marked with a huge DEPRECATED tag can have better support than the ALSA driver. The history of OSS is a bit convoluted (see here if you really want to know) but in short, the Linux kernel was frozen at OSS 3.8 when the OSS programmers decided to switch to a closed-source development model. Several years and a failed attempt at commercialization later, OSS is back under a BSD license, with greatly improved features and code.
Here’s how to install it on Gentoo Linux:
Kernel Configuration
You MUST disable kernel level sound card support, or else the OSS modules will have trouble loading.
Device Drivers
< > Sound card support
Rebuild your new kernel, reboot into it, then continue.
OSS Installation
If you’ve never set up an overlay before, follow this guide to install layman first.
Emerge mercurial:
$ sudo emerge -av mercurial
Grab the OSS overlay:
$ sudo layman -a oss-overlay
Emerge media-sound/oss
or media-sound/oss-devel
according to your preference. The stable version is 4.0 while the development version is 4.1.
By default, the development version will pull from the mercurial repository, but you can change that by adding this line to /etc/portage/package.mask
:
=media-sound/oss-devel-9999
If you are running the stable portage branch, you will definitely have to play with your keywords in /etc/portage/package.keywords
to get everything to emerge. I’m using unstable on my laptop so I’m not sure what exactly is masked.
Configuration
Once the packages have been emerged, configure OSS and run it:
$ sudo /usr/sbin/ossdetect
$ sudo /usr/sbin/soundon
At this point you can use osstest
to verify that your speakers are working properly, ossrecord
and ossplay
to test the microphone input, and ossxmix
to set the mixer levels. If all goes well, you can then add it to your default runlevel:
$ sudo rc-update add oss default
And that’s it. Rebuild your audio programs with the oss
USE flag if they don’t have it, and enjoy your fully working sound card.