Wednesday 25 August 2010

ALSA drivers not working for Cirrus Logic CS46xx soundcard

If you are using OSS emulation for ALSA on a laptop with a CS46xx card, and are getting no sound, then read on.

I use a really old laptop (Ascentia M-Series dating from 1998) that I carry about in places where I think anything nicer would get stolen/drowned in spilled tea/rolled over by a forklift. One thing that has long annoyed me about this laptop though, is that the sound doesn't work. Things would appear to be working, mplayer would claim it was playing .mp3 files, but no sound would come out.

The sound card is a cirrus logic CS4624B, and everyone says that these are a pig to get working, requiring lots of meddling with old-style Plug-and-Pray settings because, in these old laptops, the soundcard is on an isa bus.

Funny thing is though, that back in the day when I used OSS for sound, rather than ALSA, the soundcard worked fine. Why would ALSA suddenly have irq or resource issues that require me to mess with isapnp, when OSS didn't?

In the end, the problem turned out to have nothing to do with irq's, io-ports or plug-and-play. Basically there is a bug in ALSA. For these cards, ALSA sets everything to 'Mute' by default. This doesn't mean it sets the sound level to zero, it seems to be more than that, it actually does some magic 'mute' thing to the card that you have to unlock. Unfortunately, the OSS compatibility module that makes the sound-card visible to programs that use the old OSS interface, doesn't know how to mute/unmute, so the card stays muted no matter what you do.
Or it might not be the mute, it might be the fact that one of the volume controls 'Master' doesn't appear to be exported to the OSS emulation, under ALSA volume control programs you see the 'Master' setting, but under OSS volume controls, you don't.

The only solution I've found is to install the alsa libraries, and use 'alsamixer' to initially set up the card and volume levels. Suddenly BINGO! It works! No need to meddle with irq's and isapnp.conf.

However, I didn't really want to install the ALSA libraries, that's why I'm using OSS emulation. But, more and more these days Linux is becoming another O.S. of you-will-do-as-we-say. IF you want to use software X, you will install lots of libraries and now you're going to have to upgrade your computer. If I have to upgrade my computer, then why not just put windows on it or get a mac and be done with it, hmmm??