From: BALATON Zoltan <balaton@eik.bme.hu>
To: "Daniel P. Berrangé" <berrange@redhat.com>
Cc: "Marc-André Lureau" <marcandre.lureau@redhat.com>,
qemu-devel@nongnu.org, "Gerd Hoffmann" <kraxel@redhat.com>,
"Thomas Huth" <huth@tuxfamily.org>,
"Akihiko Odaki" <odaki@rsg.ci.i.u-tokyo.ac.jp>,
"Alexandre Ratchov" <alex@caoua.org>,
dirty.ice.hu@gmail.com,
"Christian Schoenebeck" <qemu_oss@crudebyte.com>,
"Philippe Mathieu-Daudé" <philmd@linaro.org>,
"Volker Rümelin" <vr_qemu@t-online.de>,
geoff@hostfission.com
Subject: Re: [RFC 00/24] audio: add GStreamer backend
Date: Tue, 2 Dec 2025 13:01:05 +0100 (CET) [thread overview]
Message-ID: <a79a1247-a218-fb0b-746c-01c97a9781e6@eik.bme.hu> (raw)
In-Reply-To: <aS3wKkxxrekvIWuc@redhat.com>
[-- Attachment #1: Type: text/plain, Size: 4631 bytes --]
On Mon, 1 Dec 2025, Daniel P. Berrangé wrote:
> On Mon, Dec 01, 2025 at 08:30:26PM +0100, BALATON Zoltan wrote:
>> On Mon, 1 Dec 2025, Marc-André Lureau wrote:
>>> On Mon, Dec 1, 2025 at 5:03 PM BALATON Zoltan <balaton@eik.bme.hu> wrote:
>>>> On Mon, 1 Dec 2025, marcandre.lureau@redhat.com wrote:
>>>>> From: Marc-André Lureau <marcandre.lureau@redhat.com>
>>>>>
>>>>> Hi,
>>>>>
>>>>> The following patch series provides a GStreamer-based audio backend,
>>>> which could
>>>>> ultimately allow QEMU to leverage the framework to support the various
>>>> audio
>>>>> subsystems and simplify the audio handling logic (timing, resampling,
>>>> mixing
>>>>> etc), as well as allow greater pipeline flexibility and customization.
>>>>
>>>> While it's good to have a GStreamer backend to integrate well into systems
>>>> already using that, this should not replace existing audio backends in
>>>> QEMU. The reason is that GStreamer has extensive dependencies that I would
>>>>
>>>
>>> GStreamer itself is not so big and doesn't have that many dependencies that
>>> qemu doesn't already have.
>>
>> Except that this proposal uses GStreamer from rust so would also pull in all
>> the rust dependencies too which is still not needed for QEMU. Saying that
>> it's optional but then you lose audio output is also not quite acceptable.
>
> In terms of replacing the existing audio backends, it would simply have to
> wait until we declare Rust to be a mandatory dependency of QEMU, before
> proposing any removal of existing backends.
>
>>>> as another audio backend but not as a replacement for QEMU's audio
>>>> handling logic and backends.
>>>
>>> It would be great if people with very specific or constrained requirements
>>> on qemu audio could check if the GStreamer backend fits their need.
>>
>> At least one of them already said it wouldn't. Also why somebody not running
>> a desktop environment that uses GStreamer would want to add that dependency
>> and use a GStreamer plugin to get the sound back to their native sound
>> service when it is probably already supported by QEMU directly? QEMU also
>> has to support Windows and macOS sound services so having a few more
>> Linux/Unix ones does not make it much more complex.
>
> GStreamer is not merely for desktop environments. It is a general purpose
> audio system, and in terms of QEMU, it is already used by the Spice server
> for video encoding purposes. IMHO it is reasonable to consider whether
> QEMU could use GStreamer for all audio output regardless of whether it is
> running from a desktop session or not.
But it's most likely found as dependency in apps that already use other
libraries from the same family that usually come with a certain desktop
environment. Also spice does not want to replace all the other display
backends or SDL does not replace other sound backends so the same way it's
fine to add a GStreamer as another optional way to output sound but not as
replacing the existing backends and sound infrastructure in QEMU.
> Personally my main concern with gstreamer is that when things go wrong
> it can be very difficult to understand why and thus hard to figure out
> how to fix it, unless you're pretty experienced with gstreamer.
>
> If we do consider rationalizing how many backends we have, IMHO, it
> would be desirable to retain at least one other QEMU audio backend
> that is considered simple & reliable (fool proof) to use & debug.
That probably means we should retain at least the lowest level output for
the native sound systems of the OSes where QEMU runs but then we can also
have other backends as the main complexity is in the audio infrastructure
and not in the backends. What may be possible is to drop OSS and the
mixing support that is mainly needed for OSS arguing that ALSA has
replaced OSS on Linux and sndio replaced it on BSD and these can already
do resampling and mixing themselves so this could simplify QEMU audio code
to just pass data to a sound service but I'm not sure this feature isn't
used by some people in QEMU with other backends or to record to wav for
example. If we remove that too saying that recording can be done from the
system native sound service then maybe no need for resampling and mixing
in QEMU at least for output. But what about input where both the system
and the emulated cards are limited to some specific samping rates and they
are not set to use the same? Or do the sound services take care of that
too and you can ask for arbitrary input rate and will it convert from
hardware rate or you get back an error and QEMU has to handle this?
Regards,
BALATON Zoltan
next prev parent reply other threads:[~2025-12-02 12:01 UTC|newest]
Thread overview: 51+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-12-01 11:22 [RFC 00/24] audio: add GStreamer backend marcandre.lureau
2025-12-01 11:22 ` [RFC 01/24] rust: patch thiserror to work with meson marcandre.lureau
2025-12-01 11:22 ` [RFC 02/24] audio: remove obsolete/obscure functions marcandre.lureau
2025-12-10 14:02 ` Akihiko Odaki
2025-12-01 11:22 ` [RFC 03/24] audio/dbus: make "dbus" the default backend when using -display dbus marcandre.lureau
2025-12-10 14:03 ` Akihiko Odaki
2025-12-01 11:22 ` [RFC 04/24] qemu-options.hx: clarify default audio backend selection marcandre.lureau
2025-12-01 11:22 ` [RFC 05/24] audio: introduce AudioDriver marcandre.lureau
2025-12-11 5:22 ` Akihiko Odaki
2025-12-01 11:22 ` [RFC 06/24] audio: simplify audio_init() marcandre.lureau
2025-12-01 11:22 ` [RFC 07/24] audio: move object creation to audio_driver_init() marcandre.lureau
2025-12-01 11:22 ` [RFC 08/24] audio: add QOM module-objects for each backend marcandre.lureau
2025-12-01 13:20 ` BALATON Zoltan
2025-12-01 18:43 ` Marc-André Lureau
2025-12-01 11:22 ` [RFC 09/24] audio: remove set_dbus_server from audio_driver marcandre.lureau
2025-12-01 11:22 ` [RFC 10/24] audio: lookup "audio-" object types, and realize them marcandre.lureau
2025-12-01 11:22 ` [RFC 11/24] audio: switch to module-object, drop audio driver registration marcandre.lureau
2025-12-01 11:22 ` [RFC 12/24] module: remove audio module support marcandre.lureau
2025-12-01 11:22 ` [RFC 13/24] audio: keep a strong reference on the backend marcandre.lureau
2025-12-01 11:22 ` [RFC 14/24] audio: make list type declaration private marcandre.lureau
2025-12-01 11:22 ` [RFC 15/24] audio: make create_pdos() private marcandre.lureau
2025-12-01 11:22 ` [RFC 16/24] replay: remove dependency on audio/ marcandre.lureau
2025-12-01 11:22 ` [RFC 17/24] audio: make all the backend-specific APIs take the be marcandre.lureau
2025-12-01 11:22 ` [RFC 18/24] audio: make AudioBackend truely abstract marcandre.lureau
2025-12-01 11:23 ` [RFC 19/24] audio: split AudioBackend marcandre.lureau
2025-12-01 11:23 ` [RFC 20/24] audio: AUD_ -> audio_be_ marcandre.lureau
2025-12-01 11:23 ` [RFC 21/24] audio-be: add common pre-conditions marcandre.lureau
2025-12-01 11:23 ` [RFC 22/24] audio-be: add some state trace marcandre.lureau
2025-12-01 11:23 ` [RFC 23/24] audio: split AudioDriver code in audio-driver.c marcandre.lureau
2025-12-01 11:23 ` [RFC 24/24] WIP: rust/audio: add GStreamer backend marcandre.lureau
2025-12-01 13:12 ` Markus Armbruster
2025-12-01 18:26 ` Marc-André Lureau
2025-12-01 13:02 ` [RFC 00/24] audio: " BALATON Zoltan
2025-12-01 13:41 ` Christian Schoenebeck
2025-12-01 18:20 ` Marc-André Lureau
2025-12-01 19:30 ` BALATON Zoltan
2025-12-01 19:44 ` Daniel P. Berrangé
2025-12-02 12:01 ` BALATON Zoltan [this message]
2025-12-01 20:58 ` Alexandre Ratchov
2025-12-02 7:55 ` Paolo Bonzini
2025-12-02 12:03 ` BALATON Zoltan
2025-12-02 12:25 ` Geoffrey McRae
2025-12-02 12:44 ` Marc-André Lureau
2025-12-02 13:25 ` Geoffrey McRae
2025-12-02 14:14 ` Marc-André Lureau
2025-12-02 14:33 ` Neal Gompa
2025-12-02 14:43 ` Geoffrey McRae
2025-12-02 14:52 ` Markus Armbruster
2025-12-03 9:19 ` Akihiko Odaki
2025-12-02 15:39 ` Christian Schoenebeck
2025-12-03 8:06 ` Alexandre Ratchov
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=a79a1247-a218-fb0b-746c-01c97a9781e6@eik.bme.hu \
--to=balaton@eik.bme.hu \
--cc=alex@caoua.org \
--cc=berrange@redhat.com \
--cc=dirty.ice.hu@gmail.com \
--cc=geoff@hostfission.com \
--cc=huth@tuxfamily.org \
--cc=kraxel@redhat.com \
--cc=marcandre.lureau@redhat.com \
--cc=odaki@rsg.ci.i.u-tokyo.ac.jp \
--cc=philmd@linaro.org \
--cc=qemu-devel@nongnu.org \
--cc=qemu_oss@crudebyte.com \
--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 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).