On 2/24/26 16:06, Marc-André Lureau wrote:
Hi
On Mon, Feb 23, 2026 at 9:26 PM Sergei Heifetz <[email protected]> wrote:
D-Bus display can be used even when QEMU is configured with
`--disable-audio`. In that case, audio interface will not be available
on `/org/qemu/Display1/Audio`.
I think it should also disable "audiodev" (from QAPI DisplayDBus etc).
Or at the minimum, it should return an error if the option is given
and qemu is compiled with !CONFIG_AUDIO.
OK, I’ll remove `audiodev`, then.
(The current handling of the situation when audio is enabled but
no D-Bus-compatible audio backend is available is different and
hasn’t been changed.)
Signed-off-by: Sergei Heifetz <[email protected]>
---
ui/dbus.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/ui/dbus.c b/ui/dbus.c
index 905ee6fea7..60c8e0b473 100644
--- a/ui/dbus.c
+++ b/ui/dbus.c
@@ -219,6 +219,7 @@ dbus_display_complete(UserCreatable *uc, Error **errp)
return;
}
+#ifdef CONFIG_AUDIO
{
AudioBackend *audio_be = audio_get_default_audio_be(NULL);
if (audio_be && !audio_be_can_set_dbus_server(audio_be)) {
@@ -234,6 +235,7 @@ dbus_display_complete(UserCreatable *uc, Error **errp)
return;
}
}
+#endif
consoles = g_array_new(FALSE, FALSE, sizeof(guint32));
for (idx = 0;; idx++) {
--
2.34.1
--
Marc-André Lureau