Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/2196772/?format=api
{ "id": 2196772, "url": "http://patchwork.ozlabs.org/api/patches/2196772/?format=api", "web_url": "http://patchwork.ozlabs.org/project/qemu-devel/patch/20260216-audio-v1-7-edcb25699381@redhat.com/", "project": { "id": 14, "url": "http://patchwork.ozlabs.org/api/projects/14/?format=api", "name": "QEMU Development", "link_name": "qemu-devel", "list_id": "qemu-devel.nongnu.org", "list_email": "qemu-devel@nongnu.org", "web_url": "", "scm_url": "", "webscm_url": "", "list_archive_url": "", "list_archive_url_format": "", "commit_url_format": "" }, "msgid": "<20260216-audio-v1-7-edcb25699381@redhat.com>", "list_archive_url": null, "date": "2026-02-16T10:42:19", "name": "[07/85] audio: replace vm_running with runstate_is_running()", "commit_ref": null, "pull_url": null, "state": "new", "archived": false, "hash": "0404659a0f82eaec5c417ff5688ae802be563ac0", "submitter": { "id": 66774, "url": "http://patchwork.ozlabs.org/api/people/66774/?format=api", "name": "Marc-André Lureau", "email": "marcandre.lureau@redhat.com" }, "delegate": null, "mbox": "http://patchwork.ozlabs.org/project/qemu-devel/patch/20260216-audio-v1-7-edcb25699381@redhat.com/mbox/", "series": [ { "id": 492288, "url": "http://patchwork.ozlabs.org/api/series/492288/?format=api", "web_url": "http://patchwork.ozlabs.org/project/qemu-devel/list/?series=492288", "date": "2026-02-16T10:42:12", "name": "audio: cleanups & add a manual test", "version": 1, "mbox": "http://patchwork.ozlabs.org/series/492288/mbox/" } ], "comments": "http://patchwork.ozlabs.org/api/patches/2196772/comments/", "check": "pending", "checks": "http://patchwork.ozlabs.org/api/patches/2196772/checks/", "tags": {}, "related": [], "headers": { "Return-Path": "<qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org>", "X-Original-To": "incoming@patchwork.ozlabs.org", "Delivered-To": "patchwork-incoming@legolas.ozlabs.org", "Authentication-Results": [ "legolas.ozlabs.org;\n\tdkim=pass (1024-bit key;\n unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256\n header.s=mimecast20190719 header.b=enPHstVU;\n\tdkim-atps=neutral", "legolas.ozlabs.org;\n spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org\n (client-ip=209.51.188.17; helo=lists.gnu.org;\n envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org;\n receiver=patchwork.ozlabs.org)" ], "Received": [ "from lists.gnu.org (lists.gnu.org [209.51.188.17])\n\t(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))\n\t(No client certificate requested)\n\tby legolas.ozlabs.org (Postfix) with ESMTPS id 4fDzsV1X83z1xwF\n\tfor <incoming@patchwork.ozlabs.org>; Mon, 16 Feb 2026 21:43:58 +1100 (AEDT)", "from localhost ([::1] helo=lists1p.gnu.org)\n\tby lists.gnu.org with esmtp (Exim 4.90_1)\n\t(envelope-from <qemu-devel-bounces@nongnu.org>)\n\tid 1vrw4s-0002BG-Ir; Mon, 16 Feb 2026 05:43:43 -0500", "from eggs.gnu.org ([2001:470:142:3::10])\n by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)\n (Exim 4.90_1) (envelope-from <marcandre.lureau@redhat.com>)\n id 1vrw4H-0001s5-UB\n for qemu-devel@nongnu.org; Mon, 16 Feb 2026 05:43:07 -0500", "from us-smtp-delivery-124.mimecast.com ([170.10.129.124])\n by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)\n (Exim 4.90_1) (envelope-from <marcandre.lureau@redhat.com>)\n id 1vrw4G-00011g-FZ\n for qemu-devel@nongnu.org; Mon, 16 Feb 2026 05:43:05 -0500", "from mx-prod-mc-03.mail-002.prod.us-west-2.aws.redhat.com\n (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by\n relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3,\n cipher=TLS_AES_256_GCM_SHA384) id us-mta-661-LiECF5iUNvSo8CPkGrGdMQ-1; Mon,\n 16 Feb 2026 05:43:00 -0500", "from mx-prod-int-08.mail-002.prod.us-west-2.aws.redhat.com\n (mx-prod-int-08.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.111])\n (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)\n key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest\n SHA256)\n (No client certificate requested)\n by mx-prod-mc-03.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS\n id D4B8D1956061; Mon, 16 Feb 2026 10:42:57 +0000 (UTC)", "from localhost (unknown [10.45.242.26])\n by mx-prod-int-08.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP\n id 4E3E41800465; Mon, 16 Feb 2026 10:42:57 +0000 (UTC)" ], "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com;\n s=mimecast20190719; t=1771238583;\n h=from:from:reply-to:subject:subject:date:date:message-id:message-id:\n to:to:cc:cc:mime-version:mime-version:content-type:content-type:\n content-transfer-encoding:content-transfer-encoding:\n in-reply-to:in-reply-to:references:references;\n bh=D9XkBQ/oXbUz12+FCnU0YeeeK3GbFA4EHm+vljyv3ok=;\n b=enPHstVUB80gToFofp3ddLRM11wArRoePsgfCLLui+0FOyd3GKc2RvhER14Nvli5IVp/qk\n /yN9TbRyu4xGXkcQFTCTvcrzIUu+XNYJK9BBohpArkVz1ApIdMC5z8zk64JFIlz84Aq+YF\n lc2BKT5KQc6q68XDh7o1vzgMjTZEfns=", "X-MC-Unique": "LiECF5iUNvSo8CPkGrGdMQ-1", "X-Mimecast-MFC-AGG-ID": "LiECF5iUNvSo8CPkGrGdMQ_1771238578", "From": "=?utf-8?q?Marc-Andr=C3=A9_Lureau?= <marcandre.lureau@redhat.com>", "Date": "Mon, 16 Feb 2026 11:42:19 +0100", "Subject": "[PATCH 07/85] audio: replace vm_running with runstate_is_running()", "MIME-Version": "1.0", "Content-Type": "text/plain; charset=\"utf-8\"", "Content-Transfer-Encoding": "8bit", "Message-Id": "<20260216-audio-v1-7-edcb25699381@redhat.com>", "References": "<20260216-audio-v1-0-edcb25699381@redhat.com>", "In-Reply-To": "<20260216-audio-v1-0-edcb25699381@redhat.com>", "To": "qemu-devel@nongnu.org", "Cc": "Gerd Hoffmann <kraxel@redhat.com>, Eduardo Habkost <eduardo@habkost.net>,\n Paolo Bonzini <pbonzini@redhat.com>,\n =?utf-8?q?Daniel_P=2E_Berrang=C3=A9?= <berrange@redhat.com>, =?utf-8?q?Phil?=\n\t=?utf-8?q?ippe_Mathieu-Daud=C3=A9?= <philmd@linaro.org>,\n John Snow <jsnow@redhat.com>, Cleber Rosa <crosa@redhat.com>,\n Christian Schoenebeck <qemu_oss@crudebyte.com>,\n Akihiko Odaki <odaki@rsg.ci.i.u-tokyo.ac.jp>,\n Thomas Huth <huth@tuxfamily.org>, Alexandre Ratchov <alex@caoua.org>,\n\t=?utf-8?q?Alex_Benn=C3=A9e?= <alex.bennee@linaro.org>,\n Laurent Vivier <laurent@vivier.eu>, \"Michael S. Tsirkin\" <mst@redhat.com>,\n Manos Pitsidianakis <manos.pitsidianakis@linaro.org>,\n Alistair Francis <alistair@alistair23.me>,\n \"Edgar E. Iglesias\" <edgar.iglesias@gmail.com>,\n Peter Maydell <peter.maydell@linaro.org>, qemu-arm@nongnu.org, =?utf-8?q?M?=\n\t=?utf-8?q?arc-Andr=C3=A9_Lureau?= <marcandre.lureau@redhat.com>,\n Mark Cave-Ayland <mark.caveayland@nutanix.com>", "X-Developer-Signature": "v=1; a=openpgp-sha256; l=2337;\n i=marcandre.lureau@redhat.com; h=from:subject:message-id;\n bh=n+3siSegRS3y0Lxy97FkNncK5ldFf6lqIw8dDZCokNw=;\n b=owEBbQKS/ZANAwAKAdro4Ql1lpzlAcsmYgBpkvSTPmqaLxLA/HnmcaTTCsvqE3vdDiQVPpbzs\n RWr6Rwjk4qJAjMEAAEKAB0WIQSHqb2TP4fGBtJ29i3a6OEJdZac5QUCaZL0kwAKCRDa6OEJdZac\n 5WnBD/0Wpu3HWqfd4pfZYaECQPFMgJuX4qlciR3vERz8tz2i9ViuKGz2MPe3enDc6GPfT5nRsUG\n +o/IR2SIGrF5CKUDBLemoWaT7csiIVoWmgPri5wF1nNmbcQ+lvOHVFE5qfkkahsYyTsRgjmX5Jf\n Jm6m37g/3mdulv98jEMNkDQKvPoDL+7ikHooELlFQaxTs5r0t7r+PWkzlIkOuv3xBdaWKAjnebC\n 24s2fgpb3CFmx0He6hurj7sJR8CTWOLlj61P5IRuncr1szCQxAtB9XJGwB6rMzitph28+amAWFq\n o9N+2x2+AyZ7A/yjQggRwDNg+i1PCIhpNL/3ECDAWhQyumYfljyCMmyOcR+UXi6gZvXE//fi9K8\n zE4mu1J7KNZrFajgN+DKVBR/Xd+l24weCfGRTjlTPf2Hm5dCsRDmyQG0QWsJgKLG/GrNFxPnISo\n owjfC6+XH8a5fUmQyICurK2YGakinVR0XyY1vPjiYm+Y1WPtie2BuAbF1h7YSrNn1ADPp9jbBHR\n S11vwda+8DE7AyPZFAyI1+a+5RXWjNozAHPvuSMgG6uwbGYdxPHU/GjBEtDSRf4QdlUYqAqq7Zc\n 7e8ylb8ruQrclQRkXkiiDWwcJu/uLje+tkSxW5qJXrdbSg7wGmTIgbiPI9ZL3FSEchlfaeskMAz\n vhLGGEXijI+/M0A==", "X-Developer-Key": "i=marcandre.lureau@redhat.com; a=openpgp;\n fpr=87A9BD933F87C606D276F62DDAE8E10975969CE5", "X-Scanned-By": "MIMEDefang 3.4.1 on 10.30.177.111", "Received-SPF": "pass client-ip=170.10.129.124;\n envelope-from=marcandre.lureau@redhat.com;\n 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,\n DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1,\n RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001,\n RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, RCVD_IN_VALIDITY_SAFE_BLOCKED=0.001,\n 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": "qemu development <qemu-devel.nongnu.org>", "List-Unsubscribe": "<https://lists.nongnu.org/mailman/options/qemu-devel>,\n <mailto:qemu-devel-request@nongnu.org?subject=unsubscribe>", "List-Archive": "<https://lists.nongnu.org/archive/html/qemu-devel>", "List-Post": "<mailto:qemu-devel@nongnu.org>", "List-Help": "<mailto:qemu-devel-request@nongnu.org?subject=help>", "List-Subscribe": "<https://lists.nongnu.org/mailman/listinfo/qemu-devel>,\n <mailto:qemu-devel-request@nongnu.org?subject=subscribe>", "Errors-To": "qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org", "Sender": "qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org" }, "content": "AudioBackend had a vm_running field which was set in\naudio_vm_change_state_handler().\n\nThe state change handler \"bool running\" argument is true when\nvm_prepare_start() calls it, and the VM runstate is either SUSPENDED or\nRUNNING.\n\nAudio hw voices shouldn't be running when the VM is suspended, but only\nwhen running. Thus replacing the vm_running field with a call to\nrunstate_is_running() is both simpler and more correct.\n\nSigned-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>\nReviewed-by: Mark Cave-Ayland <mark.caveayland@nutanix.com>\n---\n audio/audio_int.h | 1 -\n audio/audio.c | 5 ++---\n 2 files changed, 2 insertions(+), 4 deletions(-)", "diff": "diff --git a/audio/audio_int.h b/audio/audio_int.h\nindex 20b4c87b0b6..25de0e3f9cf 100644\n--- a/audio/audio_int.h\n+++ b/audio/audio_int.h\n@@ -252,7 +252,6 @@ typedef struct AudioBackend {\n QLIST_HEAD (cap_listhead, CaptureVoiceOut) cap_head;\n int nb_hw_voices_out;\n int nb_hw_voices_in;\n- int vm_running;\n int64_t period_ticks;\n \n bool timer_running;\ndiff --git a/audio/audio.c b/audio/audio.c\nindex 9563583cd1e..68698b13e15 100644\n--- a/audio/audio.c\n+++ b/audio/audio.c\n@@ -933,7 +933,7 @@ void AUD_set_active_out(SWVoiceOut *sw, bool on)\n hw->pending_disable = 0;\n if (!hw->enabled) {\n hw->enabled = true;\n- if (s->vm_running) {\n+ if (runstate_is_running()) {\n if (hw->pcm_ops->enable_out) {\n hw->pcm_ops->enable_out(hw, true);\n }\n@@ -979,7 +979,7 @@ void AUD_set_active_in(SWVoiceIn *sw, bool on)\n if (on) {\n if (!hw->enabled) {\n hw->enabled = true;\n- if (s->vm_running) {\n+ if (runstate_is_running()) {\n if (hw->pcm_ops->enable_in) {\n hw->pcm_ops->enable_in(hw, true);\n }\n@@ -1598,7 +1598,6 @@ static void audio_vm_change_state_handler (void *opaque, bool running,\n HWVoiceOut *hwo = NULL;\n HWVoiceIn *hwi = NULL;\n \n- s->vm_running = running;\n while ((hwo = audio_pcm_hw_find_any_enabled_out(s, hwo))) {\n if (hwo->pcm_ops->enable_out) {\n hwo->pcm_ops->enable_out(hwo, running);\n", "prefixes": [ "07/85" ] }