From patchwork Wed Jan 16 23:36:52 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?UTF-8?B?Wm9sdMOhbiBLxZF2w6Fnw7M=?= X-Patchwork-Id: 1026285 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="Lwk/QdKr"; dkim-atps=neutral Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 43g3d35xYwz9sBn for ; Thu, 17 Jan 2019 10:41:26 +1100 (AEDT) Received: from localhost ([127.0.0.1]:60143 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gjuoG-0006iC-TQ for incoming@patchwork.ozlabs.org; Wed, 16 Jan 2019 18:41:24 -0500 Received: from eggs.gnu.org ([209.51.188.92]:57857) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gjukl-00043K-O1 for qemu-devel@nongnu.org; Wed, 16 Jan 2019 18:37:50 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gjukj-0002tg-SS for qemu-devel@nongnu.org; Wed, 16 Jan 2019 18:37:47 -0500 Received: from mail-wm1-x344.google.com ([2a00:1450:4864:20::344]:35677) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1gjukj-0002pd-Ef for qemu-devel@nongnu.org; Wed, 16 Jan 2019 18:37:45 -0500 Received: by mail-wm1-x344.google.com with SMTP id t200so3902618wmt.0 for ; Wed, 16 Jan 2019 15:37:43 -0800 (PST) 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=C35U8zbQkeepW8CJEAOXAWaqV2bg2NxGbRQ+s0W+GJM=; b=Lwk/QdKro1eT2fzz2NJ5EbT2hWpZLLtaaXAJQvGFWhxxEHvoFU3I4sUxdlUZNHPo8u 7IqadVNc5Wnkc+ehb/0Hx4/3jh6etXnnVCvv6bMlgqTIhOghLiSiht+r67ACdPK9sFB1 WmydxddwoPExf8ZDMLGMiInETkb2/zCy0LyACGmHlXkoKBlsTV2vBncKKOYwbQp1ePxw E6RvydMX56eAmWlMPe8X0nbEuBpsj4/EsuOSW7BSawZOlnPUxfFaoSoqxQCIG9uUxqQw M+Dgr/bTmUlNZuu2an7l9YBLWNgS5wquOOrRI0YasVWCYs6j+L+oYS9yVunR/lnw2fXU pwwg== 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=C35U8zbQkeepW8CJEAOXAWaqV2bg2NxGbRQ+s0W+GJM=; b=bvqBJNBO2mu2F9yYPwQn3aJkQrrmK4SRqQP/yARAUXDo833mIIjLJqSxiNS+4Kc4Bt VssFp+SwUtxHHys0P2dszIkJm5Vy2KzV41BzYXjjInWR4JTihjSBcFt4SWwhGV6Hz6Qr kQw8E1XnCWC3CpewppssoNqbXKdOjcw55lg/IjJd2Yek0MXsQW1IwVEn202H6QFLnF9Q IsMmpk8v81u6gRmaQSTYqOpFSsYt2Fhl1zAJ8yIko88vgAZzRJcdJWnQoO/cN9MOSRCn hiOC3UUjMM4LJfidPfhjC2lkdIYnQr4VmLWxzjSZ/9PGCPSyvrPG0aVrB9yrhSsvejHS UkIQ== X-Gm-Message-State: AJcUukdDnrLnbBVUW65nlWFsjYwbXvpPFIa7asiMmu828Y55M7fKJXey 1si/WQJvicHnksBLRW8m3MexsJOfy9M= X-Google-Smtp-Source: ALg8bN5UNd3BnRUWpCTsSgAy7yQIa8k4dVe0PLjBQTTEwsb7nqRqsSYVgiHKbYgNmVoGNU2WTXZA0g== X-Received: by 2002:a1c:9e4a:: with SMTP id h71mr9706301wme.82.1547681862866; Wed, 16 Jan 2019 15:37:42 -0800 (PST) Received: from nullptr.home.dirty-ice.org (2a01-036c-0113-e4b0-0000-0000-0000-0005.pool6.digikabel.hu. [2a01:36c:113:e4b0::5]) by smtp.gmail.com with ESMTPSA id s66sm30760437wmf.34.2019.01.16.15.37.41 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 16 Jan 2019 15:37:42 -0800 (PST) From: "=?UTF-8?q?K=C5=91v=C3=A1g=C3=B3=2C=20Zolt=C3=A1n?=" X-Google-Original-From: =?utf-8?b?S8WRdsOhZ8OzLCBab2x0w6Fu?= To: qemu-devel@nongnu.org Date: Thu, 17 Jan 2019 00:36:52 +0100 Message-Id: <45bcd92296d27a5f3ec8938b396262b09395974e.1547681517.git.DirtY.iCE.hu@gmail.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: References: MIME-Version: 1.0 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:4864:20::344 Subject: [Qemu-devel] [PATCH v3 19/50] paaudio: do not move stream when sink/source name is specified X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Gerd Hoffmann Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" Unless we disable stream moving, pulseaudio can easily move the stream on connect, effectively ignoring the source/sink specified by the user. Signed-off-by: Kővágó, Zoltán --- audio/paaudio.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/audio/paaudio.c b/audio/paaudio.c index 1c20f8a7aa..108d3158a6 100644 --- a/audio/paaudio.c +++ b/audio/paaudio.c @@ -516,6 +516,11 @@ static pa_stream *qpa_simple_new ( #endif |PA_STREAM_AUTO_TIMING_UPDATE; + if (dev) { + /* don't move the stream if the user specified a sink/source */ + flags |= PA_STREAM_DONT_MOVE; + } + if (dir == PA_STREAM_PLAYBACK) { r = pa_stream_connect_playback(stream, dev, attr, flags, NULL, NULL); } else {