aboutsummaryrefslogtreecommitdiff
path: root/softmmu
diff options
context:
space:
mode:
authorPaolo Bonzini <pbonzini@redhat.com>2023-09-21 14:04:39 +0200
committerPaolo Bonzini <pbonzini@redhat.com>2023-09-22 17:35:11 +0200
commitadf7f6b72fb6d10e00e93d04dfa33ce8c5e384c8 (patch)
tree7a25c6f2cf8479a9d9f25d664ae4cd57d7a7907c /softmmu
parent50333482e16939cfeaed722e22f7b0798e5b3821 (diff)
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 <pbonzini@redhat.com>
Diffstat (limited to 'softmmu')
-rw-r--r--softmmu/vl.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/softmmu/vl.c b/softmmu/vl.c
index 3db4fd2680..db04f98c36 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