Pulseaudio in Ubuntu Feisty – play sound over the network!
This fall, I did a presentation for OSU Open Source club on the PulseAudio sound server, a replacement for ESD with a lot of cool additions and tricks. Unfortunately, I couldn’t get it to work back then, nor could I until I upgraded to Feisty Fawn. However, I finally figured out how to do it.
Why PulseAudio?
But first, some motivation. Why use a sound server these days? Doesn’t ALSA work now? Well, there’s 3 main reasons to rig up PulseAudio:
- Here’s the main one – PulseAudio can seamlessly play audio on any networked PC, regardless of what computer you’re actually at. What does this mean? Basically, you can hit play on your laptop and have the audio come out of the speakers attached to the desktop.
- Old programs that use OSS can be rigged to work correctly while having other sounds playing at the same time
- This one hasn’t been realized yet, but it’s also a very cool feature: audio can be manipulated per-application. While controlling this manually can already be done, it gets really cool when this is automatic based on the class of audio – for example, the music being turned down automatically when a VOIP phone call comes in. Someone worked on this as a Google SoC project, but he didn’t get very far (his implementation was a bit farfetched imo anyways)
How to Pulseaudio’ify
Alright, here’s what you do. First, install some packages:
#####
## If you have Flash Player 9, do this section too
#####
wget "http://www.paulbetts.org/projects/libflashsupport_1.0~2219-1_i386.deb"
sudo dpkg -i libflashsupport_1.0-2219-1_i386.deb
Then, edit the ALSA configuration file using the command: sudo gedit /etc/asound.conf. Fill it in as such:
type pulse
}
ctl.pulse {
type pulse
}
pcm.!default {
type pulse
}
ctl.!default {
type pulse
}
Some configuration things
Now, go to System->Preferences->Sounds and ensure “Enable Software Mixing” is turned on. Next, we make sure PulseAudio itself is configured correctly by hitting Alt-F2 and typing paprefs. Here’s the dialog with the correct options set:

Make sure that Multicast/RTP is off or else you’ll have problems with skipping and latency, then reboot, or hit Alt-F2 and run ‘pulseaudio’. Next, run Sound And Video->PulseAudio Device Chooser and if you have more than one PC with this setup, you’ll be able to choose which computer to send the audio to. Very cool!
Update: There’s an extra step that was added recently and in the final version of Feisty Fawn: you must add everyone to the pulse-access group. To do this, go to System->Administration->Users and Groups, click on “Manage Groups”, scroll down to “pulse-access”, Properties, then check everyone in the list. Otherwise, you’ll get weird “no-sound” errors and lockups.
Some problems
Unfortunately while you can definitely get this to work, it’s a bit of a hassle and kind of buggy – PulseAudio isn’t very bullet-proof quite yet and you might have to do some haggling. Skype in particular is annoying; it’s usually better to killall pulseaudio before trying to make a Skype call although I did get it working through OSS and padsp.
Update: Fixed busted Flash link
Credits: Most of this howto was taken from The Perfect Setup documentation on the PulseAudio site. The Flash 9 Support file is found at Revolution Linux wiki.
Yeah. Networked audio using PulseAudio and Avahi is a cool thing. When I’ll get my new laptop, I’ll probably try to switch all my systems to PulseAudio. I have already made some testing using PulseAudio on Debian Etch. PulseAudio is available in Etch main-repository too.
miksuh
15 Apr 07 at 3:32 pm
To get Alsa working via PulseAudio, you also need to install libasound2-plugins using apt-get.
StarQuake
22 Apr 07 at 3:56 pm
What about KDE people. Is there any problem regarding not to good arts thing?
bartek
25 Apr 07 at 3:40 pm
I think so, just make ARTS play to ESD and it’ll work fine (PulseAudio pretends to be ESD so it’ll all work out).
Paul Betts
26 Apr 07 at 10:54 am
I can get listen sound on Laptop and PC . Dont know why but the server hang ups , on one of both side?
Isnt it necesary to use Multicast? if I whant to stream audio , local on PC and remote on LAPTOP ? Is there any official documentation or tutorial about this ?
ljr
26 Jun 09 at 11:09 am
@ljr
same problem here.. I want to stream audio from one PC to another, completely static configuration and ACL that allows only the other PC to communicate.
Miloss
27 Nov 09 at 12:58 pm
[...] das dann aber auch mit Windows funktioniert: Keine Ahnung. PulseAudio ? Wiki ? ubuntuusers.de Pulseaudio in Ubuntu Feisty – play sound over the network! at Thursday Night Falls es nur die Musik sein sollte, haette ich dir MPD empfohlen. Dann haettest du alle [...]
Sound
12 Dec 09 at 7:28 am