[Haifux] Pulseaudio: Sounds good in theory

Nadav Har'El nyh at math.technion.ac.il
Wed Jan 5 10:52:44 MSK 2011


On Wed, Jan 05, 2011, Eli Billauer wrote about "[Haifux] Pulseaudio: Sounds good in theory":
> I've been doing some sound editing lately on my FC12, just to discover 
> that there is a new annoyance in town, namely Pulseaudio.
> http://en.wikipedia.org/wiki/PulseAudio

When Fedora first adopted Pulseaudio, it also annoyed me: it had bugs with
the volume control (my machine would boot with low volume, and no way to turn
it up), there were applications that didn't play well with pulseaudio, and so
on.

The Wikipedia article has this funny sentence: 'When first adopted by the
distributions, PulseAudio developer Lennart Poettering described it as "the
software that currently breaks your audio"'

But I now use Fedora 14, and all the glitches appear to be gone, and this
pulseaudio is on one side unnoticable and on the other hand provides some
nice advantages, especially the fact that *finally* - after all previous
attempts to do the same in Alsa (advanced Linux sound architecture) and Esd
(enlightened sound daemon), all my applications can play sounds which are
mixed together - without worrying that one application uses the "wrong"
interface and locks out all the rest. 

> I discovered it when Audacity failed to play back files or made choppy 
> noises. Other applications also seem to get messed up with this piece of 
> I-don't-know-what.

These sounds like bugs, plain and simple, bugs which have most likely been
eliminated in the year that passed since the release of Fedora 12.
Would you consider upgrading your Fedora? If you have a working Internet
connection and enough free disk space, it's very easy to do - just run
"preupgrade" (you no longer have to burn CDs or DVDs like you used to).

> My first instinct is to kick it out of my system, but since Fedora is a 
> system for experts (are they going to open a Red Hat University soon?) I 
> don't really know how to do that and what consequences I may face. I 
> mean, it's not so easy to just shut down. Killing the server makes it 
> restart (as a matter of fact, killall -9 pulseaudio has become my 
> catch-all solution for audio problems lately). And I haven't even 
> figured out how to disable this restart mechanism.

This approach should of course be possible, but I'd use it only as a last
resort, if you *must* stay with Fedora 12, and *can't* figure out what is
causing the bugs you are facing.

> And unfortunately, with all those fancy graphs and fluffy talk about 
> generalized everything, I haven't gotten to grasp how the machinery 
> ticks. Are there any special files? Domain sockets? What?

Take a look at Wikipedia article you linked to. As far as I know
(but I'm far from being an expert on this subject), PulseAudio does what
it can to trick applications that use other sound libraries (like Alsa
and ESD) to go through it, and it does the sound mixing in user space.
To take over Alsa connections, PuleseAudio (as far as I know) creates a new
"virtual sound card", and when the applications use it, PulseAudio get the
data, mixes it, and sends the results to the real sound card.

> Does anyone have insights about this? Is there any reason why this audio 
> server could be really useful, except for all the fine words said about 
> it? Weren't things OK as they were in the good old times, when audio was 
> just /dev/dsp?

No - the biggest problem with /dev/dsp was that it was exclusive - E.g., if
one application listens to songs in the background, another application cannot
play beeps (or whatever). Alsa attempted to solve this problem by doing the
mixing in the kernel, but apparently there were problems with this approach
(maybe somebody else on the list knows the whole story). Esd did mixing in
user space, but applications were forced to adopt a new API. Pulseaudio
aims to allow application to use any one of those legacy APIs and mix
everything together - while doing the mixing in user space.

To make a long story short, I *don't* think that Pulseaudio was the best
invention since sliced bread. I really think that any one of the existing
solutions that I had used - OSS, Alsa and Esd, can or could do more or less
everything that Pulseaudio could do, and perhaps in a less complex way.
But at this point (Fedora 14), it's no longer causing me any grief, so I
simply don't care, and have no incentive to try to remove it.


-- 
Nadav Har'El                        |    Wednesday, Jan  5 2011, 29 Tevet 5771
nyh at math.technion.ac.il             |-----------------------------------------
Phone +972-523-790466, ICQ 13349191 |Drink varnish and you'll get a lovely
http://nadav.harel.org.il           |finish.



More information about the Haifux mailing list