I’ve got an Edirol FA-66 firewire sound card. The only system on linux with support for this is JACK (with the FreeBoB driver). I use the FA-66 mainly for high quality audio playback. I start jackd with:
$ jackd -R --verbose -d freebob -r 44100
The command depends of course on your sound card. Test your setup with:
$ mplayer -ao jack some-file.mp3
Got sound? Excellent! Now, many audio players come with built-in jack playback support (gstreamer, pulseaudio, mplayer, xine, …) But some don’t, and the biggest issue for me here is Flash. Flash uses ALSA for playback, so it would be nifty if we could configure ALSA to redirect all it’s sound to JACK. I have been able to redirect flash audio to PulseAudio and from there to JACK, but that requires yet another sound server. No thanks! So, if we can redirect audio from ALSA to JACK, most apps should be able to send their sound through my FA-66. For apps that aren’t ALSA aware, there’s always aoss.
Googling got me to the following solution in my ~/.asoundrc file:
# convert alsa API over jack API
# use it with
# % aplay foo.wav
# use this as default
pcm.!default {
type plug
slave { pcm “jack” }
}
ctl.mixer0 {
type hw
card 1
}
# pcm type jack
pcm.jack {
type jack
playback_ports {
0 system:playback_1
1 system:playback_2
}
capture_ports {
0 system:capture_1
1 system:capture_2
}
}
Test it with aplay file.avi. Nifty, now ALSA pushes all audio to JACK which in turn pushes it through the firewire port to my sound card! If you’re unsure on what to put under playback_ports, just have a look at jack’s verbose output (–verbose flag).
Rightie, now let’s try with Flash. Pop up Firefox, youtube ahoy, nice video, play! … Nada, no sound.
Look at the debug output from jackd and you’ll discover that the Flash player continously connects and disconnects. This results in a flood of debug messages in the console. According to this post, it seems to be a bug with Flash 9. I got to be honest with you, I couldn’t get this to work properly with flash 9. The solution? Install Flash 10 Release Candidate! I’m on Ubuntu (8.04 “Hardy”) so I downloaded the flash 10 RPM and ran the following commands:
$ sudo apt-get remove flashplugin-nonfree
$ fakeroot alien flashplayer10_install_linux_081108.i386.rpm
$ sudo dpkg -i flash-plugin_10.0.0.569-1_i386.deb
$ cd ~/.mozilla/plugins
$ ln -s /usr/lib/flash-plugin/libflashplayer.so
Restart firefox, check that youtube movie again and VOILA! There’s SOUND! Hope it helps, and I hope you don’t have to spend 2hrs on this as I did… :-/
(Who said it would be easy?)