From adf7f6b72fb6d10e00e93d04dfa33ce8c5e384c8 Mon Sep 17 00:00:00 2001 From: Paolo Bonzini Date: Thu, 21 Sep 2023 14:04:39 +0200 Subject: vl: recognize audiodev groups in configuration files This is necessary for the q35 configuration tests to pass, once audiodev becomes mandatory. Signed-off-by: Paolo Bonzini --- softmmu/vl.c | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'softmmu') diff --git a/softmmu/vl.c b/softmmu/vl.c index 3db4fd2..db04f98 100644 --- a/softmmu/vl.c +++ b/softmmu/vl.c @@ -2125,6 +2125,7 @@ static int global_init_func(void *opaque, QemuOpts *opts, Error **errp) static bool is_qemuopts_group(const char *group) { if (g_str_equal(group, "object") || + g_str_equal(group, "audiodev") || g_str_equal(group, "machine") || g_str_equal(group, "smp-opts") || g_str_equal(group, "boot-opts")) { @@ -2140,6 +2141,15 @@ static void qemu_record_config_group(const char *group, QDict *dict, Visitor *v = qobject_input_visitor_new_keyval(QOBJECT(dict)); object_option_add_visitor(v); visit_free(v); + + } else if (g_str_equal(group, "audiodev")) { + Audiodev *dev = NULL; + Visitor *v = qobject_input_visitor_new_keyval(QOBJECT(dict)); + if (visit_type_Audiodev(v, NULL, &dev, errp)) { + audio_define(dev); + } + visit_free(v); + } else if (g_str_equal(group, "machine")) { /* * Cannot merge string-valued and type-safe dictionaries, so JSON -- cgit v1.1