mirror of
https://github.com/alsa-project/alsa-lib.git
synced 2025-10-29 05:40:25 -04:00
Interpret id as card if a definition is not found
This commit is contained in:
parent
d2ed34c4e5
commit
8d554635af
1 changed files with 4 additions and 2 deletions
|
|
@ -163,8 +163,10 @@ int snd_ctl_open(snd_ctl_t **ctlp, char *name)
|
|||
if (err < 0)
|
||||
return err;
|
||||
err = snd_config_searchv(snd_config, &ctl_conf, "ctl", name, 0);
|
||||
if (err < 0)
|
||||
return err;
|
||||
if (err < 0) {
|
||||
int cardno = snd_card_get_index(name);
|
||||
return snd_ctl_hw_open(ctlp, name, cardno);
|
||||
}
|
||||
if (snd_config_type(ctl_conf) != SND_CONFIG_TYPE_COMPOUND)
|
||||
return -EINVAL;
|
||||
err = snd_config_search(ctl_conf, "type", &conf);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue