Sound

From Linuxintro
Revision as of 13:45, 25 December 2011 by imported>ThorstenStaerk (this has been resolved by using a later kernel or the special Canonical repository)

Linux sound is one big mess. We have ALSA, OSS, PulseAudio, gstreamer, arts, phonon as subsystems. This article explains the concepts and helps people fixing their sound problems.

The "normal" Linux sound system is ALSA. It emulates the older OSS. ALSA allows several applications to play sound at the same time, OSS does not. This is because OSS provides a single sound device file, /dev/dsp that applications lock when outputting to it. To raise confusion, ALSA emulates OSS by also providing /dev/dsp.

The first step to find out if your sound is configured correctly is to output noise. Turn the volume low and try

dd if=/dev/urandom of=/dev/dsp

If you hear a sound, your drivers and the physical connections of your speakers are okay. To record sound, try this:

dd if=/dev/dsp of=audio.raw

Say something. Type CTRL_C to stop the recording. Playback by typing

dd if=audio.raw of=/dev/dsp

If you hear your voice, your microphone and drivers are okay.

See also