firefox (flash) > gnome (esd) > pulseaudio > jack

in

this is a small guide/reminder how to get all your gnome system sounds, gstreamer and even the firefox flash plugin output to jackd via pulseaudio.

first of all, some info about my system:
Linux 2.6.24-16-rt x86_64 (ubuntustudio, hardy 64bit)
pulseaudio 0.9.10
jackd version 0.109.2
firefox 3.0b5
flash 9.0 r124
so far, everything was installed from repositories (universe, multiverse enabled)

 

make gnome output to pulseaudio

getting gnome to use pulseaudio was as easy as setting all the playback/capture sources in System/Preferences/Sound to "PulseAudio Sound Server".
you can leave  [x] Enable software sound mixing checked, since pulseaudio replaces esd if you installed  pulseaudio-esound-compat.

make gstreamer output to pulseaudio

install gstreamer0.10-pulseaudio
in System/Preferences/Main Menu enable System/Preferences/Multimedia Systems Selector, launch it and set everything to "PulseAudio Sound Server" again.

make firefox flash plugin output to pulseaudio

install libflashsupport
package-info: Due to various bugs in the Flash 9 plugin sound output of Flash 9 through the pulseaudio soundserver doesn't work properly. This library adds a clutch to make Flash 9 sound output in pulseaudio possible.

 

make pulseaudio output to jack

since pulseaudio-module-jack was missing in the repositories I had to install the debian sid package http://packages.debian.org/sid/pulseaudio-module-jack
make sure you get the right version! (pulseaudio 32/64bit)
maybe someday it will make it into the repositories and you can skip this.

in my case:
pulseaudio 0.9.10-1ubuntu1 (hardy)
-> pulseaudio-module-jack 0.9.10-1

now tell pulseaudio to load the modules by editing /etc/pulse/default.pa


# Jack modules
load-module module-jack-sink channels=2
load-module module-jack-source channels=2

### comment this one out, so it doesn't load alsa/oss modules
#load-module module-hal-detect

### Make some devices default
set-default-sink jack_out
set-default-source jack_in

note: channels=2 is importend, cause otherwise pulseaudio would complain like:
E: module-jack-sink.c: Failed to parse channel_map= argument.
E: module.c: Failed to load  module "module-jack-sink" (argument: ""): initialization failed.

that's it. try running pulseaudio like:
pulseaudio --log-target=syslog --daemonize=true
or log out and back in, since this is how gnome launches pulseaudio as a replacement for esd.
and you should see something like this in the QjackCtl "Connections" window:

 

if you have the feeling I forgot something important, just leave a comment or drop a mail!