From: "Philippe Mathieu-Daudé" <philmd@linaro.org>
To: marcandre.lureau@redhat.com, qemu-devel@nongnu.org
Cc: "Alexandre Ratchov" <alex@caoua.org>,
"Alex Bennée" <alex.bennee@linaro.org>,
"Jan Kiszka" <jan.kiszka@web.de>,
"Michael S. Tsirkin" <mst@redhat.com>,
"Marcel Apfelbaum" <marcel.apfelbaum@gmail.com>,
"Yanan Wang" <wangyanan55@huawei.com>,
"Thomas Huth" <huth@tuxfamily.org>,
"Gerd Hoffmann" <kraxel@redhat.com>,
"Peter Maydell" <peter.maydell@linaro.org>,
"Daniel P. Berrangé" <berrange@redhat.com>,
"Eduardo Habkost" <eduardo@habkost.net>,
"Manos Pitsidianakis" <manos.pitsidianakis@linaro.org>,
qemu-ppc@nongnu.org, "Jiaxun Yang" <jiaxun.yang@flygoat.com>,
"Akihiko Odaki" <odaki@rsg.ci.i.u-tokyo.ac.jp>,
"Hervé Poussineau" <hpoussin@reactos.org>,
qemu-arm@nongnu.org, "Alistair Francis" <alistair@alistair23.me>,
"Zhao Liu" <zhao1.liu@intel.com>,
"Volker Rümelin" <vr_qemu@t-online.de>,
"Christian Schoenebeck" <qemu_oss@crudebyte.com>,
"Paolo Bonzini" <pbonzini@redhat.com>,
"Edgar E. Iglesias" <edgar.iglesias@gmail.com>,
"BALATON Zoltan" <balaton@eik.bme.hu>,
"Laurent Vivier" <laurent@vivier.eu>
Subject: Re: [PATCH v3 27/35] audio: remove QEMUSoundCard
Date: Thu, 30 Oct 2025 17:43:09 +0100 [thread overview]
Message-ID: <0ed9cb4e-7d72-43f8-9408-bcc3dae0e429@linaro.org> (raw)
In-Reply-To: <20251027151045.2863176-28-marcandre.lureau@redhat.com>
On 27/10/25 16:10, marcandre.lureau@redhat.com wrote:
> From: Marc-André Lureau <marcandre.lureau@redhat.com>
>
> There is no clear need for this extra intermediary structure between
> the audio backend and its user.
>
> Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
> Suggested-by: Paolo Bonzini <pbonzini@redhat.com>
> ---
> audio/audio.h | 18 ++++++------------
> audio/audio_int.h | 3 ---
> audio/audio_template.h | 22 ++++++++++------------
> hw/audio/lm4549.h | 2 +-
> include/hw/audio/asc.h | 2 +-
> include/hw/audio/virtio-snd.h | 2 +-
> include/hw/display/xlnx_dp.h | 2 +-
> include/hw/isa/vt82c686.h | 2 +-
> include/hw/qdev-properties-system.h | 2 +-
> audio/audio.c | 29 ++++++++++-------------------
> hw/audio/ac97.c | 25 ++++++++++++-------------
> hw/audio/adlib.c | 9 ++++-----
> hw/audio/asc.c | 9 +++------
> hw/audio/cs4231a.c | 8 ++++----
> hw/audio/es1370.c | 23 +++++++++++------------
> hw/audio/gus.c | 9 ++++-----
> hw/audio/hda-codec.c | 15 +++++++--------
> hw/audio/lm4549.c | 8 ++++----
> hw/audio/pcspk.c | 9 +++++----
> hw/audio/pl041.c | 2 +-
> hw/audio/sb16.c | 16 ++++++++--------
> hw/audio/via-ac97.c | 9 ++++-----
> hw/audio/virtio-snd.c | 13 ++++++-------
> hw/audio/wm8750.c | 23 +++++++++++------------
> hw/core/qdev-properties-system.c | 11 +++++------
> hw/display/xlnx_dp.c | 6 +++---
> hw/usb/dev-audio.c | 11 +++++------
> 27 files changed, 129 insertions(+), 161 deletions(-)
>
> diff --git a/audio/audio.h b/audio/audio.h
> index 1d56f111ea..fdbc33ae0c 100644
> --- a/audio/audio.h
> +++ b/audio/audio.h
> @@ -69,18 +69,12 @@ struct AudioBackendClass {
> };
>
> typedef struct AudioBackend AudioBackend;
> -typedef struct QEMUSoundCard {
> - char *name;
> - AudioBackend *be;
> - QLIST_ENTRY (QEMUSoundCard) entries;
> -} QEMUSoundCard;
>
> typedef struct QEMUAudioTimeStamp {
> uint64_t old_ts;
> } QEMUAudioTimeStamp;
>
> -bool AUD_register_card (const char *name, QEMUSoundCard *card, Error **errp);
> -void AUD_remove_card (QEMUSoundCard *card);
> +bool AUD_backend_check (AudioBackend **be, Error **errp);
> CaptureVoiceOut *AUD_add_capture(
> AudioBackend *s,
> struct audsettings *as,
> @@ -90,7 +84,7 @@ CaptureVoiceOut *AUD_add_capture(
> void AUD_del_capture (CaptureVoiceOut *cap, void *cb_opaque);
>
> SWVoiceOut *AUD_open_out (
> - QEMUSoundCard *card,
> + AudioBackend *be,
> SWVoiceOut *sw,
> const char *name,
> void *callback_opaque,
> @@ -98,7 +92,7 @@ SWVoiceOut *AUD_open_out (
> struct audsettings *settings
> );
>
> -void AUD_close_out (QEMUSoundCard *card, SWVoiceOut *sw);
> +void AUD_close_out (AudioBackend *be, SWVoiceOut *sw);
> size_t AUD_write (SWVoiceOut *sw, void *pcm_buf, size_t size);
> int AUD_get_buffer_size_out (SWVoiceOut *sw);
> void AUD_set_active_out (SWVoiceOut *sw, int on);
> @@ -132,7 +126,7 @@ AUD_set_volume_in_lr(SWVoiceIn *sw, bool mut, uint8_t lvol, uint8_t rvol) {
> }
>
> SWVoiceIn *AUD_open_in (
> - QEMUSoundCard *card,
> + AudioBackend *be,
> SWVoiceIn *sw,
> const char *name,
> void *callback_opaque,
> @@ -140,7 +134,7 @@ SWVoiceIn *AUD_open_in (
> struct audsettings *settings
> );
>
> -void AUD_close_in (QEMUSoundCard *card, SWVoiceIn *sw);
> +void AUD_close_in (AudioBackend *be, SWVoiceIn *sw);
I know this is painful, but please fix ./checkpatch.pl errors before
posting your pull request.
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
next prev parent reply other threads:[~2025-10-30 16:44 UTC|newest]
Thread overview: 69+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-10-27 15:10 [PATCH v3 00/35] Audio clean-ups marcandre.lureau
2025-10-27 15:10 ` [PATCH v3 01/35] qdev: add qdev_find_default_bus() marcandre.lureau
2025-10-29 13:58 ` Philippe Mathieu-Daudé
2025-10-27 15:10 ` [PATCH v3 02/35] hw/audio: look up the default bus from the device class marcandre.lureau
2025-10-29 14:01 ` Philippe Mathieu-Daudé
2025-10-27 15:10 ` [PATCH v3 03/35] audio: rename audio_define->audio_add_audiodev() marcandre.lureau
2025-10-27 15:10 ` [PATCH v3 04/35] hw/audio: use better naming for -audio model handling code marcandre.lureau
2025-10-27 15:10 ` [PATCH v3 05/35] hw/audio/virtio-snd-pci: remove custom model callback marcandre.lureau
2025-10-29 21:44 ` Philippe Mathieu-Daudé
2025-10-27 15:10 ` [PATCH v3 06/35] hw/audio: simplify 'hda' audio init code marcandre.lureau
2025-10-29 21:46 ` Philippe Mathieu-Daudé
2025-10-27 15:10 ` [PATCH v3 07/35] hw/audio: generalize audio_model.init() marcandre.lureau
2025-10-29 21:47 ` Philippe Mathieu-Daudé
2025-10-27 15:10 ` [PATCH v3 08/35] hw/audio: drop audio_model.isa marcandre.lureau
2025-10-27 15:10 ` [PATCH v3 09/35] audio: start making AudioState a QOM Object marcandre.lureau
2025-10-27 16:26 ` BALATON Zoltan
2025-10-28 12:34 ` Marc-André Lureau
2025-10-29 13:38 ` Philippe Mathieu-Daudé
2025-10-27 15:10 ` [PATCH v3 10/35] audio: register backends in /audiodevs container marcandre.lureau
2025-10-27 15:10 ` [PATCH v3 11/35] audio: use /audiodevs QOM container marcandre.lureau
2025-10-29 21:47 ` Philippe Mathieu-Daudé
2025-10-27 15:10 ` [PATCH v3 12/35] audio/paaudio: remove needless return value marcandre.lureau
2025-10-27 15:10 ` [PATCH v3 13/35] audio/dsound: simplify init() marcandre.lureau
2025-10-29 13:42 ` Philippe Mathieu-Daudé
2025-10-27 15:10 ` [PATCH v3 14/35] audio/dsound: report init error via **errp marcandre.lureau
2025-10-29 13:43 ` Philippe Mathieu-Daudé
2025-10-27 15:10 ` [PATCH v3 15/35] audio: simplify audio_driver_init() marcandre.lureau
2025-10-29 21:50 ` Philippe Mathieu-Daudé
2025-10-27 15:10 ` [PATCH v3 16/35] audio: move period tick initialization marcandre.lureau
2025-10-29 13:44 ` Philippe Mathieu-Daudé
2025-10-27 15:10 ` [PATCH v3 17/35] audio: drop needless error message marcandre.lureau
2025-10-29 13:40 ` Philippe Mathieu-Daudé
2025-10-27 15:10 ` [PATCH v3 18/35] audio: keep vmstate handle with AudioState marcandre.lureau
2025-10-29 13:46 ` Philippe Mathieu-Daudé
2025-10-27 15:10 ` [PATCH v3 19/35] audio: register and unregister vmstate " marcandre.lureau
2025-10-29 13:48 ` Philippe Mathieu-Daudé
2025-10-29 19:00 ` Marc-André Lureau
2025-10-29 21:42 ` Philippe Mathieu-Daudé
2025-10-30 16:30 ` Philippe Mathieu-Daudé
2025-10-30 16:31 ` Philippe Mathieu-Daudé
2025-10-30 16:37 ` Peter Xu
2025-10-27 15:10 ` [PATCH v3 20/35] audio: initialize card_head during object init marcandre.lureau
2025-10-29 13:48 ` Philippe Mathieu-Daudé
2025-10-27 15:10 ` [PATCH v3 21/35] audio: remove some needless headers marcandre.lureau
2025-10-29 13:48 ` Philippe Mathieu-Daudé
2025-10-27 15:10 ` [PATCH v3 22/35] audio: remove AUDIO_HOST_ENDIANNESS marcandre.lureau
2025-10-27 15:10 ` [PATCH v3 23/35] audio: introduce AUD_set_volume_{in,out}_lr() marcandre.lureau
2025-10-29 21:53 ` Philippe Mathieu-Daudé
2025-10-27 15:10 ` [PATCH v3 24/35] audio/replay: fix type punning marcandre.lureau
2025-10-29 21:51 ` Philippe Mathieu-Daudé
2025-10-27 15:10 ` [PATCH v3 25/35] audio: move internal APIs to audio_int.h marcandre.lureau
2025-10-27 15:10 ` [PATCH v3 26/35] audio: rename AudioState -> AudioBackend marcandre.lureau
2025-10-29 13:49 ` Philippe Mathieu-Daudé
2025-10-27 15:10 ` [PATCH v3 27/35] audio: remove QEMUSoundCard marcandre.lureau
2025-10-30 16:43 ` Philippe Mathieu-Daudé [this message]
2025-10-27 15:10 ` [PATCH v3 28/35] audio/dbus: use a helper function to set the backend dbus server marcandre.lureau
2025-10-30 16:38 ` Philippe Mathieu-Daudé
2025-10-27 15:10 ` [PATCH v3 29/35] audio: move audio.h under include/qemu/ marcandre.lureau
2025-10-30 16:39 ` Philippe Mathieu-Daudé
2025-10-27 15:10 ` [PATCH v3 30/35] audio: remove dependency on spice header marcandre.lureau
2025-10-29 13:51 ` Philippe Mathieu-Daudé
2025-10-27 15:10 ` [PATCH v3 31/35] audio: cleanup, use bool for booleans marcandre.lureau
2025-10-27 15:10 ` [PATCH v3 32/35] audio: move capture API to own header marcandre.lureau
2025-10-30 16:40 ` Philippe Mathieu-Daudé
2025-10-27 15:10 ` [PATCH v3 33/35] audio: drop needless audio_driver "descr" field marcandre.lureau
2025-10-29 13:51 ` Philippe Mathieu-Daudé
2025-10-27 15:10 ` [PATCH v3 34/35] audio: Remove pointless local variables marcandre.lureau
2025-10-27 15:10 ` [PATCH v3 35/35] audio: Rename @endianness argument as @big_endian for clarity marcandre.lureau
2025-10-30 13:43 ` [PATCH v3 00/35] Audio clean-ups Marc-André Lureau
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=0ed9cb4e-7d72-43f8-9408-bcc3dae0e429@linaro.org \
--to=philmd@linaro.org \
--cc=alex.bennee@linaro.org \
--cc=alex@caoua.org \
--cc=alistair@alistair23.me \
--cc=balaton@eik.bme.hu \
--cc=berrange@redhat.com \
--cc=edgar.iglesias@gmail.com \
--cc=eduardo@habkost.net \
--cc=hpoussin@reactos.org \
--cc=huth@tuxfamily.org \
--cc=jan.kiszka@web.de \
--cc=jiaxun.yang@flygoat.com \
--cc=kraxel@redhat.com \
--cc=laurent@vivier.eu \
--cc=manos.pitsidianakis@linaro.org \
--cc=marcandre.lureau@redhat.com \
--cc=marcel.apfelbaum@gmail.com \
--cc=mst@redhat.com \
--cc=odaki@rsg.ci.i.u-tokyo.ac.jp \
--cc=pbonzini@redhat.com \
--cc=peter.maydell@linaro.org \
--cc=qemu-arm@nongnu.org \
--cc=qemu-devel@nongnu.org \
--cc=qemu-ppc@nongnu.org \
--cc=qemu_oss@crudebyte.com \
--cc=vr_qemu@t-online.de \
--cc=wangyanan55@huawei.com \
--cc=zhao1.liu@intel.com \
/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).