audio: do not use first -audiodev as default audio device

It is now possible to specify the options for the default audio device
using -audio, so there is no need anymore to use a fake -audiodev option.

Remove the fall back to QTAILQ_FIRST(&audio_states), instead remember the
AudioState that was created from default_audiodevs and use that one.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
This commit is contained in:
Paolo Bonzini 2023-10-05 17:09:36 +02:00
parent 1ebdbff4c3
commit 22f84d4f78
3 changed files with 22 additions and 24 deletions

View file

@ -442,6 +442,21 @@ line using a ``secret`` object instance.
The ``-audiodev`` and ``-audio`` command line options are now the only
way to specify audio backend settings.
Using ``-audiodev`` to define the default audio backend (removed in 8.2)
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
If no audiodev property is specified, previous versions would use the
first ``-audiodev`` command line option as a fallback. Starting with
version 8.2, audio backends created with ``-audiodev`` will only be
used by clients (sound cards, machines with embedded sound hardware, VNC)
that refer to it in an ``audiodev=`` property.
In order to configure a default audio backend, use the ``-audio``
command line option without specifying a ``model``; while previous
versions of QEMU required a model, starting with version 8.2
QEMU does not require a model and will not create any sound card
in this case.
Note that the default audio backend must be configured on the command
line if the ``-nodefaults`` options is used.