From: Kuninori Morimoto Subject: Re: my driver can't reproduce continuously Date: Mon, 27 Jul 2009 09:58:19 +0900 Message-ID: References: <20090723100640.GB25013@sirena.org.uk> Mime-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail02.idc.renesas.com (mail.renesas.com [202.234.163.13]) by alsa0.perex.cz (Postfix) with ESMTP id E007E24338 for ; Mon, 27 Jul 2009 02:58:29 +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: Takashi Iwai Cc: alsa-devel@alsa-project.org List-Id: alsa-devel@alsa-project.org Dear Takashi Thank you for your comment > My rough guess is that your pointer callback returns a wrong value. > The pointer callback is supposed to give the currently played position > offset in a ring buffer, and ranged from 0 to buffer_size-1. > When the first snd_pcm_period_elapsed() is called, it should be > (ideally) pointing at period_size, at the succeeding calls, > period_size*2, period_size*3, then 0 again. The criminal is my wrong understanding... OK. But I still have trouble now. follows the log ------------ trigger called hw_prt_base = 0, hw_prt = 127, appl_prt = 8192 hw_prt_base = 0, hw_prt = 255, appl_prt = 8319 (snip) hw_prt_base = 0, hw_prt = 3845, appl_prt = 11888 hw_prt_base = 0, hw_prt = 3995, appl_prt = 12037 call elapsed // 2nd call hw_prt_base = 0, hw_prt = 4123, appl_prt = 12037 hw_prt_base = 0, hw_prt = 4272, appl_prt = 12187 call elapsed // 3rd call hw_prt_base = 0, hw_prt = 6202, appl_prt = 12288 call elapsed // 4th call hw_prt_base = 8192, hw_prt = 8192, appl_prt = 12288 <<< driver stopped here... >> ------------ when 1st buffer was send, driver stop. 2nd trigger function isn't called. Best regards -- Kuninori Morimoto