qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] audio: remove QEMU_AUDIO_* and -audio-help support


From: Thomas Huth
Subject: Re: [PATCH] audio: remove QEMU_AUDIO_* and -audio-help support
Date: Tue, 5 Sep 2023 12:39:27 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.14.0

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




reply via email to

[Prev in Thread] Current Thread [Next in Thread]