From patchwork Thu Jan 14 13:45:38 2016 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: 567465 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 9329514031E for ; Fri, 15 Jan 2016 01:03:59 +1100 (AEDT) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b=WlWJ5QEq; dkim-atps=neutral Received: from localhost ([::1]:42678 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aJiVJ-0004A2-Ha for incoming@patchwork.ozlabs.org; Thu, 14 Jan 2016 09:03:57 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:35660) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aJiEU-0001VM-OZ for qemu-devel@nongnu.org; Thu, 14 Jan 2016 08:46:39 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aJiEQ-0003Tg-1a for qemu-devel@nongnu.org; Thu, 14 Jan 2016 08:46:34 -0500 Received: from mail-wm0-x242.google.com ([2a00:1450:400c:c09::242]:35717) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aJiEP-0003TW-Sq for qemu-devel@nongnu.org; Thu, 14 Jan 2016 08:46:29 -0500 Received: by mail-wm0-x242.google.com with SMTP id f206so43694257wmf.2 for ; Thu, 14 Jan 2016 05:46:29 -0800 (PST) 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=PYlgtF6eehaRmbIVMXrYlw9uvyn7G35YNWqd2vtK8yQ=; b=WlWJ5QEqbiRmu13zwuPxsDtgWfKcVg3o7c/yEV6HDhvrfCT9CC8waqmRkCaj0QcDuu e2ioNhrG6ynlYSPxLh54+AWSaRiVUhvj3bugvxrhDO29s62uCMpETYETfPxrA3YVERSk lTMIy3HC0tYOXNeincBjEca8Is8lAZATKBikUxhfCWi2i9T3S2g0YVXsdQ/4//snXNNp iQP8JzLOAwsU207wkgn0WZmHTQINNGd/HT68BYr9KFm6VKStKRaFwWRhOdElbL8CETg+ iTWYiEhyKWX02kggdg+pKecDlkZhHGkaJWBpcwjWYRRRXTg6zlj9DLnjH2edkMvPWFnu j+Aw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-type:content-transfer-encoding; bh=PYlgtF6eehaRmbIVMXrYlw9uvyn7G35YNWqd2vtK8yQ=; b=fDDkQfsjuV8pm8NIgWa8vBt6KGcg5/sm9yYjCX3CiEPVOIYCsz/Jc4QXCOABFupay0 tmPZzkOQtmSDqXQppumiYYECP9CdmHKiVxJYFkzzhQ1DLephpPhXrP7k2R5EVVq5A7wX jRtHd/smvAjLO1gZWHrh2y8lL1hX+zvUQui3zgemfOrJPdNbGfbWSJeA11M+6y+OMtcr SfiE8/ZGVip/v4IvGHx8h2ml7SaIryWOAsn1H9uHkoSFglDOx3yXVC/d+CMRSrnPNuTx 6t/qDMh2k9IxgxsxJj6z/qYvTWBMWIJLCn2T+apSBfnVg+cXOoVlkiqR6v7XjQtdb6Nb Qfdw== X-Gm-Message-State: ALoCoQm6GcQUYuoqjZ/ZslpKXUrRYiM2CcmDOZxzhALRCTGqxMHUAtzhTLa8E40YIZ3fA0ccWgCZJ6fgR1qHkrI3bEvkPTvemg== X-Received: by 10.194.174.73 with SMTP id bq9mr4138306wjc.145.1452779189404; Thu, 14 Jan 2016 05:46:29 -0800 (PST) Received: from nullptr.home.dirty-ice.org (188-143-126-18.pool.digikabel.hu. [188.143.126.18]) by smtp.gmail.com with ESMTPSA id 79sm7398061wmo.7.2016.01.14.05.46.28 (version=TLSv1/SSLv3 cipher=OTHER); Thu, 14 Jan 2016 05:46:29 -0800 (PST) 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: Thu, 14 Jan 2016 14:45:38 +0100 Message-Id: X-Mailer: git-send-email 2.7.0 In-Reply-To: References: MIME-Version: 1.0 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2a00:1450:400c:c09::242 Cc: Gerd Hoffmann Subject: [Qemu-devel] [PATCH 25/51] paaudio: fix playback glitches 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 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 4206dd0..2d10afd 100644 --- a/audio/paaudio.c +++ b/audio/paaudio.c @@ -510,10 +510,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 */