Re: Detecting start/stop streaming for UVC webcam with bulk transfer mode

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

 



On Thu, Jul 4, 2013 at 9:12 AM, Sharma Bhupesh-B45370
<B45370@xxxxxxxxxxxxx> wrote:
> Hi,
>
>
>> On Thu, Jul 4, 2013 at 1:53 AM, Laurent Pinchart <laurent.pinchart@xxxxxxxxxxxxxxxx> wrote:
>> Hi Pratyush,
>
>> On Tuesday 02 July 2013 17:24:41 Pratyush Anand wrote:
>>> On 6/20/2013 11:20 AM, Chetan Nanda wrote:
>> >> On Tue, Jun 18, 2013 at 6:12 PM, Laurent Pinchart wrote:
>> >>> On Tuesday 18 June 2013 11:17:40 Chetan Nanda wrote:
>> >>>> Hi,
>> >>>>
>> >>>> I am currently working with UVC camera device which send data using
>> >>>> bulk transfer for preview and capture.
>> >>>> I have modified UVC gadget driver to start bulk streaming on receiving
>> >>>> first UVC_VS_COMMIT_CONTROL request from host side.
>> >>>> But currently not able to detect when to stop the streaming.
>> >>>>
>> >>>> I am running Cheese Application on host side to test start/stop
>> >>>> streaming. UVC gadget driver's 'uvc_function_set_alt' function is
>> >>>> getting called when closing the cheese application, but this function is
>> >>>> also (sometime) getting called when starting the cheese application on
>> >>>> HOST side, also some time this function gets called after receiving
>> >>>> first COMMIT_CONTROL.
>> >>>>
>> >>>> So, currently I am not able to find a proper way for starting /
>> >>>> stopping streaming for UVC bulk transfer.
>> >>>> Anyone has successfully implemented the start/stop streaming usecase
>> >>>> for bulk mode?
>> >>>
>> >>> That's in my opinion one of the shortcomings of the UVC specification.
>> >>> There is no explicit way to start streaming on bulk endpoints. One
>> >>> option would be to start streaming when receiving the first IN token on
>> >>> the bulk endpoint, and to stop streaming when no bulk activity has been
>> >>> detected for a given amount of time. A bit hackish, but I'm not sure if
>> >>> there's any other practical way.
>>>
>>> What is the limitation in defining bulk endpoint also under alt setting
>>> 1, similar to that of ISOC? Does USB specs prohibit to do that?
>
>> The UVC specification does, unfortunately. UVC 1.1 section 2.4.3 states
>
>> "A VideoStreaming interface containing a bulk endpoint for streaming shall
>> support only alternate setting zero. Additional alternate settings containing
>> bulk endpoints are not permitted in a device that is compliant with the Video
>> Class specification."
>
> Sorry, I have been away from the UVC gadget for too long now.
> I had posted a patchset in the past that worked for me on Bulk IN video streaming endpoint (see [1]).
> I have to sent out a V2 of this patchset, but I will be able to do so only after 2-3 weeks from now.
>
> I hope Chetan can try to apply this patch and test this Bulk video streaming using cheese application
> on a linux host on his platform as well.
>
> [1] http://comments.gmane.org/gmane.linux.usb.general/85292
>

Sorry for being late on reply,
Hi Bhupesh,

I am trying with the patches you have shared sometime back.
Your patches are relying on alt_setting commands from host for
start/stop bulk point streaming.

I have two development environments with different Fedora
distributions and using 'cheese' application for testing UVC device.
With one host, UVC device is getting alt_setting when cheese
application is start and stop. So at uvc driver level we are able to
identify when to enable/disable the bulk end point.

But with other host, there is no alt_setting command when starting the
cheese application (but getting one when stopping the cheese), so
patch set is not working with this host.

We further debug this issue and found that due to different version of
GStreamer cheese application behaving differently on both host.
So, either we have to do fixing in UVC device driver such that it can
properly and not depends on alt_setting, Or GStreamer should be made
same (not an extensible solution).

Thanks,
Chetan Nanda

> Regards,
> Bhupesh
>
>
>>> If not, then would it not insure set_alt when camera application at host PC
>>> is started or stopped?
>>>
>>> I am not sure what I am talking will really make sense. But, changing
>>> dwc3 driver in hackish way can not be the final solution.
>
>
>
--
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