From mboxrd@z Thu Jan 1 00:00:00 1970 From: Clemens Ladisch Subject: Re: ALSA sound/core/pcm_lib.c:318: BUG: pcmC0D0p:0, pos = 32768, buffer size = 32768 , period size = 2048 Date: Mon, 06 Sep 2010 19:35:55 +0200 Message-ID: <4C85267B.40002@ladisch.de> References: <4C849542.4030409@ladisch.de> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from out1.smtp.messagingengine.com (out1.smtp.messagingengine.com [66.111.4.25]) by alsa0.perex.cz (Postfix) with ESMTP id 60F3224627 for ; Mon, 6 Sep 2010 19:35:27 +0200 (CEST) In-Reply-To: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: alsa-devel-bounces@alsa-project.org Errors-To: alsa-devel-bounces@alsa-project.org To: Patrick Doyle Cc: alsa-devel@alsa-project.org List-Id: alsa-devel@alsa-project.org Patrick Doyle wrote: > On Mon, Sep 6, 2010 at 3:16 AM, Clemens Ladisch wrote: > > Patrick Doyle wrote: > > > pos = 32768, buffer size = 32768 > > > > This means that the driver's pointer callback returned a position that > > is outside the buffer; in this case, the position is just after the end > > of the buffer. > > OK, so I should go trace down how and when the driver invokes that > callback. That callback is invoked by the ALSA framework. The callback itself is buggy. > Hmmm... any tips on where I might start that journey, given that this > driver is an SoC driver? bf5xx_pcm_pointer() in soc/blackfin/bf5xx-i2s-pcm.c calls sport_curr_offset_tx() in soc/blackfin/bf5xx-sport.c, which just calls get_dma_curr_addr(). I'd guess that the end of the buffer is considered a valid address by the Blackfin's DMA unit, so the driver has to check for that and wrap it around to zero. Regards, Clemens