mirror of
https://github.com/alsa-project/alsa-lib.git
synced 2025-10-29 05:40:25 -04:00
ucm: quick fix for the previous commit when ALSA_CONFIG_UCM_VAR is set
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
This commit is contained in:
parent
10a63e093c
commit
2e53bbd876
1 changed files with 9 additions and 8 deletions
|
|
@ -1584,20 +1584,21 @@ static int load_master_config(snd_use_case_mgr_t *uc_mgr,
|
|||
uc_mgr->conf_format = 2;
|
||||
configuration_filename(uc_mgr, filename, sizeof(filename),
|
||||
uc_mgr->conf_file_name, card_name, ".conf");
|
||||
if (access(filename, R_OK) == 0)
|
||||
goto __load;
|
||||
}
|
||||
if (uc_mgr->conf_format >= 2 && access(filename, R_OK) != 0) {
|
||||
/* try the old ucm directory */
|
||||
uc_mgr->conf_format = 1;
|
||||
configuration_filename(uc_mgr, filename, sizeof(filename),
|
||||
card_name, card_name, ".conf");
|
||||
if (access(filename, R_OK) != 0)
|
||||
return -ENOENT;
|
||||
}
|
||||
/* try the old ucm directory */
|
||||
uc_mgr->conf_format = 1;
|
||||
configuration_filename(uc_mgr, filename, sizeof(filename),
|
||||
card_name, card_name, ".conf");
|
||||
if (access(filename, R_OK) != 0)
|
||||
return -ENOENT;
|
||||
} else {
|
||||
configuration_filename(uc_mgr, filename, sizeof(filename),
|
||||
card_name, card_name, ".conf");
|
||||
}
|
||||
|
||||
__load:
|
||||
err = uc_mgr_config_load(uc_mgr->conf_format, filename, cfg);
|
||||
if (err < 0) {
|
||||
uc_error("error: could not parse configuration for card %s",
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue