| 1 |
PulseAudio <--> ALSA plugins |
| 2 |
============================ |
| 3 |
|
| 4 |
This plugin allows any program that uses the ALSA API to access a PulseAudio |
| 5 |
sound daemon. In other words, native ALSA applications can play and record |
| 6 |
sound across a network. |
| 7 |
|
| 8 |
There are two plugins in the suite, one for PCM and one for mixer control. A |
| 9 |
typical configuration will look like: |
| 10 |
|
| 11 |
pcm.pulse { |
| 12 |
type pulse |
| 13 |
} |
| 14 |
|
| 15 |
ctl.pulse { |
| 16 |
type pulse |
| 17 |
} |
| 18 |
|
| 19 |
Put the above in ~/.asoundrc, or /etc/asound.conf, and use "pulse" as device |
| 20 |
in your ALSA applications. For example: |
| 21 |
|
| 22 |
% aplay -Dpulse foo.wav |
| 23 |
% amixer -Dpulse |
| 24 |
|
| 25 |
PulseAudio will accept more or less any format you throw at it. So a plug |
| 26 |
wrapper is unnecessary. Mixing is also handled so dmix will only cause a |
| 27 |
performance hit without any gain. |
| 28 |
|
| 29 |
The plugins will respect your PulseAudio environment variables (like |
| 30 |
PULSE_SERVER), but you can override these in ALSA's configuration files. |
| 31 |
|
| 32 |
Both plugins accept the "server" parameter, specifying which PulseAudio server |
| 33 |
to contact. Both also accept the "device" parameter, which indicate which |
| 34 |
source and sink to use. |
| 35 |
|
| 36 |
The mixer control plugin also accepts the parameters "source" and "sink" for |
| 37 |
when you need to specify a sink/source combination with different names. If |
| 38 |
you need to do this with PCM:s then specify two PCM:s with different "device". |
| 39 |
|
| 40 |
If you do not specify any source and/or sink, then the server's defaults will |
| 41 |
be used. |
| 42 |
|
| 43 |
When "fallback" option is set, the plugin will try to open the given PCM |
| 44 |
(or control) automatically when connecting to PA server fails. Typically, |
| 45 |
it should point to "sysdefault", which was introduced recently in alsa-lib, |
| 46 |
so that the system-default setup is used even when you overwrite "default" |
| 47 |
PCM and control definitions. |
| 48 |
|
| 49 |
pcm.pulse { |
| 50 |
type pulse |
| 51 |
fallback "sysdefault" |
| 52 |
} |
| 53 |
|
| 54 |
ctl.pulse { |
| 55 |
type pulse |
| 56 |
fallback "sysdefault" |
| 57 |
} |
| 58 |
|
| 59 |
pcm.!default "pulse" |
| 60 |
ctl.!default "pulse" |