mirror of
https://github.com/alsa-project/alsa-lib.git
synced 2025-10-29 05:40:25 -04:00
ucm: find-device / pcm - the ctl_list may be empty
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
This commit is contained in:
parent
447a676ee5
commit
ddb0871ec6
1 changed files with 4 additions and 0 deletions
|
|
@ -467,6 +467,10 @@ static int rval_device_lookup_init(snd_use_case_mgr_t *uc_mgr,
|
|||
|
||||
if (snd_config_search(config, "ctl", &d) || snd_config_get_string(d, &s)) {
|
||||
iter->ctl_list = uc_mgr_get_master_ctl(uc_mgr);
|
||||
if (iter->ctl_list == NULL) {
|
||||
uc_error("Control device is not defined!");
|
||||
return -EINVAL;
|
||||
}
|
||||
} else {
|
||||
err = uc_mgr_open_ctl(uc_mgr, &iter->ctl_list, s, 1);
|
||||
if (err < 0) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue