Welcome to Linux Knowledge Base and Tutorial
"The place where you learn linux"
International Medical Corps

 Create an AccountHome | Submit News | Your Account  

Tutorial Menu
Linux Tutorial Home
Table of Contents

· Introduction to Operating Systems
· Linux Basics
· Working with the System
· Shells and Utilities
· Editing Files
· Basic Administration
· The Operating System
· The X Windowing System
· The Computer Itself
· Networking
· System Monitoring
· Solving Problems
· Security
· Installing and Upgrading
· Linux and Windows

Man Pages
Linux Topics
Test Your Knowledge

Site Menu
Site Map
Copyright Info
Terms of Use
Privacy Info
Masthead / Impressum
Your Account

Private Messages

News Archive
Submit News
User Articles
Web Links


The Web

Who's Online
There are currently, 271 guest(s) and 5 member(s) that are online.

You are an Anonymous user. You can register for free by clicking here



Current HOWTO: Alsa-sound-mini-HOWTO

Alsa-sound-mini-HOWTO: Tips and Troubleshooting Next Previous Contents

7. Tips and Troubleshooting

Please take a look at the FAQ file in the sound driver directory. This section is still under construction.

7.1 Compiling the driver

Linux kernel sourcetree

If your ALSA drivers do not compile correctly and tell you things about ``version.h'' or other header-files that cannot be found, this can mean that you do not have the kernel header files. Take a look at the kernel-HOWTO, unpack a recent kernel in /usr/src and issue a make config.

Cannot create executables

The utils also contain code written in c++. Most of us have a c++ compiler either from gcc or egcs but make sure you also have the libstdc++-devel package installed, else when you run the configure script for the utils, your system will stump you with an error message saying your ``c++ compiler cannot create executables''.

7.2 Loading the driver

Please check the following items.

Sound devices

ALSA uses special devices in the /dev-tree. Make sure you have run the ./snddevices script in the alsa-drivers source directory.

Sound card compatibility

Are you 100% sure that your sound card IS supported ? Do check it again. Sometimes an X123 is not exactly an X123b and you might be wasting time. On the other hand, even a supported card can give you troubles - it took me two hours to figure out the installation of a CS4237B which was, after all, just a fine example of RTFM.

``Device busy'' or ``unresolved symbols''

You might have a 2.0.x kernel with sound support compiled in, or the OSS/Lite (kernel) sound driver could be loaded (check with cat /proc/modules). Remove the driver or recompile the kernel (have a look at the Kernel-HOWTO).

The sound module in the 2.0 series kernel is called ``sound.o'' and should not be active. (The ALSA driver ``snd.o'' is OK, though).

If you have a 2.2.x series kernel without sound driver compiled in, the ALSA drivers will not work, too.

2.0 kernels

I know it this is confusing, so let me try to explain it one more time. If you have a 2.0.x series kernel (the command ``uname -a'' tells you something like ``Linux penguin 2.0.35 #6 Wed Sep 23 10:19:16 CEST 1998 i686 unknown'') then you need to leave out sound drivers in the kernel. ALSA 0.4.x and later do not work with the 2.0 series kernel

2.2 kernels

If you have a 2.2.x series kernel you do need the sound drivers. A 2.2 series kernel should be compiled with sound support, but without any sound card driver. So you select sound support but make sure that no specific sound card driver will be compiled.

References to other drivers

Another reason why the driver complains that the device is busy could be that the file /etc/conf.modules still has references to the soundcard drivers. You should delete these and leave only the references to the ALSA-driver. (If there are other non-sound-related drivers there, then you can probably leave these as-is).

Unresolved symbols revisited

Another source of ``unresolved symbols'' messages could be a new kernel with older drivers. Please recompile the ALSA drivers after you recompile a new kernel. This will make sure that the drivers match your new kernel.

Check the PnP setup

Are you sure that your card is active? Take another look at the PnP-HOWTO and check if you activated your sound card correctly.

Are your parameters right ?

Check, doublecheck your sound card parameters. Please note: 534 is not 543, nor is 0x534 the same as 534.

Also, some sound cards must be loaded by a different name than might be expected. Take a break, a beer or whatever, and look again at your ``modprobe'' command. For example the Crystal 4232 driver should be inserted by modprobe snd-card-cs4232, not ``snd-cs4231'', and the SoundBlaster PCI 64 should be loaded with ``snd-card-audiopci'', not snd-es1370. (It's all in the docs, and even though I wrote the HOWTO, I once spent an evening trying to persuade snd-cs4231 to make sound).

7.3 Driver loaded... but no (or hardly any) sound


The ALSA drivers can use the ``muting'' facilities that most soundcards have. If you loaded the sound drivers and everything is fine but you get nothing but silence, then you probably forgot to unmute your card. You need ``amixer'' or ``alsamixer'' for this, both from the ALSA-util package. Just typing

amixer set -c 1 Master 70 unmute
amixer set -c 1 PCM 70 unmute
amixer set -c 1 CD 70 unmute
should do for most applications. Please note that for the older amixer command you need to leave out the ``set'' in the command line.


Most sound cards have a separate mixer part for extra input or output boosting. This entry is most likely called the ``gain'', ``in-gain'' for input and ``out-gain'' for output. Setting this gain to an appropriate level will greatly help you getting the maximum volume out of your speakers (think about your parents/neighbours/ears though). So a command like

amixer set out-gain 100 unmute
will probably help.

OSS/Linux compatibility

If this is the first time you use the ALSA drivers and you used the built-in sound drivers before, you probably want to have backwards compatible sound (i.e. use the /dev/pcmX devices). You need to load the ``OSS compatibility driver'' for this. Do a modprobe snd-pcm1-oss && modprobe snd-mixer-oss. (See the end of the section about loading the driver). Please note: snd-pcm1-oss is not equal to snd-pcm1, you need snd-pcm1-oss for old-fashioned sound support and snd-mixer-oss for (you guessed it) the mixer.

Cannot open mixer

If you have tried to install a couple of different ALSA versions, then sometimes the mixer cannot be opened anymore. This happens if you have tried 0.3.2 and want to downgrade to 0.3.0-pre4 (IIRC). You should delete all libasound files and links from /usr/lib and then recompile libraries and utils:

rm /usr/lib/libasound.*
Just to be safe, remove all ALSA sound drivers afterwards, then recompile and install and reload the drivers.

7.4 General suggestions

Try using ``insmod''

It can always be useful to start with "insmod" instead of kerneld. Maybe you actually see the error on screen.

Read the INSTALL file.

A lot of information can be found in the INSTALL file in the drivers directory. If your driver won't work check if there is additional information available.

Debug messages

As a last resort, you can rebuild the driver and tell it to send debug information to /var/log/messages. Go to the driver-directory with cd /usr/src/alsa-driver-.... and type:

./configure --with-debug=detect; make clean; make

Remove the driver (as far as it is active, see below for a general remove statement). Then use the "modprobe" statement you used before to insert the newly compiled driver. Look in /var/log/messages if there are any messages.

If all else fails...

If these messages doesn't help you, send a message to the ALSA users mailing list, alsa-user@alsa-project.org.

Include the following information:

  • soundcard name + chip names present on your soundcard
  • relevant sections in your isapnp.conf if you have ISA PnP soundcard
  • your conf.modules or line which you activate ALSA driver
  • all messages from /var/log/messages which should be relevant to the ALSA driver

7.5 Bug reports

If you found a bug, the ALSA developers would like to know the following things (at minimum)

  1. driver + kernel version: 'cat /proc/asound/version'
  2. soundcard info
    • soundcard name provided by manufacture
    • list of chips which soundcard have onboard
    • contents of 'cat /proc/asound/cards'
  3. all messages from /var/log/messages which should be relevant to ALSA driver
  4. problem description

7.6 Tip: playing CD's

If you use kmod/kerneld and the ALSA drivers to play CD's, then kmod/kerneld probably do not load the drivers as expected. This is due to the fact that a command line CD player only tells the CD player to start playing without using any of the devices that tell kmod/kerneld that there is sound to occur. Using modprobe may be your only solution to this problem.

7.7 Tip: installing the MIDI serial driver

Normally, the IO port of the serial device is owned by the standard serial device driver. So before you can do ``modprobe snd-serial'' we have to tell the driver to release the serial device.

Here is the procedure.

setserial /dev/ttyS0 uart none
modprobe snd-serial

(Replace /dev/ttyS0 with the appropriate /dev/ttySx device if your MIDI device uses a different serial device).

7.8 Tip: new kernel? New modules!

After you upgrade your kernel, you probably need to recompile the ALSA drivers. If they are still in the original /usr/src directory, then please do not forget to issue a make clean before you do the ./configure, make, make install thing.

Oh, and then there is this anomaly in kernel numbering: a ``2.2.0ac1'' kernel that is ``not a number'' - says the configure script. I think this was resolved in newer scripts, otherwise you should maybe change the kernel version in the source.

7.9 Tip: KDE and ALSA drivers

Suppose you have KDE up and running but you cannot get system sounds to work, like for opening windows, changing desktops, etc. Sound works in general. If your cd player and mp3 player and mixer all do work, then it's probably just "kwmsound" that's lacking.

So: make sure "kwmsound" is in your startscript ($KDEDIR/bin/startkde)

7.10 Tip: use the ALSA devices

If you had sound support in your Linux before, then your applications will probably all point to /dev/pcm0, /dev/audio and /dev/mixer. This is fine, if you use OSS compatibility with the snd-pcm1-oss module. It might be better, however, to use the real ALSA devices, those found in /dev/snd/.

7.11 Tip: removing all modules

Removing 10+ modules one by one is not the way to go. Luckily, all modules start with the "snd-" prefix, so a little command line programming will do. You can easily remove ALSA sound by issuing a command like:

cat /proc/modules|gawk '/^snd-/{print $1}'|xargs -i rmmod {}

Juergen Kahrs wrote: ``I have a script that also removes soundcore and soundlow and sound if present and if they are not in use. This script processes /proc/modules three times so there should not be too many modules left after processing''. His solution is

awk '/^snd/||/^sound/&&($3==0){system("rmmod " $1)}' /proc/modules /proc/modules /proc/modules

Please note: if some module is dependent on another module you cannot just remove the "higher" one. This means that you might need to issue a second removal statement. (I never encountered this situation though, it seems that you can remove the ALSA modules in the order they appear in /proc/modules).

Next Previous Contents

The Linux Tutorial completely respects the rights of authors and artists to decide for themselves if and how their works can be used, independent of any existing licenses. This means if you are the author of any document presented on this site and do no wish it to be displayed as it is on this site or do not wish it to be displayed at all, please contact us and we will do our very best to accommodate you. If we are unable to accommodate you, we will, at your request, remove your document as quickly as possible.

If you are the author of any document presented on this site and would like a share of the advertising revenue, please contact us using the standard Feedback Form.

Show your Support for the Linux Tutorial

Purchase one of the products from our new online shop. For each product you purchase, the Linux Tutorial gets a portion of the proceeds to help keep us going.



Security Code
Security Code
Type Security Code

Don't have an account yet? You can create one. As a registered user you have some advantages like theme manager, comments configuration and post comments with your name.

Help if you can!

Amazon Wish List

Did You Know?
You can choose larger fonts by selecting a different themes.


Tell a Friend About Us

Bookmark and Share

Web site powered by PHP-Nuke

Is this information useful? At the very least you can help by spreading the word to your favorite newsgroups, mailing lists and forums.
All logos and trademarks in this site are property of their respective owner. The comments are property of their posters. Articles are the property of their respective owners. Unless otherwise stated in the body of the article, article content (C) 1994-2013 by James Mohr. All rights reserved. The stylized page/paper, as well as the terms "The Linux Tutorial", "The Linux Server Tutorial", "The Linux Knowledge Base and Tutorial" and "The place where you learn Linux" are service marks of James Mohr. All rights reserved.
The Linux Knowledge Base and Tutorial may contain links to sites on the Internet, which are owned and operated by third parties. The Linux Tutorial is not responsible for the content of any such third-party site. By viewing/utilizing this web site, you have agreed to our disclaimer, terms of use and privacy policy. Use of automated download software ("harvesters") such as wget, httrack, etc. causes the site to quickly exceed its bandwidth limitation and are therefore expressly prohibited. For more details on this, take a look here

PHP-Nuke Copyright © 2004 by Francisco Burzi. This is free software, and you may redistribute it under the GPL. PHP-Nuke comes with absolutely no warranty, for details, see the license.
Page Generation: 0.71 Seconds