]> git.alsa-project.org Git - alsa-lib.git/commitdiff
ucm: move macros and evali substitution to Syntax 6
authorJaroslav Kysela <perex@perex.cz>
Wed, 18 May 2022 06:45:33 +0000 (08:45 +0200)
committerJaroslav Kysela <perex@perex.cz>
Wed, 18 May 2022 06:52:50 +0000 (08:52 +0200)
There should be printed an error when the new configuration
blocks are used with the older alsa-lib.

Signed-off-by: Jaroslav Kysela <perex@perex.cz>
src/ucm/parser.c
src/ucm/ucm_subs.c

index 71b95f0e799aad81bbd7e6e28c53898c9399a1b5..7e4e4cedfbfbcb5835d7b6ddaa2cb1a8d4db5d57 100644 (file)
@@ -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;
        }
 
index 7bf0aaae633ebe3f294421ab46635fd4623e55df..6ff21853360f400219d7eb5ba572e05a78c7bb56 100644 (file)
@@ -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);