From nobody Fri Nov 14 18:23:19 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=1761893514; cv=none; d=zohomail.com; s=zohoarc; b=PrHz715XeTpZb0KS3SVb4Osw2wHWV58Hm8+gynadzpqtn7NTWat5MX/IfQwPd52yInnnrKtMO2hcOCDl9kOV0FlML2jJ+NgvKRZ1w/9/uRYTspv1VmA6RP+ssaXBLVDegEb/6bSDmPoCF4HEP9Vm/JOfWjCVKJ4kG7rkPbggSOE= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1761893514; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Owner:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:Reply-To:References:Subject:Subject:To:To:Message-Id; bh=fbPBC/kbbxjTAHogvMh1uN5OqrpzsFVG1nGmmsuw47c=; b=e7ncp4+f7ijGSOF5mlE9j5L+S/F0SLLq5AQ58auD5JD59Q770KxiAgekhTHM+hxuaMVC2DGust52FeSiRpZKFpA4PHo5ZzUfaHD9YXV4XZaPmKnTXMS54MDTjQK3IAoImZjOszqF8WqhleWCGf5A4w0ISOLQbyckLnMh6OuxO2s= 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 1761893514494366.0831778894087; Thu, 30 Oct 2025 23:51:54 -0700 (PDT) Received: by lists.libvirt.org (Postfix, from userid 993) id A03C23F341; Fri, 31 Oct 2025 02:51:50 -0400 (EDT) Received: from [172.19.199.29] (lists.libvirt.org [8.43.85.245]) by lists.libvirt.org (Postfix) with ESMTP id 1BF6B43F41; Fri, 31 Oct 2025 02:50:45 -0400 (EDT) Received: by lists.libvirt.org (Postfix, from userid 993) id 92D5441A31; Fri, 31 Oct 2025 02:50:38 -0400 (EDT) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.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 6D9CB41C2D for ; Fri, 31 Oct 2025 02:50:35 -0400 (EDT) Received: from mx-prod-mc-06.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-444-d25_UxdKMKGnZrGD3eT6xQ-1; Fri, 31 Oct 2025 02:50:32 -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-06.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 27B251833786; Fri, 31 Oct 2025 06:50:31 +0000 (UTC) Received: from localhost (unknown [10.45.242.5]) by mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 87BBF1955BE3; Fri, 31 Oct 2025 06:50:29 +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=-5.0 required=5.0 tests=BAYES_00,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=1761893435; 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: in-reply-to:in-reply-to:references:references; bh=fbPBC/kbbxjTAHogvMh1uN5OqrpzsFVG1nGmmsuw47c=; b=bf7LVd8RU+NCNYff392Pw4Ni9I6iJkzd+x1DOWzE/XIybT3T6W2XR8ecuGfu4raM8/zjyx Zp74pCdJ6F5p62h0v0Ck+10U+ZbHw9dvD1bSbxpC34KIbnLbJeJjFiuWWRjlyCW/Pq/5rw NXlBlsg8DHsGohUW32VTrWMKnyJFtgM= X-MC-Unique: d25_UxdKMKGnZrGD3eT6xQ-1 X-Mimecast-MFC-AGG-ID: d25_UxdKMKGnZrGD3eT6xQ_1761893431 To: qemu-devel@nongnu.org Subject: [PULL 36/36] audio: deprecate HMP audio commands Date: Fri, 31 Oct 2025 10:46:29 +0400 Message-ID: <20251031064631.134651-37-marcandre.lureau@redhat.com> In-Reply-To: <20251031064631.134651-1-marcandre.lureau@redhat.com> References: <20251031064631.134651-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: AHNLK746KWZGTPRMDJUCHEJ533CQWARJ X-Message-ID-Hash: AHNLK746KWZGTPRMDJUCHEJ533CQWARJ 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: richard.henderson@linaro.org, =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= , Gerd Hoffmann , "reviewer:Incompatible changes" , "Dr. David Alan Gilbert" 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: 1761893515199158500 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 Acked-by: Dr. David Alan Gilbert Reviewed-by: Daniel P. Berrang=C3=A9 Message-Id: <20251022105753.1474739-1-marcandre.lureau@redhat.com> --- docs/about/deprecated.rst | 20 ++++++++++++++++++++ audio/audio-hmp-cmds.c | 7 +++++++ audio/meson.build | 5 +++-- hmp-commands-info.hx | 6 ++++-- hmp-commands.hx | 9 +++++++-- 5 files changed, 41 insertions(+), 6 deletions(-) diff --git a/docs/about/deprecated.rst b/docs/about/deprecated.rst index ca6b3769b5..4ee98d6646 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/audio/audio-hmp-cmds.c b/audio/audio-hmp-cmds.c index 1e56af21ab..1ffb5ebc74 100644 --- a/audio/audio-hmp-cmds.c +++ b/audio/audio-hmp-cmds.c @@ -28,6 +28,7 @@ #include "monitor/monitor.h" #include "qapi/error.h" #include "qobject/qdict.h" +#include "qemu/error-report.h" =20 static QLIST_HEAD (capture_list_head, CaptureState) capture_head; =20 @@ -36,6 +37,8 @@ void hmp_info_capture(Monitor *mon, const QDict *qdict) int i; CaptureState *s; =20 + warn_report_once("'info capture' is deprecated since v10.2, to be remo= ved"); + for (s =3D capture_head.lh_first, i =3D 0; s; s =3D s->entries.le_next= , ++i) { monitor_printf(mon, "[%d]: ", i); s->ops.info (s->opaque); @@ -48,6 +51,8 @@ void hmp_stopcapture(Monitor *mon, const QDict *qdict) int n =3D qdict_get_int(qdict, "n"); CaptureState *s; =20 + warn_report_once("'stopcapture' is deprecated since v10.2, to be remov= ed"); + for (s =3D capture_head.lh_first, i =3D 0; s; s =3D s->entries.le_next= , ++i) { if (i =3D=3D n) { s->ops.destroy (s->opaque); @@ -69,6 +74,8 @@ void hmp_wavcapture(Monitor *mon, const QDict *qdict) Error *local_err =3D NULL; AudioBackend *as =3D audio_be_by_name(audiodev, &local_err); =20 + warn_report_once("'wavcapture' is deprecated since v10.2, to be remove= d"); + if (!as) { error_report_err(local_err); return; diff --git a/audio/meson.build b/audio/meson.build index 37789437fb..b2dca2c640 100644 --- a/audio/meson.build +++ b/audio/meson.build @@ -1,12 +1,13 @@ system_ss.add(files( 'audio.c', - 'audio-hmp-cmds.c', 'mixeng.c', 'noaudio.c', 'wavaudio.c', - 'wavcapture.c', )) =20 +# deprecated since v10.2, to be removed +system_ss.add(files('audio-hmp-cmds.c', 'wavcapture.c')) + 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 2a7f5810d7..41674dcbe1 100644 --- a/hmp-commands-info.hx +++ b/hmp-commands-info.hx @@ -363,18 +363,20 @@ SRST Show host USB devices. ERST =20 +/* BEGIN deprecated */ { .name =3D "capture", .args_type =3D "", .params =3D "", - .help =3D "show capture information", + .help =3D "show capture information (deprecated)", .cmd =3D hmp_info_capture, }, =20 SRST ``info capture`` - Show capture information. + Show capture information (deprecated). ERST +/* END deprecated */ =20 { .name =3D "snapshots", diff --git a/hmp-commands.hx b/hmp-commands.hx index 15f6082596..5cc4788f12 100644 --- a/hmp-commands.hx +++ b/hmp-commands.hx @@ -764,11 +764,12 @@ SRST =20 ERST =20 +/* BEGIN deprecated */ { .name =3D "wavcapture", .args_type =3D "path:F,audiodev:s,freq:i?,bits:i?,nchannels:i?", .params =3D "path audiodev [frequency [bits [channels]]]", - .help =3D "capture audio to a wave file (default frequency= =3D44100 bits=3D16 channels=3D2)", + .help =3D "capture audio to a wave file (deprecated, default= frequency=3D44100 bits=3D16 channels=3D2)", .cmd =3D hmp_wavcapture, }, SRST @@ -782,13 +783,15 @@ SRST - Sample rate =3D 44100 Hz - CD quality - Bits =3D 16 - Number of channels =3D 2 - Stereo + + Deprecated. ERST =20 { .name =3D "stopcapture", .args_type =3D "n:i", .params =3D "capture index", - .help =3D "stop capture", + .help =3D "stop capture (deprecated)", .cmd =3D hmp_stopcapture, }, SRST @@ -797,7 +800,9 @@ SRST =20 info capture =20 + Deprecated. ERST +/* END deprecated */ =20 { .name =3D "memsave", --=20 2.51.1