]> git.proxmox.com Git - mirror_qemu.git/commit - audio/audio.c
qapi, audio: Make introspection reflect build configuration more closely
authorDaniel P. Berrangé <berrange@redhat.com>
Mon, 23 Jan 2023 08:39:57 +0000 (09:39 +0100)
committerThomas Huth <thuth@redhat.com>
Mon, 30 Jan 2023 14:43:55 +0000 (15:43 +0100)
commit7a92a8573c81162f75d71873be32c65f8aedd07f
treea260c7056bc91567026a48804dcc94017fd2ebf9
parent637d18090ed2fc8d5edea0c0c584291cb792a086
qapi, audio: Make introspection reflect build configuration more closely

Currently the -audiodev accepts any audiodev type regardless of what is
built in to QEMU. An error only occurs later at runtime when a sound
device tries to use the audio backend.

With this change QEMU will immediately reject -audiodev args that are
not compiled into the binary. The QMP schema will also be introspectable
to identify what is compiled in.

This also helps to avoid compiling code that is not required in the
binary. Note: When building the audiodevs as modules, the patch only
compiles out code for modules that we don't build at all.

Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
[thuth: Rebase, take sndio and dbus devices into account]
Message-Id: <20230123083957.20349-3-thuth@redhat.com>
Signed-off-by: Thomas Huth <thuth@redhat.com>
audio/audio.c
audio/audio_legacy.c
audio/audio_template.h
qapi/audio.json