Am Dienstag, den 25.01.2011, 14:38 +0100 schrieb Laurent Pinchart: > Hi Alexey, > > On Sunday 16 January 2011 09:57:53 Alexey Fisher wrote: > > Hi, > > i helping my friend to install linux on his new laptop "fujisu lifebook > > a340". It is cheap one (350€) but seems to work good with linux. But web > > cam has some issues, which i will discuss with you. > > > > It is uvc webcam (0408:1fc3 Quanta Computer, Inc.). > > For most frame sizes it aims to support 10, 15,25, 30 fps. In real life it > > stream only with 30fps, if i try to set 10fps, it will silently ignore it. > > The real problem - there is no exposure control and autoexposure do not > > working with 30fps too. So with normal light the image will be dark and > > noisy. > > > > With frame sizes 1280x960 and 1280x1024, it has max frame rate 9fps > > (aims to support 9 and 5 fps). Interesting thing is, autoexposure seems > > to work here. If i close the cam, frame rate will drop to ~4fps, and if > > i add extra light it will go to ~9fps. The image with this framerate is > > better than with 30fps. > > > > By tracing i also found "uvcvideo: Dropping payload (out of sync)." > > messages. So i added two quirks for this cam: UVC_QUIRK_STREAM_NO_FID > > for out of sync; > > Did UVC_QUIRK_STREAM_NO_FID make any difference ?
It remove all "out of sync" errors from trace. But i didn't noticed any stability or quality difference. > > UVC_QUIRK_RESTRICT_FRAME_RATE for dummy frame rates. > > > > Now my question: is it possible to pull/force some registers to test if > > auto exposure can work with 30fps too? > > The camera doesn't report exposure/auto exposure controls in its descriptors. > You could hack the driver to make it think the camera supports those > controls. > You should then be able to set them from userspace to see if they make any > difference. > > The easiest way would be to modify uvc_ctrl_init_device() in uvc_ctrl.c. Add > > static const u8 camera_controls[3] = { 0x0e, 0x00, 0x00 }; > > at the beginning of the function, and replace > > } else if (UVC_ENTITY_TYPE(entity) == UVC_ITT_CAMERA) { > bmControls = entity->camera.bmControls; > bControlSize = entity->camera.bControlSize; > } > > with > > } else if (UVC_ENTITY_TYPE(entity) == UVC_ITT_CAMERA) { > bmControls = camera_controls; > bControlSize = entity->camera.bControlSize; > } This is not working. I did other hack, i just allowed only high resolution. This is my last diff: > diff --git a/drivers/media/video/uvc/uvc_driver.c > b/drivers/media/video/uvc/uvc_ > index a1e9dfb..e771530 100644 > --- a/drivers/media/video/uvc/uvc_driver.c > +++ b/drivers/media/video/uvc/uvc_driver.c > @@ -495,7 +495,9 @@ static int uvc_parse_format(struct uvc_device *dev, > 10000000/frame->dwDefaultFrameInterval, > (100000000/frame->dwDefaultFrameInterval)%10); > - format->nframes++; > + if (get_unaligned_le16(&buffer[5]) == 1280) > + format->nframes++; > + > buflen -= buffer[0]; > buffer += buffer[0]; > } > @@ -1957,6 +1959,16 @@ MODULE_PARM_DESC(timeout, "Streaming control requests > tim > * though they are compliant. > */ > static struct usb_device_id uvc_ids[] = { > + /* (Quanta Computer, Inc.) Build in webcam found on Lifebook A530 */ > + { .match_flags = USB_DEVICE_ID_MATCH_DEVICE > + | USB_DEVICE_ID_MATCH_INT_INFO, > + .idVendor = 0x0408, > + .idProduct = 0x1fc3, > + .bInterfaceClass = USB_CLASS_VIDEO, > + .bInterfaceSubClass = 1, > + .bInterfaceProtocol = 0, > + .driver_info = UVC_QUIRK_STREAM_NO_FID > + | UVC_QUIRK_RESTRICT_FRAME_RATE }, > /* Genius eFace 2025 */ > { .match_flags = USB_DEVICE_ID_MATCH_DEVICE > | USB_DEVICE_ID_MATCH_INT_INFO, This i get before patch: uvcdynctrl -f Listing available frame formats for device video0: Pixel format: YUYV (YUV 4:2:2 (YUYV); MIME type: video/x-raw-yuv) Frame size: 640x480 Frame rates: 30, 25, 15, 10 Frame size: 352x288 Frame rates: 30, 25, 15, 10 Frame size: 320x240 Frame rates: 30, 25, 15, 10 Frame size: 176x144 Frame rates: 30, 25, 15, 10 Frame size: 160x120 Frame rates: 30, 25, 15, 10 Frame size: 1280x960 Frame rates: 9, 5 Frame size: 1280x1024 Frame rates: 9, 5 This is after patch: .... Pixel format: YUYV (YUV 4:2:2 (YUYV); MIME type: video/x-raw-yuv) Frame size: 1280x960 Frame rates: 9 Frame size: 1280x1024 Frame rates: 9 -- Regards, Alexey _______________________________________________ Linux-uvc-devel mailing list Linux-uvc-devel@lists.berlios.de https://lists.berlios.de/mailman/listinfo/linux-uvc-devel