From acb423d937111d682706169bcdcb58c70fdfa84d Mon Sep 17 00:00:00 2001 From: Takashi Iwai Date: Tue, 26 Jul 2011 13:10:24 +0200 Subject: 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 --- include/pcm.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'include/pcm.h') diff --git a/include/pcm.h b/include/pcm.h index 7243ffb3..be355a91 100644 --- a/include/pcm.h +++ b/include/pcm.h @@ -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); -- cgit v1.2.3