From patchwork Thu Aug 6 18:28:31 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: 504930 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 1E98F1402A7 for ; Fri, 7 Aug 2015 07:59:13 +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=vHQbLNNy; dkim-atps=neutral Received: from localhost ([::1]:46542 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZNRi9-0004U7-Aw for incoming@patchwork.ozlabs.org; Thu, 06 Aug 2015 16:24:21 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:49133) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZNPuG-00082H-LE for qemu-devel@nongnu.org; Thu, 06 Aug 2015 14:28:45 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZNPuE-0001H6-AH for qemu-devel@nongnu.org; Thu, 06 Aug 2015 14:28:44 -0400 Received: from mail-wi0-x231.google.com ([2a00:1450:400c:c05::231]:33064) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZNPuE-0001G7-2v for qemu-devel@nongnu.org; Thu, 06 Aug 2015 14:28:42 -0400 Received: by wijp15 with SMTP id p15so33070285wij.0 for ; Thu, 06 Aug 2015 11:28:41 -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=Lec8OaoBDAuN5V/vSIFPbyCQyQKKFRVLtg7NcWg9kFo=; b=vHQbLNNysbWBZaW42/BRXJ3RdgVE2+FzFkIRTsiIoE2GrCIbkquQEgklkqp7bp+XHF XULNHTTksZrz6fiFlDYEEhmRRsjP6HF7GL9N2x5XhTtNVNslFZNQ4JDPv+QJbyqEbIaO 7vRfnjAXWhCoiLTgu/ft8x+U9fqHayhJZ+XZVTx/XO/zXF8HDnwX9/PQRrF2dETxuFb/ X82MTM0phxFCNF4qpE7Z7NJ0tIe9UM3bzVA6x7X2CVFPqzi3jTRU73SRrrex5g6KdOdD VxKxOPUumybEwhm+yTGpxP5gF9Lfe2y1fKRWcwkMFwPTrsE98TTrGjWRwqIjWvKOlJRW nbfQ== X-Received: by 10.180.9.6 with SMTP id v6mr3620476wia.83.1438885721527; Thu, 06 Aug 2015 11:28:41 -0700 (PDT) Received: from nullptr.home.dirty-ice.org (84-236-21-48.pool.digikabel.hu. [84.236.21.48]) by smtp.gmail.com with ESMTPSA id i6sm10726509wje.33.2015.08.06.11.28.40 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 06 Aug 2015 11:28:41 -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: Thu, 6 Aug 2015 20:28:31 +0200 Message-Id: <3763f025154490e0b1ec54937010ed6f5f594f07.1438884611.git.DirtY.iCE.hu@gmail.com> X-Mailer: git-send-email 2.4.5 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::231 Cc: Gerd Hoffmann Subject: [Qemu-devel] [PATCH 19/25] 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 2aee22f..3990a80 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 */ flags |= PA_STREAM_DONT_MOVE;