From: Sergei Heifetz <heifetz@yandex-team.com>
To: qemu-devel@nongnu.org
Cc: "Eric Blake" <eblake@redhat.com>,
"Michael S. Tsirkin" <mst@redhat.com>,
"Alex Bennée" <alex.bennee@linaro.org>,
"Markus Armbruster" <armbru@redhat.com>,
"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>,
"Sergei Heifetz" <heifetz@yandex-team.com>
Subject: [PATCH v3 01/11] audio: add `audio` build option for meson and Kconfig
Date: Mon, 16 Mar 2026 01:16:36 +0500 [thread overview]
Message-ID: <20260315201646.96862-2-heifetz@yandex-team.com> (raw)
In-Reply-To: <20260315201646.96862-1-heifetz@yandex-team.com>
This patch adds the `audio` option to meson_options.txt. It is
propagated into Kconfig as AUDIO. It is enabled by default.
The corresponding `--disable-audio` and `--enable-audio` options
for `configure` are also added.
For now, this option does nothing. In subsequent patches, it will
gradually disable audio in different places. The final goal is to stop
building sources from `audio/` and `hw/audio/` and other audio-related
files (except for some stubs). Note that this intent is different from
`-audio none`, which mutes audio but still compiles the audio subsystem.
Signed-off-by: Sergei Heifetz <heifetz@yandex-team.com>
Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
---
Kconfig.host | 3 +++
meson.build | 3 +++
meson_options.txt | 3 +++
scripts/meson-buildoptions.sh | 3 +++
4 files changed, 12 insertions(+)
diff --git a/Kconfig.host b/Kconfig.host
index 933425c74b4..ec129aa4fc0 100644
--- a/Kconfig.host
+++ b/Kconfig.host
@@ -29,6 +29,9 @@ config IVSHMEM
config TPM
bool
+config AUDIO
+ bool
+
config FDT
bool
diff --git a/meson.build b/meson.build
index ed82247111e..d05533488f9 100644
--- a/meson.build
+++ b/meson.build
@@ -68,6 +68,8 @@ foreach target : target_dirs
endforeach
have_user = have_linux_user or have_bsd_user
+have_audio = get_option('audio').disable_auto_if(not have_system).allowed()
+
############
# Programs #
############
@@ -3277,6 +3279,7 @@ disassemblers = {
have_ivshmem = config_host_data.get('CONFIG_EVENTFD')
host_kconfig = \
(get_option('fuzzing') ? ['CONFIG_FUZZ=y'] : []) + \
+ (have_audio ? ['CONFIG_AUDIO=y'] : []) + \
(have_tpm ? ['CONFIG_TPM=y'] : []) + \
(pixman.found() ? ['CONFIG_PIXMAN=y'] : []) + \
(spice.found() ? ['CONFIG_SPICE=y'] : []) + \
diff --git a/meson_options.txt b/meson_options.txt
index 31d5916cfce..d22386b4c15 100644
--- a/meson_options.txt
+++ b/meson_options.txt
@@ -71,6 +71,9 @@ option('malloc_trim', type : 'feature', value : 'auto',
option('malloc', type : 'combo', choices : ['system', 'tcmalloc', 'jemalloc'],
value: 'system', description: 'choose memory allocator to use')
+option('audio', type: 'feature', value: 'auto',
+ description: 'Audio support')
+
option('kvm', type: 'feature', value: 'auto',
description: 'KVM acceleration support')
option('mshv', type: 'feature', value: 'auto',
diff --git a/scripts/meson-buildoptions.sh b/scripts/meson-buildoptions.sh
index ca5b113119a..05c55d2e70f 100644
--- a/scripts/meson-buildoptions.sh
+++ b/scripts/meson-buildoptions.sh
@@ -96,6 +96,7 @@ meson_options_help() {
printf "%s\n" ' af-xdp AF_XDP network backend support'
printf "%s\n" ' alsa ALSA sound support'
printf "%s\n" ' attr attr/xattr support'
+ printf "%s\n" ' audio Audio support'
printf "%s\n" ' auth-pam PAM access control'
printf "%s\n" ' blkio libblkio block device driver'
printf "%s\n" ' bochs bochs image format support'
@@ -243,6 +244,8 @@ _meson_option_parse() {
--disable-asan) printf "%s" -Dasan=false ;;
--enable-attr) printf "%s" -Dattr=enabled ;;
--disable-attr) printf "%s" -Dattr=disabled ;;
+ --enable-audio) printf "%s" -Daudio=enabled ;;
+ --disable-audio) printf "%s" -Daudio=disabled ;;
--audio-drv-list=*) quote_sh "-Daudio_drv_list=$2" ;;
--enable-auth-pam) printf "%s" -Dauth_pam=enabled ;;
--disable-auth-pam) printf "%s" -Dauth_pam=disabled ;;
--
2.34.1
next prev parent reply other threads:[~2026-03-15 20:18 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 ` Sergei Heifetz [this message]
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
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=20260315201646.96862-2-heifetz@yandex-team.com \
--to=heifetz@yandex-team.com \
--cc=alex.bennee@linaro.org \
--cc=armbru@redhat.com \
--cc=berrange@redhat.com \
--cc=dave@treblig.org \
--cc=eblake@redhat.com \
--cc=eduardo@habkost.net \
--cc=farosas@suse.de \
--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.