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
_______________________________________________
Alsa-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/alsa-devel

Reply via email to