From: Markus Armbruster <armbru@redhat.com>
To: "Sergei Heifetz" <heifetz@yandex-team.com>
Cc: qemu-devel@nongnu.org, "Eric Blake" <eblake@redhat.com>,
"Michael S. Tsirkin" <mst@redhat.com>,
"Alex Bennée" <alex.bennee@linaro.org>,
"Philippe Mathieu-Daudé" <philmd@linaro.org>,
"Marcel Apfelbaum" <marcel.apfelbaum@gmail.com>,
"Paolo Bonzini" <pbonzini@redhat.com>,
"Fabiano Rosas" <farosas@suse.de>,
"Marc-André Lureau" <marcandre.lureau@redhat.com>,
"Eduardo Habkost" <eduardo@habkost.net>,
"Yanan Wang" <wangyanan55@huawei.com>,
"Zhao Liu" <zhao1.liu@intel.com>,
"Richard Henderson" <richard.henderson@linaro.org>,
"Dr. David Alan Gilbert" <dave@treblig.org>,
"Thomas Huth" <thuth@redhat.com>,
"Daniel P. Berrangé" <berrange@redhat.com>,
"Laurent Vivier" <lvivier@redhat.com>,
"Gerd Hoffmann" <kraxel@redhat.com>
Subject: Re: [PATCH v3 09/11] audio: do not build audio-related sources with --disable-audio
Date: Wed, 01 Apr 2026 10:11:36 +0200 [thread overview]
Message-ID: <874ilv3xs7.fsf@pond.sub.org> (raw)
In-Reply-To: <DHHJ37V0JNBW.JENSG5ZXL7Z1@yandex-team.com> (Sergei Heifetz's message of "Wed, 01 Apr 2026 09:20:15 +0500")
"Sergei Heifetz" <heifetz@yandex-team.com> writes:
> On Thu Mar 19, 2026 at 1:36 PM +05, Markus Armbruster wrote:
>> [...]
>>> index 2df87b97101..28fda7c8ac3 100644
>>> --- a/qapi/audio.json
>>> +++ b/qapi/audio.json
>>> @@ -540,4 +540,5 @@
>>> # Since: 8.0
>>> ##
>>> { 'command': 'query-audiodevs',
>>> - 'returns': ['Audiodev'] }
>>> + 'returns': ['Audiodev'],
>>> + 'if': 'CONFIG_AUDIO' }
>>
>> Could we disable all the audio stuff here?
>>
>> I tried, patch appended. What do you think?
>
> For some reason, I thought it was undesirable to alter the header files.
> That's what I had in mind while working on the series.
>
> In particular, when you previously suggested emptying out audio.json,
> I used that idea to find other parts of the source code we can compile
> out, but I thought that was it, and that there is no real reason to
> actually remove the QAPI definitions.
>
> I don't have any strong arguments against it. If we are okay with
> changing the headers, what you suggest makes perfect sense.
We'd add a bunch of #if defined(CONFIG_AUDIO) to generated
qapi-*-audio.h.
If these were handwritten, would we do the same?
I figure we would, because that way we get compile errors instead of
link errors. Likely one big #ifdef to guard everything but #include.
>>> [...]
>>>
>>> +#include "qemu/osdep.h"
>>> +#include "system/replay.h"
>>> +
>>> +void replay_audio_in_start(size_t *nsamples)
>>> +{
>>> +}
>>> +void replay_audio_in_sample_lr(uint64_t *left, uint64_t *right)
>>> +{
>>> +}
>>> +void replay_audio_in_finish(void)
>>> +{
>>> +}
>>> +void replay_audio_out(size_t *played)
>>> +{
>>> +}
>>
>> Should this go into stubs/ instead? Genuine question! I can't tell
>> when we use stubs/foo*.c and when we use foo/*stub.c.
>
> I don't think we should move this to stubs/ unless we also move
> replay/stubs-system.c there. I put the new file in replay/ because
> that's where these stubs originally came from.
>
> Also, here is a quote from stubs/meson.build: 'If possible, add new
> files to other directories, by using "if_false"'.
Alright, I learned something :)
>> [...]
>
> P.S. Thank you for the review and for your suggestions. I'm really
> grateful for them. I'm still interested in working on this, and I'm very
> sorry it took so long to respond.
No worries!
next prev parent reply other threads:[~2026-04-01 8:12 UTC|newest]
Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-03-15 20:16 [PATCH v3 00/11] add build option to disable audio subsystem Sergei Heifetz
2026-03-15 20:16 ` [PATCH v3 01/11] audio: add `audio` build option for meson and Kconfig Sergei Heifetz
2026-03-15 20:16 ` [PATCH v3 02/11] ui/vnc: disable audio feature when configured with --disable-audio Sergei Heifetz
2026-04-01 10:07 ` Philippe Mathieu-Daudé
2026-04-01 21:54 ` Sergei Heifetz
2026-03-15 20:16 ` [PATCH v3 03/11] tests/qtest: remove -audio none " Sergei Heifetz
2026-04-01 10:08 ` Philippe Mathieu-Daudé
2026-03-15 20:16 ` [PATCH v3 04/11] hw/audio/pcspk: change PCSPK behaviour " Sergei Heifetz
2026-03-15 20:16 ` [PATCH v3 05/11] Kconfig: add AUDIO dependency to audio-related devices Sergei Heifetz
2026-03-15 20:16 ` [PATCH v3 06/11] system/vl: remove audio and audiodev options when audio is disabled Sergei Heifetz
2026-03-15 20:16 ` [PATCH v3 07/11] ui/dbus: run without Audio interface " Sergei Heifetz
2026-03-19 7:58 ` Markus Armbruster
2026-04-01 4:16 ` Sergei Heifetz
2026-04-01 10:43 ` Markus Armbruster
2026-04-01 21:06 ` Sergei Heifetz
2026-04-01 10:57 ` Daniel P. Berrangé
2026-03-15 20:16 ` [PATCH v3 08/11] tests/audio: do not compile if " Sergei Heifetz
2026-04-01 10:10 ` Philippe Mathieu-Daudé
2026-04-01 21:02 ` Sergei Heifetz
2026-03-15 20:16 ` [PATCH v3 09/11] audio: do not build audio-related sources with --disable-audio Sergei Heifetz
2026-03-19 8:36 ` Markus Armbruster
2026-04-01 4:20 ` Sergei Heifetz
2026-04-01 8:11 ` Markus Armbruster [this message]
2026-03-15 20:16 ` [PATCH v3 10/11] qom: remove audiodevs root container if audio is disabled Sergei Heifetz
2026-03-15 20:16 ` [PATCH v3 11/11] meson.build: ignore audio drivers when configured with --disable-audio Sergei Heifetz
2026-04-01 10:10 ` Philippe Mathieu-Daudé
2026-04-01 10:13 ` Philippe Mathieu-Daudé
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=874ilv3xs7.fsf@pond.sub.org \
--to=armbru@redhat.com \
--cc=alex.bennee@linaro.org \
--cc=berrange@redhat.com \
--cc=dave@treblig.org \
--cc=eblake@redhat.com \
--cc=eduardo@habkost.net \
--cc=farosas@suse.de \
--cc=heifetz@yandex-team.com \
--cc=kraxel@redhat.com \
--cc=lvivier@redhat.com \
--cc=marcandre.lureau@redhat.com \
--cc=marcel.apfelbaum@gmail.com \
--cc=mst@redhat.com \
--cc=pbonzini@redhat.com \
--cc=philmd@linaro.org \
--cc=qemu-devel@nongnu.org \
--cc=richard.henderson@linaro.org \
--cc=thuth@redhat.com \
--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 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.