Hi Laurent, Thanks for your mail, On Tue, Jun 18, 2013 at 6:12 PM, Laurent Pinchart <laurent.pinchart@xxxxxxxxxxxxxxxx> wrote: > Hi Chetan, > > 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. We are using DWC3 usb device controller and tried to look into the dwc3 driver code to check a place where we can identify first IN token from HOST side. I tried modify 'dwc3_endpoint_interrupt' function in file 'drivers/usb/dwc3/gadget.c' in case 'case DWC3_DEPEVT_XFERNOTREADY:' to start streaming for the first time when this case hit. I am not sure if this is the right place for this, I will dig more into the DWC3 spec and code. > >> Any pointer would be very helpful. > > -- > Regards, > > Laurent Pinchart > Thanks, Chetan Nanda -- 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