From patchwork Sun Jan 17 09:32:10 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?q?Volker_R=C3=BCmelin?= X-Patchwork-Id: 569229 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 31EF314076E for ; Sun, 17 Jan 2016 20:32:50 +1100 (AEDT) Received: from localhost ([::1]:54357 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aKjhY-0001Wg-2b for incoming@patchwork.ozlabs.org; Sun, 17 Jan 2016 04:32:48 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:51580) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aKjhK-0001Fs-B6 for qemu-devel@nongnu.org; Sun, 17 Jan 2016 04:32:35 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aKjhF-0000iI-DE for qemu-devel@nongnu.org; Sun, 17 Jan 2016 04:32:34 -0500 Received: from mailout02.t-online.de ([194.25.134.17]:48114) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aKjhF-0000iC-6f for qemu-devel@nongnu.org; Sun, 17 Jan 2016 04:32:29 -0500 Received: from fwd25.aul.t-online.de (fwd25.aul.t-online.de [172.20.26.130]) by mailout02.t-online.de (Postfix) with SMTP id AF85761D367; Sun, 17 Jan 2016 10:32:27 +0100 (CET) Received: from [192.168.211.103] (ZSbMtEZpwhtqOeYZ3fFMwyiJDAE4bc6C5-ymAbqVZr5j-6lgqfnLCfkDFwImwZ5Qfh@[84.160.31.12]) by fwd25.t-online.de with (TLSv1.2:ECDHE-RSA-AES256-SHA encrypted) esmtp id 1aKjh4-369KrY0; Sun, 17 Jan 2016 10:32:18 +0100 To: =?UTF-8?B?S8WRdsOhZ8OzLCBab2x0w6Fu?= , Gerd Hoffmann , qemu-devel@nongnu.org References: From: =?UTF-8?Q?Volker_R=c3=bcmelin?= Message-ID: <569B5F9A.5090005@t-online.de> Date: Sun, 17 Jan 2016 10:32:10 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.5.0 MIME-Version: 1.0 X-ID: ZSbMtEZpwhtqOeYZ3fFMwyiJDAE4bc6C5-ymAbqVZr5j-6lgqfnLCfkDFwImwZ5Qfh X-TOI-MSGID: 96ca5f76-68d8-40e9-b3e1-a5ac2ea8776b X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 194.25.134.17 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 Hi, a better way to fix the playback glitches is to use a bigger playback buffer on pulseaudio server side. I suggest you replace your patch with a patch like this one: I tested your patch and while it really improves audio playback, I still notice audio drop-outs. With my suggestion I experience no playback glitches. Regards, Volker diff --git a/audio/paaudio.c b/audio/paaudio.c index fea6071..8bd5b91 100644 --- a/audio/paaudio.c +++ b/audio/paaudio.c @@ -554,7 +554,7 @@ static int qpa_init_out(HWVoiceOut *hw, struct audsettings *as, * qemu audio tick runs at 100 Hz (by default), so processing * data chunks worth 10 ms of sound should be a good fit. */ - ba.tlength = pa_usec_to_bytes (10 * 1000, &ss); + ba.tlength = pa_usec_to_bytes (50 * 1000, &ss); ba.minreq = pa_usec_to_bytes (5 * 1000, &ss); ba.maxlength = -1; ba.prebuf = -1;