On Thu, Oct 5, 2023 at 5:01 PM Paolo Bonzini <pbonzini@redhat.com> wrote:
>
> Currently, AUD_register_card picks the audio backend from either:
>
> - the first audiodev that was created
>
> - the audio_prio_list[] array, which can be customized at
> configure time
>
> This series instead extends -audio to define a default audio
> backend if no "model" is used. This preserves simple command line
> use where a single "-audio" option applies to all audio devices
> and captures, and also uses a single QAPI-based configuration
> syntax for both -audio and -audiodev.
>
> The current hack to use the first -audiodev as a default audio
> device is removed. For migration purposes, the first audiodev
> is suggested in case of an error:
>
> ./qemu-system-x86_64 -device sb16 -audiodev pa,id=default
> qemu-system-x86_64: -device sb16: no default audio driver available
> Perhaps you wanted to set audiodev=default?
>
> VNC is changed to reintroduce use of the default audio backend;
> still, compared to before the cleanup effort this will not be
> enabled if -nodefaults is use, which is an improvement as it
> removes magic.
>
> Paolo
>
>
> Paolo Bonzini (7):
> audio: error hints need a trailing \n
> audio: disable default backends if -audio/-audiodev is used
> audio: extract audio_define_default
> audio: extend -audio to allow creating a default backend
> audio: do not use first -audiodev as default audio device
> audio: reintroduce default audio backend for VNC
> audio, qtest: get rid of QEMU_AUDIO_DRV
>
Series:
Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
> audio/audio.c | 85 +++++++++++++--------------------
> audio/audio.h | 3 ++
> docs/about/deprecated.rst | 6 ---
> docs/about/removed-features.rst | 14 ++++--
> qemu-options.hx | 29 +++++++----
> system/vl.c | 34 ++++++++-----
> tests/qtest/libqtest.c | 4 +-
> ui/vnc.c | 2 +
> 8 files changed, 93 insertions(+), 84 deletions(-)
>
> --
> 2.41.0
>
>
--
Marc-André Lureau