Open Sound System (OSS) 4.1 in Gentoo Linux

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.

Published in: on November 30, 2008 at 10:41 am  Comments (3)  

The URI to TrackBack this entry is: http://blog.tagabunot.com/2008/11/30/toshiba-satellite-m305d-working-microphone/trackback/

RSS feed for comments on this post.

3 Comments Leave a comment

  1. Hey thanks a lot for the update.

    I didn’t know much about OSS, and was kind of waiting to see what was going to happen with the future of the ALSA drivers.

    There was some post on the ubuntu forums about managing to use the mics properly with the Hermosa chipset, though, so I figured I’d just wait and see.

    I’ll give this a shot as soon as I can get Gentoo to boot again (unfortunately had to re-install and atm getting kernel panics because it can’t find /dev/sda4… very strange.)

    Can you let me know (on my blog would be nice) what the .config section for your S-ATA/IDE kernel looks like? I assumed just using AHCI + PIIX (for the CD drive) would be fine, but it doesn’t seem happy about it.

  2. Thank you yet again!

    I was having issues seeing my CD drive (wasn’t sure what P-ATA chip on installed), and the reason I was getting the kernel panics was because my kernel didn’t have the Advanced Partition selection set (duh! who decided the DOS partition table should be in the advanced setting?).
    Anyways, I’m not fully booted, with (almost) full hardware support, ready to emerge the rest of my system.

    I hope I can pay you back for the help somehow. At least now I can move on to tackling issues with mono and monodevelop. On to C# for me!

    By the way, do you find yourself constantly trying to wipe your laptop to stay as shiny as it was when you opened the box? The fact that it seems to just attract grease drives me nuts! fingerprint magnet they say? I’d call it a tool to turn anyone into an obsessive clean freak!

  3. The glossy keyboard was one of the first things I noticed too. It drove me crazy for a couple of days until I gave in and got one of those silicone keyboard protectors. That doesn’t help with the other surfaces, but I’m still happy that it cut down my cleaning time by half. Hehe.

    Anyway, hope you enjoy your Gentoo-powered laptop! I’m very happy with mine.


Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <pre> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>