On Fri, 14 May 2004 12:37:46 +0200
Takashi Iwai <[EMAIL PROTECTED]> wrote:

> > > prepare and trigger callbacks are already in irq-disabled.
> > > i.e. you need only spin_lock() in them.
> >
> > Does it mean that ALSA acquires the lock only when it calls PCM callbacks,
> > that is trigger(), etc., are atomic only wrt other PCM functions ?
>
> sorry i don't understand your question.
>
> the prepare and the trigger callbacks acquire several locks.
> first, the global rw_lock for the pcm linking (snd_pcm_link_rwlock),
> the group lock the substream belongs to, and the lock for the
> substream itself.  and the first lock/unlock is done with *_irq().

Ok, are those locks acquired also before calling any other interface
callback (control, midi...) ?  If so, it shouldn't be necessary protecting
with a spin_lock() the code which touches the hw inside prepare().



--
Giuliano.



-------------------------------------------------------
This SF.Net email is sponsored by: SourceForge.net Broadband
Sign-up now for SourceForge Broadband and get the fastest
6.0/768 connection for only $19.95/mo for the first 3 months!
http://ads.osdn.com/?ad_id=2562&alloc_id=6184&op=click
_______________________________________________
Alsa-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/alsa-devel

Reply via email to