Friday, February 27, 2009

Fainting and the Linux audio stack, or Know Your Enemy

I've been working off and on to draft a Linux audio overview in the vein of Bryce's excellent X Window System architecture docs. Lennart, the brains behind Avahi and PulseAudio, already has a quite-good writeup on the different APIs with well thought-out reasons for choosing whichever one(s) for a task. Given that I've been knee-deep in triaging audio bugs, it has been amusing to watch various (developer) parties argue the merits of their wheels.

Nonetheless, in Linux, it's still a jungle [PNG].

Any user, power or novice, generally approaches bugs in an identical fashion: stuff needs to work now. Without further ado, here is part one of rationale behind guidelines for troubleshooting audio anomalies in Ubuntu (some of which is documented).

My sound is broken. Well, not quite. Generally when one's sound is inaudible, it can be caused by numerous culprits. Prior to Intrepid, one's user had to be in the "audio" group to use sound devices. PulseAudio's use of PolicyKit obviates that requirement, so one's user no longer has to be in that group. However, users experimenting with multiple desktop environments like Xfce, KDE, and GNOME - some of which don't use PulseAudio with a PolicyKit backend - need to be in that group. What am I driving at?
  • The user has to know too much about traditional discretionary access control.
Thanks to PulseAudio's integration with PolicyKit - and here, classic abstraction at work - we no longer have to concern ourselves with questions regarding incorrect ownership and/or permissions on /dev/dsp*, /dev/snd/*, etc. Yet that is a common culprit for inaudible applications that we catch repeatedly using a community-maintained troubleshooting script.

Next time, we look at how Linux speaks to our audio hardware.

No comments:

Post a Comment