ALSA provides a number of additional plugins in this package. These include a plugin for JACK, and a plugin for PulseAudio. JACK and PulseAudio are sound servers, and we will discuss them later in detail. These plugins allow applications that depend on ALSA for sound, to be redirected to JACK or PulseAudio. In this way, applications that are normally not capable of using JACK or PulseAudio, will be able to connect to the sound server. To make use of these plugins, you can define new PCM devices which make use of these plugins. You can do so in one of the ALSA configuration files: .asoundrc or asound.conf . For PulseAudio, you would add something like this:
pcm.pulse {
type pulse
}
ctl.pulse {
type pulse
}
1.And for 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
}
}
Now you are ready to use these PCM devices for playback. You could for example use the command 'aplay -D jack example.wav', and aplay would be automatically connected to the JACK server. And 'aplay -D pulse example.wav' would connect to PulseAudio when it is running. To make JACK or PulseAudio the default PCM for applications that use ALSA, you can add this (substitute "jack" for "pulse" if you want to use PulseAudio):
pcm.!default {
type plug
slave { pcm "jack" }
}