From patchwork Fri Aug 21 15:37:24 2015 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: 509549 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 855D4140784 for ; Sat, 22 Aug 2015 01:54:41 +1000 (AEST) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b=zG3gh63I; dkim-atps=neutral Received: from localhost ([::1]:42273 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZSoeN-00021E-NW for incoming@patchwork.ozlabs.org; Fri, 21 Aug 2015 11:54:39 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:50924) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZSoON-0002hR-8v for qemu-devel@nongnu.org; Fri, 21 Aug 2015 11:38:08 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZSoOJ-00028H-GF for qemu-devel@nongnu.org; Fri, 21 Aug 2015 11:38:07 -0400 Received: from mail-wi0-x233.google.com ([2a00:1450:400c:c05::233]:34881) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZSoOJ-00028B-Aq for qemu-devel@nongnu.org; Fri, 21 Aug 2015 11:38:03 -0400 Received: by wicne3 with SMTP id ne3so19123871wic.0 for ; Fri, 21 Aug 2015 08:38:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-type:content-transfer-encoding; bh=D6S7g4JBSPKYUgxAkRirPPQAAvxi5gAQgmL8Hv2siu0=; b=zG3gh63INXkOZeGD6rnh12AV1tNBH+VfgotRWsf7Za8Kt2Tnx10/MlS339Uy9XwRUQ 7Hi1NmdyALzfZ0vfiRuiMkxbsXqfTRgwZFP5LA9rPT53TYSRciQV9XsGUVlaC1xKogbm dNyacBz5mwbh0nz0RNvS1m25IFwkRonONdaEykOzBC8HilJ5ggt61+wQqUFju8EWdPH9 248HJiSwB3wIm5pb9Byt5/IcgddVgYJO1wVKi6VJDNXwqQaqQx/4pYISmXhluvXnoNxl OVCi+Enr6akZWLm+HEbmnBRv/jhvff4orGkpkng8xyLMEMNQBsoIWGkhVBQC87L9/Cfu iuXg== X-Received: by 10.180.83.72 with SMTP id o8mr7314399wiy.27.1440171482812; Fri, 21 Aug 2015 08:38:02 -0700 (PDT) Received: from nullptr.home.dirty-ice.org (178-164-172-216.pool.digikabel.hu. [178.164.172.216]) by smtp.gmail.com with ESMTPSA id v8sm10479895wjr.15.2015.08.21.08.38.02 (version=TLSv1/SSLv3 cipher=OTHER); Fri, 21 Aug 2015 08:38:02 -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: Fri, 21 Aug 2015 17:37:24 +0200 Message-Id: <9336a4ff2986c3b7982efe713e09177a753ff50c.1440171025.git.DirtY.iCE.hu@gmail.com> X-Mailer: git-send-email 2.5.0 In-Reply-To: References: MIME-Version: 1.0 X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2a00:1450:400c:c05::233 Cc: Gerd Hoffmann Subject: [Qemu-devel] [PATCH v2 28/49] paaudio: do not move stream when sink/source name is specified X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org 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 c375d80..17e8992 100644 --- a/audio/paaudio.c +++ b/audio/paaudio.c @@ -515,6 +515,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 {