From mboxrd@z Thu Jan 1 00:00:00 1970 From: Takashi Iwai Subject: Re: Interrupt handler Date: Tue, 18 Mar 2003 14:32:43 +0100 Sender: alsa-devel-admin@lists.sourceforge.net Message-ID: References: Mime-Version: 1.0 (generated by SEMI 1.14.4 - "Hosorogi") Content-Type: text/plain; charset=US-ASCII Return-path: In-Reply-To: Errors-To: alsa-devel-admin@lists.sourceforge.net List-Help: List-Post: List-Subscribe: , List-Unsubscribe: , List-Archive: To: Giuliano Pochini Cc: alsa-devel@lists.sourceforge.net List-Id: alsa-devel@alsa-project.org At Mon, 17 Mar 2003 15:22:45 +0100 (CET), Giuliano Pochini wrote: > > > On 17-Mar-2003 Takashi Iwai wrote: > > usually in the interrupt handler, you need to just send "ack" to the > > middle layer by calling snd_pcm_period_elapsed(). then, the > > middle-layer checks the current position by calling pointer callback, > > and copy/send/set-silence in the necessary area. > > I didn't realize the role of .pointer callback. Tnx. > > In hw_params callback I build the hardware sg list according > to sgbuf->table. Then I have to set the card to play the list > in a neverending loop and to issue an irq at the and of each > period. Is it right ? yes. also, don't forget to unlock the spinlock during calling snd_pcm_period_elapsed() if a single lock is used for callbacks. as mentioned above, snd_pcm_period_elapsed() will call pointer callback. if you call snd_pcm_period_elapsed() inside the spinlock, this may result in a deadlock. Takashi ------------------------------------------------------- This SF.net email is sponsored by: Does your code think in ink? You could win a Tablet PC. Get a free Tablet PC hat just for playing. What are you waiting for? http://ads.sourceforge.net/cgi-bin/redirect.pl?micr5043en