ucm: remove strict: in ${OpenName} substitution

Signed-off-by: Jaroslav Kysela <perex@perex.cz>
This commit is contained in:
Jaroslav Kysela 2020-06-08 09:17:57 +02:00
parent e1777ee1a1
commit 9b5fde5054
2 changed files with 7 additions and 4 deletions

View file

@ -2202,8 +2202,6 @@ int uc_mgr_import_master_config(snd_use_case_mgr_t *uc_mgr)
/* do not handle the error here */
/* we can refer the virtual UCM config */
get_by_card_name(uc_mgr, name);
} else {
name += 7;
}
err = load_toplevel_config(uc_mgr, &cfg);

View file

@ -31,10 +31,15 @@
static char *rval_open_name(snd_use_case_mgr_t *uc_mgr)
{
const char *name;
if (uc_mgr->conf_format < 3)
return NULL;
if (uc_mgr->card_name && uc_mgr->card_name[0])
return strdup(uc_mgr->card_name);
name = uc_mgr->card_name;
if (name) {
if (strncmp(name, "strict:", 7) == 0)
name += 7;
return strdup(name);
}
return NULL;
}