From nobody Tue Oct 28 08:37:41 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.libvirt.org designates 8.43.85.245 as permitted sender) client-ip=8.43.85.245; envelope-from=devel-bounces@lists.libvirt.org; helo=lists.libvirt.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of lists.libvirt.org designates 8.43.85.245 as permitted sender) smtp.mailfrom=devel-bounces@lists.libvirt.org; dmarc=pass(p=reject dis=none) header.from=lists.libvirt.org ARC-Seal: i=1; a=rsa-sha256; t=1760513827; cv=none; d=zohomail.com; s=zohoarc; b=GDL7+JBX5gPlHSlhJf43vprAXhgTG7loeP0Vzf9WZk1/ogCOOvos0q0f0FrNqcL+t3lBgEau/f0pupFjt9O4cJ5n5nS+JOqEJspRhtGUrbPKxikC8fwuuGZMbkvx+zwPmwBfpWG2LAbvb9xvGE08Ggat2qtTY9wdrZHD0oAg1eo= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1760513827; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:List-Subscribe:List-Post:List-Owner:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:Reply-To:Subject:Subject:To:To:Message-Id; bh=qGMG3q0crFDJVbLc/s/7883YxgjNgjUwgfC2sjdFAiQ=; b=OqUHVqkvdnI11qmR2vYFEq1HHYBNuU2DIbjL/gylmYLeGCwaG0DqXk/TG7qfGoETSOO+O6vAToR/wfrKMnMwGZAd2UFiDFPWyQW/WUnBNbvZCNA3VT9GcOX0vpvJBJP3Abxq/RLFGBI788AguW0Xlx8vRa8gegZs4r0pLJXUSxg= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of lists.libvirt.org designates 8.43.85.245 as permitted sender) smtp.mailfrom=devel-bounces@lists.libvirt.org; dmarc=pass header.from= (p=reject dis=none) Return-Path: Received: from lists.libvirt.org (lists.libvirt.org [8.43.85.245]) by mx.zohomail.com with SMTPS id 1760513827662319.01693162973515; Wed, 15 Oct 2025 00:37:07 -0700 (PDT) Received: by lists.libvirt.org (Postfix, from userid 993) id 6836643DB9; Wed, 15 Oct 2025 03:37:06 -0400 (EDT) Received: from [172.19.199.20] (lists.libvirt.org [8.43.85.245]) by lists.libvirt.org (Postfix) with ESMTP id 0555A44358; Wed, 15 Oct 2025 03:36:21 -0400 (EDT) Received: by lists.libvirt.org (Postfix, from userid 993) id F2C6241BC6; Wed, 15 Oct 2025 03:36:13 -0400 (EDT) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (3072 bits) server-digest SHA256) (No client certificate requested) by lists.libvirt.org (Postfix) with ESMTPS id D681844066 for ; Wed, 15 Oct 2025 03:36:09 -0400 (EDT) Received: from mx-prod-mc-08.mail-002.prod.us-west-2.aws.redhat.com (ec2-35-165-154-97.us-west-2.compute.amazonaws.com [35.165.154.97]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-583-57otKqHIP6u93SNM41pueQ-1; Wed, 15 Oct 2025 03:36:06 -0400 Received: from mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.17]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-08.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 7CA5C1800741; Wed, 15 Oct 2025 07:36:04 +0000 (UTC) Received: from localhost (unknown [10.45.242.3]) by mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 276851955BE3; Wed, 15 Oct 2025 07:36:02 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-26) on lists.libvirt.org X-Spam-Level: X-Spam-Status: No, score=-3.1 required=5.0 tests=DKIM_INVALID,DKIM_SIGNED, MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,RCVD_IN_VALIDITY_RPBL_BLOCKED, RCVD_IN_VALIDITY_SAFE_BLOCKED,SPF_PASS autolearn=unavailable autolearn_force=no version=4.0.1 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1760513769; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=qGMG3q0crFDJVbLc/s/7883YxgjNgjUwgfC2sjdFAiQ=; b=EsWRh0Yc7cbgb36QRKhJeRkF8imnES60pKRFpACvXYxyLIKTbLKFkw3pO37Caj2NMuPu6u sl0sovJRH2Z9GYsVdGlHGTpIAvctpYOp+Vmy17Y2UKHCYtR5y9a0jxOu695enX2DerpU32 MBxT4Zl+yqiOtcXMb8cJLI/1ba0Xm0o= X-MC-Unique: 57otKqHIP6u93SNM41pueQ-1 X-Mimecast-MFC-AGG-ID: 57otKqHIP6u93SNM41pueQ_1760513764 To: qemu-devel@nongnu.org Subject: [PATCH] RFC: audio: deprecate HMP audio commands Date: Wed, 15 Oct 2025 11:35:59 +0400 Message-ID: <20251015073559.2799165-1-marcandre.lureau@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 3.0 on 10.30.177.17 Message-ID-Hash: DNYJMP2IPSETWHYHMT4R2L7RRC5P5G5J X-Message-ID-Hash: DNYJMP2IPSETWHYHMT4R2L7RRC5P5G5J X-MailFrom: marcandre.lureau@redhat.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; loop; banned-address; header-match-devel.lists.libvirt.org-0; emergency; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header CC: pbonzini@redhat.com, =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= , Gerd Hoffmann , "reviewer:Incompatible changes" , "Dr. David Alan Gilbert" , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , =?UTF-8?q?Alex=20Benn=C3=A9e?= , Thomas Huth X-Mailman-Version: 3.3.10 Precedence: list List-Id: Development discussions about the libvirt library & tools Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: From: "marcandre.lureau--- via Devel" Reply-To: marcandre.lureau@redhat.com X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZM-MESSAGEID: 1760513831129158500 From: Marc-Andr=C3=A9 Lureau The command is niche and better served by the host audio system. There is no QMP equivalent, fortunately. You can capture the audio stream via remote desktop protocols too (dbus, vnc, spice). Signed-off-by: Marc-Andr=C3=A9 Lureau --- docs/about/deprecated.rst | 20 ++++++++++++++++++++ meson.build | 9 +++++++++ audio/meson.build | 7 +++++-- hmp-commands-info.hx | 2 ++ hmp-commands.hx | 4 +++- meson_options.txt | 3 +++ scripts/meson-buildoptions.sh | 3 +++ 7 files changed, 45 insertions(+), 3 deletions(-) diff --git a/docs/about/deprecated.rst b/docs/about/deprecated.rst index 98361f5832..a357f207cf 100644 --- a/docs/about/deprecated.rst +++ b/docs/about/deprecated.rst @@ -169,6 +169,26 @@ Use ``job-finalize`` instead. =20 This argument has always been ignored. =20 +Human Machine Protocol (HMP) commands +------------------------------------- + +``wavcapture`` (since 10.2) +'''''''''''''''''''''''''''' + +The ``wavcapture`` command is deprecated and will be removed in a future r= elease. + +Use ``-audiodev wav`` or your host audio system to capture audio. + +``stopcapture`` (since 10.2) +'''''''''''''''''''''''''''' + +The ``stopcapture`` command is deprecated and will be removed in a future = release. + +``info`` argument ``capture`` (since 10.2) +'''''''''''''''''''''''''''''''''''''''''' + +The ``info capture`` command is deprecated and will be removed in a future= release. + Host Architectures ------------------ =20 diff --git a/meson.build b/meson.build index afaefa0172..0a2401e11e 100644 --- a/meson.build +++ b/meson.build @@ -2354,6 +2354,7 @@ endif config_host_data =3D configuration_data() =20 config_host_data.set('CONFIG_HAVE_RUST', have_rust) +config_host_data.set('CONFIG_AUDIO_HMP', get_option('audio_hmp')) audio_drivers_selected =3D [] if have_system audio_drivers_available =3D { @@ -5105,3 +5106,11 @@ if not actually_reloc and (host_os =3D=3D 'windows' = or get_option('relocatable')) message('QEMU will have to be installed under ' + get_option('prefix') += '.') message('Use --disable-relocatable to remove this warning.') endif + +if get_option('audio_hmp') + message() + warning('DEPRECATED HMP audio commands') + message() + message('If you want to keep supporting this command, please') + message('contact the developers at qemu-devel@nongnu.org.') +endif diff --git a/audio/meson.build b/audio/meson.build index 59f0a431d5..ca2ef2a8f3 100644 --- a/audio/meson.build +++ b/audio/meson.build @@ -1,12 +1,15 @@ system_ss.add([spice_headers, files('audio.c')]) system_ss.add(files( - 'audio-hmp-cmds.c', + 'audio.c', 'mixeng.c', 'noaudio.c', 'wavaudio.c', - 'wavcapture.c', )) =20 +if get_option('audio_hmp') + system_ss.add(files('audio-hmp-cmds.c', 'wavcapture.c')) +endif + system_ss.add(when: coreaudio, if_true: files('coreaudio.m')) system_ss.add(when: dsound, if_true: files('dsoundaudio.c', 'audio_win_int= .c')) =20 diff --git a/hmp-commands-info.hx b/hmp-commands-info.hx index 25b4aed51f..59f3446224 100644 --- a/hmp-commands-info.hx +++ b/hmp-commands-info.hx @@ -363,6 +363,7 @@ SRST Show host USB devices. ERST =20 +#ifdef CONFIG_AUDIO_HMP { .name =3D "capture", .args_type =3D "", @@ -375,6 +376,7 @@ SRST ``info capture`` Show capture information. ERST +#endif =20 { .name =3D "snapshots", diff --git a/hmp-commands.hx b/hmp-commands.hx index 15f6082596..414e2d2d1e 100644 --- a/hmp-commands.hx +++ b/hmp-commands.hx @@ -764,6 +764,7 @@ SRST =20 ERST =20 +#ifdef CONFIG_AUDIO_HMP { .name =3D "wavcapture", .args_type =3D "path:F,audiodev:s,freq:i?,bits:i?,nchannels:i?", @@ -798,6 +799,7 @@ SRST info capture =20 ERST +#endif =20 { .name =3D "memsave", @@ -1090,7 +1092,7 @@ ERST =20 SRST ``dump-guest-memory [-p]`` *filename* *begin* *length* - \=20 + \ ``dump-guest-memory [-z|-l|-s|-w]`` *filename* Dump guest memory to *protocol*. The file can be processed with crash or gdb. Without ``-z|-l|-s|-w``, the dump format is ELF. diff --git a/meson_options.txt b/meson_options.txt index 2836156257..d0fa75f1cf 100644 --- a/meson_options.txt +++ b/meson_options.txt @@ -39,6 +39,9 @@ option('coroutine_backend', type: 'combo', option('gdb', type: 'string', value: '', description: 'Path to GDB') =20 +option('audio_hmp', type: 'boolean', value: true, + description: 'enable HMP commands for audio', deprecated: true) + # Everything else can be set via --enable/--disable-* option # on the configure script command line. After adding an option # here make sure to run "make update-buildoptions". diff --git a/scripts/meson-buildoptions.sh b/scripts/meson-buildoptions.sh index 3d0d132344..44ef7900f0 100644 --- a/scripts/meson-buildoptions.sh +++ b/scripts/meson-buildoptions.sh @@ -11,6 +11,7 @@ meson_options_help() { printf "%s\n" ' set block driver read-write wh= itelist (by default' printf "%s\n" ' affects only QEMU, not tools l= ike qemu-img)' printf "%s\n" ' --datadir=3DVALUE Data file directory [share]' + printf "%s\n" ' --disable-audio-hmp enable HMP commands for audio' printf "%s\n" ' --disable-coroutine-pool coroutine freelist (better per= formance)' printf "%s\n" ' --disable-debug-info Enable debug symbols and other= information' printf "%s\n" ' --disable-hexagon-idef-parser' @@ -244,6 +245,8 @@ _meson_option_parse() { --enable-attr) printf "%s" -Dattr=3Denabled ;; --disable-attr) printf "%s" -Dattr=3Ddisabled ;; --audio-drv-list=3D*) quote_sh "-Daudio_drv_list=3D$2" ;; + --enable-audio-hmp) printf "%s" -Daudio_hmp=3Dtrue ;; + --disable-audio-hmp) printf "%s" -Daudio_hmp=3Dfalse ;; --enable-auth-pam) printf "%s" -Dauth_pam=3Denabled ;; --disable-auth-pam) printf "%s" -Dauth_pam=3Ddisabled ;; --enable-gcov) printf "%s" -Db_coverage=3Dtrue ;; --=20 2.51.0