From: "Daniel P. Berrangé" <berrange@redhat.com>
To: "Marc-André Lureau" <marcandre.lureau@gmail.com>
Cc: "BALATON Zoltan" <balaton@eik.bme.hu>,
qemu-devel@nongnu.org,
"Philippe Mathieu-Daudé" <philmd@linaro.org>,
"Paolo Bonzini" <pbonzini@redhat.com>,
"Volker Rümelin" <vr_qemu@t-online.de>,
"Gerd Hoffmann" <kraxel@redhat.com>,
"Laurent Vivier" <laurent@vivier.eu>,
"Manos Pitsidianakis" <manos.pitsidianakis@linaro.org>,
"Michael S. Tsirkin" <mst@redhat.com>,
"Eduardo Habkost" <eduardo@habkost.net>,
"Alistair Francis" <alistair@alistair23.me>,
"Edgar E. Iglesias" <edgar.iglesias@gmail.com>,
"Peter Maydell" <peter.maydell@linaro.org>,
"Jiaxun Yang" <jiaxun.yang@flygoat.com>,
"open list:Xilinx ZynqMP and..." <qemu-arm@nongnu.org>
Subject: Re: [PATCH 35/43] audio: rename QEMUSoundCard -> AudioFE
Date: Fri, 24 Oct 2025 12:50:39 +0100 [thread overview]
Message-ID: <aPtoD4KB8sDmy_gn@redhat.com> (raw)
In-Reply-To: <CAJ+F1CL9_vM0nXt1XKsx-SWG1kxdHfgNJWppx-aTZ7DK3MktpA@mail.gmail.com>
On Tue, Oct 21, 2025 at 05:06:01PM +0400, Marc-André Lureau wrote:
> Hi
>
> On Tue, Oct 21, 2025 at 4:50 PM BALATON Zoltan <balaton@eik.bme.hu> wrote:
> >
> > On Tue, 21 Oct 2025, Marc-André Lureau wrote:
> > > On Tue, Oct 21, 2025 at 4:13 PM BALATON Zoltan <balaton@eik.bme.hu> wrote:
> > >>
> > >> On Tue, 21 Oct 2025, marcandre.lureau@redhat.com wrote:
> > >>> From: Marc-André Lureau <marcandre.lureau@redhat.com>
> > >>>
> > >>> Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
> > >>> ---
> > >>> audio/audio.h | 20 ++++++++++----------
> > >>> audio/audio_int.h | 6 +++---
> > >>> audio/audio_template.h | 4 ++--
> > >>> 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 | 10 +++++-----
> > >>> hw/audio/ac97.c | 6 +++---
> > >>> hw/audio/adlib.c | 6 +++---
> > >>> hw/audio/asc.c | 6 +++---
> > >>> hw/audio/cs4231a.c | 4 ++--
> > >>> hw/audio/es1370.c | 6 +++---
> > >>> hw/audio/gus.c | 6 +++---
> > >>> hw/audio/hda-codec.c | 6 +++---
> > >>> hw/audio/lm4549.c | 2 +-
> > >>> hw/audio/pcspk.c | 4 ++--
> > >>> hw/audio/sb16.c | 4 ++--
> > >>> hw/audio/via-ac97.c | 4 ++--
> > >>> hw/audio/virtio-snd.c | 4 ++--
> > >>> hw/audio/wm8750.c | 6 +++---
> > >>> hw/core/qdev-properties-system.c | 4 ++--
> > >>> hw/display/xlnx_dp.c | 2 +-
> > >>> hw/usb/dev-audio.c | 6 +++---
> > >>> 26 files changed, 64 insertions(+), 64 deletions(-)
> > >>>
> > >>> diff --git a/audio/audio.h b/audio/audio.h
> > >>> index 845e078169..a43ca0700c 100644
> > >>> --- a/audio/audio.h
> > >>> +++ b/audio/audio.h
> > >>> @@ -70,18 +70,18 @@ struct AudioBEClass {
> > >>> };
> > >>>
> > >>> typedef struct AudioBE AudioBE;
> > >>> -typedef struct QEMUSoundCard {
> > >>> +typedef struct AudioFE {
> > >>
> > >> You could also leave it as it is. While it's a bit odd naming it's clear
> > >> enough and not at least the local variables now called "card" match the
> > >> type which would not be the case if you rename it to Audiodev or something
> > >> else but not rename all the locals. So maybe it does not worth the churn
> > >> to change this type name.
> > >
> > > I think it's still worth it. Local variables are locals, and usually
> > > easy to understand by the context and using their types. It's easy to
> > > rename "card" to "audio_fe" or "frontend" though, I can do this in
> > > this change too.
> >
> > The point is to have less churn not more so renaming locals from card to
> > fe or something (but definitely not to a longer name than currently) would
> > just be more churn for not much more clarity. Therefore I argued that
>
> Renaming is making churn, I agree. But if the end result allows more
> readable code, even slightly, we should consider it.
>
> Imho AudioState and QEMUSoundCard are bad type names that don't help.
> I value type names a lot more than variable names, especially now that
> we have LSP, I am probably not the only one.
>
> I proposed AudioBE and AudioFE, for simplicity consistency and to
> avoid some naming clashes with QAPI types.
>
> Agree, BE and FE are not the most readable, so AudioBackend and
> AudioFrontend seems agreeable (local variables or in fn_name_for_be
> use usually a shorter version though).
I find both ChardevFrontend and AudioFrontend as somewhat confusing,
because the Device is frontend. IIUC ChardevFrontend/AudioFrontend
act more like a way to associate a frontend and backend together.
Can we call the objects something like a "Connection" / "Attachment"
/ "Link" ?
With regards,
Daniel
--
|: https://berrange.com -o- https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org -o- https://fstop138.berrange.com :|
|: https://entangle-photo.org -o- https://www.instagram.com/dberrange :|
next prev parent reply other threads:[~2025-10-24 11:51 UTC|newest]
Thread overview: 75+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-10-21 9:02 [PATCH 00/43] Audio clean-ups marcandre.lureau
2025-10-21 9:02 ` [PATCH 01/43] hw/audio: improve error reports marcandre.lureau
2025-10-21 13:06 ` Philippe Mathieu-Daudé
2025-10-21 9:02 ` [PATCH 02/43] hw/audio: rename model list function marcandre.lureau
2025-10-21 10:04 ` Philippe Mathieu-Daudé
2025-10-21 9:02 ` [PATCH 03/43] hw/audio: remove global pcspk marcandre.lureau
2025-10-21 9:49 ` Philippe Mathieu-Daudé
2025-10-21 9:02 ` [PATCH 04/43] hw/pcspk: use explicitly the required PIT types marcandre.lureau
2025-10-21 9:50 ` Philippe Mathieu-Daudé
2025-10-21 9:02 ` [PATCH 05/43] hw/pcspk: make 'pit' a class property marcandre.lureau
2025-10-21 17:45 ` Philippe Mathieu-Daudé
2025-10-21 9:02 ` [PATCH 06/43] hw/pcspk: check the "pit" is set marcandre.lureau
2025-10-21 9:51 ` Philippe Mathieu-Daudé
2025-10-21 9:02 ` [PATCH 07/43] docs: update -soundhw -> -device list marcandre.lureau
2025-10-21 11:27 ` Thomas Huth
2025-10-21 9:02 ` [PATCH 08/43] qdev: add qdev_find_default_bus() marcandre.lureau
2025-10-21 11:22 ` BALATON Zoltan
2025-10-21 11:28 ` Marc-André Lureau
2025-10-21 9:02 ` [PATCH 09/43] hw/audio: look up the default bus from the device class marcandre.lureau
2025-10-21 9:02 ` [PATCH 10/43] audio: rename audio_define->audio_add_audiodev() marcandre.lureau
2025-10-21 9:52 ` Philippe Mathieu-Daudé
2025-10-21 9:02 ` [PATCH 11/43] hw/audio: use better naming for -audio model handling code marcandre.lureau
2025-10-21 9:02 ` [PATCH 12/43] hw/audio/virtio-snd-pci: remove custom model callback marcandre.lureau
2025-10-21 9:02 ` [PATCH 13/43] hw/audio: simplify 'hda' audio init code marcandre.lureau
2025-10-21 9:02 ` [PATCH 14/43] hw/audio: generalize audio_model.init() marcandre.lureau
2025-10-21 9:02 ` [PATCH 15/43] hw/audio: drop audio_model.isa marcandre.lureau
2025-10-21 17:47 ` Philippe Mathieu-Daudé
2025-10-21 9:02 ` [PATCH 16/43] audio: start making AudioState a QOM Object marcandre.lureau
2025-10-21 9:56 ` Philippe Mathieu-Daudé
2025-10-21 9:02 ` [PATCH 17/43] audio: register backends in /audiodevs container marcandre.lureau
2025-10-21 9:57 ` Philippe Mathieu-Daudé
2025-10-21 9:59 ` Philippe Mathieu-Daudé
2025-10-21 9:02 ` [PATCH 18/43] audio: use /audiodevs qom container marcandre.lureau
2025-10-21 9:02 ` [PATCH 19/43] audio/paaudio: remove needless return value marcandre.lureau
2025-10-21 9:59 ` Philippe Mathieu-Daudé
2025-10-21 9:02 ` [PATCH 20/43] audio/dsound: simplify init() marcandre.lureau
2025-10-21 9:02 ` [PATCH 21/43] audio/dsound: report init error via **errp marcandre.lureau
2025-10-21 9:02 ` [PATCH 22/43] audio: simplify audio_driver_init() marcandre.lureau
2025-10-21 9:02 ` [PATCH 23/43] audio: move period tick initialization marcandre.lureau
2025-10-21 9:02 ` [PATCH 24/43] audio: drop needless error message marcandre.lureau
2025-10-21 9:02 ` [PATCH 25/43] audio: clean-up vmstate change handler on finalize marcandre.lureau
2025-10-21 9:02 ` [PATCH 26/43] audio: unregister vmstate description marcandre.lureau
2025-10-21 9:02 ` [PATCH 27/43] audio: initialize card_head during object init marcandre.lureau
2025-10-21 9:02 ` [PATCH 28/43] audio: remove some needless headers marcandre.lureau
2025-10-21 9:03 ` [PATCH 29/43] audio: remove AUDIO_HOST_ENDIANNESS marcandre.lureau
2025-10-21 9:03 ` [PATCH 30/43] audio: introduce AUD_set_volume_{in,out}_lr() marcandre.lureau
2025-10-21 9:03 ` [PATCH 31/43] hw/audio: replace AUD_log() usage marcandre.lureau
2025-10-21 10:01 ` Philippe Mathieu-Daudé
2025-10-21 9:03 ` [PATCH 32/43] audio/replay: fix type punning marcandre.lureau
2025-10-21 9:03 ` [PATCH 33/43] audio: move internal APIs to audio_int.h marcandre.lureau
2025-10-21 9:03 ` [PATCH 34/43] audio: rename AudioState -> AudioBE marcandre.lureau
2025-10-21 9:30 ` Paolo Bonzini
2025-10-21 9:40 ` Paolo Bonzini
2025-10-21 10:03 ` Philippe Mathieu-Daudé
2025-10-21 10:40 ` Marc-André Lureau
2025-10-21 10:48 ` Paolo Bonzini
2025-10-21 12:50 ` Marc-André Lureau
2025-10-21 12:58 ` BALATON Zoltan
2025-10-21 12:08 ` BALATON Zoltan
2025-10-21 9:03 ` [PATCH 35/43] audio: rename QEMUSoundCard -> AudioFE marcandre.lureau
2025-10-21 12:11 ` BALATON Zoltan
2025-10-21 12:29 ` Marc-André Lureau
2025-10-21 12:49 ` BALATON Zoltan
2025-10-21 13:06 ` Marc-André Lureau
2025-10-24 11:50 ` Daniel P. Berrangé [this message]
2025-10-21 9:03 ` [PATCH 36/43] audio: rename audio_get_id() marcandre.lureau
2025-10-21 9:03 ` [PATCH 37/43] audio/dbus: use a helper function to set the backend dbus server marcandre.lureau
2025-10-21 9:03 ` [PATCH 38/43] audio: move audio.h under include/qemu/ marcandre.lureau
2025-10-23 6:00 ` Akihiko Odaki
2025-10-21 9:03 ` [PATCH 39/43] audio: remove dependency on spice header marcandre.lureau
2025-10-21 9:03 ` [PATCH 40/43] audio: cleanup, use bool for booleans marcandre.lureau
2025-10-21 9:03 ` [PATCH 41/43] audio: drop needless list of FE marcandre.lureau
2025-10-21 9:03 ` [PATCH 42/43] audio: move capture API to own header marcandre.lureau
2025-10-21 9:03 ` [PATCH 43/43] audio: drop needless audio_driver "descr" field marcandre.lureau
2025-10-23 5:58 ` Akihiko Odaki
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=aPtoD4KB8sDmy_gn@redhat.com \
--to=berrange@redhat.com \
--cc=alistair@alistair23.me \
--cc=balaton@eik.bme.hu \
--cc=edgar.iglesias@gmail.com \
--cc=eduardo@habkost.net \
--cc=jiaxun.yang@flygoat.com \
--cc=kraxel@redhat.com \
--cc=laurent@vivier.eu \
--cc=manos.pitsidianakis@linaro.org \
--cc=marcandre.lureau@gmail.com \
--cc=mst@redhat.com \
--cc=pbonzini@redhat.com \
--cc=peter.maydell@linaro.org \
--cc=philmd@linaro.org \
--cc=qemu-arm@nongnu.org \
--cc=qemu-devel@nongnu.org \
--cc=vr_qemu@t-online.de \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.