Hi Michael,

> > The Linux UVC driver doesn't support reading directly from the device
> > (yet).  Only the streaming I/O method (using mmap) is supported. You can
> > test your webcam with luvcview.
>
> Thanks for the feedback.  I had tried a few other utilities to read from
> /dev/vide0, but they were giving me errors as well.  I thought that cat(1)
> would be the simplest way to demonstrate the problem, but I guess not :-)
>
> When I try using the luvcview utility, the error messages I'm seeing are:
>
>       [EMAIL PROTECTED] ~/luvcview-20060920]$ ./luvcview
>       uvcview version 0.1.7
>       Video driver: x11
>       A window manager is available
>       video /dev/video0
>       Unable to set format: 5.
>        Init v4L2 failed !! exit fatal
>
> And in dmesg, I see:
>
>       [17357520.848000] uvcvideo: Trying format 0x47504a4d (MJPG): 320x240.
>       [17357520.848000] uvcvideo: Using default frame interval 66666.6 us 
> (15.0
> fps). [17357521.148000] uvcvideo: Failed to query (1) UVC control 1 (unit
> 0) : -110 (exp. 26).

Welcome to the "Logitech hardware bug victims" club. You are experiencing a 
know hardware problem for which no proper solution exists yet. A patch has 
been posted some times ago on this list. Depending on how much your computer 
is affected by the bug, it might help you.

> Looking at the luvcview-20060920/v4l2uvc.c file, the codepath that
> generates the "Unable to set format" error is:
>
>       /* set format in */
>       memset(&vd->fmt, 0, sizeof(struct v4l2_format));
>       vd->fmt.type = V4L2_BUF_TYPE_VIDEO_CAPTURE;
>       vd->fmt.fmt.pix.width = vd->width;
>       vd->fmt.fmt.pix.height = vd->height;
>       vd->fmt.fmt.pix.pixelformat = vd->formatIn;
>       vd->fmt.fmt.pix.field = V4L2_FIELD_ANY;
>       ret = ioctl(vd->fd, VIDIOC_S_FMT, &vd->fmt);
>       if (ret < 0) {
>           printf("Unable to set format: %d.\n", errno);
>           goto fatal;
>       }
>
> Which I thought that may be an indication that I needed to use the "-f"
> or "-s" command line arguments to change the requested format or size to
> something that may be better supported by my camera, so I tried a number
> of different permutations with:
>
>       for f in yuv jpg; do
>       for s in 1024x576 1280x960 160x120 176x144 320x240 352x288 432x240 \
>                480x360 512x288 640x360 640x480 704x576 864x480 960x720; do
>                       ./luvcview -f $f -s $s -o ~/foo
>       done
>       done
>
> However, none of them appeared to be successful.
>
> Searching around for the "Failed to query" error message that appeared in
> dmesg seems to suggest that I may be hitting a Logitech hardware bug :-(

Exactly :-( You might be lucky with the so-called "reset patch". Please search 
the list archive.

Best regards,

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

Reply via email to