[alsa-devel] [PATCH 2/5] ALSA: snd-usb: switch over to new endpoint streaming logic
torsten.schenk at zoho.com
Wed Nov 2 23:01:54 CET 2011
I'm following the discussion about Daniel's patch because I'm at a similar point
with the 6fire driver - separating urb handling from alsa substream handling
and pcm callbacks. One comment catched my attention:
>> The trigger callback should execute very quickly; the initial URB
>> submission should be handled in the prepare callback.
>Indeed this is a PITA since long time ago... In general, it's wrong
>to do it in prepare callback. But we had to do just as a workaround.
It did because I always thought that would be the right place to start the
transfer. If it is not, what is the prepare callback supposed to do (at least
in the usb case)? Is it simply a check routine for the hw_params?
I also implemented copying data alsa<->urb in a tasklet. This tasklet
might actually also be a good choice for starting urb transfer if that should
be done in the trigger callback. If so, I'll change the 6fire driver
On the other side, the transfer would not necessarily have been started
when trigger finishes - one advantage of doing it in the prepare callback.
Does that matter for the alsa system?
Another question came into my mind: does alsa allow changing the hw_params
after prepare has been called?
More information about the Alsa-devel