On 3/3/21 7:18 PM, Daniel P. Berrangé wrote:
Historically we've done almost nothing with audio backend configuration. In QEMU we merely set QEMU_AUDIO_DRV to one of sdl, spice, none depending on <graphics>. We also have the somewhat crazy ability to let QEMU inherit the QEMU_AUDIO_DRV env variable from libvirtd. Fairly recently BHyve wanted audio backend config for OSS so introduced the <audio> element. We designed that to allow QEMU to later extend it, and that's what this series does. We add <audio> types for all the QEMU backends, except the Windows only DSound which isn't relevant for libvirt. The QEMU driver is updated to use this element to configure things. QEMU has many many many more env variables for configuring audio settings, which we can now support. These are all deprecated since 4.0.0 though, so we also add support for the new -audiodev argument. Unfortunately -audiodev isn't introspectable due to limits in QEMU fixed by: https://lists.gnu.org/archive/html/qemu-devel/2021-03/msg00653.html The lack of introspection isn't critical though. We can detect existance of -audiodev by querying for '-vnc audiodev=3DNNN' argument support. We simply lack ability to determine what QEMU audio backends are compiled in. This means we have to delegate error reporting to QEMU itself, which is OK. We'll make use of the query-audiodev command at a later date to track future improvements to QEMU audiodev backends. Daniel P. Berrang=C3=A9 (18): config: cleanup some typos / baggage wrt compiler checks conf: stronger error reporting when parsing audio related params conf: don't force existance of audio child elements conf: add helper to test for sound device codec support conf: add missing iteration over audio backends conf: refactor OSS audio backend specific options conf: add coverage for all QEMU audio backend types conf: add support for audio backend for the VNC server conf: add validation of audio backend IDs conf: rename and improve virDomainDefFindAudioForSound qemu: support use of <audio> elements qemu: populate <audio> element with default config qemu: probe for -vnc audiodev property qemu: add support for generating -audiodev arguments conf: introduce support for common audio settings qemu: wire up support for common audio backend settings conf: add support for audio backend specific settings qemu: wire up support for backend specific audio settings
957 files changed, 6887 insertions(+), 341 deletions(-)
Reviewed-by: Michal Privoznik <mprivozn@xxxxxxxxxx> Michal