qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Paolo Bonzini <pbonzini@redhat.com>
To: "Marc-André Lureau" <marcandre.lureau@gmail.com>
Cc: qemu-devel@nongnu.org, "BALATON Zoltan" <balaton@eik.bme.hu>,
	"Philippe Mathieu-Daudé" <philmd@linaro.org>,
	"Volker Rümelin" <vr_qemu@t-online.de>,
	"Gerd Hoffmann" <kraxel@redhat.com>,
	"Christian Schoenebeck" <qemu_oss@crudebyte.com>,
	"Eduardo Habkost" <eduardo@habkost.net>,
	"Marcel Apfelbaum" <marcel.apfelbaum@gmail.com>,
	"Yanan Wang" <wangyanan55@huawei.com>,
	"Zhao Liu" <zhao1.liu@intel.com>,
	"Daniel P. Berrangé" <berrange@redhat.com>
Subject: Re: [PATCH 34/43] audio: rename AudioState -> AudioBE
Date: Tue, 21 Oct 2025 12:48:58 +0200	[thread overview]
Message-ID: <32170b83-473c-4eb8-96dc-9180c51fe872@redhat.com> (raw)
In-Reply-To: <CAJ+F1CLoaufD_1tFUd_1uckWZLXVQ7E-GpRDZRDXtfi6unBw7A@mail.gmail.com>

On 10/21/25 12:40, Marc-André Lureau wrote:
>>> BE and FE aren't used in existing code though.  Looking at current use:
> 
> There is a top-level backends/ though. I meant to say that it's
> usually clearer for everyone when we talk about "backend" vs
> "frontend" (or not?), and I wish we would follow that naming more in
> the code.

Yes, but the front-end should have a *pointer* to a backend.

>>> - BlockDriverState*/BlockBackend*
> 
> I am not very familiar with the block subsystem, but it is seems
> BlockBackend is actually the backend and BlockDriverState is
> implementation data detail. Correct me if I'm wrong

Yes, note the "*".  What I meant above is "the frontend has a 
BlockBackend*, which itself has the internal BlockDriverState*".  Same 
for character and NICs below.

>>> - Chardev*/CharBackend
>>>
> 
> Those are actually always confusing... and I remember I attempted to
> rename it in the past... CharBackend is the front-end side..

Yes, they are confusing.  I'm not sure why it failed, but 
s/CharBackend/CharFrontend/ does get my vote.

>> QEMUSoundCard's name field is basically unused, and QEMUSoundCard should
>> be just an Audiodev*.  There's no need for a separate AudioFE struct.
> 
> For audio, it's pretty obvious that we have "backend" object to
> implement the host audio subsystem details, while "QEMUSoundCard" is
> the "frontend", or "client/user" context.

I agree, but unlike character devices, QEMUSoundCard is not needed at 
all.  So you can drop it and only leave Audiodev*, or AudioBackend* (but 
I prefer Audiodev* which matches both the option name and Chardev*).

Paolo



  reply	other threads:[~2025-10-21 10:50 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 [this message]
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é
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=32170b83-473c-4eb8-96dc-9180c51fe872@redhat.com \
    --to=pbonzini@redhat.com \
    --cc=balaton@eik.bme.hu \
    --cc=berrange@redhat.com \
    --cc=eduardo@habkost.net \
    --cc=kraxel@redhat.com \
    --cc=marcandre.lureau@gmail.com \
    --cc=marcel.apfelbaum@gmail.com \
    --cc=philmd@linaro.org \
    --cc=qemu-devel@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).