From b45fbeee34f61d08f204bec51f2d0ed269543b68 Mon Sep 17 00:00:00 2001 From: Jaroslav Kysela Date: Wed, 18 May 2022 08:45:33 +0200 Subject: [PATCH] ucm: move macros and evali substitution to Syntax 6 There should be printed an error when the new configuration blocks are used with the older alsa-lib. Signed-off-by: Jaroslav Kysela --- src/ucm/parser.c | 8 ++++---- src/ucm/ucm_subs.c | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/ucm/parser.c b/src/ucm/parser.c index 71b95f0e..7e4e4ced 100644 --- a/src/ucm/parser.c +++ b/src/ucm/parser.c @@ -367,8 +367,8 @@ static int evaluate_define_macro(snd_use_case_mgr_t *uc_mgr, return -EINVAL; } - if (uc_mgr->conf_format < 5) { - uc_error("DefineMacro is supported in v5+ syntax"); + if (uc_mgr->conf_format < 6) { + uc_error("DefineMacro is supported in v6+ syntax"); return -EINVAL; } @@ -481,8 +481,8 @@ static int evaluate_macro(snd_use_case_mgr_t *uc_mgr, return -EINVAL; } - if (uc_mgr->conf_format < 5) { - uc_error("Macro is supported in v5+ syntax"); + if (uc_mgr->conf_format < 6) { + uc_error("Macro is supported in v6+ syntax"); return -EINVAL; } diff --git a/src/ucm/ucm_subs.c b/src/ucm/ucm_subs.c index 7bf0aaae..6ff21853 100644 --- a/src/ucm/ucm_subs.c +++ b/src/ucm/ucm_subs.c @@ -614,8 +614,8 @@ static int rval_evali(snd_use_case_mgr_t *uc_mgr, snd_config_t *node, const char size_t l; int err; - if (uc_mgr->conf_format < 5) { - uc_error("variable evaluation is supported in v5+ syntax"); + if (uc_mgr->conf_format < 6) { + uc_error("variable evaluation is supported in v6+ syntax"); return -EINVAL; } err = snd_config_get_id(node, &id); -- 2.47.1