PulseAudio for 2008.1

For those who don't follow the Cooker list, it's recently been announced that Mandriva will switch to using PulseAudio as its default sound server for all desktops in the next release. Several other distros have announced plans to do this, and Fedora has been doing it since Fedora 8, but it's rather more complex for Mandriva as we support both KDE and GNOME desktops. However, testing indicates that we can manage a good KDE implementation, so we're going to go with it.

For anyone who hasn't yet come across PulseAudio, it's a sound server. This means it sits between applications and your actual hardware sound output devices, accepting audio from applications and mixing it together and potentially processing it in other ways before sending it out to the device(s). At its most basic level, this allows for software mixing of audio from various applications, allowing them all to play audio together. This is nothing new; the existing servers, esd for GNOME and arts for KDE, do this already (more or less...), and so (in a slightly different way) does the 'dmix' component of ALSA itself. However, PulseAudio has rather more potential than any of these. It is also able to easily and universally configure default input and output devices, a common bugbear on Linux, and increasingly so as more and more people have more than one audio device on their system. It can move a stream from one output device to another while it's playing, which is very useful. It can adjust volume for different streams independently. It can also be used over a network (and supports Zeroconf), so you can even move output streams around between different machines. In simple practical terms, too, it just tends to work rather better than esd, arts or dmix do alone; for instance, I've only ever been able to reliably get sound output from Flash working using Pulse.

As you can probably tell, I personally like Pulse a lot and am very happy to see this change: it should reduce the audio configuration headaches in future Mandriva releases massively.

It's worth noting that Pulse has actually been in Mandriva for many releases now (in older releases, under its old name of PolypAudio); it just hasn't been used by default. If you want to try it out on an existing Mandriva release, just install all the available Pulse packages (and libflashsupport, if it's available - you need that for Flash) and then follow the PulseAudio perfect setup guide. To actually start Pulse, if you use GNOME you can rename /usr/bin/esd to /usr/bin/esdbak and rename /usr/bin/esdcompat to /usr/bin/esd , if you're on KDE you'll probably have to start it manually with each session. To control it, it's probably easiest to have 'padevchooser' running permanently, it's a panel icon you can use to launch the other control applications. "Volume Control" is the most useful one, it lets you monitor and move about the currently playing audio streams.

Thanks to the PulseAudio team for being the ones to finally write a good next-generation sound server for Linux, thanks to Colin Guthrie for most of the recent packaging work and cheerleading for Pulse within the MDV community, and thanks to Fred Crozat for being the inside guy for Pulse :)

Comments

dexter11 wrote on 2007-12-05 18:12:
What's wrong with OSS? I don't know too much about it or about sound systems in general but it's open sourced, low latency (or so the writers say), does this mixing stuff you mentioned in your blog post, it's the oldest sound system which means it's mature and it's even multi platform. It could be something which makes the cooperation stronger between the various unix and unixlike OSes. It looks a clear winner to me.
adamw wrote on 2007-12-05 22:59:
OSS is a collection of sound drivers, not a sound server. It's not the same thing at all. Doesn't do software mixing at all as far as I can tell. OSS/Free (a subset of OSS) was the default driver collection and audio interface on Linux for years. That's what /dev/dsp is, for instance. It has been superseded, more or less, by ALSA, though we *still* have to maintain a few OSS/Free drivers for corner case hardware which doesn't work well with ALSA drivers. ALSA includes a module which provides an implementation of the OSS API, for backwards compatibility (which is why you can play audio through the OSS interface when using an ALSA driver). The whole of OSS was only recently open sourced, and given the fact that ALSA is more or less the incumbent now, hasn't really caught on with distributors.
Mark wrote on 2007-12-06 07:46:
Hi Adam, Nothing to do with Pulse audio but I thought I'd let you know I installed Mandriva 2008 a week ago for the first time in year's. All credit to you guys, I didn't realize how far the distro had come over the years. It will remain my primary desktop moving forward, keep up the good work, most polished distro I've used.