From nobody Tue Apr 7 08:12:05 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=1773606023; cv=none; d=zohomail.com; s=zohoarc; b=DhIjXcq949FjypWs4BkuE+Xks/7q7S94FvRw0YHK2aG8t/1tiJ/xdotRds9him0Is8kT8ORU4LGi2EXsA4cpyv6XOzjEnQF3Y53XK8aS9RjLWs5+Y2eyn91AIHU243xifbv8N5IzNVgBQoHNLRJ5DxqratsMKyC7T6PGS4HUqV4= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1773606023; h=Content-Type: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=o31vVvyYMo9/zoUyzVln6L7BlLpfRJY383WWkJGVbu4=; b=EnEtoer2NqNXCiM7I4IEsSa4dWeoT2kp4ki62nRlTIzqcXmxGUbZSwU/n5R/hfBY9E7ocr9J6WBrk4P0RlbOqERfNSaZSUhAK+uJFgjd/zcdpMjp+VvmxRbm17+g6Zx3kLKS+rVOlJJlyVw1qcoCkewSu+puqJCIsM2p74RHfrU= 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 1773606023386212.51396152030281; Sun, 15 Mar 2026 13:20:23 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1w1ruN-0006Oj-N3; Sun, 15 Mar 2026 16:17:55 -0400 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 1w1ru6-0006Ll-M8 for qemu-devel@nongnu.org; Sun, 15 Mar 2026 16:17:41 -0400 Received: from forwardcorp1a.mail.yandex.net ([178.154.239.72]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1w1ru1-0002MY-Ak for qemu-devel@nongnu.org; Sun, 15 Mar 2026 16:17:35 -0400 Received: from mail-nwsmtp-smtp-corp-main-69.vla.yp-c.yandex.net (mail-nwsmtp-smtp-corp-main-69.vla.yp-c.yandex.net [IPv6:2a02:6b8:c1f:3a87:0:640:845c:0]) by forwardcorp1a.mail.yandex.net (Yandex) with ESMTPS id 4C820C015F; Sun, 15 Mar 2026 23:17:10 +0300 (MSK) Received: from localhost (unknown [2a02:6bf:8080:b49::1:d]) by mail-nwsmtp-smtp-corp-main-69.vla.yp-c.yandex.net (smtpcorp/Yandex) with ESMTPSA id 9HRQD91AhmI0-RiAdBxZz; Sun, 15 Mar 2026 23:17:09 +0300 X-Yandex-Fwd: 1 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yandex-team.com; s=default; t=1773605829; bh=o31vVvyYMo9/zoUyzVln6L7BlLpfRJY383WWkJGVbu4=; h=Cc:Message-Id:References:Date:In-Reply-To:Subject:To:From; b=EZGX5f725J08sFXn7037fO/4SJdaE/kzNtH4tVHgUJ7CpLJtusFvRpWybk7M4pdFv QSWcfuG6PcDOvpzLoy4ygCxeAR0bgmoOdl8xlqlD6kECjXpZxFhyOfu120ZyMOvVcf 8TWKJfBP+8zh9iiQqwsgwGzA+fm7Rdi5Xx7fsGU8= Authentication-Results: mail-nwsmtp-smtp-corp-main-69.vla.yp-c.yandex.net; dkim=pass header.i=@yandex-team.com From: Sergei Heifetz To: qemu-devel@nongnu.org Cc: Eric Blake , "Michael S. Tsirkin" , =?UTF-8?q?Alex=20Benn=C3=A9e?= , Markus Armbruster , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Marcel Apfelbaum , Paolo Bonzini , Fabiano Rosas , =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= , Eduardo Habkost , Yanan Wang , Zhao Liu , Richard Henderson , "Dr. David Alan Gilbert" , Thomas Huth , =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= , Laurent Vivier , Gerd Hoffmann , Sergei Heifetz Subject: [PATCH v3 11/11] meson.build: ignore audio drivers when configured with --disable-audio Date: Mon, 16 Mar 2026 01:16:46 +0500 Message-Id: <20260315201646.96862-12-heifetz@yandex-team.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20260315201646.96862-1-heifetz@yandex-team.com> References: <20260315201646.96862-1-heifetz@yandex-team.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" 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=178.154.239.72; envelope-from=heifetz@yandex-team.com; helo=forwardcorp1a.mail.yandex.net X-Spam_score_int: -3 X-Spam_score: -0.4 X-Spam_bar: / X-Spam_report: (-0.4 / 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, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.819, RCVD_IN_VALIDITY_SAFE_BLOCKED=0.903, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no 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: 1773606041623158500 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 d05533488f9..7f71dce3ae5 100644 --- a/meson.build +++ b/meson.build @@ -2280,46 +2280,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')) @@ -4710,7 +4719,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