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: 8050271 Return-Path: X-Original-To: patchwork-qemu-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 0924BBEEE5 for ; Sun, 17 Jan 2016 09:32:43 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 6C796202F2 for ; Sun, 17 Jan 2016 09:32:42 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 4B7AA202E9 for ; Sun, 17 Jan 2016 09:32:41 +0000 (UTC) Received: from localhost ([::1]:54356 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aKjhQ-0001Fz-8r for patchwork-qemu-devel@patchwork.kernel.org; Sun, 17 Jan 2016 04:32:40 -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+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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;