diff options
author | Takashi Iwai <tiwai@suse.de> | 2011-07-26 13:10:24 +0200 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2011-07-27 15:24:13 +0200 |
commit | acb423d937111d682706169bcdcb58c70fdfa84d (patch) | |
tree | feea1ea7d719c0246782754fbdda7b5935b72e1d /include | |
parent | e6f990e5c9be5cac6f36924d20a75d0f69d27297 (diff) |
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>
Diffstat (limited to 'include')
-rw-r--r-- | include/control.h | 1 | ||||
-rw-r--r-- | include/pcm.h | 3 |
2 files changed, 4 insertions, 0 deletions
diff --git a/include/control.h b/include/control.h index e8f38bb4..f265e349 100644 --- a/include/control.h +++ b/include/control.h @@ -224,6 +224,7 @@ char *snd_device_name_get_hint(const void *hint, const char *id); int snd_ctl_open(snd_ctl_t **ctl, const char *name, int mode); int snd_ctl_open_lconf(snd_ctl_t **ctl, const char *name, int mode, snd_config_t *lconf); +int snd_ctl_open_fallback(snd_ctl_t **ctl, snd_config_t *root, const char *name, const char *orig_name, int mode); int snd_ctl_close(snd_ctl_t *ctl); int snd_ctl_nonblock(snd_ctl_t *ctl, int nonblock); int snd_async_add_ctl_handler(snd_async_handler_t **handler, snd_ctl_t *ctl, 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); |