Newbie question about Ubuntu Linux Sound Systems

crimsun at fungus.sh.nu crimsun at fungus.sh.nu
Wed Jan 26 22:59:16 UTC 2005


On Wed, Jan 26, 2005 at 02:35:15PM -0500, Matt Philmon wrote:
> For instance, what is esound? What is ALSA, OSS, etc? What should the
> default be and where should I configure it? Little things: Mplayer is the

EsounD is a deprecated client-server architecture for mixing audio
streams using a single hardware device. For instance, if your sound
device is only capable of playing one stream at a time, then EsounD
provides a method of software "mixing" of sounds so you can listen
to mplayer, gaim, and mozilla-firefox simultaneously.

EsounD has rather horrid latency, however. Furthermore, it will be
replaced by Polypaudio (which currently already supercedes it) in
future releases (though inclusion in Hoary is murky).

EsounD requires an audio backend like ALSA or OSS (or Sun's audio
"stuff").

ALSA and OSS are, respectively, the Advanced Linux Sound Architecture
and the Open Sound System. They are both APIs that developers use to
create programs that need audio input/output/processing. While ALSA is
Linux-only*, OSS is cross-platform. The major advantage of ALSA is
apparent to developers, not users - in fact, many users find ALSA
insanely difficult to configure and use. Why have Linux kernel
developers chosen to deprecate OSS, then? The short of it is that ALSA
so simplifies the programming aspect that layering the difficulties in
configuring and using it are worth the tradeoff. This difference is
particularly apparent when using professional audio hardware.

So the way to picture this layering is:
  [mplayer]
  [esound]
  [ALSA/OSS]
  [sound card(s)]

Now for the confusing part. It's also quite possible to use:
  [mplayer]
  [ALSA/OSS]
  [sound card(s)]
and to eliminate the sound server completely. However, by doing so, you
eliminate the ability to mix sound streams unless your hardware is
capable (think sblive, sbaudigy, sbaudigy2, m-audio revolution, etc.).
This solution is preferred for the lowest latency.

Of interest to professional audio users and developers is JACK, which is
another client-server architecture. Its aim is different from EsounD's,
however, since it was designed from the ground up to remain low-latency
and to simplify programming for professional audio hardware. In such
situations, the picture looks like:
  [ardour]
  [JACK]
  [ALSA/OSS]
  [sound card(s)]

*While ALSA is Linux-only, OSS has developed (or hacked, rather) an
asound library that redirects calls to ALSA devices to OSS devices.
Currently very few functions are available, but a small subset of
ALSA programs can use this library. Confused yet? Don't be. What about
OSS-only games like Quake{2,3} or Doom 3? ALSA provides an OSS emulation
layer.

> with Mono 1.0.5 but that Winamp lookalike. XMMS? Locks up immediately when I
> press play and can't only be brought down forcibly. I don't understand how

XMMS should be configured to use the esd output.

> all this relates to gstreamer and all of those related packages. I don't get

Gstreamer is a pipeline architecture that simplifies programming for
multimedia. Think of it as a method by which the programmer worries less
about the hardware and more about his program. The picture might be:
  [rhythmbox]
  [gstreamer]
  [esound]
  [ALSA/OSS]
  [sound card(s)]
but it could very well be:
  [rhythmbox]
  [gstreamer]
  [ALSA/OSS]
  [sound cards(s)]

> why in Mplayer I have to choose ESD (I think) to get it to play sound while

You have to choose esd output because, by default, Ubuntu Warty uses
EsounD.

> process. Why does Mplayer freak out using ESD if I turn on the system sounds
> (let the sound server start)? About a week ago as soon as ALSA system starts

esd adds enormous latency, and it's probable mplayer is complaining
loudly about it. Without the precise error, however, I can't assist in
debugging your mplayer+esd issue(s).

> I get a loud hiss from one speaker. Sound plays along with the hiss. The
> speakers and sound card have checked out fine (an older Sound Blaster). I've
> moved the speakers to another output jack (I think it's mono or something)
> that removes the hiss but this has never been necessary before. 

This issue is probably due to your volumes being too high. Check with
the Volume Control application (use the ALSA device).

-- 
Daniel T. Chen          crimsun at fungus.sh.nu
GPG key:   www.sh.nu/~crimsun/pubkey.gpg.asc
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <https://lists.ubuntu.com/archives/ubuntu-users/attachments/20050126/e9d2917c/attachment.sig>


More information about the ubuntu-users mailing list