- Load the required modules for your sound card if using a modular kernel.
- Install sound packages.
To configure alsa, you might have to run alsactl init as root.
You can install too e.g. Sound/Audio apps or Applications using MAD, 'xfreecd' (music CD playing software), 'mp3blaster' (full-screen console mp3-player), or 'saytime' (if you have no CD drive and no ?MP3s). Try to run them as root (it should work). With Debian, ordinary users lack permission to read the CD drive and write to the audio device (usually /dev/dsp), and they probably can't use these programs (yet; see next paragraph).
Use 'adduser USER_NAME audio' to allow a specific user to write to the /dev/dsp, /dev/mixer and /dev/audio devices and thus output sound from the soundcard; note: the user needs to log off and on again for such changes to take effect! This is the recommended way to allow a user to play audio. If, instead, you changed the permissions of the /dev/audio etc devices to make them accessible to anyone, that would open a security hole because you would be allowing any trojan to read the microphone device.
- better is to add your user to the audio group
To allow some users to play music CDs on the CDROM drive: 'ls -al /dev/cdrom' to check which special file /dev/cdrom is a symbolic link to. If it is hdc, then do: 'chgrp cdrom /dev/hdc' or if it is something else (e.g. /dev/scd0) do the corresponding thing. Then do 'adduser USER_ID cdrom' to allow the user to play music CDs. Changing the group of /dev/hdc (or hdb or whatever) is necessary, because otherwise you would need to add the user to group disk, which is bad for security.
If you run xfreecd, remember to change the default CDDB server on the 'xfreecd' software from 'cddb.cddb.com' to 'freedb.freedb.org'. This is best done by directly editing the '.xfreecdrc' file in the home directories of the users who use the program.
speaker-test - command-line speaker test tone generator for ALSA
Alsa / OSS
There are two main projects, that aim to provide sound drivers in Linux.
ALSA is the main current set of sound drivers in Linux. It provide some modules (snd-mixer-oss, snd-mixer-pcm, snd-mixer-seq) to emulate OSS with legacy application.
OSS was the original sound drivers.
To switch between ALSA and OSS, you should run:
Some useful commands:
alsactl store/alsactl restore - save/restore the volume settings (this is normally performed on shutdown/boot)
The documentation is in /usr/share/doc/alsa-base (as usually!)
If you notice that a user starts up Gnome and receives a message about Audio not working the likely cause is that the user is not in group audio (only the initialy created user is in the audio group by default). You need to:
# adduser john audio
Next time user john logs on they will be able to use the audio device.