From nobody Sat Apr 20 10:12:10 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.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; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=gmail.com ARC-Seal: i=1; a=rsa-sha256; t=1568158114; cv=none; d=zoho.com; s=zohoarc; b=eL8hVTlPNw0yh9XWR6JAOBeInCLEiYkCbA313PdzLULqBs1FQr29r99AQUvOajnuVehcnpM71cpJJcIGS7wzt3L+My0WcML5F7LHGcdgj0hZGqarlGvSWgDZCGuCC3uENb+dJaHrQ3Ch4/XieN/clcuQMWBCAJrx3fKwrV+4BZw= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1568158114; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To:ARC-Authentication-Results; bh=8xjLznpUdjiS3wFXti0oZrmHBPX6ZNgdzcIw0ChVDDk=; b=mMv8KDlF+hpHJYUfZ5mpwXDc0ajoYwhaK7c9wu2UIqOohM+mjpHjc/fzKVx9Np31fHKq4a3tCZO9QRbjhR/iFNS7jySVXXpaVBYnFNK8+R2d+71mhO85eOhjsluEAoR4PVDYREZ7wURzqx5pKGvp4gOU00iT25UkgEYHt6iXiZg= ARC-Authentication-Results: i=1; mx.zoho.com; dkim=fail; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1568158114571662.0058185614511; Tue, 10 Sep 2019 16:28:34 -0700 (PDT) Received: from localhost ([::1]:45446 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1i7pYn-0007DB-FS for importer@patchew.org; Tue, 10 Sep 2019 19:28:33 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:37432) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1i7pWl-00052W-AT for qemu-devel@nongnu.org; Tue, 10 Sep 2019 19:26:28 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1i7pWk-000511-Cl for qemu-devel@nongnu.org; Tue, 10 Sep 2019 19:26:27 -0400 Received: from mail-qt1-x843.google.com ([2607:f8b0:4864:20::843]:41159) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1i7pWk-00050h-93 for qemu-devel@nongnu.org; Tue, 10 Sep 2019 19:26:26 -0400 Received: by mail-qt1-x843.google.com with SMTP id j10so22904831qtp.8 for ; Tue, 10 Sep 2019 16:26:26 -0700 (PDT) Received: from decltype.home.dirty-ice.org (2a01-036c-0113-6ea8-0001-0000-0000-00d3.pool6.digikabel.hu. [2a01:36c:113:6ea8:1::d3]) by smtp.gmail.com with ESMTPSA id z5sm8804535qki.55.2019.09.10.16.26.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 10 Sep 2019 16:26:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=8xjLznpUdjiS3wFXti0oZrmHBPX6ZNgdzcIw0ChVDDk=; b=ZOZqGd3oi/gIr+vNH4dut0PKGvIQHkcWj2uJQwQif/AvIdOE2MHMq5gyEa/8RER9d6 eDYws+7yKrIT+Jw+2OLV57L5Rm0JWN29J1NI9qHR5chTK6Ec/Uomv6IzNskdxM8KhZCz QVH2ZP9WSjJY1MlwYv3Ikx/wq4bQ083nusnmKng/kVba7tkcQkoqXsdNgrxECSdiR90O TkH2Uv0YwULeGj0QjNIzfXUDZ1xGtK8AIZkNvC/tZHCvlFOmSkaUtoQNnE9UIIKfdYjQ f1Dc3Sho4eU+VDEvmpDo2pH30rd9i0k50roIe+BMAUmMeQBwClj3xmPF0kao+/YISEY2 BEuA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=8xjLznpUdjiS3wFXti0oZrmHBPX6ZNgdzcIw0ChVDDk=; b=W+IodYOs7+EH7NTXSQBXUooSO3JdcUXgVfrOADeOSvBVmD8oQ2UmUF92sOBYOchDDo GMZOHQcs5sOVigNYCIUJoqhS6UJqdTKVE/KKVf3uzWfQyF+J2FKiptjlP19Ck2aMpWDU FRKvATuaF//XGW9BfAgvtqgoLtmTofiZF8y/bASEsbrcxJ/8884Mz/txOC98xqdSJcSA 6LHPvXjHVpQ1+hV9aW6AHkYqY7taFnPlsAMwg5MzNCrwsiwN6RCp/7op8gdlLbRdf3EW hwcINh8bxE/gIYpuEeK6+i6PosDQU0CTJH2L5WJi2Br5S7FeZWEQtOBNNt04YQdKPl8L wKSQ== X-Gm-Message-State: APjAAAXNweQ+PZh3BUAq8C0zGNfZNQIe0SK3EH8sDE1k4rjI8vqJTAY/ xrJ86z/Gn7bq9iAnnvuQVF0DkiSZ X-Google-Smtp-Source: APXvYqxEH5X+fSHvuKwo33CsQAawDcb4zlR9MxmhFTuTeWR3T20SKJbtHvARSO9swlmUT2YN3PnI5w== X-Received: by 2002:ac8:7504:: with SMTP id u4mr31682384qtq.81.1568157985570; Tue, 10 Sep 2019 16:26:25 -0700 (PDT) From: "=?UTF-8?q?K=C5=91v=C3=A1g=C3=B3=2C=20Zolt=C3=A1n?=" X-Google-Original-From: =?UTF-8?q?K=C5=91v=C3=A1g=C3=B3=2C=20Zolt=C3=A1n?= To: qemu-devel@nongnu.org Date: Wed, 11 Sep 2019 01:26:18 +0200 Message-Id: <0eadcc88b8421bb86ce2d68ac70517f920c3ad6c.1568157545.git.DirtY.iCE.hu@gmail.com> X-Mailer: git-send-email 2.23.0 In-Reply-To: References: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:4864:20::843 Subject: [Qemu-devel] [PATCH 1/3] audio: fix parameter dereference before NULL check X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Gerd Hoffmann , Maxim Levitsky Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) This should fix Coverity issues CID 1405305 and 1405301. Signed-off-by: K=C5=91v=C3=A1g=C3=B3, Zolt=C3=A1n --- audio/audio_template.h | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/audio/audio_template.h b/audio/audio_template.h index 2562bf5f00..cc4b53b5d7 100644 --- a/audio/audio_template.h +++ b/audio/audio_template.h @@ -428,8 +428,8 @@ SW *glue (AUD_open_, TYPE) ( struct audsettings *as ) { - AudioState *s =3D card->state; - AudiodevPerDirectionOptions *pdo =3D glue(audio_get_pdo_, TYPE)(s->dev= ); + AudioState *s; + AudiodevPerDirectionOptions *pdo; =20 if (audio_bug(__func__, !card || !name || !callback_fn || !as)) { dolog ("card=3D%p name=3D%p callback_fn=3D%p as=3D%p\n", @@ -437,6 +437,9 @@ SW *glue (AUD_open_, TYPE) ( goto fail; } =20 + s =3D card->state; + pdo =3D glue(audio_get_pdo_, TYPE)(s->dev); + ldebug ("open %s, freq %d, nchannels %d, fmt %d\n", name, as->freq, as->nchannels, as->fmt); =20 --=20 2.23.0 From nobody Sat Apr 20 10:12:10 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.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; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=gmail.com ARC-Seal: i=1; a=rsa-sha256; t=1568158057; cv=none; d=zoho.com; s=zohoarc; b=lozqJRbmPShkgNTINi+f1mIR1CjA0nLIg4xT2yLAUUN7bOwlE/7u2jSsgKZTmGnYjz+K8ZSgM9c5LRfEtxKxu5Lg/Tu95omaujev7Hq+RMVF5LJkBKswwkKFB2rVyKbFrGrw0tpUKpxTZA9jcRb88SRfTNb5jTEVHuE6m1qur7w= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1568158057; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To:ARC-Authentication-Results; bh=QPvAIEyjbdHkgFa3D8BV/iy/+lVvKr2RpSl+66ez4lg=; b=GC/Wq7GnVObWE5I6HYwDmGR6kw2nC69EpRyLWDJiZb+QnRk68QSqOirwUNZGasfXl0Pa1jJPkT4GTb2XZMhRnuxgTiSmuBowBNuTmOSOBqY1zEHGtBIUUVPSReeVkBA7QPzyqNdQ0cpBTPbxX3Ddr/pFGqK2MGmc8qCn+KNns/M= ARC-Authentication-Results: i=1; mx.zoho.com; dkim=fail; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (209.51.188.17 [209.51.188.17]) by mx.zohomail.com with SMTPS id 1568158057093525.0235991224731; Tue, 10 Sep 2019 16:27:37 -0700 (PDT) Received: from localhost ([::1]:45438 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1i7pXk-0005vY-W5 for importer@patchew.org; Tue, 10 Sep 2019 19:27:29 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:37444) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1i7pWm-00052o-UG for qemu-devel@nongnu.org; Tue, 10 Sep 2019 19:26:29 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1i7pWl-000521-Uz for qemu-devel@nongnu.org; Tue, 10 Sep 2019 19:26:28 -0400 Received: from mail-qt1-x844.google.com ([2607:f8b0:4864:20::844]:34397) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1i7pWl-00051q-RZ for qemu-devel@nongnu.org; Tue, 10 Sep 2019 19:26:27 -0400 Received: by mail-qt1-x844.google.com with SMTP id j1so10224901qth.1 for ; Tue, 10 Sep 2019 16:26:27 -0700 (PDT) Received: from decltype.home.dirty-ice.org (2a01-036c-0113-6ea8-0001-0000-0000-00d3.pool6.digikabel.hu. [2a01:36c:113:6ea8:1::d3]) by smtp.gmail.com with ESMTPSA id z5sm8804535qki.55.2019.09.10.16.26.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 10 Sep 2019 16:26:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=QPvAIEyjbdHkgFa3D8BV/iy/+lVvKr2RpSl+66ez4lg=; b=ZveI0hNHksiNF9IdOHTlNSsfUaGFtEz4dwuFXR8UFDL9DB5cGxgrE/wR6FXXy79Pa+ 42BI4IszZWx2tZhFZ2GI/SLRwSwj9KciufaFEyYzT1AG/JjWX+kmF/TGq55bTRL64pOX nezPkQ3GrRtCuJ98Cz7ixHS8IVdOZ7aCQxdqWdf2k+oKPnzY/8WzvEQ/CtUOIOrhrlUZ V+WR7T7fgMAMbEZe/TpZyrQYoD9iCh6+aVK94zV4MjS8BW4AtQkFatQ93rtYUA6C9DKQ FAmL+WhHB6K27Ei/JUcVTGMjn4kAMcO1cXRK5gR7hjap7bGBCfjjTDvCZBeI8jte6Dvq YTsw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=QPvAIEyjbdHkgFa3D8BV/iy/+lVvKr2RpSl+66ez4lg=; b=cSZxKvQzZTFORbvkZgD9QUereZEGMkgVyxfAP5ZDuIptY3TayAnQnibocOCxswnlWV 7VNFOv64aWgS8rctp54qRxpTU40njMzVxjwH3hNuIRZRttVFsFRPBj1CsnSdb5KB95rs wcN+rVkTqAaPxzQ1sc5WYewtv8XwAja+YpNB3yK+UuIBgZwjIPOcvQT/asbj/O1v675m UuhLyckLPR5d8nuLxk66LsgEFZqs49zvQFt2B+T2x8lqHaj54c+1qzf1Ncnhcr8qZ6EF Fx9BPjWtem3c8RYBcnUMNxapt62y3SE/1LHEmXSq1H7KnBHhWoO9l2E2q3jGzH28cjsw 2uNQ== X-Gm-Message-State: APjAAAV2ev7G3qN/98r+1cXs3hZnirItyynAbdtGH6x83Nv/OWhfRV9c cjmbbI7mRqrPLCSeDxFf1Vw5DwR/ X-Google-Smtp-Source: APXvYqwzqJ8w+LK9f7Yiqd/p0i8LO6dbh9EP05vgwHTUzXiXscLJMC3iME0MbJtE1nktaszU/AQWbw== X-Received: by 2002:ac8:6746:: with SMTP id n6mr32342947qtp.128.1568157987238; Tue, 10 Sep 2019 16:26:27 -0700 (PDT) From: "=?UTF-8?q?K=C5=91v=C3=A1g=C3=B3=2C=20Zolt=C3=A1n?=" X-Google-Original-From: =?UTF-8?q?K=C5=91v=C3=A1g=C3=B3=2C=20Zolt=C3=A1n?= To: qemu-devel@nongnu.org Date: Wed, 11 Sep 2019 01:26:19 +0200 Message-Id: <3d139426031a400a68d440608ba5e43f0e116cd8.1568157545.git.DirtY.iCE.hu@gmail.com> X-Mailer: git-send-email 2.23.0 In-Reply-To: References: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:4864:20::844 Subject: [Qemu-devel] [PATCH 2/3] audio: paaudio: fix connection and stream name X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Gerd Hoffmann , Maxim Levitsky Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Connection name was previously erroneously set to the server socket path, while connection names were simply "qemu". After this patch, the connection name will be the vm name (falling back to "qemu" if not specified), while stream names will be the audiodev's id. Signed-off-by: K=C5=91v=C3=A1g=C3=B3, Zolt=C3=A1n --- audio/paaudio.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/audio/paaudio.c b/audio/paaudio.c index bfef9acaad..19b7e39092 100644 --- a/audio/paaudio.c +++ b/audio/paaudio.c @@ -2,6 +2,7 @@ =20 #include "qemu/osdep.h" #include "qemu/module.h" +#include "qemu-common.h" #include "audio.h" #include "qapi/opts-visitor.h" =20 @@ -562,7 +563,7 @@ static int qpa_init_out(HWVoiceOut *hw, struct audsetti= ngs *as, =20 pa->stream =3D qpa_simple_new ( c, - "qemu", + g->dev->id, PA_STREAM_PLAYBACK, ppdo->has_name ? ppdo->name : NULL, &ss, @@ -630,7 +631,7 @@ static int qpa_init_in(HWVoiceIn *hw, struct audsetting= s *as, void *drv_opaque) =20 pa->stream =3D qpa_simple_new ( c, - "qemu", + g->dev->id, PA_STREAM_RECORD, ppdo->has_name ? ppdo->name : NULL, &ss, @@ -857,6 +858,7 @@ static int qpa_validate_per_direction_opts(Audiodev *de= v, /* common */ static void *qpa_conn_init(const char *server) { + const char *vm_name; PAConnection *c =3D g_malloc0(sizeof(PAConnection)); QTAILQ_INSERT_TAIL(&pa_conns, c, list); =20 @@ -865,8 +867,9 @@ static void *qpa_conn_init(const char *server) goto fail; } =20 + vm_name =3D qemu_get_vm_name(); c->context =3D pa_context_new(pa_threaded_mainloop_get_api(c->mainloop= ), - server); + vm_name ? vm_name : "qemu"); if (!c->context) { goto fail; } --=20 2.23.0 From nobody Sat Apr 20 10:12:10 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.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; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=gmail.com ARC-Seal: i=1; a=rsa-sha256; t=1568158174; cv=none; d=zoho.com; s=zohoarc; b=FXpfi/YMQ7nvIG2OX8WCsbL0WmIW2HVzdhPKAinFGoukEJOjj+Ntyoslqlw5mIrKc7S+RipndhJevrTbc65oktEHcuHdHnfGn802JGqd9K+iM402Wr1awZMDR22VTBiECTsqtur9aQE/5ds3lZE5f5dDUQd4DhVDsnstSgisAIY= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1568158174; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To:ARC-Authentication-Results; bh=uwyGdjJlG7jF1gyRPno8QuHyS6nZmBhawgXlLsE85NM=; b=TkUZUQffmsobSDj737o+5y7i0j8ii6Yg2FPncmzqQO3TLtRSzuV2+mRRrefi+1ziFPoyzQTb5Dd9EYTLcQ4uR+mBBb6N4EK4QxEpazxgCU/8LS9OQ0LGzX3gs/C7gYxB6aaeFldD0W/AlLHQerJFL47Po7QIP/W0guBW6vOOkiw= ARC-Authentication-Results: i=1; mx.zoho.com; dkim=fail; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1568158174673271.1121346442868; Tue, 10 Sep 2019 16:29:34 -0700 (PDT) Received: from localhost ([::1]:45452 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1i7pZj-0008OP-LP for importer@patchew.org; Tue, 10 Sep 2019 19:29:31 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:37455) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1i7pWo-00054m-PD for qemu-devel@nongnu.org; Tue, 10 Sep 2019 19:26:31 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1i7pWn-00053A-S1 for qemu-devel@nongnu.org; Tue, 10 Sep 2019 19:26:30 -0400 Received: from mail-qt1-x843.google.com ([2607:f8b0:4864:20::843]:45869) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1i7pWn-00052y-OE for qemu-devel@nongnu.org; Tue, 10 Sep 2019 19:26:29 -0400 Received: by mail-qt1-x843.google.com with SMTP id r15so22922300qtn.12 for ; Tue, 10 Sep 2019 16:26:29 -0700 (PDT) Received: from decltype.home.dirty-ice.org (2a01-036c-0113-6ea8-0001-0000-0000-00d3.pool6.digikabel.hu. [2a01:36c:113:6ea8:1::d3]) by smtp.gmail.com with ESMTPSA id z5sm8804535qki.55.2019.09.10.16.26.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 10 Sep 2019 16:26:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=uwyGdjJlG7jF1gyRPno8QuHyS6nZmBhawgXlLsE85NM=; b=afSA5kaJoc7EBZHMHQ3prQDBdLdjfcNDk3m89wnw858t8SZS/aGcm6unqkd9ubuE78 uc+fJfRQMYmgAeYnK8y9lDLTsayzXsS181Lufa/p+R3fAr5NLqPYgdxTq0L0UzHwcRxD r00MvbeOMAHKnZnipaH7N+ejawo+Em5ZC0WxJW2+xeOj7rjPqaqqGF6oT6VznrCCbDRD 1MulHlFhESvgoY1vfP595ccw30YEYeJ8T7pSb8pIW5Frrlecr/QhbaMn7CWZ9g4kNzi/ 55tJuSj87AOCodwCvh5zWzJh+1kXNhEmQfz/zfu5kl9tI5eO5SnZztO4XO+6MiZ2EFAF gjOw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=uwyGdjJlG7jF1gyRPno8QuHyS6nZmBhawgXlLsE85NM=; b=rwWNBDyx274ClDDs7m3pfe4oEKEpB2eomLVTjO7tLKsXVmido/LF5BRw+UEH/GsrF7 epBrjW9JmQqHEP1US4styi3wI9CC8vTHQRgi5r8YEzeZRI54IkBQujRoWHQ9KYTT/i4c btZN/+i0cu4IvC1D23V9Q/PeG0oKw3FLb/sb9xOhxumJuU83zCu85K2ORTCDEppBNHZg T9ChAwiV44qs3BzOEPyA5rRR8zhTng9I3teC0duAv0Ih+U7wWrEM0bDpEuGujZFjvf2K Zuo3LR2phdw3jIJNdV8cqlc1HBZYwkNGgw8hXoCVXskH9a+7vEgxfFc6b4fWzqomtpzK d7Gw== X-Gm-Message-State: APjAAAW5BYpX7dlLVZfXOYjpWWbzClGs4L96t2tF9nj4JhbbO0vhQxYe W8XwbPOoNEDTV59SSkk54iWzUGhl X-Google-Smtp-Source: APXvYqynxefTpNIKyL4VutnTiZvduSvsA0k2Dko3LUJu7Lt2cjhecFqfBZdFTtAjCA5/JIpntbAqUg== X-Received: by 2002:a0c:e946:: with SMTP id n6mr20483055qvo.214.1568157989212; Tue, 10 Sep 2019 16:26:29 -0700 (PDT) From: "=?UTF-8?q?K=C5=91v=C3=A1g=C3=B3=2C=20Zolt=C3=A1n?=" X-Google-Original-From: =?UTF-8?q?K=C5=91v=C3=A1g=C3=B3=2C=20Zolt=C3=A1n?= To: qemu-devel@nongnu.org Date: Wed, 11 Sep 2019 01:26:20 +0200 Message-Id: <2d6e337c474ac84172d0809e6959c26b21d48120.1568157545.git.DirtY.iCE.hu@gmail.com> X-Mailer: git-send-email 2.23.0 In-Reply-To: References: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:4864:20::843 Subject: [Qemu-devel] [PATCH 3/3] audio: paaudio: ability to specify stream name X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Markus Armbruster , Gerd Hoffmann , Maxim Levitsky Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) This can be used to identify stream in tools like pavucontrol when one creates multiple -audiodevs or runs multiple qemu instances. Signed-off-by: K=C5=91v=C3=A1g=C3=B3, Zolt=C3=A1n Acked-by: Markus Armbruster --- audio/paaudio.c | 4 ++-- qapi/audio.json | 6 ++++++ 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/audio/paaudio.c b/audio/paaudio.c index 19b7e39092..d9cff9a2be 100644 --- a/audio/paaudio.c +++ b/audio/paaudio.c @@ -563,7 +563,7 @@ static int qpa_init_out(HWVoiceOut *hw, struct audsetti= ngs *as, =20 pa->stream =3D qpa_simple_new ( c, - g->dev->id, + ppdo->has_stream_name ? ppdo->stream_name : g->dev->id, PA_STREAM_PLAYBACK, ppdo->has_name ? ppdo->name : NULL, &ss, @@ -631,7 +631,7 @@ static int qpa_init_in(HWVoiceIn *hw, struct audsetting= s *as, void *drv_opaque) =20 pa->stream =3D qpa_simple_new ( c, - g->dev->id, + ppdo->has_stream_name ? ppdo->stream_name : g->dev->id, PA_STREAM_RECORD, ppdo->has_name ? ppdo->name : NULL, &ss, diff --git a/qapi/audio.json b/qapi/audio.json index 9fefdf5186..e45218f081 100644 --- a/qapi/audio.json +++ b/qapi/audio.json @@ -206,6 +206,11 @@ # # @name: name of the sink/source to use # +# @stream-name: name of the PulseAudio stream created by qemu. Can be +# used to identify the stream in PulseAudio when you +# create multiple PulseAudio devices or run multiple qemu +# instances (default: audiodev's id, since 4.2) +# # @latency: latency you want PulseAudio to achieve in microseconds # (default 15000) # @@ -215,6 +220,7 @@ 'base': 'AudiodevPerDirectionOptions', 'data': { '*name': 'str', + '*stream-name': 'str', '*latency': 'uint32' } } =20 ## --=20 2.23.0