[gst-devel] Linux audio is a mess? [was: JACK and GStreamer, from the horse's mouth]

Ronald S. Bultje rbultje at ronald.bitfreak.net
Thu Nov 30 21:52:53 CET 2006

Hi Lennart,

On Thu, 30 Nov 2006, Lennart Poettering wrote:
> In a way, PA is just a way to fix "dmix". PA can be started on-demand
> from libasound, which makes it behave much like dmix, a very powerful
> dmix.

I'm aware that both PA and Jack can be used in that way. That leads to the
following questions:
- why is there a separate API? Why is it being pushed?
- why isn't PA as dmix-replacement in ALSA pushed much louder?
And directly following from that:
- why was PA developed, and didn't you just fix dmix?

Same for Jack, of course, although Jack came before dmix so it's too easy
to get away with it so I won't bother (although my opinion stands).

> ALSA is not "the solution" for all problems we currently have in Linux
> multimedia. Why? Because it doesn't provide compatibility with OSS,
> with ESD and what not. It's just one API. And there are others, which
> are unlikely to go away, which however are incompatible with

Right, and you fix that by introducing Yet Another Linux Audio API [tm].


So let's sit here for a second and think of why CoreAudio is really such a
success on OS X. I'd say it is because there is nothing else.


If there was something else and only that something else, people would
use that. Different people would complain in different ways, because it is
the nature of human beings to complain, but they would use it.

Now, think that we would have this ideal situation in the Linux world.
Just one API. Sure, there would be some issues with old APIs, and we can
indeed get away with supporting those. That's what hacks such as esddsp
do, as you mentioned. Which audio API would you choose? That is the key
question here. Removing deprecated options such as oss, esd, bla bla,
we're left with modern systems such as ALSA, jack and PA. Let's leave gst
out of this because I don't think anyone would agree with this anyway
(think xine devs). I think the only API with any serious chance is ALSA.
This may mean that I'll end up using PA inside alsa, which I really don't
care about as long as it doesn't bother me, but it means that the API of
my audio output of my next simple media player (unless I use gst) will
be... ALSA.

And that is the key question here. What API will "Linux", for whatever
definition of Linux that we give to third-party resellers and application
developers, offer to those vendors? The only reasonable choice is ALSA. So
promoting Jack and PA and bla bla bla is really interesting, but it's just

Given this, it'd be nice to focus on the ALSA integration, try to answer
the question of why you would develop PA instead of dmix. that's a
question that interests me. Why not develop good oss wrapping for dmix?
And esd emulation? Etc. You can do it all. This is not physically
impossible, it's just the same code in a different CVS repository.

> That's the mess I want to see cleaned up. Certainly, it would be nice
> if suddenly all apps would use ALSA and nothing else, and if ALSA dmix
> would be perfect. However, that is not going to happen.

And this is why that won't work out, and this confuses me. This is the
noise that needs to be cleaned up if we want to "fix" - for whatever
definition of "fix" - audio on the Linux desktop.

> talk directly to the hardware. That was traditionally OK, but nowadays
> this becomes a problem: you might want to stream its output to other
> apps. You might want to adjust the volume of each playback stream
> individually. You might want to reroute audio output from one output
> device to another one while is playing. You might want to output audio
> on more than a single device at the same time. You might want to send
> audio to a different machine on the network. You might want to
> multicast audio on your net. However, that all is not possible with
> just ALSA.

I really just want to play and edit audio, and because we don't have the
tyrranny of a single sound system pushed upon us, whether we like it or
not, I'm not able to do so because some apps require Jack, some require
gstreamer, some talk to esd and some are still OSS-only and my soundcard
can't mix in hardware.

And PA doesn't fix that. If you think about it, it just makes it worse.

PA is great, and integrating relevant parts of it inside ALSA (either in
dmix or in a PA-based dmix replacement) would make this a lot better. How
about that?


More information about the gstreamer-devel mailing list