[alsa-devel] [PATCH 3/3] pulse: Add fallback option
Raymond Yau
superquad.vortex2 at gmail.com
Mon Sep 12 03:20:53 CEST 2011
2011/7/26 Takashi Iwai <tiwai at suse.de>:
> [Patch to alsa-plugins]
>
> Added "fallback" option to give the PCM / controller name as a fallback
> when connecting to PA server fails.
>
> Signed-off-by: Takashi Iwai <tiwai at suse.de>
> ---
> doc/README-pulse | 19 +++++++++++++++++++
> pulse/ctl_pulse.c | 17 ++++++++++++++++-
> pulse/pcm_pulse.c | 17 ++++++++++++++++-
> pulse/pulse.c | 7 ++++---
> pulse/pulse.h | 2 +-
> 5 files changed, 56 insertions(+), 6 deletions(-)
>
> diff --git a/doc/README-pulse b/doc/README-pulse
> index d5431b4..5b119f9 100644
> --- a/doc/README-pulse
> +++ b/doc/README-pulse
> @@ -39,3 +39,22 @@ you need to do this with PCM:s then specify two PCM:s with different "device".
>
> If you do not specify any source and/or sink, then the server's defaults will
> be used.
> +
> +When "fallback" option is set, the plugin will try to open the given PCM
> +(or control) automatically when connecting to PA server fails. Typically,
> +it should point to "sysdefault", which was introduced recently in alsa-lib,
> +so that the system-default setup is used even when you overwrite "default"
> +PCM and control definitions.
> +
> + pcm.pulse {
> + type pulse
> + fallback "sysdefault"
> + }
> +
> + ctl.pulse {
> + type pulse
> + fallback "sysdefault"
> + }
> +
> + pcm.!default "pulse"
> + ctl.!default "pulse"
it seem that override "pulse" is not a good idea
a better way is just add "fallback" to default
pcm.!default {
type pulse
fallback "sysdefault"
hint {
description "Default"
}
}
ctl.!default {
type pulse
fallback "sysdefault"
hint {
description "Default"
}
}
More information about the Alsa-devel
mailing list