From nobody Sun Apr 12 06:06:52 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=yandex-team.com ARC-Seal: i=1; a=rsa-sha256; t=1771306145; cv=none; d=zohomail.com; s=zohoarc; b=JoMy+QOhLUvaNTo0xZ/VcJBa4m57AHk0D1wdcLLJJSPDrg7Z4NWJ1BBsxvjgr36xZ8nT4NF/bL3XxjKjCzzUMYBffJijPUu06KAeNy5SXFGsIFOX1TlYm4naou+aZHevlVe0zL60Em0opy5F4GQIstfO0ZnBztIdU4VCZNshTr4= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1771306145; h=Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=cW96GpRtxrwmpHjA3rFfk5LGg/7cNAQbpRSdRXk6Veo=; b=dbHAZcvOuFRGMI4Or2/O5BEB/e/g63Brdli7XeZ5NEaNaos7yxWKhh08S85eTpoqRzcOsn6ne8x+Z51ph5LFouq+fud28ywFt9zTFdG0BinXDn4j220/fyqBzKxKd5lj+OkL2FamXaiHZBw8oTQNuFWSe8dK/iKtdUqhxUWtkkA= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 177130614508064.31946302559345; Mon, 16 Feb 2026 21:29:05 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1vsDcs-0002ck-Mo; Tue, 17 Feb 2026 00:27:58 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1vsDco-0002bI-0e for qemu-devel@nongnu.org; Tue, 17 Feb 2026 00:27:54 -0500 Received: from forwardcorp1b.mail.yandex.net ([2a02:6b8:c02:900:1:45:d181:df01]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1vsDcm-0006cm-5y for qemu-devel@nongnu.org; Tue, 17 Feb 2026 00:27:53 -0500 Received: from mail-nwsmtp-smtp-corp-canary-81.sas.yp-c.yandex.net (mail-nwsmtp-smtp-corp-canary-81.sas.yp-c.yandex.net [IPv6:2a02:6b8:c37:8aa5:0:640:e6ae:0]) by forwardcorp1b.mail.yandex.net (Yandex) with ESMTPS id E90A78852A; Tue, 17 Feb 2026 08:27:50 +0300 (MSK) Received: from heifetz-lin.yandex-team.ru (unknown [2a02:6bf:8080:b54::1:2f]) by mail-nwsmtp-smtp-corp-canary-81.sas.yp-c.yandex.net (smtpcorp/Yandex) with ESMTPSA id eRRjrX2Ak0U0-BEQR34Gh; Tue, 17 Feb 2026 08:27:50 +0300 X-Yandex-Fwd: 1 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yandex-team.com; s=default; t=1771306070; bh=cW96GpRtxrwmpHjA3rFfk5LGg/7cNAQbpRSdRXk6Veo=; h=Message-Id:Date:In-Reply-To:Cc:Subject:References:To:From; b=B6yNRU49+hngQyNX40/rrbl+kLZgpYohiOF6T4KqYn4Kr/dXS6Dt1d35WHr/Hqo+c VzuEGXtkuNzGCr0rBs//lq4FIblA/mCwQQowuFfnmYh8yOmfSocB30X5HnwaC/WSDk UxcVHRtLktGSjaMGckLcigkrHY25zTepq2aq+tww= Authentication-Results: mail-nwsmtp-smtp-corp-canary-81.sas.yp-c.yandex.net; dkim=pass header.i=@yandex-team.com From: Sergei Heifetz To: qemu-devel@nongnu.org Cc: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , =?UTF-8?q?Alex=20Benn=C3=A9e?= , Eric Blake , =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= , =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= , Markus Armbruster , Fabiano Rosas , Paolo Bonzini , Thomas Huth , Gerd Hoffmann , Laurent Vivier Subject: [PATCH 8/8] meson.build: ignore audio drivers when configured with --disable-audio Date: Tue, 17 Feb 2026 10:27:40 +0500 Message-Id: <20260217052740.114117-9-heifetz@yandex-team.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20260217052740.114117-1-heifetz@yandex-team.com> References: <20260217052740.114117-1-heifetz@yandex-team.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a02:6b8:c02:900:1:45:d181:df01; envelope-from=heifetz@yandex-team.com; helo=forwardcorp1b.mail.yandex.net X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: qemu development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @yandex-team.com) X-ZM-MESSAGEID: 1771306148893158500 Content-Type: text/plain; charset="utf-8" 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 --- meson.build | 80 ++++++++++++++++++++++++++++++----------------------- 1 file changed, 45 insertions(+), 35 deletions(-) diff --git a/meson.build b/meson.build index 69aa7cd189..a1224c9695 100644 --- a/meson.build +++ b/meson.build @@ -2266,46 +2266,55 @@ endif config_host_data =3D configuration_data() =20 config_host_data.set('CONFIG_HAVE_RUST', have_rust) -audio_drivers_selected =3D [] -if have_system - audio_drivers_available =3D { - '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', audio_enabled) +if audio_enabled + audio_drivers_selected =3D [] + if have_system + audio_drivers_available =3D { + '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 =20 - # Default to native drivers first, OSS second, SDL third - audio_drivers_priority =3D \ - [ 'pa', 'coreaudio', 'dsound', 'sndio', 'oss' ] + \ - (host_os =3D=3D 'linux' ? [] : [ 'sdl' ]) - audio_drivers_default =3D [] - foreach k: audio_drivers_priority - if audio_drivers_available[k] - audio_drivers_default +=3D k - endif - endforeach + # Default to native drivers first, OSS second, SDL third + audio_drivers_priority =3D \ + [ 'pa', 'coreaudio', 'dsound', 'sndio', 'oss' ] + \ + (host_os =3D=3D 'linux' ? [] : [ 'sdl' ]) + audio_drivers_default =3D [] + foreach k: audio_drivers_priority + if audio_drivers_available[k] + audio_drivers_default +=3D k + endif + endforeach =20 + foreach k: get_option('audio_drv_list') + if k =3D=3D 'default' + audio_drivers_selected +=3D audio_drivers_default + elif not audio_drivers_available[k] + error('Audio driver "@0@" not available.'.format(k)) + else + audio_drivers_selected +=3D 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 =3D=3D 'default' - audio_drivers_selected +=3D audio_drivers_default - elif not audio_drivers_available[k] - error('Audio driver "@0@" not available.'.format(k)) - else - audio_drivers_selected +=3D k + if k !=3D '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) + '", ') =20 have_host_block_device =3D (host_os !=3D 'darwin' or cc.has_header('IOKit/storage/IOMedia.h')) @@ -4660,7 +4669,8 @@ if enable_modules summary_info +=3D {'alternative module path': get_option('module_upgrade= s')} endif summary_info +=3D {'fuzzing support': get_option('fuzzing')} -if have_system +summary_info +=3D {'Audio': get_option('audio')} +if have_system and audio_enabled summary_info +=3D {'Audio drivers': ' '.join(audio_drivers_selected)} endif summary_info +=3D {'Trace backends': ','.join(get_option('trace_backend= s'))} --=20 2.34.1