レナート   Wunschkonzert, Ponyhof und Abenteuerspielplatz   ﻟﻴﻨﺎﺭﺕ

Thu, 25 Sep 2008

Everybody Loves Pretty Graphics

As kind of a followup to my Guide to Linux Sound APIs here're some pretty graphics I just drew. (At least "pretty" to the degree of my limited drawing abilities). It's a block diagram depicting the Linux audio stack. A lot of people already drew something similar, and often enough the result was horribly complicated and -- in its conclusion disappointing. So, here's my try:

Linux Audio Stack

The components interface each other across the horizontal lines. The vertical lines seperate unrelated components. The drawing only includes modern, supported APIs and systems as described in the aforementioned blog article. It (hopefully) shows that things in the Linux audio world are not all that bad at all and we have workable answers for most questions without too much complexity, although they might not entirely make everyone overly happy.

In an outburst of bias I completely ommited KDE-specific technologies from this drawing. I guess even if I would have included them it'd be called biased anyway, so why bother? Also, they would have distracted the reader and complicated the drawing considerably due to KDE's affection for pluggable backends. So: if you care about KDE, please ignore this diagram.

posted at: 01:44 | path: /projects | permanent link to this entry | 21 comments


Posted by Patrick at Thu Sep 25 02:53:20 2008
What about http://www.ffado.org/?

Posted by Lennart at Thu Sep 25 02:57:25 2008
FFADO is a bit difficult to position. It probably should be below JACK, so that JACK interfaces ALSA and FFADO equally.

But yes, good point. It's missing here.

Posted by Mark Brown at Thu Sep 25 10:27:16 2008
Depends which OSS API bodge you're using but if it's the in-kernel one which most people seem to use then it sits next to the ALSA user API.

Posted by Lennart at Thu Sep 25 13:57:54 2008
Mark: I don't really consider the kernel OSS emulation that useful since it bypasses software sound servers and userspace sound drivers like Blueooth and Firewire. That's why I ommited the kernel-level OSS emulation from this diagram.

Posted by Albert at Thu Sep 25 14:52:36 2008
Yeah! Keep saying you are "the Linux standard" while ignoring half of Linux users, you rock :-)

Posted by Lennart at Thu Sep 25 14:57:07 2008
Albert: "standard"? Where do I use this term? You're confused. And which half of the Linux users do I ignore? KDE people? Not sure if they still remotely come near to be half of the community...

Posted by Tom at Thu Sep 25 15:38:39 2008
What is your babbling about KDE about??

Phonon is not dependent on KDE.

Posted by Richard Van Den Boom at Thu Sep 25 16:38:54 2008
xine is missing too.
In fact, most audio players use xine or directly use Alsa. Video players use mainly xine or mplayer.
So what is this all about?
What are you trying to say with this graph? That Linux audio looks like this?
Talking about wishfull thinking at best.

Posted by Stoffe at Thu Sep 25 17:12:48 2008
Seems like you've gotten a small flock of trolls following your wagon and making noise everytime you set up shop and actually do something. :)

I'd advice to just ignore them, unlike you they don't contribute anything to anything and would rather everything be like on grampas time (if it was good enough for him, it was good enough for me, now get off my lawn).

Anyhow, keep up the great work! You probably don't know how appreciated the efforts with pulse and bluez is! And maybe the KDE people never will, since they take the protectionist approach. Their problem.

Posted by Lennart at Thu Sep 25 17:50:31 2008
Richard: This chart is about APIs. MPlayer is not a useful API, and yes, I ignored Xine in favour of GStreamer. Call that bias, but it is not in my interest to list alternatives here -- this is about listing recommendations. Also, I wonder how you came to the conclusion there were more audio players using Xine than GStreamer. This is really far from the reality. I am not sure you have the full picture here.

Posted by Max Howell at Thu Sep 25 20:23:35 2008
Honestly, it's people like you that drove me away from Linux development.

You are clearly bright, and capable, so why be so childish about different groups of developers?

Posted by Rob at Fri Sep 26 01:18:49 2008
@Max: You may want to read the comments on the earlier entry.

Posted by Mark Brown at Fri Sep 26 09:40:32 2008
Lennart: At least for the embedded world it seems to be the in-kernel OSS emulation that gets used if people want one. It does have massive disadvantages (more than you list, it also manages to do things like interact poorly with the actual drivers) but people seem to prefer it.

Posted by Karol Szumski at Fri Sep 26 14:21:28 2008
There's also OSS 4.x series released some time ago by 4front under a opensource license - it's an alternative to ALSA and removes most of old OSS drawbacks (Multichannel sound and stream mixing. It also has per-application volume control)

Posted by Lennart at Fri Sep 26 14:41:56 2008
Karol: in the guide this story is a followup to I explained that OSS4 is irrelevant on Linux.

Posted by Blazej Krzeminski at Fri Nov 7 23:31:49 2008
I've read Hanu's (oss4 developer) blog and his explanation why oss4 is better than alsa sounds more convining;). I've tried it and really liked it: nonblocking access to the sound card works out of the box, per-application mixing works out of the box. None of the linux distributions I've used had these things enabled by default, instead we are told to use yet another layer, heh.. anyway I hope that oss4 guys will continue good work and get more attention.

Posted by SomeOne at Tue Nov 18 03:54:05 2008
Hi, Lennart,
  why don't you spend more time to fix that awful
piece of crap u created?
  Certainly you are very good at advertising and
FUDing things.

"Karol: in the guide this story is a followup to I explained that OSS4 is irrelevant on Linux."

Irrelevant or not(which itself a BS issue), it works
ten times better than your PA crap, out of box.

Posted by Rudd-O at Fri Nov 28 08:24:08 2008
Reference (the diagram you asked):

http://rudd-o.com/uploads/2007/11/pulseaudio-diagram.png/view

Posted by Mephisto at Sun Dec 7 01:29:52 2008
You OSS fanboys can flame PA and alsa all you want, but 4front made a big mistake with OSS that the other developers did not. They actually wanted people to pay for additional features that are assumed as standard functionality since win98. It's pretty hard to convince users to pay for an audio stack after they have installed an already unfamiliar OS and expect everything, including software sound mixing, to work. 4front might have started seeing the light now and come up with an open source version which includes that and more, but they're already too late. Because of their short-sightedness, linux now has a replacement, alsa, and its not going away in favor of a new version of the very thing they wanted to get rid of. Don't forget it was OSS in the first place that got linux in the whole audio stack mess with incompatible sound daemons and different API's. If they made their sound mixing functionality freely available about 10 years ago, no one would've needed a sound daemons back then, and "esd compatibility" or other legacy crap now.
So yes, OSS4 is irrelevant. Application developers have been moving away from OSS since linux 2.6 at an increasing rate, and personally, i dont care if OSS is better than alsa, i just want them (4front) to bug off and take their proprietary crap with them. Anyone who really cares about free software wouldnt want alsa to be replaced by software from a company that has shown in the past that they're not in it for the open source idea but for the money.

Posted by Mephisto at Sun Dec 7 01:33:04 2008
Oh, almost forgot. I do think OSS compatibility shouldn't be place on top of PA in the diagram, but next to alsa, since this is kernel-level functionality from the alsa system that completely bypasses PA and alsa systems like dmix.

Posted by Delan Azabani at Sun Jul 3 09:35:43 2011
It's somewhat disappointing to see your dislike of OSS, even when it's been constantly proven that your claims of the shortcomings of OSS are no longer true, or were never true in the first place.

Of course, it is not perfect, and for example, I am very disappointed that OSS is practically incapable for use on laptops or other devices that users want to suspend.

I for one, hope that OSS continues to be developed and overtakes ALSA as the default sound system shipped with the major distributions.

I also hope that more applications will stop coding directly for the ALSA API and use something higher-level, if they're simply playing or capturing sound. I find it incredibly frustrating when some developers jump on the incompatibility bandwagon (which some could say as the anti-OSS bandwagon, but let's not go there) and I'm left with no sound in some applications.

I really appreciate and admire your work, but I disagree with your opinion in this area.

Leave a Comment:

Your Name:


Your E-mail (optional):


Comment:


As a protection against comment spam, please type the following number into the field on the right:
Secret Number Image

Please note that this is neither a support forum nor a bug tracker! Support questions or bug reports posted here will be ignored and not responded to!


It should be obvious but in case it isn't: the opinions reflected here are my own. They are not the views of my employer, or Ronald McDonald, or anyone else.

Please note that I take the liberty to delete any comments posted here that I deem inappropriate, off-topic, or insulting. And I excercise this liberty quite agressively. So yes, if you comment here, I might censor you. If you don't want to be censored your are welcome to comment on your own blog instead.


Lennart Poettering <mzoybt (at) 0pointer (dot) net>
Syndicated on Planet GNOME, Planet Fedora, planet.freedesktop.org, Planet Debian Upstream. feed RSS 0.91, RSS 2.0
Archives: 2005, 2006, 2007, 2008, 2009, 2010, 2011

Valid XHTML 1.0 Strict!   Valid CSS!