[pulseaudio-discuss] Help in setting up PA

Tanu Kaskinen tanuk at iki.fi
Fri Feb 1 14:57:49 PST 2008

On Fri, Feb 01, 2008 at 03:02:40PM -0500, Richard Geddes wrote:
> You are correct... latest release Ubuntu 7.10 comes with PA 0.9.6.  
> I'll look into getting the latest version of PA.
> My goal was to use PA as a replacement for esound server...  I'd like to
> be able to record/mix different sound sources (midi, analog, sound from
> files (mp3, wav, ogg, etc)) and be able to create different file
> formats, including sound delivered in flash (I'm not a fan of flash as
> it consumes alot of cpu time, but it is in demand).  I played with jackd
> for a while and was impressed with it's technical capabilities, but
> unfortunately, I haven't found a way to play flash sound through
> jackd... that is, flash in firefox.  I found a how-to in the Ubuntu
> forum that seemed to patch together a solution the involved PA:
> http://ubuntu-utah.ubuntuforums.org/showthread.php?t=548178

If you want to record midi and do other "pro-audio" stuff,
then jack is the way to go. If you also want to do "desktop"
stuff (like have every media player just work), then the
best solution in my experience is to run pulseaudio on top
of jack (like instructed in that link).

A summary of what you'll have to do at minimum:
- Get pulseaudio version >= 0.9.7
- Remove device loading from /etc/pulse/default.pa and add
  the jack modules instead
- Edit /etc/security/limits.conf as instructed in the link
- Edit /etc/pulse/daemon.conf to enable realtime scheduling
- Run jackd with -R parameter (i.e. in realtime mode)
- Other stuff that I have forgot ;)

If you are going to record midi, that probably means that
you have some midi instrument that you want to be able to
play live. That requires quite low latency. That's
completely possible to achieve. Unfortunately it may require
extensive tuning (mostly kernel, but you may need to tweak
irq priorities as well). Vanilla kernels are AFAIK getting
better and better regarding latency, so first try with your
current kernel. The actual latency is controlled by jackd
parameters -n and -p (read man jackd). If your kernel isn't
able to provide low enough latency, you'll get drop-outs and
xruns (the former being the audible consequence of the

If you have problems with setting pulseaudio to work in
combination with jack, or anything else pulseaudio related,
then feel free to ask further questions.

If it turns out that your system needs latency-tuning, here
are a few kernel options you could try without compiling an
-rt patched kernel:
CONFIG_HIGH_RES_TIMERS=y (AFAIK this requires a rather recent kernel)

There may be others that I'm not aware of. These are
beneficial to pulseaudio regardless of what kind of setup
you need (jack or not).

If you end up needing a patched kernel, here's the wiki of
the patchset: http://rt.wiki.kernel.org/index.php/Main_Page

If you have further questions about latency stuff, I
recommend searching the linux-audio-user at linuxaudio.org list
archives, and if that doesn't help, then send questions
there. That's a very good list to subscribe to anyway, if
you're going to do any audio work on Linux.

And then a note on flash. Flash requires a thing called
libflashsupport due to Adobe's plugin's bugginess. AFAIK it
will be packaged eventually, but currently you have to
compile it yourself. The link you gave refers to an outdated
version of the "thing". More recent information is available
at http://www.pulseaudio.org/wiki/PerfectSetup#FlashPlayer9.
In short: get the one that's hosted at git.0pointer.de, not
the revolutionlinux one.

An alternative to the flash plugin is http://keepvid.com,
which allows you to download the .flv files in Youtube and
several other supported services. Then just play the file on
your favourite media player. Keepvid.com is enough for me,
but YMMV. Note the white button saying "Drag this button..."
etc. It talks about a "links toolbar" but bookmarking the
script does the same thing.

> Question:   PA, esound, jackd, etc.. are all called sound servers,
> implying that you can replace one with another... like apache vs iis....

I'd say that being a sound server implies only that the
server is somehow capable of software mixing.

> is the main difference that they use different client/server
> communication protocols?

The main difference of pulseaudio and jack is their
different designs and goals. Maybe the communication
protocols somehow reflect that, I don't know. Esound's
distinctive feature is being dead, I don't know much else
about that thing.

Tanu Kaskinen

More information about the pulseaudio-discuss mailing list