From patchwork Sun Dec 23 20:52:01 2018 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: 1018095 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=208.118.235.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="JYz907P8"; dkim-atps=neutral Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 43NFH446hvz9sML for ; Mon, 24 Dec 2018 08:04:32 +1100 (AEDT) Received: from localhost ([127.0.0.1]:42236 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gbAvG-00074O-D0 for incoming@patchwork.ozlabs.org; Sun, 23 Dec 2018 16:04:30 -0500 Received: from eggs.gnu.org ([208.118.235.92]:52368) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gbAk1-0007v7-As for qemu-devel@nongnu.org; Sun, 23 Dec 2018 15:52:54 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gbAk0-0002e9-C4 for qemu-devel@nongnu.org; Sun, 23 Dec 2018 15:52:53 -0500 Received: from mail-wm1-x341.google.com ([2a00:1450:4864:20::341]:55631) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1gbAk0-0002b5-4I for qemu-devel@nongnu.org; Sun, 23 Dec 2018 15:52:52 -0500 Received: by mail-wm1-x341.google.com with SMTP id y139so9809490wmc.5 for ; Sun, 23 Dec 2018 12:52:52 -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=DhsP1IZYKezBoWf9kL+ulOkH8CQ0XIepreTWbDHpa6k=; b=JYz907P8/OBdq4p0Eu2l9yKC8yYazS+zxLMFBLbW/33cu5U3QnvtdJAqRrGYu2VM/6 1bWwQVBba/HpWI6gQ97WdSMKHarj80/yIk47c9QZWM2TiCYqTgtp3WpU9FR3y9qw2s0Y NvMlpZVQJwVXBLnVhzcBdR4ULcaN3F05DOVY2NhhvjNowid2SLtTYV63sK7ix4GNRBRm QxrGTL7wWiXhf48uCTFvtiwq21EIY4Zaq5mYgLq4vqMEDtK62Lqb31kJOjPnWFmdCZ8v WVhf4LhG+ctjzdrXL5AwjHuGmX7ueAON+jLGw2diEPJuqf1TA/hv+p8EVhji5fmoeR8l 9TQg== 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=DhsP1IZYKezBoWf9kL+ulOkH8CQ0XIepreTWbDHpa6k=; b=kAvdyBO5uRKyZaMyKmQsJiHC+1jqHrwpqeh4JHZvz6UjaNoVxUHfoln/nnXumzUpwm e82XJIcHgjLTa9yVJiXt8e7fxe/3bVDDbsquTF4om14IoM78aVXkhTpLfrvaDJmS4cS3 dm9XGGMNa5kU+Fse+tF2ie/NmvUtFCbDXT84k5gku7+nN2YDXcs6PO7xxYsddacxImxm HVa89OCfHyogQoIipp0JolKEmUDg7lm4F/046ww4y2lfMgzfHC5SvTCh8H598cdu9SwA Fo52dKysoKitxhvk4i8aXIHp1TLtFbkBcIp+zxi9xbK2EvjrJ1eSjs3AFpI+WjEOWuka poAA== X-Gm-Message-State: AA+aEWaA30E/kScQTGOuTJk9x4dibzFjaYMXoHdH/J87LIa3YCeCUrN5 OSrLflAANnBa4sznuB45DcpAC+atOUQ= X-Google-Smtp-Source: ALg8bN5XVabu9Nix+tE/Kmv6OykYErE+3qnEY0TQXsmhteh62mcqZNMXxV/KfexjLV2Wt166KZ7+lw== X-Received: by 2002:a1c:3d44:: with SMTP id k65mr9831278wma.76.1545598370968; Sun, 23 Dec 2018 12:52:50 -0800 (PST) Received: from nullptr.home.dirty-ice.org (2a01-036c-0113-24a3-0000-0000-0000-0005.pool6.digikabel.hu. [2a01:36c:113:24a3::5]) by smtp.gmail.com with ESMTPSA id g198sm25456920wmd.23.2018.12.23.12.52.50 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 23 Dec 2018 12:52:50 -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: Sun, 23 Dec 2018 21:52:01 +0100 Message-Id: <69db519bda51135da1fe3e379586c98756be3a1c.1545598229.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::341 Subject: [Qemu-devel] [PATCH v2 25/52] 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 6ed12851c0..9331e630d1 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 */