From: "Philippe Mathieu-Daudé" <philmd@linaro.org>
To: Sergei Heifetz <heifetz@yandex-team.com>, 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>,
"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 11/11] meson.build: ignore audio drivers when configured with --disable-audio
Date: Wed, 1 Apr 2026 12:13:01 +0200 [thread overview]
Message-ID: <b9ae80bd-8d37-4fee-8a4e-6001b29089d0@linaro.org> (raw)
In-Reply-To: <ee0a3c03-75c7-49af-a3d8-2c715bd1e3e0@linaro.org>
On 1/4/26 12:10, Philippe Mathieu-Daudé wrote:
> On 15/3/26 21:16, Sergei Heifetz wrote:
>> When QEMU is configured with `--disable-audio`, we do not need to add the
>> audio drivers list to config_host_data. We also do not need to print this
>> list.
>>
>> Signed-off-by: Sergei Heifetz <heifetz@yandex-team.com>
>> Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
>> ---
>> meson.build | 80 ++++++++++++++++++++++++++++++-----------------------
>> 1 file changed, 45 insertions(+), 35 deletions(-)
>>
>> diff --git a/meson.build b/meson.build
>> index d05533488f9..7f71dce3ae5 100644
>> --- a/meson.build
>> +++ b/meson.build
>> @@ -2280,46 +2280,55 @@ endif
>> config_host_data = configuration_data()
>> config_host_data.set('CONFIG_HAVE_RUST', have_rust)
>> -audio_drivers_selected = []
>> -if have_system
>> - audio_drivers_available = {
>> - 'alsa': alsa.found(),
>> - 'coreaudio': coreaudio.found(),
>> - 'dsound': dsound.found(),
>> - 'jack': jack.found(),
>> - 'oss': oss.found(),
>> - 'pa': pulse.found(),
>> - 'pipewire': pipewire.found(),
>> - 'sdl': sdl.found(),
>> - 'sndio': sndio.found(),
>> - }
>> - foreach k, v: audio_drivers_available
>> - config_host_data.set('CONFIG_AUDIO_' + k.to_upper(), v)
>> - endforeach
>> +config_host_data.set('CONFIG_AUDIO', have_audio)
>> +if have_audio
>> + audio_drivers_selected = []
>> + if have_system
>> + audio_drivers_available = {
>> + 'alsa': alsa.found(),
>> + 'coreaudio': coreaudio.found(),
>> + 'dsound': dsound.found(),
>> + 'jack': jack.found(),
>> + 'oss': oss.found(),
>> + 'pa': pulse.found(),
>> + 'pipewire': pipewire.found(),
>> + 'sdl': sdl.found(),
>> + 'sndio': sndio.found(),
>> + }
>> + foreach k, v: audio_drivers_available
>> + config_host_data.set('CONFIG_AUDIO_' + k.to_upper(), v)
>> + endforeach
>> - # Default to native drivers first, OSS second, SDL third
>> - audio_drivers_priority = \
>> - [ 'pa', 'coreaudio', 'dsound', 'sndio', 'oss' ] + \
>> - (host_os == 'linux' ? [] : [ 'sdl' ])
>> - audio_drivers_default = []
>> - foreach k: audio_drivers_priority
>> - if audio_drivers_available[k]
>> - audio_drivers_default += k
>> - endif
>> - endforeach
>> + # Default to native drivers first, OSS second, SDL third
>> + audio_drivers_priority = \
>> + [ 'pa', 'coreaudio', 'dsound', 'sndio', 'oss' ] + \
>> + (host_os == 'linux' ? [] : [ 'sdl' ])
>> + audio_drivers_default = []
>> + foreach k: audio_drivers_priority
>> + if audio_drivers_available[k]
>> + audio_drivers_default += k
>> + endif
>> + endforeach
>> + foreach k: get_option('audio_drv_list')
>> + if k == 'default'
>> + audio_drivers_selected += audio_drivers_default
>> + elif not audio_drivers_available[k]
>> + error('Audio driver "@0@" not available.'.format(k))
>> + else
>> + audio_drivers_selected += k
>> + endif
>> + endforeach
>> + endif
>> + config_host_data.set('CONFIG_AUDIO_DRIVERS',
>> + '"' + '", "'.join(audio_drivers_selected) + '", ')
>> +else
>> foreach k: get_option('audio_drv_list')
>> - if k == 'default'
>> - audio_drivers_selected += audio_drivers_default
>> - elif not audio_drivers_available[k]
>> - error('Audio driver "@0@" not available.'.format(k))
>> - else
>> - audio_drivers_selected += k
>> + if k != 'default'
>> + error('Audio drivers are not supported because audio is
>> disabled.')
>> endif
>> endforeach
>> endif
>> -config_host_data.set('CONFIG_AUDIO_DRIVERS',
>> - '"' + '", "'.join(audio_drivers_selected) + '", ')
>> have_host_block_device = (host_os != 'darwin' or
>> cc.has_header('IOKit/storage/IOMedia.h'))
>> @@ -4710,7 +4719,8 @@ if enable_modules
>> summary_info += {'alternative module path':
>> get_option('module_upgrades')}
>> endif
>> summary_info += {'fuzzing support': get_option('fuzzing')}
>> -if have_system
>> +summary_info += {'Audio support': have_audio}
>> +if have_audio
>> summary_info += {'Audio drivers': '
>> '.join(audio_drivers_selected)}
>> endif
>> summary_info += {'Trace backends':
>> ','.join(get_option('trace_backends'))}
>
> Shouldn't this be squashed with patch #1 as a single meson change?
Ah no otherwise we'd get link failures before the other patches.
prev parent reply other threads:[~2026-04-01 10:13 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
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é [this message]
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=b9ae80bd-8d37-4fee-8a4e-6001b29089d0@linaro.org \
--to=philmd@linaro.org \
--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=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=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.