Hi Alexey, On Thursday 15 October 2009 21:00:59 Alexey Fisher wrote: > I did some simple dirty hack, it prevent webcam from being killed by cheese. > On other site it make cheese work too. > Like Paulo said, the camera is slow and it need more time to make thirst > start, some time it need 8 seconds on second start it need about 2 seconds. > If we call STREAMOFF before we get EOF, the camera will die.
Which EOF are you talking about here ? The UVC bit in the video packets header ? How have you tested that ? > IMHO, the driver should decide if camera ready or not. The easiest way > is, to add SLOWSTART quirk. Correct way probobly will be to check if camera > ready or not. > Any ideas how to make it? Or any other ideas? > > I know, cheese use some bruteforce way to get settings, but the bug in > cheese make the bug in uvcvideo easy to reproduce. It's not a bug in uvcvideo but a bug in the camera. Have you been to isolate exactly which sequence of ioctls issued by Cheese make the camera crash ? I'd like more information about that. > here is this hack: > > diff --git a/drivers/media/video/uvc/uvc_video.c > b/drivers/media/video/uvc/uvc_video.c > index f960e8e..fdc7007 100644 > --- a/drivers/media/video/uvc/uvc_video.c > +++ b/drivers/media/video/uvc/uvc_video.c > @@ -794,7 +794,7 @@ static void uvc_uninit_video(struct uvc_streaming > *stream, int free_buffers) > { > struct urb *urb; > unsigned int i; > - > + msleep(5000); > for (i = 0; i < UVC_URBS; ++i) { > urb = stream->urb[i]; > if (urb == NULL) > @@ -985,7 +985,7 @@ static int uvc_init_video(struct uvc_streaming > *stream, gfp_t gfp_flags) > return ret; > } > } > - > + msleep(5000); > return 0; > } I hate random sleeps. Really. I'll need more information about the bug, as well as a simple userspace test application, before making any such change to the driver. -- Regards, Laurent Pinchart _______________________________________________ Linux-uvc-devel mailing list Linux-uvc-devel@lists.berlios.de https://lists.berlios.de/mailman/listinfo/linux-uvc-devel