From patchwork Wed Jan 16 23:36:56 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: 1026298 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="Sg0MULkV"; 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 43g3n12JDWz9sBZ for ; Thu, 17 Jan 2019 10:48:21 +1100 (AEDT) Received: from localhost ([127.0.0.1]:33706 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gjuux-0003rL-7Q for incoming@patchwork.ozlabs.org; Wed, 16 Jan 2019 18:48:19 -0500 Received: from eggs.gnu.org ([209.51.188.92]:58006) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gjuks-000471-4q for qemu-devel@nongnu.org; Wed, 16 Jan 2019 18:37:56 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gjukm-00030z-G8 for qemu-devel@nongnu.org; Wed, 16 Jan 2019 18:37:52 -0500 Received: from mail-wr1-x441.google.com ([2a00:1450:4864:20::441]:42514) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1gjukl-0002wg-Ov for qemu-devel@nongnu.org; Wed, 16 Jan 2019 18:37:48 -0500 Received: by mail-wr1-x441.google.com with SMTP id q18so8928081wrx.9 for ; Wed, 16 Jan 2019 15:37:47 -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=7BQBLAP2ndQEDvJdO6DNKAjZ70szS1/J5w8BeLsmcNk=; b=Sg0MULkV6ZzU0U2HddUAbXSZ2QBAjelmi2wvK4DpNyLDECgcEYpsm6h8S2MhPSe0jt EzVIKnU9JIJcxSJm7SvYSN0068nF6/6r3xJoaoLVquGVxYSyn7zh6smiDV3q+jiuy/Pp NYmSgSABM+KpArXXYVUd92XMA6g0S2i9CMmqYVRNSnD0qS9vjBu1sUD7y4dloak1IU/i m5HdKEJiCHY3b6EicF3wyggJKeH4G3jVeVT2RWY+4AbrBqv6E8Qc8KeKnm9txfcy+LsI BJkWEfXlvd2rNmbb+63lBUZqm2OCJh4/uB4dxF5XaeR+HB8dNjlVqCQ+GTmjVJ6GWzwB lVaw== 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=7BQBLAP2ndQEDvJdO6DNKAjZ70szS1/J5w8BeLsmcNk=; b=CMXV8orUB847O9fa10AcS14wKMNV/XgDFpr4YUTLudJEXh2uw2Edro+ybe0YWbUJWL 7N95aZFGjyoaeSq0AAePDx5FiWL7Nq8t5DNSqn+iTHSIgOYhAtizcQbFJBnlr+wBZkBi 77GREKhEZEYecKawCQNSK1IzAifFjPMGr45QAZUZwITAlIo5b+4T/zBWSzULy9492vWL AjlnyrOjuTv7+2KLPncNHLFZd5CQLDvTjUUGAImuiR3sLQX02Eq9AiI/SAl66xaesJus wCKlNM7HrNGHdZcyhzwnERnMFftvZnIIGBHsUq6Amdbnpv1FZWa6ywZ49SEZRSokbn5z HqxA== X-Gm-Message-State: AJcUukfAYC6ulIK739wvXUcebjBTu9a8xS34iim5bSyIyqvqDSinWVZl H1KFIA51g9Ak8YryXq2OPiFAtBG9xaw= X-Google-Smtp-Source: ALg8bN4d2bxvMeSB8RTbp8rhZaZI41aS02PFuVyjpK7fLIg52jTlbP7VFyO8izXBHkXXfcOtMLOFlg== X-Received: by 2002:a5d:4046:: with SMTP id w6mr9915527wrp.92.1547681866326; Wed, 16 Jan 2019 15:37:46 -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.45 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 16 Jan 2019 15:37:45 -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:56 +0100 Message-Id: <369e7d44a4a351d3103033325afc12c339e031a5.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::441 Subject: [Qemu-devel] [PATCH v3 23/50] paaudio: fix playback glitches 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" 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 --- audio/paaudio.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/audio/paaudio.c b/audio/paaudio.c index 0a770fa57d..7758d304ca 100644 --- a/audio/paaudio.c +++ b/audio/paaudio.c @@ -511,10 +511,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 */