qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 00/13] Cleanup deprecated audio features, take 2
@ 2023-09-23  8:54 Paolo Bonzini
  2023-09-23  8:54 ` [PATCH 01/13] ui/vnc: Require audiodev= to enable audio Paolo Bonzini
                   ` (12 more replies)
  0 siblings, 13 replies; 25+ messages in thread
From: Paolo Bonzini @ 2023-09-23  8:54 UTC (permalink / raw)
  To: qemu-devel; +Cc: mkletzan, vr_qemu, balaton

When sending v1 of the "Support machine-default audiodev" series,
Zoltan suggested keeping the default audio backends, so I am sending a
reduced version of the pull request.

In this version the QEMU_AUDIO_* options go away, but it is still
possible to pick a default audio backend from the list provided to
--audio-drv-list.  The code is still simplified a lot compared to
having all the legacy parsing code and the -audio-help function.
I had to keep QEMU_AUDIO_DRV=none because it is used by libqtest;
a possibility for the future could be to add a "-audio none" option
without a model.  For now I kept this setting as it is a subset of the
previous accepted values, and it can be deprecated separately.

At the end of this series, all devices can be configured with
-audiodev.  Therefore, I decided to forbid mixing the default
audio backend with audiodevs or with -nodefaults.

Patches 1-2 are Martin's patches that didn't end up in the previous
pull request.

Patches 3-4 change audio.c to use Error ** a bit more.

Patches 5-7 introduce the minimal code to create a default audio
backend.

Patches 8-11 introduce a machine property "audiodev" and plumb
it into all machines with an embedded sound card.

Patches 12-13 forbid some not-so-sensible usage of default
audio backends.

Paolo

Based-on: <20230922154228.304933-1-pbonzini@redhat.com>

Martin Kletzander (5):
  ui/vnc: Require audiodev= to enable audio
  audio: Require AudioState in AUD_add_capture
  Introduce machine property "audiodev"
  hw/arm: Support machine-default audiodev with fallback
  hw/ppc: Support machine-default audiodev with fallback

Paolo Bonzini (8):
  audio: allow returning an error from the driver init
  audio: return Error ** from audio_state_by_name
  audio: commonize voice initialization
  audio: simplify flow in audio_init
  audio: remove QEMU_AUDIO_* and -audio-help support
  vt82c686: Support machine-default audiodev with fallback
  audio: forbid mixing default audiodev backend and -audiodev
  audio: forbid default audiodev backend with -nodefaults

 audio/alsaaudio.c                |   3 +-
 audio/audio-hmp-cmds.c           |   6 +-
 audio/audio.c                    | 207 +++++------
 audio/audio.h                    |   5 +-
 audio/audio_int.h                |   7 +-
 audio/audio_legacy.c             | 591 -------------------------------
 audio/audio_template.h           |   9 +-
 audio/coreaudio.m                |   3 +-
 audio/dbusaudio.c                |   3 +-
 audio/dsoundaudio.c              |   3 +-
 audio/jackaudio.c                |   3 +-
 audio/meson.build                |   1 -
 audio/noaudio.c                  |   3 +-
 audio/ossaudio.c                 |  12 +-
 audio/paaudio.c                  |   8 +-
 audio/pwaudio.c                  |  17 +-
 audio/sdlaudio.c                 |   6 +-
 audio/sndioaudio.c               |   3 +-
 audio/spiceaudio.c               |   5 +-
 audio/wavaudio.c                 |   3 +-
 docs/about/deprecated.rst        |  16 +-
 docs/about/removed-features.rst  |  12 +
 hw/arm/integratorcp.c            |  11 +-
 hw/arm/musicpal.c                |  11 +-
 hw/arm/nseries.c                 |   4 +
 hw/arm/omap2.c                   |   7 +-
 hw/arm/palm.c                    |   2 +
 hw/arm/realview.c                |  12 +
 hw/arm/spitz.c                   |  17 +-
 hw/arm/versatilepb.c             |   8 +
 hw/arm/vexpress.c                |   5 +
 hw/arm/xlnx-zcu102.c             |   6 +
 hw/arm/z2.c                      |  15 +-
 hw/audio/ac97.c                  |   6 +-
 hw/audio/adlib.c                 |   6 +-
 hw/audio/cs4231a.c               |   6 +-
 hw/audio/es1370.c                |   5 +-
 hw/audio/gus.c                   |   6 +-
 hw/audio/hda-codec.c             |   5 +-
 hw/audio/lm4549.c                |   8 +-
 hw/audio/pcspk.c                 |   4 +-
 hw/audio/sb16.c                  |   6 +-
 hw/audio/via-ac97.c              |   6 +-
 hw/audio/wm8750.c                |   5 +-
 hw/core/machine.c                |  33 ++
 hw/core/qdev-properties-system.c |  16 +-
 hw/display/xlnx_dp.c             |   6 +-
 hw/input/tsc210x.c               |   7 +-
 hw/isa/vt82c686.c                |   2 +
 hw/mips/fuloong2e.c              |  13 +-
 hw/ppc/pegasos2.c                |  10 +-
 hw/ppc/prep.c                    |   7 +
 hw/usb/dev-audio.c               |   5 +-
 include/hw/boards.h              |   7 +
 qemu-options.hx                  |  10 -
 softmmu/vl.c                     |   4 -
 ui/dbus.c                        |   3 +-
 ui/vnc.c                         |  13 +-
 58 files changed, 381 insertions(+), 842 deletions(-)
 delete mode 100644 audio/audio_legacy.c

-- 
2.41.0



^ permalink raw reply	[flat|nested] 25+ messages in thread
* [PATCH v2 00/13] Cleanup deprecated audio features, take 2
@ 2023-09-28  7:36 Paolo Bonzini
  2023-09-28  7:36 ` [PATCH 02/13] audio: Require AudioState in AUD_add_capture Paolo Bonzini
  0 siblings, 1 reply; 25+ messages in thread
From: Paolo Bonzini @ 2023-09-28  7:36 UTC (permalink / raw)
  To: qemu-devel; +Cc: berrange, balaton

In this version the QEMU_AUDIO_* options go away, but it is still
possible to pick a default audio backend from the list provided to
--audio-drv-list.  The code is still simplified a lot compared to
having all the legacy parsing code and the -audio-help function.
I had to keep QEMU_AUDIO_DRV=none because it is used by libqtest;
a possibility for the future could be to add a "-audio none" option
without a model.  For now I kept this setting as it is a subset of the
previous accepted values, and it can be deprecated separately.

At the end of this series, all devices can be configured with
-audiodev.  Therefore, I decided to forbid mixing the default
audio backend with audiodevs or with -nodefaults.

Patches 1-2 are Martin's patches that didn't end up in the previous
pull request.

Patches 3-4 change audio.c to use Error ** a bit more.

Patches 5-7 introduce the minimal code to create a default audio
backend.

Patches 8-11 introduce a machine property "audiodev" and plumb
it into all machines with an embedded sound card.

Patches 12-13 forbid some not-so-sensible usage of default
audio backends.

Paolo

v1->v2:
- do not expose audio encoding feature if VNC audio is not enabled [Daniel]
- add hint to error messages when -audiodev and default backend are mixed
- context changes due to shadowed variable fixes


Martin Kletzander (4):
  audio: Require AudioState in AUD_add_capture
  Introduce machine property "audiodev"
  hw/arm: Support machine-default audiodev with fallback
  hw/ppc: Support machine-default audiodev with fallback

Paolo Bonzini (9):
  ui/vnc: Require audiodev= to enable audio
  audio: allow returning an error from the driver init
  audio: return Error ** from audio_state_by_name
  audio: commonize voice initialization
  audio: simplify flow in audio_init
  audio: remove QEMU_AUDIO_* and -audio-help support
  vt82c686: Support machine-default audiodev with fallback
  audio: forbid mixing default audiodev backend and -audiodev
  audio: forbid default audiodev backend with -nodefaults

 audio/alsaaudio.c                |   3 +-
 audio/audio-hmp-cmds.c           |   6 +-
 audio/audio.c                    | 213 +++++------
 audio/audio.h                    |   5 +-
 audio/audio_int.h                |   7 +-
 audio/audio_legacy.c             | 591 -------------------------------
 audio/audio_template.h           |   9 +-
 audio/coreaudio.m                |   3 +-
 audio/dbusaudio.c                |   3 +-
 audio/dsoundaudio.c              |   3 +-
 audio/jackaudio.c                |   3 +-
 audio/meson.build                |   1 -
 audio/noaudio.c                  |   3 +-
 audio/ossaudio.c                 |  12 +-
 audio/paaudio.c                  |   8 +-
 audio/pwaudio.c                  |  17 +-
 audio/sdlaudio.c                 |   6 +-
 audio/sndioaudio.c               |   3 +-
 audio/spiceaudio.c               |   5 +-
 audio/wavaudio.c                 |   3 +-
 docs/about/deprecated.rst        |  16 +-
 docs/about/removed-features.rst  |  12 +
 hw/arm/integratorcp.c            |  11 +-
 hw/arm/musicpal.c                |  11 +-
 hw/arm/nseries.c                 |   4 +
 hw/arm/omap2.c                   |   7 +-
 hw/arm/palm.c                    |   2 +
 hw/arm/realview.c                |  12 +
 hw/arm/spitz.c                   |  17 +-
 hw/arm/versatilepb.c             |   8 +
 hw/arm/vexpress.c                |   5 +
 hw/arm/xlnx-zcu102.c             |   6 +
 hw/arm/z2.c                      |  15 +-
 hw/audio/ac97.c                  |   6 +-
 hw/audio/adlib.c                 |   6 +-
 hw/audio/cs4231a.c               |   6 +-
 hw/audio/es1370.c                |   5 +-
 hw/audio/gus.c                   |   6 +-
 hw/audio/hda-codec.c             |   5 +-
 hw/audio/lm4549.c                |   8 +-
 hw/audio/pcspk.c                 |   4 +-
 hw/audio/sb16.c                  |   6 +-
 hw/audio/via-ac97.c              |   6 +-
 hw/audio/wm8750.c                |   5 +-
 hw/core/machine.c                |  33 ++
 hw/core/qdev-properties-system.c |  16 +-
 hw/display/xlnx_dp.c             |   6 +-
 hw/input/tsc210x.c               |   7 +-
 hw/isa/vt82c686.c                |   2 +
 hw/mips/fuloong2e.c              |  13 +-
 hw/ppc/pegasos2.c                |  10 +-
 hw/ppc/prep.c                    |   7 +
 hw/usb/dev-audio.c               |   5 +-
 include/hw/boards.h              |   7 +
 qemu-options.hx                  |  10 -
 softmmu/vl.c                     |   4 -
 ui/dbus.c                        |   3 +-
 ui/vnc.c                         |  14 +-
 ui/vnc.h                         |   2 +
 59 files changed, 391 insertions(+), 841 deletions(-)
 delete mode 100644 audio/audio_legacy.c

-- 
2.41.0



^ permalink raw reply	[flat|nested] 25+ messages in thread
* [PATCH v4 00/13] Cleanup deprecated audio features, take 2
@ 2023-10-02 14:57 Paolo Bonzini
  2023-10-02 14:57 ` [PATCH 02/13] audio: Require AudioState in AUD_add_capture Paolo Bonzini
  0 siblings, 1 reply; 25+ messages in thread
From: Paolo Bonzini @ 2023-10-02 14:57 UTC (permalink / raw)
  To: qemu-devel; +Cc: balaton

In this version the QEMU_AUDIO_* options go away, but it is still
possible to pick a default audio backend from the list provided to
--audio-drv-list.  The code is still simplified a lot compared to
having all the legacy parsing code and the -audio-help function.
I had to keep QEMU_AUDIO_DRV=none because it is used by libqtest;
a possibility for the future could be to add a "-audio none" option
without a model.  For now I kept this setting as it is a subset of the
previous accepted values, and it can be deprecated separately.

At the end of this series, all devices can be configured with
-audiodev.  Therefore, I decided to forbid mixing the default
audio backend with audiodevs or with -nodefaults.

Patches 1-2 are Martin's patches that didn't end up in the previous
pull request.

Patches 3-4 change audio.c to use Error ** a bit more.

Patches 5-7 introduce the minimal code to create a default audio
backend.

Patches 8-11 introduce a machine property "audiodev" and plumb
it into all machines with an embedded sound card.

Patch 12 cleans up error propagation up to the realize functions
of the devices, so that error messages are nicer when patch 13
forbids usage of default audio backends with -nodefaults.

Paolo

v3->v4: for now, always allow default audiodev backend even
        together with -audiodev.  The new plan is to first improve
        -audio so that it can create a default audiodev backend,
        and only then remove the possibility to use the first
        -audiodev as the default audiodev backend.

        do not use error_report+abort

Martin Kletzander (5):
  audio: Require AudioState in AUD_add_capture
  Introduce machine property "audiodev"
  hw/arm: Support machine-default audiodev with fallback
  hw/ppc: Support machine-default audiodev with fallback
  audio: propagate Error * out of audio_init

Paolo Bonzini (8):
  ui/vnc: Require audiodev= to enable audio
  audio: allow returning an error from the driver init
  audio: return Error ** from audio_state_by_name
  audio: commonize voice initialization
  audio: simplify flow in audio_init
  audio: remove QEMU_AUDIO_* and -audio-help support
  vt82c686 machines: Support machine-default audiodev with fallback
  audio: forbid default audiodev backend with -nodefaults

 audio/alsaaudio.c                |   3 +-
 audio/audio-hmp-cmds.c           |   6 +-
 audio/audio.c                    | 246 ++++++-------
 audio/audio.h                    |   7 +-
 audio/audio_int.h                |   7 +-
 audio/audio_legacy.c             | 591 -------------------------------
 audio/audio_template.h           |   9 +-
 audio/coreaudio.m                |   3 +-
 audio/dbusaudio.c                |   3 +-
 audio/dsoundaudio.c              |   3 +-
 audio/jackaudio.c                |   3 +-
 audio/meson.build                |   1 -
 audio/noaudio.c                  |   3 +-
 audio/ossaudio.c                 |  12 +-
 audio/paaudio.c                  |   8 +-
 audio/pwaudio.c                  |  17 +-
 audio/sdlaudio.c                 |   6 +-
 audio/sndioaudio.c               |   3 +-
 audio/spiceaudio.c               |   5 +-
 audio/wavaudio.c                 |   3 +-
 docs/about/deprecated.rst        |  16 +-
 docs/about/removed-features.rst  |  12 +
 hw/arm/integratorcp.c            |  11 +-
 hw/arm/musicpal.c                |  11 +-
 hw/arm/nseries.c                 |   4 +
 hw/arm/omap2.c                   |   7 +-
 hw/arm/palm.c                    |   2 +
 hw/arm/realview.c                |  12 +
 hw/arm/spitz.c                   |  17 +-
 hw/arm/versatilepb.c             |   8 +
 hw/arm/vexpress.c                |   5 +
 hw/arm/xlnx-zcu102.c             |   6 +
 hw/arm/z2.c                      |  15 +-
 hw/audio/ac97.c                  |   6 +-
 hw/audio/adlib.c                 |   6 +-
 hw/audio/cs4231a.c               |   6 +-
 hw/audio/es1370.c                |   5 +-
 hw/audio/gus.c                   |   6 +-
 hw/audio/hda-codec.c             |   5 +-
 hw/audio/lm4549.c                |   8 +-
 hw/audio/pcspk.c                 |   4 +-
 hw/audio/sb16.c                  |   6 +-
 hw/audio/via-ac97.c              |   6 +-
 hw/audio/wm8750.c                |   5 +-
 hw/core/machine.c                |  33 ++
 hw/core/qdev-properties-system.c |  16 +-
 hw/display/xlnx_dp.c             |   6 +-
 hw/input/tsc210x.c               |   7 +-
 hw/mips/fuloong2e.c              |  15 +-
 hw/ppc/pegasos2.c                |  12 +-
 hw/ppc/prep.c                    |   7 +
 hw/usb/dev-audio.c               |   5 +-
 include/hw/boards.h              |   9 +
 qemu-options.hx                  |  10 -
 softmmu/vl.c                     |   8 +-
 ui/dbus.c                        |   3 +-
 ui/vnc.c                         |  14 +-
 ui/vnc.h                         |   2 +
 58 files changed, 419 insertions(+), 856 deletions(-)
 delete mode 100644 audio/audio_legacy.c

-- 
2.41.0



^ permalink raw reply	[flat|nested] 25+ messages in thread

end of thread, other threads:[~2023-10-02 14:59 UTC | newest]

Thread overview: 25+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-09-23  8:54 [PATCH 00/13] Cleanup deprecated audio features, take 2 Paolo Bonzini
2023-09-23  8:54 ` [PATCH 01/13] ui/vnc: Require audiodev= to enable audio Paolo Bonzini
2023-09-25  9:05   ` Daniel P. Berrangé
2023-09-23  8:54 ` [PATCH 02/13] audio: Require AudioState in AUD_add_capture Paolo Bonzini
2023-09-23 11:48   ` BALATON Zoltan
2023-09-24  8:53     ` Paolo Bonzini
2023-09-28 11:59     ` BALATON Zoltan
2023-09-28 13:01     ` Markus Armbruster
2023-09-23  8:54 ` [PATCH 03/13] audio: allow returning an error from the driver init Paolo Bonzini
2023-09-23  8:54 ` [PATCH 04/13] audio: return Error ** from audio_state_by_name Paolo Bonzini
2023-09-23  8:54 ` [PATCH 05/13] audio: commonize voice initialization Paolo Bonzini
2023-09-23  8:54 ` [PATCH 06/13] audio: simplify flow in audio_init Paolo Bonzini
2023-09-23  8:55 ` [PATCH 07/13] audio: remove QEMU_AUDIO_* and -audio-help support Paolo Bonzini
2023-09-23  8:55 ` [PATCH 08/13] Introduce machine property "audiodev" Paolo Bonzini
2023-09-23  8:55 ` [PATCH 09/13] hw/arm: Support machine-default audiodev with fallback Paolo Bonzini
2023-09-23  8:55 ` [PATCH 10/13] hw/ppc: " Paolo Bonzini
2023-09-23  8:55 ` [PATCH 11/13] vt82c686: " Paolo Bonzini
2023-09-23 12:23   ` BALATON Zoltan
2023-09-24  8:53     ` Paolo Bonzini
2023-09-24 12:14       ` BALATON Zoltan
2023-09-24 16:06         ` Paolo Bonzini
2023-09-23  8:55 ` [PATCH 12/13] audio: forbid mixing default audiodev backend and -audiodev Paolo Bonzini
2023-09-23  8:55 ` [PATCH 13/13] audio: forbid default audiodev backend with -nodefaults Paolo Bonzini
  -- strict thread matches above, loose matches on Subject: below --
2023-09-28  7:36 [PATCH v2 00/13] Cleanup deprecated audio features, take 2 Paolo Bonzini
2023-09-28  7:36 ` [PATCH 02/13] audio: Require AudioState in AUD_add_capture Paolo Bonzini
2023-10-02 14:57 [PATCH v4 00/13] Cleanup deprecated audio features, take 2 Paolo Bonzini
2023-10-02 14:57 ` [PATCH 02/13] audio: Require AudioState in AUD_add_capture Paolo Bonzini

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).