From nobody Tue Oct 28 08:18:13 2025 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=quarantine dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1761130753; cv=none; d=zohomail.com; s=zohoarc; b=WMPHegZMaEfaANbjvdxhwFdLZhmm0z1IUaEiA1Ka0lDa7N/frhVt5YllbHkDhWaPOaosVyksdh87H1riXHYKI4VSJsGKuDHuLZiKl+s0Du73gMjIEITRjyO2zaS6zHb4DpGJiJ9lp9MN5QZ3zBf17rssXEYEOQZFDhvof8XeYy4= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1761130753; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=kBfjwrWaeU08zARbDtJ5eMY4XK1z9CrhTFoPTZP0e+A=; b=DJw6mDeRmzKjGHu8ZIl1tav6ivcJF8tgRcjKCIIPADMWbxCNTyfqlhSbJubgTLfdJN0Sapkcpok4cGh4HZpssfxyS6ckANhGl2vrmfxpLNABFq8Ro71KY+b/Ftnl7KyjpxnS0+HMf1Hr/OX+kgxB+ooM1FgD5X4AbgBMRNpUgHs= 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=quarantine dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1761130753719485.75096706924035; Wed, 22 Oct 2025 03:59:13 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1vBWXj-0000gR-Jr; Wed, 22 Oct 2025 06:58:11 -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 1vBWXh-0000g5-7j for qemu-devel@nongnu.org; Wed, 22 Oct 2025 06:58:09 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1vBWXd-00052p-P1 for qemu-devel@nongnu.org; Wed, 22 Oct 2025 06:58:08 -0400 Received: from mx-prod-mc-03.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-637-m7t13Q9kNMaupEBR_bL13Q-1; Wed, 22 Oct 2025 06:58:00 -0400 Received: from mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.93]) (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-03.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 56A3F1956050; Wed, 22 Oct 2025 10:57:59 +0000 (UTC) Received: from localhost (unknown [10.44.22.9]) by mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 12BF918003FC; Wed, 22 Oct 2025 10:57:56 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1761130682; 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=kBfjwrWaeU08zARbDtJ5eMY4XK1z9CrhTFoPTZP0e+A=; b=YROCHPNLfn7QM2ZMjoHZqc4odk8dMz0brwDDLQ+cIxLfCvKdRci+PP6w4EL/xHYc6fdpd1 zGu82lcu2PyDfbbxzSBTC3wh9MHUVppuvi6k3tVx2jC0f1XOh4Intp1m+SQqzZ1lhbkthD rZeehL5+LYlGBAeRVc+eVfoHqBkxQVE= X-MC-Unique: m7t13Q9kNMaupEBR_bL13Q-1 X-Mimecast-MFC-AGG-ID: m7t13Q9kNMaupEBR_bL13Q_1761130679 From: marcandre.lureau@redhat.com To: qemu-devel@nongnu.org Cc: berrange@redhat.com, =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= , Gerd Hoffmann , devel@lists.libvirt.org (reviewer:Incompatible changes), "Dr. David Alan Gilbert" Subject: [PATCH v3] audio: deprecate HMP audio commands Date: Wed, 22 Oct 2025 14:57:53 +0400 Message-ID: <20251022105753.1474739-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.4.1 on 10.30.177.93 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=170.10.129.124; envelope-from=marcandre.lureau@redhat.com; helo=us-smtp-delivery-124.mimecast.com 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, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, RCVD_IN_VALIDITY_SAFE_BLOCKED=0.001, SPF_HELO_PASS=-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: 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 @redhat.com) X-ZM-MESSAGEID: 1761130766824158501 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 --- 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 dacf2882e4..31445dfc61 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 8774c09f18..9129a02331 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; AudioState *as =3D audio_state_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 59f0a431d5..f0c97e5223 100644 --- a/audio/meson.build +++ b/audio/meson.build @@ -1,12 +1,13 @@ system_ss.add([spice_headers, files('audio.c')]) system_ss.add(files( - '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 25b4aed51f..8d3d180637 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.0