Add snd_{ctl|pcm}_open_fallback() functions

This patch adds new API functions, snd_ctl_open_fallback() and
snd_pcm_open_fallback().  These are just like snd_*_open_lconf() but
used to open a fallback PCM/control.  The difference is that it replaces
the name string with the given original name, so that hctl and other
upper-layers will recognize it as an alias.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
This commit is contained in:
Takashi Iwai 2011-07-26 13:10:24 +02:00
parent e6f990e5c9
commit acb423d937
4 changed files with 50 additions and 0 deletions

View file

@ -410,6 +410,9 @@ int snd_pcm_open(snd_pcm_t **pcm, const char *name,
int snd_pcm_open_lconf(snd_pcm_t **pcm, const char *name,
snd_pcm_stream_t stream, int mode,
snd_config_t *lconf);
int snd_pcm_open_fallback(snd_pcm_t **pcm, snd_config_t *root,
const char *name, const char *orig_name,
snd_pcm_stream_t stream, int mode);
int snd_pcm_close(snd_pcm_t *pcm);
const char *snd_pcm_name(snd_pcm_t *pcm);