control: add _snd_ctl_open_child()

To support internal plugins, add internal _snd_ctl_open_child()
function like _snd_pcm_open_slave().

Signed-off-by: Jaroslav Kysela <perex@perex.cz>
This commit is contained in:
Jaroslav Kysela 2021-03-29 12:19:21 +02:00
parent bb646ecb47
commit 7db7e18bbb
2 changed files with 39 additions and 6 deletions

View file

@ -107,6 +107,16 @@ int INTERNAL(snd_ctl_elem_info_get_dimensions)(const snd_ctl_elem_info_t *obj);
int INTERNAL(snd_ctl_elem_info_get_dimension)(const snd_ctl_elem_info_t *obj, unsigned int idx);
#endif /* INTERNAL */
int _snd_ctl_open_named_child(snd_ctl_t **pctl, const char *name,
snd_config_t *root, snd_config_t *conf,
int mode, snd_config_t *parent_conf);
static inline int
_snd_ctl_open_child(snd_ctl_t **pctl, snd_config_t *root,
snd_config_t *conf, int mode, snd_config_t *parent_conf)
{
return _snd_ctl_open_named_child(pctl, NULL, root, conf, mode, parent_conf);
}
int __snd_ctl_add_elem_set(snd_ctl_t *ctl, snd_ctl_elem_info_t *info,
unsigned int element_count,
unsigned int member_count);