Ming Lei wrote:
> On Fri, Jul 19, 2013 at 5:06 PM, Clemens Ladisch <clem...@ladisch.de> wrote:
>> Ming Lei wrote:
>>> if (list_empty (&stream->td_list)) {
>>>     if (running from hcd interrupt or tasklet context)
>>>          underrun
>>>     else
>>>          new stream
>>> }
>>
>> Why shouldn't a driver start a stream in an interrupt/tasklet,
>
> It should, but actually one driver won't do this because generally
> usb_set_interface() is required before starting stream.

Not always, and the usb_set_interface() call can be done in a different
context.

> If stream is started in another non-isoc URB complete(), this approach
> can cover this situation easily.
>
> But do you have examples in which one isoc stream is started in another
> isoc URB's complete()?

There are quite a few audio devices using implicit rate feedback, where
playback URBs are submitted from the capture completions handler.

>> or delay URB resubmission to a workqueue?
>
> Yes, it is possible, and the isoc URBs can be resubmitted in tasklet too,
> but it isn't a big deal:

But your proposed code would not be able to differentiate a workqueue
resubmission from a stream start.


Regards,
Clemens
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to