From nobody Sun Apr 12 02:50:40 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=1771878403; cv=none; d=zohomail.com; s=zohoarc; b=Wu+ADgJMamTD8Y37NzNMfCI13yKq9hGNEXMh1HCZsurnZSq/6QmTaj+z5pryeAQm6JWuGvYhknjcwIpkjUb0w2Q36AZKLIBi6eInJQEj0ifsT3UFn+4EIhvnX592JmVfLbLK1ZCHhQbeeY+cy5SFNtxijOpaChBrLP+tBFqAf3k= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1771878403; 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=79h67q6LX1lQ96c0uP4Rm18o9dNvSF7B8/1ghQcCkZY=; b=GE13xns0tupxSdj3y/Z42iREZG4AVWqGQlNqZj/N/OUuv7E6HpcfWTRoe4EGeMv5lUwPPGJrYU75lQvNxUKTe/eYLQ8+kGH/KJRPH5vnUeuC01z7m1XGAYSnrI8gonDmfG+9m5BHwKepi9ck/ApFBBy5vM4vcvE59rUZLgpP+zY= 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 1771878403073104.55665121285938; Mon, 23 Feb 2026 12:26:43 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1vucVE-0003gs-Ag; Mon, 23 Feb 2026 15:26:02 -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 1vucV1-0003GF-Ty for qemu-devel@nongnu.org; Mon, 23 Feb 2026 15:25:48 -0500 Received: from forwardcorp1d.mail.yandex.net ([2a02:6b8:c41:1300: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 1vucUv-0002R9-Mr for qemu-devel@nongnu.org; Mon, 23 Feb 2026 15:25:47 -0500 Received: from mail-nwsmtp-smtp-corp-main-66.iva.yp-c.yandex.net (mail-nwsmtp-smtp-corp-main-66.iva.yp-c.yandex.net [IPv6:2a02:6b8:c0c:bf1f:0:640:c739:0]) by forwardcorp1d.mail.yandex.net (Yandex) with ESMTPS id E581982FC0; Mon, 23 Feb 2026 23:25:36 +0300 (MSK) Received: from heifetz-lin.yandex-team.ru (unknown [2a02:6bf:8080:12d::1:2c]) by mail-nwsmtp-smtp-corp-main-66.iva.yp-c.yandex.net (smtpcorp/Yandex) with ESMTPSA id CPmvPN6Ap8c0-KKDYrATx; Mon, 23 Feb 2026 23:25:36 +0300 X-Yandex-Fwd: 1 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yandex-team.com; s=default; t=1771878336; bh=79h67q6LX1lQ96c0uP4Rm18o9dNvSF7B8/1ghQcCkZY=; h=Message-Id:Date:In-Reply-To:Cc:Subject:References:To:From; b=uPtu32VNDHcPg1HQXyFbwffZEB2Nk2D4e7xQtdurF6hN06CiN0uV48Pc8b1ur4xie IgduYQ8DfG/WSW/syBV0Y+c9GBIawcWddKt88HcpQ2H4YFBiSOnafwiRWxrHITraCR JU2/2norgVhv3Rci8NuhCCvAlSL95+enFsKwH1YE= Authentication-Results: mail-nwsmtp-smtp-corp-main-66.iva.yp-c.yandex.net; dkim=pass header.i=@yandex-team.com From: Sergei Heifetz To: qemu-devel@nongnu.org Cc: Gerd Hoffmann , Marcel Apfelbaum , =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= , Paolo Bonzini , =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= , Fabiano Rosas , Laurent Vivier , Thomas Huth , Eduardo Habkost , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Eric Blake , =?UTF-8?q?Alex=20Benn=C3=A9e?= , Richard Henderson , "Michael S. Tsirkin" , Markus Armbruster , "Dr. David Alan Gilbert" Subject: [PATCH v2 10/10] meson.build: ignore audio drivers when configured with --disable-audio Date: Tue, 24 Feb 2026 01:25:12 +0500 Message-Id: <20260223202512.1308205-11-heifetz@yandex-team.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20260223202512.1308205-1-heifetz@yandex-team.com> References: <20260223202512.1308205-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:c41:1300:1:45:d181:df01; envelope-from=heifetz@yandex-team.com; helo=forwardcorp1d.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: 1771878405334158500 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 Reviewed-by: Marc-Andr=C3=A9 Lureau --- meson.build | 80 ++++++++++++++++++++++++++++++----------------------- 1 file changed, 45 insertions(+), 35 deletions(-) diff --git a/meson.build b/meson.build index fdb2578447..ae71a0dd91 100644 --- a/meson.build +++ b/meson.build @@ -2272,46 +2272,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', have_audio) +if have_audio + 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')) @@ -4684,7 +4693,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 support': have_audio} +if have_audio 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