summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJaroslav Kysela <perex@perex.cz>2021-05-13 18:28:20 +0200
committerJaroslav Kysela <perex@perex.cz>2021-05-13 18:28:20 +0200
commitd9658b75093a4170384bc5108d099d6e983eae81 (patch)
tree3c8101c6872ed0577d521deed64c9a615c781179
parentffb401ba22fcec9c1cbcc4cbf2d24108998bbe66 (diff)
downloadalsa-lib-d9658b75093a4170384bc5108d099d6e983eae81.tar.gz
ucm: parse LibraryConfig also in the toplevel file
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
-rw-r--r--src/ucm/parser.c14
1 files changed, 12 insertions, 2 deletions
diff --git a/src/ucm/parser.c b/src/ucm/parser.c
index 33754803..2a425da6 100644
--- a/src/ucm/parser.c
+++ b/src/ucm/parser.c
@@ -2098,7 +2098,7 @@ static int parse_master_file(snd_use_case_mgr_t *uc_mgr, snd_config_t *cfg)
if (strcmp(id, "Error") == 0)
return error_node(uc_mgr, n);
- uc_error("uknown master file field %s", id);
+ uc_error("unknown master file field %s", id);
}
return 0;
}
@@ -2337,7 +2337,17 @@ static int parse_toplevel_config(snd_use_case_mgr_t *uc_mgr,
continue;
}
- uc_error("uknown toplevel field %s", id);
+ /* alsa-lib configuration */
+ if (uc_mgr->conf_format > 3 && strcmp(id, "LibraryConfig") == 0) {
+ err = parse_libconfig(uc_mgr, n);
+ if (err < 0) {
+ uc_error("error: failed to parse LibConfig");
+ return err;
+ }
+ continue;
+ }
+
+ uc_error("unknown toplevel field %s", id);
}
return -ENOENT;