|
Packit Service |
cd2a00 |
PulseAudio <--> ALSA plugins
|
|
Packit Service |
cd2a00 |
============================
|
|
Packit Service |
cd2a00 |
|
|
Packit Service |
cd2a00 |
This plugin allows any program that uses the ALSA API to access a PulseAudio
|
|
Packit Service |
cd2a00 |
sound daemon. In other words, native ALSA applications can play and record
|
|
Packit Service |
cd2a00 |
sound across a network.
|
|
Packit Service |
cd2a00 |
|
|
Packit Service |
cd2a00 |
There are two plugins in the suite, one for PCM and one for mixer control. A
|
|
Packit Service |
cd2a00 |
typical configuration will look like:
|
|
Packit Service |
cd2a00 |
|
|
Packit Service |
cd2a00 |
pcm.pulse {
|
|
Packit Service |
cd2a00 |
type pulse
|
|
Packit Service |
cd2a00 |
}
|
|
Packit Service |
cd2a00 |
|
|
Packit Service |
cd2a00 |
ctl.pulse {
|
|
Packit Service |
cd2a00 |
type pulse
|
|
Packit Service |
cd2a00 |
}
|
|
Packit Service |
cd2a00 |
|
|
Packit Service |
cd2a00 |
Put the above in ~/.asoundrc, or /etc/asound.conf, and use "pulse" as device
|
|
Packit Service |
cd2a00 |
in your ALSA applications. For example:
|
|
Packit Service |
cd2a00 |
|
|
Packit Service |
cd2a00 |
% aplay -Dpulse foo.wav
|
|
Packit Service |
cd2a00 |
% amixer -Dpulse
|
|
Packit Service |
cd2a00 |
|
|
Packit Service |
cd2a00 |
PulseAudio will accept more or less any format you throw at it. So a plug
|
|
Packit Service |
cd2a00 |
wrapper is unnecessary. Mixing is also handled so dmix will only cause a
|
|
Packit Service |
cd2a00 |
performance hit without any gain.
|
|
Packit Service |
cd2a00 |
|
|
Packit Service |
cd2a00 |
The plugins will respect your PulseAudio environment variables (like
|
|
Packit Service |
cd2a00 |
PULSE_SERVER), but you can override these in ALSA's configuration files.
|
|
Packit Service |
cd2a00 |
|
|
Packit Service |
cd2a00 |
Both plugins accept the "server" parameter, specifying which PulseAudio server
|
|
Packit Service |
cd2a00 |
to contact. Both also accept the "device" parameter, which indicate which
|
|
Packit Service |
cd2a00 |
source and sink to use.
|
|
Packit Service |
cd2a00 |
|
|
Packit Service |
cd2a00 |
The mixer control plugin also accepts the parameters "source" and "sink" for
|
|
Packit Service |
cd2a00 |
when you need to specify a sink/source combination with different names. If
|
|
Packit Service |
cd2a00 |
you need to do this with PCM:s then specify two PCM:s with different "device".
|
|
Packit Service |
cd2a00 |
|
|
Packit Service |
cd2a00 |
If you do not specify any source and/or sink, then the server's defaults will
|
|
Packit Service |
cd2a00 |
be used.
|
|
Packit Service |
cd2a00 |
|
|
Packit Service |
cd2a00 |
When "fallback" option is set, the plugin will try to open the given PCM
|
|
Packit Service |
cd2a00 |
(or control) automatically when connecting to PA server fails. Typically,
|
|
Packit Service |
cd2a00 |
it should point to "sysdefault", which was introduced recently in alsa-lib,
|
|
Packit Service |
cd2a00 |
so that the system-default setup is used even when you overwrite "default"
|
|
Packit Service |
cd2a00 |
PCM and control definitions.
|
|
Packit Service |
cd2a00 |
|
|
Packit Service |
cd2a00 |
pcm.pulse {
|
|
Packit Service |
cd2a00 |
type pulse
|
|
Packit Service |
cd2a00 |
fallback "sysdefault"
|
|
Packit Service |
cd2a00 |
}
|
|
Packit Service |
cd2a00 |
|
|
Packit Service |
cd2a00 |
ctl.pulse {
|
|
Packit Service |
cd2a00 |
type pulse
|
|
Packit Service |
cd2a00 |
fallback "sysdefault"
|
|
Packit Service |
cd2a00 |
}
|
|
Packit Service |
cd2a00 |
|
|
Packit Service |
cd2a00 |
pcm.!default "pulse"
|
|
Packit Service |
cd2a00 |
ctl.!default "pulse"
|