OSS and ALSA
Here are two major sets of Linux sound drivers, ALSA and OSS. OSS only allows for one application at a time to have access to the sound card, but can be used on many UNIX systems. ALSA allows several applications to share sound card access, but can only be used on Linux. ALSA emulates OSS by providing a device /dev/dsp. If you can call alsamixer on your system, your sound system is most probably ALSA.
Use the command
Use the command
which will do this for you. At the end you should see a file /dev/dsp and you should be able to play random noise with the command (issued as root, stop it with CTRL_C)
dd if=/dev/urandom of=/dev/dsp
If you hear a sound, configure your mixer:
The users who shall be able to play sound must be added to the audio group like this:
# adduser joeuser audio
# hwinfo --sound 16: PCI 1b.0: 0403 Audio device [...] Model: "Intel 82801I (ICH9 Family) HD Audio Controller" Driver Activation Cmd: "modprobe snd_hda_intel" [...]
- test if the sound works, excluding mixer (use CTRL-C to stop the sound):
cat /dev/urandom >/dev/dsp
If you hear a sound after that command, you can be sure
- your user is allowed to play sound
- you loaded the correct sound driver
- you have your speakers working and on enough volume
If you cannot hear a sound, check the above points.
If one is positive that one has the right module, but the sound still is not working, then try reading the comments at the top of the driver's source code for help. For instance, the SiS7012 onboard soundcard only runs at 4800hz. The source code for the i810_audio OSS/Lite driver explicitly notes this problem, and says that only apps such as xmms will work, while mpg123 will not.
Alternatively, try updating the Linux kernel.