[alsa-devel] [PATCH 2/5] ALSA: snd-usb: implement new endpoint streaming model

Daniel Mack zonque at gmail.com
Tue Dec 20 21:16:56 CET 2011

On 12/20/2011 04:32 PM, Clemens Ladisch wrote:
> Takashi Iwai wrote:
>> One point I'm not sure about this implementation is the use of
>> tasklet.  The tasklet itself runs again in ep->lock, what's the
>> rationale for it?  In other words, can't it be a straight function
>> call?
> This architecture was copied from ua101.c.


> If I remember correctly,
> the original reason for the tasklet was to avoid calling
> snd_pcm_period_elapsed() from inside the lock.  This would not be
> necessary in endpoint.c.

Hmm. It was actually you who told me to use a tasklet and not to submit
urbs from the input urb completion callbacks, as we can run out of
queuable playback buffers otherwise. Now that I think about it again, I
agree that it could be done without a tasklet as well by just keeping
the returned ones in a list and handle them in one go whenever possible.

I'll try this when I spin the next version.


More information about the Alsa-devel mailing list