From patchwork Fri Oct 18 07:41:33 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Gerd Hoffmann X-Patchwork-Id: 11197685 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id B5A485703 for ; Fri, 18 Oct 2019 07:55:33 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 96B4C222C9 for ; Fri, 18 Oct 2019 07:55:33 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 96B4C222C9 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Received: from localhost ([::1]:36110 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iLN6h-0004u4-W8 for patchwork-qemu-devel@patchwork.kernel.org; Fri, 18 Oct 2019 03:55:32 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:59285) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iLMta-0006KU-JO for qemu-devel@nongnu.org; Fri, 18 Oct 2019 03:42:00 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iLMtV-00073c-BL for qemu-devel@nongnu.org; Fri, 18 Oct 2019 03:41:58 -0400 Received: from mx1.redhat.com ([209.132.183.28]:51388) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1iLMtV-00071n-3t for qemu-devel@nongnu.org; Fri, 18 Oct 2019 03:41:53 -0400 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id C70B9C05AA6C; Fri, 18 Oct 2019 07:41:50 +0000 (UTC) Received: from sirius.home.kraxel.org (ovpn-116-43.ams2.redhat.com [10.36.116.43]) by smtp.corp.redhat.com (Postfix) with ESMTP id D1F6C60925; Fri, 18 Oct 2019 07:41:44 +0000 (UTC) Received: by sirius.home.kraxel.org (Postfix, from userid 1000) id 1ECF79D26; Fri, 18 Oct 2019 09:41:44 +0200 (CEST) From: Gerd Hoffmann To: qemu-devel@nongnu.org Subject: [PULL 02/13] audio: paaudio: fix connection and stream name Date: Fri, 18 Oct 2019 09:41:33 +0200 Message-Id: <20191018074144.24071-3-kraxel@redhat.com> In-Reply-To: <20191018074144.24071-1-kraxel@redhat.com> References: <20191018074144.24071-1-kraxel@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.32]); Fri, 18 Oct 2019 07:41:50 +0000 (UTC) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 209.132.183.28 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: =?unknown-8bit?b?S8WRdsOhZ8OzQHJlZGhhdC5jb20sID0/VVRGLTg/cT9ab2x0PUMz?= =?unknown-8bit?b?PUExbj89IDxEaXJ0WS5pQ0UuaHVAZ21haWwuY29tPiwgR2VyZCBIb2Zm?= =?unknown-8bit?b?bWFubiA8a3JheGVsQHJlZGhhdC5jb20+LCBNYXJrdXMgQXJtYnJ1c3Rl?= =?unknown-8bit?b?ciA8YXJtYnJ1QHJlZGhhdC5jb20+?= Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" From: Kővágó, Zoltán 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ővágó, Zoltán Message-id: 3d139426031a400a68d440608ba5e43f0e116cd8.1568157545.git.DirtY.iCE.hu@gmail.com Signed-off-by: Gerd Hoffmann --- audio/paaudio.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/audio/paaudio.c b/audio/paaudio.c index ed31f863f7fe..3e6580a5ee50 100644 --- a/audio/paaudio.c +++ b/audio/paaudio.c @@ -2,6 +2,7 @@ #include "qemu/osdep.h" #include "qemu/module.h" +#include "qemu-common.h" #include "audio.h" #include "qapi/opts-visitor.h" @@ -338,7 +339,7 @@ static int qpa_init_out(HWVoiceOut *hw, struct audsettings *as, pa->stream = qpa_simple_new ( c, - "qemu", + g->dev->id, PA_STREAM_PLAYBACK, ppdo->has_name ? ppdo->name : NULL, &ss, @@ -387,7 +388,7 @@ static int qpa_init_in(HWVoiceIn *hw, struct audsettings *as, void *drv_opaque) pa->stream = qpa_simple_new ( c, - "qemu", + g->dev->id, PA_STREAM_RECORD, ppdo->has_name ? ppdo->name : NULL, &ss, @@ -549,6 +550,7 @@ static int qpa_validate_per_direction_opts(Audiodev *dev, /* common */ static void *qpa_conn_init(const char *server) { + const char *vm_name; PAConnection *c = g_malloc0(sizeof(PAConnection)); QTAILQ_INSERT_TAIL(&pa_conns, c, list); @@ -557,8 +559,9 @@ static void *qpa_conn_init(const char *server) goto fail; } + vm_name = qemu_get_vm_name(); c->context = pa_context_new(pa_threaded_mainloop_get_api(c->mainloop), - server); + vm_name ? vm_name : "qemu"); if (!c->context) { goto fail; }