Software Design UK


Home Page
Contact Us
About Us

Web 2.0
Sound Cards for Linux
Spam Filters
Linux FlashReader
Scripting in Linux
A SQL Tutorial

Clients
Client Login
Autoresponder
 
Sound Cards for Linux
Home Page > Training > Tutorials > Sound Cards for Linux

This articles deals with sound issues in Linux. It assumes you have installed one of the major Linux flavours, such as SuSE, Ubuntu or Fedora.

Some basics
Manufacturers create hardware that is capable of exchanging sound waves to bits and bytes, and vice versa - the sound card. Typically, it is build on a physical card that slots neatly into your computer. It is frequently hardwired into the motherboard, meaning it is no longer physically separable from the CPU.

One would have thought manufacturers would also produce software that allows the computer to make use of the physical capabilities. But for Linux users, most do not. So the Linux community has come to the rescue, not for the first time and not for the last.

ALSA
A huge number of sound cards have been hacked by Linux programmers. The hacked software, missing from the most of the major manufacturers, has been collated to a wonderful repositary of drivers at www.alsa-project.org.

For those who are uncertain, ALSA stands for the "Advanced Linux Sound Architecture". It is a grand title for Linux software that takes the hacked drivers and runs them when you want to listen to or record anything on your computer.

Where you have a sound card with effective hacks, your sound will just work. You will not need to do anything clever (other than, perhaps, increasing the sound level from zero, the strange default level in some of the older Linux systems, which you can do using the standard volume control software kmix or gamix). Similarly, you will probably not reading this because you do not need to.

Solutions to problems
So for the many people for whom sound just does not work, this is a quickie to give you a heads up.

Not all sound cards have Linux drivers. For those without the drivers, you are very unlikely to get your sound card to work. You could look around to see if you can find drivers - particuarly on the alsa-project website. But if they exist, they are likely to be within your Linux system already. If not, download them and follow the instructions in the ALSA website about how to install them. (If you are doing this, a tiny bit of understanding may help you understand the instructions. Somehow, you need to get the drivers to be looked at by Linux when it tries to get a sound card to work. There are two ways to achieve this. One is to compile the drives in the Kernel. Easy if you know what you are doing, and scary - but still easy - if not. The other way is to load the drivers to Linux manually. You can achieve this using a "modprobe" command.)

If you, like me, have no clue how to find out what your sound card is or, if you can find it, are not able to get drivers, there is a solution. Get a second sound card. You can get an internal card. Make sure the drivers are supported on the Alsa website before you buy. When you check, look carefully at the notes in each Alsa entry. Some of them give hints whether the drivers are fully fledged or whether there are limitations - such as no recording capabilities. Then you can buy the sound card, put it in your machine and install it - hopefully in a fairly straight forward way.

If you, like me, are scared even to open your machine to put in the sound card, there is an even easier way. Buy an external sound card.

External sound cards, also called USB sound cards, plug into the USB port. Most will work with a generic driver. I bought a Terratec 5.1 USB MKII sound card for around £38, plugged it in, did something with a modprobe command that I did not understand (but as instructed by the ALSA website) and bingo, was able to record and listen. There was a quirk relating to the SUSE installation. I had a sound card that had not been recognised. When I tried to install the new sound card (using YaST), the first problem was that I could not find the model in the Terratec section in YaST. The solution to this problem was installing the "USB" model in the manufacturer named "Generic". The second problem was that, even having solved problem one, the card would still not install. The solution was simply to delete (again in YaST) the worthless original sound card (deleting merely unlinks the useless driver, it does not actually delete anything of significance), following which the installation worked exactly as one would hope - painlessly.

A happy ending
Since the sound card was external, I could not resist checking it out on my laptop, whose sound card was working well, but whose recording capabilities were quite awful. The installation worked instantly, with no hitch, using YaST. From then on, I had two working sound cards. Most of the software I was interested in (Skype and Audacity in particular) allow you to select which sound card to use (/dev/dsp for the first card or /dev/dsp1 for the second, somewhere in the preferences section) and it is quite fun to get the sound switching between the cards.