From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755649AbYERHou (ORCPT ); Sun, 18 May 2008 03:44:50 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1752389AbYERHok (ORCPT ); Sun, 18 May 2008 03:44:40 -0400 Received: from cantor2.suse.de ([195.135.220.15]:49675 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751915AbYERHok (ORCPT ); Sun, 18 May 2008 03:44:40 -0400 Date: Sun, 18 May 2008 09:44:38 +0200 Message-ID: From: Takashi Iwai To: Stas Sergeev Cc: Roberto Oppedisano , LKML , alsa-devel@alsa-project.org Subject: Re: [patch] snd-pcsp: silent misleading warning In-Reply-To: <482EFED2.1020504@aknet.ru> References: <482737BE.20502@infracom.it> <4827415A.7060101@aknet.ru> <482756F0.8020609@infracom.it> <48275D8D.10500@aknet.ru> <4827F0A1.9090600@infracom.it> <48288ACC.1020909@aknet.ru> <48299F08.2060702@infracom.it> <4829B6A1.90707@infracom.it> <482A7A17.8070706@infracom.it> <482C9A3E.3000009@infracom.it> <482C9F3E.4050104@aknet.ru> <482EC93E.7080702@infracom.it> <482EFED2.1020504@aknet.ru> User-Agent: Wanderlust/2.14.0 (Africa) SEMI/1.14.6 (Maruoka) FLIM/1.14.7 (=?ISO-8859-4?Q?Sanj=F2?=) APEL/10.6 MULE XEmacs/21.5 (beta28) (fuki) (+CVS-20070806) (i386-suse-linux) MIME-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org At Sat, 17 May 2008 19:50:42 +0400, Stas Sergeev wrote: > > Hello. > > Roberto Oppedisano wrote: > > I noticed that when I run > > aplay -D plughw:2,0 /usr/share/sounds/KDE_Logout.wav > > I get a flood of: > > [ 417.338143] PCSP: playback_ptr inconsistent (4642 4661 18645) > It turns out that the buffer size you > get, is not evenly devided by period size. > 18645 % 4661 = 1. > That (wrongly) triggers the warning. > This may very well be an alsa bug, or > may not, but the code in the driver is > handling that properly, so there is no > need for such a verbose warning. The right fix would be to add a hw_constraint to align the buffer size. The simplest way is to add the following in PCM open callback. snd_pcm_hw_constraint_integer(runtime, SNDRV_PCM_HW_PARAM_PERIODS); Takashi