Hi, On Thursday 25 December 2008, K wrote: > Hi all, > > I tried to setup a very cheap webcam ( > http://photos.imageevent.com/eunion4u/ebay/L01-G.jpg) with the latest > version of the UVC driver source tree (revision 9904). I haven't been able > to make it work with Motion (complaining about mmap) though the /dev/video1 > device has been created. I have another UVC webcam that works well at > /dev/video0 (it's an Hercules Dualpix II). > > There is one odd thing when using the command "v4l2-ctl -d 1 --all" (full > output is below), I get an unknown colorspace which could be one of the > issues: > > Format Video Capture: > Width/Height : 640/480 > Pixel Format : 'MJPG' > Field : None > Bytes per Line: 0 > Size Image : 614400 > Colorspace : Unknown (00000000) <------------------- looks > weird, I was expecting SRGB ou YUV or at least a non-null value..
If you look at the UVC descriptors (from your lsusb output): > VideoStreaming Interface Descriptor: > bLength 6 > bDescriptorType 36 > bDescriptorSubtype 13 (COLORFORMAT) > bColorPrimaries 0 (Unspecified) > bTransferCharacteristics 0 (Unspecified) > bMatrixCoefficients 0 (Unspecified) The device doesn't report color primaries so the driver can't report a valid colorspace (I refuse to generate a random value :-)). > I am developer though I don't have much experience with drivers under > Linux. Any technical hint is welcome. [snip] > dmesg output when loading uvcvideo module, looks similar to my working > Hercules camera: > ------------------------------------ > Linux video capture interface: v2.00 > uvcvideo 5-1:1.0: usb_probe_interface > uvcvideo 5-1:1.0: usb_probe_interface - got id > uvcvideo: Found UVC 1.00 device Hercules Dualpix Exchange (06f8:3005) > uvcvideo: UVC non compliance - GET_DEF(PROBE) not supported. Enabling > workaround. > input: Hercules Dualpix Exchange as /class/input/input26 > usb 5-1: link qh4-0001/efbcd100 start 3 [1/0 us] > uvcvideo 4-1:1.0: usb_probe_interface > uvcvideo 4-1:1.0: usb_probe_interface - got id > uvcvideo: Found UVC 1.00 device USB2.0 PC CAMERA (18ec:3288) > uvcvideo: UVC non compliance - GET_DEF(PROBE) not supported. Enabling > workaround. > input: USB2.0 PC CAMERA as /class/input/input27 > uhci_hcd 0000:00:09.1: reserve dev 4 ep81-INT, period 8, phase 4, 23 us > usbcore: registered new interface driver uvcvideo > USB Video Class driver (v0.1.0) > ------------------------------------ Nothing unexpected there. > Trying to launch it with Motion, dmesg shows some errors: > ------------------------------------ > uvcvideo: Failed to query (130) UVC probe control : 0 (exp. 26). > uvcvideo: Failed to query (130) UVC probe control : 0 (exp. 26). > uvcvideo: Failed to query (130) UVC probe control : 0 (exp. 26). > uvcvideo: Failed to query (130) UVC probe control : 0 (exp. 26). > ------------------------------------ Try setting the quirks parameter to 2 before plugging your webcam (either with 'modprobe uvcvideo quirks=2' if the driver is not already loaded, or with 'echo 2 > /sys/modules/uvcvideo/parameters/quirks' if the driver is already loaded). > Motion itself complains: > ------------------------------------- > [0] Motion 3.2.11 Started > [0] Thread 1 is from /usr/local/etc/motion.conf > [1] Thread 1 started > [1] cap.driver: "uvcvideo" > [1] cap.card: "USB2.0 PC CAMERA" > [1] cap.bus_info: "0000:00:09.1" > [1] cap.capabilities=0x04000001 > [1] - VIDEO_CAPTURE > [1] - STREAMING > [1] Supported palettes: > [1] 0: MJPG (MJPEG) > [1] VIDIOC_TRY_FMT failed for format MJPG: Input/output error This is the real problem, and it should be fixed by quirks=2. I'll fix the driver after getting confirmation this is the real issue. > [1] ioctl(VIDIOCGMBUF) - Error device does not support memory map As VIDIOC_TRY_FMT failed Motion probably falls back to V4L1 which is not supported by the uvcvideo driver. Fixing the above problem should get rid of this one as well. > [1] V4L capturing using read is deprecated! > [1] Motion only supports mmap. > [1] Could not fetch initial image from camera > [1] Motion continues using width and height from config file(s) > [1] Resizing pre_capture buffer to 1 items > [1] Started stream webcam server in port 8080 > [1] Resizing pre_capture buffer to 3 items > [1] Retrying until successful connection with camera > ------------------------------------ [snip] Best regards, Laurent Pinchart _______________________________________________ Linux-uvc-devel mailing list Linux-uvc-devel@lists.berlios.de https://lists.berlios.de/mailman/listinfo/linux-uvc-devel