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

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;
}



Alexey,

Am Mittwoch, den 14.10.2009, 16:37 +0100 schrieb Paulo Assis: 
> Alexey,
> I believe it has something to do with the camera initialization, both
> the sphere and the pro9000 are based on the same chip and it takes it
> several seconds to initialize, unlike other cameras.
> Not sure how cheese handles this, although I guess very badly :D.
> If I start some other software first, like guvcview, then cheese, it
> will work OK since the camera initialization already happen, but if I
> start cheese first, it can crash/lock the camera. The latest cheese
> version from upcoming ubuntu karmic exhibits the same problems (even
> worst than intrepid). In fact the last time I experience this, the
> crash was so bad that alsa/pulse was also affected, it wouldn't start
> the camera mic, making the entire system very slow.
> Other cameras with fast initialization times work without problems.
> 
> Best regards,
> Paulo
> 
> 2009/10/14 Alexey Fisher <bug-tr...@fisher-privat.net>:
> > Actually i don't really care about chees or empathy do not work, but
> > more. Haw they make camera freeze so hard that only plugoff will help?
> > What control was used to do it?
> >
> > Alexey.
> >
> > Am Mittwoch, den 14.10.2009, 09:53 -0400 schrieb Andres Cimmarusti:
> >> I have the same problem with cheese and the same camera. I don't get
> >> any problems using lucview nor skype. Cheese version 2.22 was actually
> >> working fairly well for me (using Debian stable), but I couldn't
> >> record videos so I uninstalled it. I'll wait for a more polished
> >> "bug-free" cheese which will be available with squeeze.
> >>
> >> Andres
> >>
> >> On Wed, Oct 14, 2009 at 7:29 AM, Paulo Assis <pj.as...@gmail.com>
> >> wrote:
> >>         Alexey,
> >>         Since this only manifests itself after using cheese I would
> >>         say it's a
> >>         cheese problem.
> >>         I also have the same problem with a sphereAF and cheese,
> >>         sometimes it
> >>         works fine, others the camera just crashes and I need to
> >>         unplug it so
> >>         that it will work again.
> >>         Other apps work just fine with the camera.
> >>
> >>         Best regards,
> >>         Paulo
> >>
> >>         2009/10/14 Alexey Fisher <bug-tr...@fisher-privat.net>:
> >>
> >>         > Hallo,
> >>         > I found in this list message "Logitech QuickCam Pro for
> >>         Notebooks
> >>         > 046d:0991 not working" from Mon Jul 28 10:18:08 CEST 2008.
> >>         So now i will
> >>         > ask about same problem. It seems some bugs was fixed, some
> >>         new probably
> >>         > made.
> >>         >
> >>         > I have some random problem with this camera. Thirst of all
> >>         cheese, some
> >>         > time it's work, some time i gat only black screen, after
> >>         this camera do
> >>         > not work, so i need to replug it. With mplayer it working
> >>         mostly normal
> >>         > but after cheese it will not work too. The video chat with
> >>         empathy has
> >>         > same problem like cheese to. cheese and epmaty depend on
> >>         gstreamer but
> >>         > this seems to work fine if i use:
> >>         >
> >>         > gst-launch v4l2src ! queue ! videorate !
> >>         > video/x-raw-yuv,framerate=15/1 ! videoscale !
> >>         > video/x-raw-yuv,width=640,height=480 ! ffmpegcolorspace !
> >>         videoscale !
> >>         > ximagesink
> >>         >
> >>         >  After cheese i get this demsg:
> >>         >
> >>         > [ 1296.135911] usbcore: registered new interface driver
> >>         snd-usb-audio
> >>         > [ 1296.147366] uvcvideo: Found UVC 1.00 device <unnamed>
> >>         (046d:0991)
> >>         > [ 1296.170101] input: UVC Camera (046d:0991)
> >>         >
> >>         as /devices/pci0000:00/0000:00:1a.7/usb1/1-6/1-6:1.0/input/input15
> >>         > [ 1296.170139] usbcore: registered new interface driver
> >>         uvcvideo
> >>         > [ 1296.170142] USB Video Class driver (v0.1.0)
> >>         > [ 2235.420181] uvcvideo: Failed to query (135) UVC control 2
> >>         (unit 2) :
> >>         > -110 (exp. 2).
> >>         > [ 2235.721428] uvcvideo: Failed to query (135) UVC control 2
> >>         (unit 2) :
> >>         > -110 (exp. 2).
> >>         > [ 2242.560187] uvcvideo: Failed to query (135) UVC control 2
> >>         (unit 2) :
> >>         > -110 (exp. 2).
> >>         > [ 2242.860179] uvcvideo: Failed to query (135) UVC control 2
> >>         (unit 2) :
> >>         > -110 (exp. 2).
> >>         > [ 2266.230184] uvcvideo: Failed to set UVC probe control :
> >>         -110 (exp.
> >>         > 26).
> >>         > [ 2271.350744] uvcvideo: Failed to set UVC probe control :
> >>         -110 (exp.
> >>         > 26).
> >>         > [ 2289.660019] usb 1-6: USB disconnect, address 6
> >>         > [ 2293.430078] usb 1-6: new high speed USB device using
> >>         ehci_hcd and
> >>         > address 7
> >>         > [ 2293.708270] usb 1-6: configuration #1 chosen from 1
> >>         choice
> >>         >
> >>         > The guestion is, is it kernel, gstreamer or empathy and
> >>         cheese bug?
> >>         >
> >>         > _______________________________________________
> >>         > Linux-uvc-devel mailing list
> >>         > Linux-uvc-devel@lists.berlios.de
> >>         > https://lists.berlios.de/mailman/listinfo/linux-uvc-devel
> >>         >
> >>         _______________________________________________
> >>         Linux-uvc-devel mailing list
> >>         Linux-uvc-devel@lists.berlios.de
> >>         https://lists.berlios.de/mailman/listinfo/linux-uvc-devel
> >>
> >>
> >
> >
> >


_______________________________________________
Linux-uvc-devel mailing list
Linux-uvc-devel@lists.berlios.de
https://lists.berlios.de/mailman/listinfo/linux-uvc-devel

Reply via email to