mirror of
https://github.com/alsa-project/alsa-lib.git
synced 2026-04-07 08:20:59 -04:00
ucm: substitute component sequence string
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
This commit is contained in:
parent
991990cdf2
commit
df498d89c7
1 changed files with 9 additions and 4 deletions
|
|
@ -573,14 +573,19 @@ static int parse_component_seq(snd_use_case_mgr_t *uc_mgr,
|
|||
snd_config_t *n, int enable,
|
||||
struct component_sequence *cmpt_seq)
|
||||
{
|
||||
const char *val;
|
||||
char *val;
|
||||
int err;
|
||||
|
||||
err = snd_config_get_string(n, &val);
|
||||
if (uc_mgr->conf_format < 3) {
|
||||
err = parse_string(n, &val);
|
||||
} else {
|
||||
err = parse_string_substitute(uc_mgr, n, &val);
|
||||
}
|
||||
if (err < 0)
|
||||
return err;
|
||||
|
||||
cmpt_seq->device = find_component_dev(uc_mgr, val);
|
||||
free(val);
|
||||
if (!cmpt_seq->device) {
|
||||
uc_error("error: Cannot find component device %s", val);
|
||||
return -EINVAL;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue