From mboxrd@z Thu Jan 1 00:00:00 1970 From: Takashi Iwai Subject: Re: sound/core/pcm_lib.c:158: BUG Date: Mon, 20 Dec 2004 15:08:16 +0100 Message-ID: References: <20041218235359.GA3782@suse.de> <1103416452.28301.5.camel@krustophenia.net> Mime-Version: 1.0 (generated by SEMI 1.14.5 - "Awara-Onsen") Content-Type: multipart/mixed; boundary="Multipart_Mon_Dec_20_15:08:16_2004-1" Return-path: In-Reply-To: <1103416452.28301.5.camel@krustophenia.net> Sender: alsa-devel-admin@lists.sourceforge.net Errors-To: alsa-devel-admin@lists.sourceforge.net List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , List-Archive: To: Lee Revell Cc: Olaf Hering , alsa-devel@lists.sourceforge.net List-Id: alsa-devel@alsa-project.org --Multipart_Mon_Dec_20_15:08:16_2004-1 Content-Type: text/plain; charset=US-ASCII At Sat, 18 Dec 2004 19:34:12 -0500, Lee Revell wrote: > > On Sun, 2004-12-19 at 00:53 +0100, Olaf Hering wrote: > > Is this just debug output, or should I be worried about it? > > > > linux-2.6.10-rc3-olh/sound/core/pcm_lib.c:158: BUG: stream = 0, pos = 0x4000, buffer size = 0x4000, period size = 0x1000 > > > > This is an ibook2, playing mp3 with xmms, alsa version is 1.0.3, from sles9. > > I remember no failures in the last couple hours. > > That message indicates that the hardware pointer returned by the pointer > callback was beyond the end of the buffer which should not be possible. > > This could indicate an off by one error in the driver, it looks like the > erroneous position is one sample past the end of the buffer. Does the patch below work? Takashi --Multipart_Mon_Dec_20_15:08:16_2004-1 Content-Type: text/plain; charset=US-ASCII Index: alsa-kernel/ppc/pmac.c =================================================================== RCS file: /suse/tiwai/cvs/alsa/alsa-kernel/ppc/pmac.c,v retrieving revision 1.51 diff -u -r1.51 pmac.c --- alsa-kernel/ppc/pmac.c 15 Dec 2004 21:45:54 -0000 1.51 +++ alsa-kernel/ppc/pmac.c 20 Dec 2004 14:06:46 -0000 @@ -318,7 +318,8 @@ stat = ld_le16(&cp->xfer_status); if (stat & (ACTIVE|DEAD)) { count = in_le16(&cp->res_count); - count = rec->period_size - count; + if (count) + count = rec->period_size - count; } #endif count += rec->cur_period * rec->period_size; --Multipart_Mon_Dec_20_15:08:16_2004-1-- ------------------------------------------------------- SF email is sponsored by - The IT Product Guide Read honest & candid reviews on hundreds of IT Products from real users. Discover which products truly live up to the hype. Start reading now. http://productguide.itmanagersjournal.com/