From: Paolo Bonzini <pbonzini@redhat.com>
To: qemu-devel@nongnu.org
Cc: balaton@eik.bme.hu
Subject: [PULL 9/9] vl: recognize audiodev groups in configuration files
Date: Fri, 22 Sep 2023 17:42:28 +0200 [thread overview]
Message-ID: <20230922154228.304933-10-pbonzini@redhat.com> (raw)
In-Reply-To: <20230922154228.304933-1-pbonzini@redhat.com>
This is necessary for the q35 configuration tests to pass,
once audiodev becomes mandatory.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
docs/config/q35-emulated.cfg | 4 ++++
docs/config/q35-virtio-graphical.cfg | 4 ++++
softmmu/vl.c | 10 ++++++++++
3 files changed, 18 insertions(+)
diff --git a/docs/config/q35-emulated.cfg b/docs/config/q35-emulated.cfg
index c8806e6d362..b4bd7e858a9 100644
--- a/docs/config/q35-emulated.cfg
+++ b/docs/config/q35-emulated.cfg
@@ -288,3 +288,7 @@
driver = "hda-duplex"
bus = "ich9-hda-audio.0"
cad = "0"
+ audiodev = "audiodev0"
+
+[audiodev "audiodev0"]
+ driver = "none" # CHANGE ME
diff --git a/docs/config/q35-virtio-graphical.cfg b/docs/config/q35-virtio-graphical.cfg
index 148b5d2c5e4..820860aefe0 100644
--- a/docs/config/q35-virtio-graphical.cfg
+++ b/docs/config/q35-virtio-graphical.cfg
@@ -248,3 +248,7 @@
driver = "hda-duplex"
bus = "sound.0"
cad = "0"
+ audiodev = "audiodev0"
+
+[audiodev "audiodev0"]
+ driver = "none" # CHANGE ME
diff --git a/softmmu/vl.c b/softmmu/vl.c
index 3db4fd26808..db04f98c36f 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
--
2.41.0
next prev parent reply other threads:[~2023-09-22 15:43 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-09-22 15:42 [PULL v2 0/9] i386, audio changes for 2023-09-22 Paolo Bonzini
2023-09-22 15:42 ` [PULL 1/9] target/i386: enumerate bit 56 of MSR_IA32_VMX_BASIC Paolo Bonzini
2023-09-22 15:42 ` [PULL 2/9] target/i386: Export GDS_NO bit to guests Paolo Bonzini
2023-09-22 15:42 ` [PULL 3/9] qemu/timer: Add host ticks function for RISC-V Paolo Bonzini
2023-09-22 15:42 ` [PULL 4/9] hw/input/tsc210x: Extract common init code into new function Paolo Bonzini
2023-09-22 15:42 ` [PULL 5/9] hw/audio: Simplify hda audio init Paolo Bonzini
2023-09-22 15:42 ` [PULL 6/9] hw/audio/lm4549: Add errp error reporting to init function Paolo Bonzini
2023-09-22 15:42 ` [PULL 7/9] hw/display/xlnx_dp.c: Add audiodev property Paolo Bonzini
2023-09-22 15:42 ` [PULL 8/9] tests/qtest: Specify audiodev= and -audiodev Paolo Bonzini
2023-09-22 15:42 ` Paolo Bonzini [this message]
2023-09-25 15:36 ` [PULL v2 0/9] i386, audio changes for 2023-09-22 Stefan Hajnoczi
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20230922154228.304933-10-pbonzini@redhat.com \
--to=pbonzini@redhat.com \
--cc=balaton@eik.bme.hu \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).