From: Thomas Huth <thuth@redhat.com>
To: "Paolo Bonzini" <pbonzini@redhat.com>,
qemu-devel@nongnu.org,
"Marc-André Lureau" <marcandre.lureau@redhat.com>
Cc: Gerd Hoffmann <kraxel@redhat.com>
Subject: Re: [PATCH] audio: remove QEMU_AUDIO_* and -audio-help support
Date: Tue, 5 Sep 2023 12:39:27 +0200 [thread overview]
Message-ID: <12deb1fe-5a9d-ba44-8867-62f674ecfdf4@redhat.com> (raw)
In-Reply-To: <20230905101944.307701-1-pbonzini@redhat.com>
On 05/09/2023 12.19, Paolo Bonzini wrote:
> These have been deprecated for a long time, and the introduction
> of -audio in 7.1.0 has cemented the new way of specifying an
> audio backend. Remove all the associated baggage, including the
> concept of default audio backends.
>
> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
> ---
> audio/alsaaudio.c | 1 -
> audio/audio.c | 44 +--
> audio/audio.h | 1 -
> audio/audio_int.h | 2 -
> audio/audio_legacy.c | 591 --------------------------------
> audio/coreaudio.m | 1 -
> audio/dbusaudio.c | 1 -
> audio/dsoundaudio.c | 1 -
> audio/jackaudio.c | 1 -
> audio/meson.build | 1 -
> audio/noaudio.c | 1 -
> audio/ossaudio.c | 1 -
> audio/paaudio.c | 1 -
> audio/pwaudio.c | 1 -
> audio/sdlaudio.c | 1 -
> audio/sndioaudio.c | 1 -
> audio/wavaudio.c | 1 -
> docs/about/deprecated.rst | 8 -
> docs/about/removed-features.rst | 6 +
> qemu-options.hx | 10 -
> softmmu/vl.c | 4 -
> 21 files changed, 10 insertions(+), 669 deletions(-)
> delete mode 100644 audio/audio_legacy.c
>
> diff --git a/audio/alsaaudio.c b/audio/alsaaudio.c
> index 057571dd1e0..5ffb39c4182 100644
> --- a/audio/alsaaudio.c
> +++ b/audio/alsaaudio.c
> @@ -960,7 +960,6 @@ static struct audio_driver alsa_audio_driver = {
> .init = alsa_audio_init,
> .fini = alsa_audio_fini,
> .pcm_ops = &alsa_pcm_ops,
> - .can_be_default = 1,
> .max_voices_out = INT_MAX,
> .max_voices_in = INT_MAX,
> .voice_size_out = sizeof (ALSAVoiceOut),
> diff --git a/audio/audio.c b/audio/audio.c
> index 90c7c49d116..13f519611f6 100644
> --- a/audio/audio.c
> +++ b/audio/audio.c
> @@ -111,8 +111,6 @@ const struct mixeng_volume nominal_volume = {
> #endif
> };
>
> -static bool legacy_config = true;
> -
> int audio_bug (const char *funcname, int cond)
> {
> if (cond) {
> @@ -1712,46 +1710,14 @@ static AudioState *audio_init(Audiodev *dev, const char *name)
> /* silence gcc warning about uninitialized variable */
> AudiodevListHead head = QSIMPLEQ_HEAD_INITIALIZER(head);
>
> - if (using_spice) {
> - /*
> - * When using spice allow the spice audio driver being picked
> - * as default.
> - *
> - * Temporary hack. Using audio devices without explicit
> - * audiodev= property is already deprecated. Same goes for
> - * the -soundhw switch. Once this support gets finally
> - * removed we can also drop the concept of a default audio
> - * backend and this can go away.
> - */
> - driver = audio_driver_lookup("spice");
> - if (driver) {
> - driver->can_be_default = 1;
> - }
> - }
> -
> if (dev) {
> /* -audiodev option */
> - legacy_config = false;
> drvname = AudiodevDriver_str(dev->driver);
> } else if (!QTAILQ_EMPTY(&audio_states)) {
> - if (!legacy_config) {
> - dolog("Device %s: audiodev default parameter is deprecated, please "
> - "specify audiodev=%s\n", name,
> - QTAILQ_FIRST(&audio_states)->dev->id);
> - }
> + dolog("Device %s: audiodev default parameter is deprecated, please "
> + "specify audiodev=%s\n", name,
> + QTAILQ_FIRST(&audio_states)->dev->id);
You said that you removed the default handling ... so this log message looks
suspicious ... is this code block still required?
> return QTAILQ_FIRST(&audio_states);
> - } else {
> - /* legacy implicit initialization */
> - head = audio_handle_legacy_opts();
> - /*
> - * In case of legacy initialization, all Audiodevs in the list will have
> - * the same configuration (except the driver), so it doesn't matter which
> - * one we chose. We need an Audiodev to set up AudioState before we can
> - * init a driver. Also note that dev at this point is still in the
> - * list.
> - */
> - dev = QSIMPLEQ_FIRST(&head)->dev;
> - audio_validate_opts(dev, &error_abort);
> }
Thomas
next prev parent reply other threads:[~2023-09-05 10:40 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-09-05 10:19 [PATCH] audio: remove QEMU_AUDIO_* and -audio-help support Paolo Bonzini
2023-09-05 10:39 ` Thomas Huth [this message]
2023-09-05 10:55 ` Paolo Bonzini
2023-09-05 11:41 ` Thomas Huth
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=12deb1fe-5a9d-ba44-8867-62f674ecfdf4@redhat.com \
--to=thuth@redhat.com \
--cc=kraxel@redhat.com \
--cc=marcandre.lureau@redhat.com \
--cc=pbonzini@redhat.com \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).