From patchwork Wed Aug 21 08:41:10 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Gerd Hoffmann X-Patchwork-Id: 11106131 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 B7A7513B1 for ; Wed, 21 Aug 2019 08:51:58 +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 981BE22D6D for ; Wed, 21 Aug 2019 08:51:58 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 981BE22D6D 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]:45518 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1i0MLV-00086c-DW for patchwork-qemu-devel@patchwork.kernel.org; Wed, 21 Aug 2019 04:51:57 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:55277) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1i0MBM-0003wS-Kf for qemu-devel@nongnu.org; Wed, 21 Aug 2019 04:41:29 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1i0MBL-00058I-J7 for qemu-devel@nongnu.org; Wed, 21 Aug 2019 04:41:28 -0400 Received: from mx1.redhat.com ([209.132.183.28]:53684) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1i0MBL-00057k-D4 for qemu-devel@nongnu.org; Wed, 21 Aug 2019 04:41:27 -0400 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id AB6FE7F756; Wed, 21 Aug 2019 08:41:26 +0000 (UTC) Received: from sirius.home.kraxel.org (ovpn-116-60.ams2.redhat.com [10.36.116.60]) by smtp.corp.redhat.com (Postfix) with ESMTP id E7B15798B; Wed, 21 Aug 2019 08:41:21 +0000 (UTC) Received: by sirius.home.kraxel.org (Postfix, from userid 1000) id 1E19A31E95; Wed, 21 Aug 2019 10:41:14 +0200 (CEST) From: Gerd Hoffmann To: qemu-devel@nongnu.org Date: Wed, 21 Aug 2019 10:41:10 +0200 Message-Id: <20190821084113.1840-13-kraxel@redhat.com> In-Reply-To: <20190821084113.1840-1-kraxel@redhat.com> References: <20190821084113.1840-1-kraxel@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.6.2 (mx1.redhat.com [10.5.110.71]); Wed, 21 Aug 2019 08:41:26 +0000 (UTC) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [PULL 12/15] paaudio: fix playback glitches 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?PT9VVEYtOD9xP0RhbmllbD0yMFA9MkU9MjBCZXJyYW5nPUMzPUE5?= =?unknown-8bit?b?Pz0gPGJlcnJhbmdlQHJlZGhhdC5jb20+LCBFZHVhcmRvIEhhYmtvc3Qg?= =?unknown-8bit?b?PGVoYWJrb3N0QHJlZGhhdC5jb20+LCBLxZF2w6Fnw7NAcmVkaGF0LmNv?= =?unknown-8bit?b?bSwgTWFya3VzIEFybWJydXN0ZXIgPGFybWJydUByZWRoYXQuY29tPiwg?= =?unknown-8bit?b?IkRyLiBEYXZpZCBBbGFuIEdpbGJlcnQiIDxkZ2lsYmVydEByZWRoYXQu?= =?unknown-8bit?b?Y29tPiwgTWljaGFlbCBXYWxsZSA8bWljaGFlbEB3YWxsZS5jYz4sIEdl?= =?unknown-8bit?b?cmQgSG9mZm1hbm4gPGtyYXhlbEByZWRoYXQuY29tPiwgUGF2ZWwgRG92?= =?unknown-8bit?b?Z2FseXVrIDxwYXZlbC5kb3ZnYWx1a0Bpc3ByYXMucnU+LCA9P1VURi04?= =?unknown-8bit?b?P3E/Wm9sdD1DMz1BMW4/PSA8RGlydFkuaUNFLmh1QGdtYWlsLmNvbT4s?= =?unknown-8bit?b?IFBhb2xvIEJvbnppbmkgPHBib256aW5pQHJlZGhhdC5jb20+?= Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" From: Kővágó, Zoltán Pulseaudio normally assumes that when the server wants it, the client can generate the audio samples and send it right away. Unfortunately this is not the case with QEMU -- it's up to the emulated system when does it generate the samples. Buffering the samples and sending them from a background thread is just a workaround, that doesn't work too well. Instead enable pa's compatibility support and let pa worry about the details. Signed-off-by: Kővágó, Zoltán Message-id: aa4e3613122ccbaa62b1feb4e427260731f7477c.1566168923.git.DirtY.iCE.hu@gmail.com Signed-off-by: Gerd Hoffmann --- audio/paaudio.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/audio/paaudio.c b/audio/paaudio.c index f3864e1d5038..c8ae1a6eca01 100644 --- a/audio/paaudio.c +++ b/audio/paaudio.c @@ -512,10 +512,8 @@ static pa_stream *qpa_simple_new ( flags = PA_STREAM_INTERPOLATE_TIMING -#ifdef PA_STREAM_ADJUST_LATENCY - | PA_STREAM_ADJUST_LATENCY -#endif - | PA_STREAM_AUTO_TIMING_UPDATE; + | PA_STREAM_AUTO_TIMING_UPDATE + | PA_STREAM_EARLY_REQUESTS; if (dev) { /* don't move the stream if the user specified a sink/source */