Re: How should we handle isochronous underruns?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Jul 19, 2013 at 6:30 PM, Clemens Ladisch <clemens@xxxxxxxxxx> wrote:
> Ming Lei wrote:
>> On Fri, Jul 19, 2013 at 5:06 PM, Clemens Ladisch <clemens@xxxxxxxxxx> 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.

That still can be covered easily by the approach since isoc direction is
different, :-)

>
>>> 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.

As I explained, it isn't a big deal. Either it is working well for long time
in case of underrun with empty queue, or we can change the resubmission
to complete(), right?

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




[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux