ucm: define and describe Syntax 7

- for new macro argument substitution
- for new Path condition fields substitutions

Link: https://github.com/alsa-project/alsa-ucm-conf/pull/411
Link: https://github.com/alsa-project/alsa-lib/issues/395
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
This commit is contained in:
Jaroslav Kysela 2024-04-24 15:33:40 +02:00
parent c6cd83bd0a
commit 3864f7d95f
4 changed files with 41 additions and 16 deletions

View file

@ -454,11 +454,16 @@ static int evaluate_macro1(snd_use_case_mgr_t *uc_mgr,
err = snd_config_get_ascii(n, &var);
if (err < 0)
goto __err_path;
err = uc_mgr_get_substituted_value(uc_mgr, &var2, var);
free(var);
if (err >= 0) {
err = uc_mgr_set_variable(uc_mgr, name, var2);
free(var2);
if (uc_mgr->conf_format < 7) {
err = uc_mgr_set_variable(uc_mgr, name, var);
free(var);
} else {
err = uc_mgr_get_substituted_value(uc_mgr, &var2, var);
free(var);
if (err >= 0) {
err = uc_mgr_set_variable(uc_mgr, name, var2);
free(var2);
}
}
if (err < 0)
goto __err_path;