RE: [linux-uvc-devel] Closing Bulk Stream in V4L2 UVC Linux driver

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

 



Thanks for the answer.
First, I mentioned something wrong below, I meant "AltSet 0" (alternateSetting set 0) instead of "AltSet 1" (alternateSetting set 1). Sorry about that.

What STREAMOFF does is the following:
      - uvc_uninit_video (frees URB buffers)
      - usb_set_interface 0 (sends set alternate 0)
      - uvc_queue_enable 0 (sends vb2_streamoff)
      - uvc_video_clock_cleanup (cleanup some memory)

What STREAMON does is the following:
	- uvc_video_clock_init (init some memory)
	- uvc_queue_enable (sends vb2_streamon)
	- uvc_commit_video (sends commit to USB)
	- uvc_init_video (allocated URB buffers)

So when do you think the device should "open"/"close" a stream/interface? 
Maybe "open" stream when "commit" is received and "close" stream when "set alternate 0" is received?

Thanks,
Hani;

-----Original Message-----
From: Paulo Assis [mailto:pj.assis@xxxxxxxxx] 
Sent: Thursday, January 02, 2014 11:43
To: Ayoub, Hani
Cc: linux-uvc-devel@xxxxxxxxxxxxxxxxxxxxx; Linux Media Mailing List
Subject: Re: [linux-uvc-devel] Closing Bulk Stream in V4L2 UVC Linux driver

Hi,
guvcview just handles this like any other V4L2 device. You should look at the driver in this case, and check what it does when a VIDIOC_STREAMOFF is received.

Regards,
Paulo

PS: adding linux media to CC


2014/1/1 Ayoub, Hani <hani.ayoub@xxxxxxxxx>:
> Hi,
>
> I'm trying to bring up a device which sends data using BULK transfer 
> using
> V4L2 UVC Linux driver (Ubuntu 12.04).
>
> Using guvcview, I can see that the device transfer data successfully 
> and I can see a stream. However, that works fine ONLY the first time I 
> run guvcview after I plug-in the device, closing the app and 
> re-launching it does not show any pictures... to get a good stream I 
> have to re-plug-in the device to the USB 3.0 port.
>
>
>
> Via USB analyzer, I can see that when closing the application (closing 
> the
> device) an "AltSet 1" (alternateSetting set 1) is sent although it's 
> prohibited by spec (UVC 1.1 section 2.4.3) - so the device ignores it, 
> this (I think) is the reason why the stream doesn't work when 
> re-launching the application.
>
>
>
> My question is: how should I properly close the stream in BULK? Is 
> there any way to "patch" V4L or the application to make closing the device works fine?
>
> There are some similar discussions in the web, but I think there's no 
> real answer (some references below)
>
>
>
> References:
>
> *         Thread1
>
> *         Thread2
>
> *         Thread3
>
> *         Thread4
>
>
>
> Thanks,
>
> Hani;
>
> ---------------------------------------------------------------------
> Intel Israel (74) Limited
>
> This e-mail and any attachments may contain confidential material for 
> the sole use of the intended recipient(s). Any review or distribution 
> by others is strictly prohibited. If you are not the intended 
> recipient, please contact the sender and delete all copies.
>
>
> ----------------------------------------------------------------------
> -------- Rapidly troubleshoot problems before they affect your 
> business. Most IT organizations don't have a clear picture of how 
> application performance affects their revenue. With AppDynamics, you 
> get 100% visibility into your Java,.NET, & PHP application. Start your 
> 15-day FREE TRIAL of AppDynamics Pro!
> http://pubads.g.doubleclick.net/gampad/clk?id=84349831&iu=/4140/ostg.c
> lktrk _______________________________________________
> Linux-uvc-devel mailing list
> Linux-uvc-devel@xxxxxxxxxxxxxxxxxxxxx
> https://lists.sourceforge.net/lists/listinfo/linux-uvc-devel
>
---------------------------------------------------------------------
Intel Israel (74) Limited

This e-mail and any attachments may contain confidential material for
the sole use of the intended recipient(s). Any review or distribution
by others is strictly prohibited. If you are not the intended
recipient, please contact the sender and delete all copies.

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




[Index of Archives]     [Linux Input]     [Video for Linux]     [Gstreamer Embedded]     [Mplayer Users]     [Linux USB Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux