Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/2196836/?format=api
{ "id": 2196836, "url": "http://patchwork.ozlabs.org/api/patches/2196836/?format=api", "web_url": "http://patchwork.ozlabs.org/project/qemu-devel/patch/20260216-audio-v1-80-e676662e4514@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-80-e676662e4514@redhat.com>", "list_archive_url": null, "date": "2026-02-16T11:16:09", "name": "[80/85] audio: rework invalid audsettings error", "commit_ref": null, "pull_url": null, "state": "new", "archived": false, "hash": "e1bb5dd67067cc2c03bdee30645c9f6094326e65", "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-80-e676662e4514@redhat.com/mbox/", "series": [ { "id": 492294, "url": "http://patchwork.ozlabs.org/api/series/492294/?format=api", "web_url": "http://patchwork.ozlabs.org/project/qemu-devel/list/?series=492294", "date": "2026-02-16T11:14:52", "name": "audio: cleanups & add a manual test", "version": 1, "mbox": "http://patchwork.ozlabs.org/series/492294/mbox/" } ], "comments": "http://patchwork.ozlabs.org/api/patches/2196836/comments/", "check": "pending", "checks": "http://patchwork.ozlabs.org/api/patches/2196836/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=Ia6TSTDx;\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 4fF0ll5pqWz1xxy\n\tfor <incoming@patchwork.ozlabs.org>; Mon, 16 Feb 2026 22:24:03 +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 1vrwfU-0007XQ-Ow; Mon, 16 Feb 2026 06:21:32 -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 1vrwdY-0000co-Jb\n for qemu-devel@nongnu.org; Mon, 16 Feb 2026 06:19:34 -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 1vrwdW-0008WR-Vf\n for qemu-devel@nongnu.org; Mon, 16 Feb 2026 06:19:32 -0500", "from mx-prod-mc-08.mail-002.prod.us-west-2.aws.redhat.com\n (ec2-35-165-154-97.us-west-2.compute.amazonaws.com [35.165.154.97]) by\n relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3,\n cipher=TLS_AES_256_GCM_SHA384) id us-mta-157-qBn4hfwiOxy1PhneU5GLmw-1; Mon,\n 16 Feb 2026 06:19:26 -0500", "from mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com\n (mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.4])\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-08.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS\n id 416311800352; Mon, 16 Feb 2026 11:19:24 +0000 (UTC)", "from localhost (unknown [10.45.242.26])\n by mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP\n id 490CC30001A5; Mon, 16 Feb 2026 11:19:23 +0000 (UTC)" ], "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com;\n s=mimecast20190719; t=1771240770;\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=m0EmStvnfux6SRdwIes6737BLoqxJP2yVeKJO8MbGz4=;\n b=Ia6TSTDxJzKU3qSdV5mt3XQGVq4pP41EgXQgxYj3+seoeyQHiS8JtC9bhkwPgKQiFuDokq\n 0Yg/qR0L47BVD2Ux67w2vehwVcBJJ+Z06BJnxXbfHZlRidP6qJGMBTfy8wV+w+cY4oGGQO\n J8MgST20xixhko2QKcqlAna9qaME9xY=", "X-MC-Unique": "qBn4hfwiOxy1PhneU5GLmw-1", "X-Mimecast-MFC-AGG-ID": "qBn4hfwiOxy1PhneU5GLmw_1771240764", "From": "=?utf-8?q?Marc-Andr=C3=A9_Lureau?= <marcandre.lureau@redhat.com>", "Date": "Mon, 16 Feb 2026 12:16:09 +0100", "Subject": "[PATCH 80/85] audio: rework invalid audsettings error", "MIME-Version": "1.0", "Content-Type": "text/plain; charset=\"utf-8\"", "Content-Transfer-Encoding": "8bit", "Message-Id": "<20260216-audio-v1-80-e676662e4514@redhat.com>", "References": "<20260216-audio-v1-0-e676662e4514@redhat.com>", "In-Reply-To": "<20260216-audio-v1-0-e676662e4514@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=3338;\n i=marcandre.lureau@redhat.com; h=from:subject:message-id;\n bh=DOJovR/J2k1KAla05HmsB7pR9pRP9RvnTgMZQuarhDc=;\n b=owEBbQKS/ZANAwAKAdro4Ql1lpzlAcsmYgBpkvxSnXO32iYEl8o8zZV2F9Oh/JWAlwWg37ikc\n r7xIdTzuR6JAjMEAAEKAB0WIQSHqb2TP4fGBtJ29i3a6OEJdZac5QUCaZL8UgAKCRDa6OEJdZac\n 5aVEEACh9XvMthEFPQywxqOzatqETNSiy+JPT0Xu3afRti/u4CYaGO1uPl/mL39QskvYmUU79pW\n UAbDvbOzfLl3X4ABUSXsI6Txh1W4V1GoeY7CZrEW7X/hG7MuF6wgaIZUwlMa6ycLtpwqrfszJo7\n sWW92UWAd+XbYASkT2nMVj7rRNcsk3MKoAJ1F5LveFmJ1Cj/kEjspvjS05sMOGVQJTja2LPt7dU\n vcxTrol5D/Hes2WClKpxZrm4MqHHGlrC1n+9JnFjaV7Y/+99/k50jnp1L1QuLf6KEKd+gABOJB6\n NW6o6mE83UskEDBuSfc5U2SOR0YLi+QKBGbPdC5lhfgULyEClCqD263BkVdvvwOvYPgbZ/Bd4kG\n S4dfBvZWaEVGKadD+CflRzdbxWi/oZC9b/QpsLeCXuTiCPoybRpki0BfZts55DchoScL0JAxYpJ\n hE7wcsudaVF6mi+AMbHtiuAFRrlA7/v6fE2FYOObiBjIaQT4DSPAfNwP6es4njGz6iDmM1VOLwH\n r6lDXyGNQ9D/W2a3zmDoJ5w6UDTfs4tWEa0+uSZ3kxRws9JeBxCWUk6mexV3AO+Jeor5HZcloOZ\n 8TiODYoCUOLdcBPlY+DM7h1tWmnZGnHdn1kVXtZnVUfotxpjLYPVT1BB3b5/x/kImG7yNHESnud\n ppkdaJCERvAbbnA==", "X-Developer-Key": "i=marcandre.lureau@redhat.com; a=openpgp;\n fpr=87A9BD933F87C606D276F62DDAE8E10975969CE5", "X-Scanned-By": "MIMEDefang 3.4.1 on 10.30.177.4", "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": "Currently, when given invalid settings, QEMU will print to stderr:\n\nA bug was just triggered in audio_mixeng_backend_open_out\nSave all your work and restart without audio\nI am sorry\nContext:\naudio: frequency=44100 nchannels=0 fmt=S16 endianness=little\n\nNow it will use error_report() and simply report:\naudio: Invalid audio settings: frequency=44100 nchannels=0 fmt=s16 endian=little\n\nSigned-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>\nReviewed-by: Mark Cave-Ayland <mark.caveayland@nutanix.com>\n---\n audio/audio_template.h | 5 +++--\n audio/audio-mixeng-be.c | 41 +++++++----------------------------------\n 2 files changed, 10 insertions(+), 36 deletions(-)", "diff": "diff --git a/audio/audio_template.h b/audio/audio_template.h\nindex e884c8e9b1a..5711f4a26e1 100644\n--- a/audio/audio_template.h\n+++ b/audio/audio_template.h\n@@ -513,8 +513,9 @@ static SW *glue(audio_mixeng_backend_open_, TYPE) (\n trace_audio_open_in(name, as->freq, as->nchannels, as->fmt);\n #endif\n \n- if (audio_bug(__func__, audio_validate_settings(as))) {\n- audio_print_settings (as);\n+ if (audio_validate_settings(as)) {\n+ g_autofree char *str = audsettings_to_string(as);\n+ error_report(\"audio: Invalid audio settings: %s\", str);\n goto fail;\n }\n \ndiff --git a/audio/audio-mixeng-be.c b/audio/audio-mixeng-be.c\nindex 7eabb1c2505..bb8c0b56f78 100644\n--- a/audio/audio-mixeng-be.c\n+++ b/audio/audio-mixeng-be.c\n@@ -101,38 +101,11 @@ void AUD_log (const char *cap, const char *fmt, ...)\n va_end (ap);\n }\n \n-static void audio_print_settings (const struct audsettings *as)\n+static char *audsettings_to_string(const struct audsettings *as)\n {\n- dolog (\"frequency=%d nchannels=%d fmt=\", as->freq, as->nchannels);\n-\n- switch (as->fmt) {\n- case AUDIO_FORMAT_S8:\n- AUD_log (NULL, \"S8\");\n- break;\n- case AUDIO_FORMAT_U8:\n- AUD_log (NULL, \"U8\");\n- break;\n- case AUDIO_FORMAT_S16:\n- AUD_log (NULL, \"S16\");\n- break;\n- case AUDIO_FORMAT_U16:\n- AUD_log (NULL, \"U16\");\n- break;\n- case AUDIO_FORMAT_S32:\n- AUD_log (NULL, \"S32\");\n- break;\n- case AUDIO_FORMAT_U32:\n- AUD_log (NULL, \"U32\");\n- break;\n- case AUDIO_FORMAT_F32:\n- AUD_log (NULL, \"F32\");\n- break;\n- default:\n- AUD_log (NULL, \"invalid(%d)\", as->fmt);\n- break;\n- }\n-\n- AUD_log (NULL, \" endianness=%s\\n\", as->big_endian ? \"big\" : \"little\");\n+ return g_strdup_printf(\"frequency=%d nchannels=%d fmt=%s endian=%s\",\n+ as->freq, as->nchannels, AudioFormat_str(as->fmt),\n+ as->big_endian ? \"big\" : \"little\");\n }\n \n static int audio_validate_settings (const struct audsettings *as)\n@@ -1607,9 +1580,9 @@ static CaptureVoiceOut *audio_mixeng_backend_add_capture(\n return NULL;\n }\n \n- if (audio_validate_settings (as)) {\n- dolog (\"Invalid settings were passed when trying to add capture\\n\");\n- audio_print_settings (as);\n+ if (audio_validate_settings(as)) {\n+ g_autofree char *str = audsettings_to_string(as);\n+ error_report(\"audio: Invalid audio settings when trying to add capture: %s\", str);\n return NULL;\n }\n \n", "prefixes": [ "80/85" ] }