Version 3 (modified by adi, 13 years ago) |
---|
Running ALSA applications with FFADO
Once you have your jackd running with FFADO, you would probably also like to use some non-jackd applications, i.e. sound from the flash plugin (Update: if you want jack-enabled flash, try git clone git://repo.or.cz/libflashsupport-jack.git) in your browser. While it's usually possible to configure programs like mplayer, qmmp or gstreamer to use jackd directly, you cannot do so with others (once again: flash).
According to http://alsa.opensrc.org/index.php/Jack_(plugin), there's a way to reroute the ALSA output to jackd. On Debian-based systems, you'd need to install libasound2-plugins, other distros may vary:
# apt-get install libasound2-plugins
Afterwards, change your ~/.asoundrc:
pcm.!default { type plug slave { pcm "jack" } } pcm.jack { type jack playback_ports { 0 system:playback_1 1 system:playback_2 } capture_ports { 0 alsa_pcm:capture_1 1 alsa_pcm:capture_2 } } ctl.mixer0 { type hw card 0 }
Note that you don't have to provide target names for the playback ports. If you prefer to start your alsa application without connecting to system:playback_1, just omit them, but keep the channel numbers (0,1):
pcm.jack { type jack playback_ports { 0 1 } [..]
If you need to automatically connect one channel to more than one jackd destination port, then take an approach as outlined in http://www.alsa-project.org/main/index.php/Asoundrc#Virtual_multi_channel_devices. Of course, you could still create multiple connections of the same output by hand (e.g. in qjackctl)
OSS-only applications
If you have old applications which neither support jackd nor ALSA, you need to use an OSS wrapper on top of ALSA. On Debian-based systems, install alsa-oss:
# apt-get install alsa-oss
This should give you the wrapper script aoss, making OSS applications use ALSA and hence jackd, if configured as shown above. For Firefox/Flash, there's nothing more to do, for all other apps see http://alsa.opensrc.org/Aoss.