Re: [Linux-uvc-devel] control black list

2009-12-09 Thread Laurent Pinchart
Hi Paulo,

thanks a lot for the bug report and the proposed fixes.

>From 2.6.21 onwards the kernel provides a usb_match_one_id() function that 
matches perfectly what the driver needs here. In order to keep compatibility 
with < 2.6.21 kernels on the linuxtv.org tree, I've committed a patch that 
checks the idVendor and idProduct values directly (after converting them from 
little-endian to cpu-endian, which was forgotten in your first patch).

For the record, here's the patch.

# HG changeset patch
# User Laurent Pinchart 
# Date 1260408681 -3600
# Node ID 0826158f044cfc144681aa2e716a3825d8d84ce7
# Parent  065f9e34e07bea91007d787ae75ada7570cccf5c
uvcvideo: Fix controls blacklisting

From: Laurent Pinchart 

The control blacklisting code erroneously used usb_match_id() by passing
a pointer to a usb_device_id structure instead of an array of such
structures.

Replace the usb_match_id() call by usb_match_id_one().

Thanks to Paulo Assis for diagnosing the bug and providing an initial
fix.

Priority: normal

Signed-off-by: Laurent Pinchart 

diff -r 065f9e34e07b -r 0826158f044c linux/drivers/media/video/uvc/uvc_ctrl.c
--- a/linux/drivers/media/video/uvc/uvc_ctrl.c  Mon Dec 07 10:08:33 2009 -0200
+++ b/linux/drivers/media/video/uvc/uvc_ctrl.c  Thu Dec 10 02:31:21 2009 +0100
@@ -1395,7 +1395,14 @@
size = entity->processing.bControlSize;
 
for (i = 0; i < ARRAY_SIZE(blacklist); ++i) {
-   if (!usb_match_id(dev->intf, &blacklist[i].id))
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 21)
+   if ((blacklist[i].id.idVendor !=
+le16_to_cpu(dev->udev->descriptor.idVendor)) ||
+   (blacklist[i].id.idProduct !=
+le16_to_cpu(dev->udev->descriptor.idProduct)))
+#else
+   if (!usb_match_one_id(dev->intf, &blacklist[i].id))
+#endif
continue;
 
if (blacklist[i].index >= 8 * size ||

-- 
Best regards,

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


Re: [Linux-uvc-devel] [SUPPORTED] 04f2:a147 Chicony "USB2.0 2MP UVC Camera" (sold as Medion P86004 "2MP Webcam with Headset")

2009-12-09 Thread Laurent Pinchart
On Friday 04 December 2009 02:02:53 Melchior FRANZ wrote:
> * Laurent Pinchart -- Thursday 03 December 2009:
> > On Wednesday 02 December 2009 18:10:56 Melchior FRANZ wrote:
> > > I didn't find a reserved keysym for webcam snapshot buttons.
> >
> > What about XF86WebCam ?
> 
> I saw that one, but the definition says that it's for launching the "camera
>  app", not for taking a snapshot. Sure, I could use that locally, as my
>  keyboard doesn't have a camera launcher key. But this is probably not
>  generally usable.
> 
> XF86keysym.h:#define XF86XK_WebCam  0x1008FF8F   /* Launch web
>  camera app.*/

Good point. I'm not sure how formal the definition is though. And there's no 
formal definition for the webcam button usage either, it could be used to 
launch the web camera application :-)

> (And I had assumed that xmodmap can't assign keys from XF86keysym.h, but I
>  was wrong. It just has to be the raw value:  "keycode 187 = 0x1008FF8F".)
> 
> > The camera doesn't need to stream video to report button events. Holding
> > the video device node (/dev/videoX) open is enough. It should be quite
> > trivial to write an application that opens the device node and then
> > sleeps forever.
> 
> That would be trivial, indeed. But once open for supporting the snapshot
>  key, it can probably not be opened a second time for actually taking the
>  snapshot. I assume one would first have to close the device, then take the
>  shot, then grab the device again for the next shot. A bit messy. But I
>  don't care much, I just wondered.  :-)

The uvcvideo driver supports multiple opens. You can open the device in an 
application and sit there with the device opened without disturbing any other 
application. Of course, if you're trying to stream video in two separate 
applications at the same time, that's another story.

-- 
Regards,

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


Re: [Linux-uvc-devel] New UVC webcam not working

2009-12-09 Thread Laurent Pinchart
Hi Chris,

On Monday 07 December 2009 09:19:54 Chris Wilkinson wrote:
> Hi there,
> 
> I bought a usb2 vga uvc-compliant webcam (arkmicro chipset) today for use
>  with Skype 2.1 beta on openSUSE 11. When I plug it in I get this in
>  dmesg...
> 
> usb 4-2: new high speed USB device using ehci_hcd and address 11
> usb 4-2: configuration #1 chosen from 1 choice
> usb 4-2: New USB device found, idVendor=18ec, idProduct=3299

Could you please send me the output of

lsusb -v -d 18ec:3299

Thanks.

> usb 4-2: New USB device strings: Mfr=1, Product=2, SerialNumber=0
> usb 4-2: Product: USB2.0 PC CAMERA
> usb 4-2: Manufacturer: ARKMICRO
> uvcvideo: disagrees about version of symbol v4l_compat_translate_ioctl
> uvcvideo: Unknown symbol v4l_compat_translate_ioctl
> uvcvideo: disagrees about version of symbol video_devdata
> uvcvideo: Unknown symbol video_devdata
> uvcvideo: disagrees about version of symbol video_unregister_device
> uvcvideo: Unknown symbol video_unregister_device
> uvcvideo: disagrees about version of symbol video_device_alloc
> uvcvideo: Unknown symbol video_device_alloc
> uvcvideo: disagrees about version of symbol video_register_device
> uvcvideo: Unknown symbol video_register_device
> uvcvideo: disagrees about version of symbol video_usercopy
> uvcvideo: Unknown symbol video_usercopy
> uvcvideo: disagrees about version of symbol video_device_release
> uvcvideo: Unknown symbol video_device_release
> 
> I'm running the latest version of uvcvideo, compiled from source today. No
>  /dev/video* device is created, and because of that no webcam software can
>  see the webcam. I do see a new usb audio device (camera's inbuilt mic),
>  but of course I would prefer if I could get video with that.
> 
> Does anyone have any pointer as to where I can start, to diagnose what
>  prevents the video from this camera working? Are there some parameters I
>  can try and pass to the kernel module etc?...

The above messages show that you've indeed installed the uvcvideo driver from 
source, but that the v4l core modules (such as videodev.ko) are still the one 
bundled with your default kernel. You need to install all the modules from the 
source tree.

-- 
Regards,

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


Re: [Linux-uvc-devel] Genius cam to be added to the compatible list

2009-12-10 Thread Laurent Pinchart
Hi Federico,

On Tuesday 08 December 2009 15:05:58 Federico Tello Gentile wrote:
> Hi. Maybe you can add the "Genius iSlim 330" to the compatible cam list
> 
> The ID is 0458:505e
> 
> lsusb output:
> 
> Bus 002 Device 003: ID 0458:505e KYE Systems Corp. (Mouse Systems)
> 
> It is not the mouse ID, I checked unplugging the cam.
> 
> The camera is this one:
> 
> http://www.geniusnet.com/geniusOnline/online.portal?_nfpb=true&productPortl
> et_actionOverride=%2Fportlets%2FproductArea%2Fcategory%2FqueryPro&_windowLa
> bel=productPortlet&productPortletproductId=1092053&_pageLabel=productPage&t
> est=portlet-action
> 
> I think it is important to add more genius models to the list because
> most brands listed there are unknown in Argentina where I live, so the
> list might not be too useful for a shopper around here.
> 
> All the UVC cameras actually being sold in stores in my area were not in
> the list and most of them were Genius.

Thanks for the report. I've updated the supported devices list on the website.

-- 
Regards,

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


Re: [Linux-uvc-devel] Is Logitech Webcam Model C250 Supported?

2009-12-10 Thread Laurent Pinchart
Hi Steve,

On Friday 04 December 2009 19:54:34 saze...@aol.com wrote:
>  Hello,
> Guten Tag,
> 
> I have alogitech C250 which is device ID 046d:0804 with chipset SPCA2211.
> 
> Is itsupported?

Why don't you try it ? :-)

The camera should be supported. I haven't received any test report for it 
though, but I've successfully tested the C600 and Portable C200.

Could you please send me the output of

lsusb -v -d 046d:0804

with your camera plugged in ? Thanks.

-- 
Regards,

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


Re: [Linux-uvc-devel] Is Logitech Webcam Model C250 Supported?

2009-12-10 Thread Laurent Pinchart
Hi Steve,

(CC'ing the linux-uvc-devel mailing list, as the information you wrote can be 
helpful for many people).

On Thursday 10 December 2009 16:21:21 saze...@aol.com wrote:
>  Laurent,
> 
> Thanks for the reply.  I sent the output of dmesg to Paulo and he observed
>  the camera was connected via a hub. Paulo suspected that the problem may
>  be caused by a defect in the way that Linux handles hubs. It turns out
>  that all of the USB ports on my laptop go through a hub. I switched to a
>  desktop and it worked!
> I am using Puppy Linux and I relayed the problem to the Puppy forum.
> One of the members off this advice on changing the uvcvideo driver to get
>  around the hub problem:
> 
> While compiling the 2.6.31.6 kernel, I noticedthis: in order to get true
>  usb2 speed through my (Intel ICH7) usbports, I must compile the usb2
>  driver ehci_hcd into the kernel, not asa module. Otherwise the usb1 driver
>  (uhci_hcd) grabs the hub'sinterrupts first and doesn't relinquish them to
>  ehci_hcd. Result:slww usb-port operation. I would speculate, too slow
>  for a webcam.
> 
> I would therefore suggest to the writers of Linux usb webcamdrivers that,
>  in order to obtain a meaningful probe for a usb2 hub, thewebcam driver
>  loader should look first at the output of lspci -k,before looking at
>  lsmod. If the webcam driver loader looks only atlsmod, it will miss the
>  case where the 2.6.31.6 (and, presumably, allearlier) kernel(s)
>  is/are/were compiled correctly for usb2 (i.e., withehci_hcd compiled
>  directly into the kernel, and uhci_hcd and ohci_hcdas modules).
> 
> If the kernel.org team ever makes the kernel do its ehci_hcd probebefore
>  its uhci_hcd probe, then a mere lsmod probe will suffice. Untilthat happy
>  day, I would venture to predict there will be muchfrustration in webcam
>  Linuxland, except among those who are savvyenough to add the necessary
>  lspci -k probing logic to the webcam driverloader ourselves
> 
> If your camera's driver loader *is* already written to look first atlspci
>  -k, then all you need in order for the webcam to work is torecompile the
>  kernel with ehci_hcd compiled directly into the kernel,the other two as
>  modules. Wuh-laww, now your ICH7 usb2 hub runs at itsintended speed and
>  your usb webcam (knock on wood) works.
> 
> Don't get carried away and compile usbhid into the kernel as well,though.
>  It works OK, but it confuses the Puppy shutdown script.
> 
> 
> Not sure how difficult it is to use lspci -k before lsmod but it might be
>  worth trying so that users with only hub terminated USB ports can use
>  uvcvideo.

Thanks a lot for the information. You forgot the "lsusb -v -d 046d:0804" 
output though ;-)

-- 
Regards,

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


Re: [Linux-uvc-devel] Philips NC610: UVC Video Cam to Add to Support List

2009-12-10 Thread Laurent Pinchart
Hi Michael,

On Thursday 10 December 2009 18:56:40 Michael Curlis wrote:
> The following USB Video Class (UVC) cam is not yet supported: the Philips
>  NC610 (also known as Philips SPC 610NC). I do not know the device ID.

Do you own one of those cameras ? If so, have you tested it ? Most UVC webcam 
should be supported out of the box by the uvcvideo driver even if they're not 
listed on the driver's website.

-- 
Regards,

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


Re: [Linux-uvc-devel] Microsoft Lifecam NX-6000

2009-12-13 Thread Laurent Pinchart
Hi Alessandro,

On Monday 07 December 2009 17:12:18 Alessandro Bonometti wrote:
> On Thursday 03 December 2009 20:29:24 Laurent Pinchart wrote:
> > > I bought a Microsoft LifeCam NX-6000 which should be supported by UVC
> > > (http://linux-uvc.berlios.de/#devices). The camera is recognized, but
> > > it doesn't work in skype, kopete or luvcview. The cam is fine (I have
> > > tried it on a Windows PC) and the OS should be correctly configured
> > > since I have another cam on this system (it's a eeepc) and it works
> > > fine.
> >
> > Could you try the camera on another Linux system ?
> 
> Ok, this is really strange. I have two Linux system, a desktop and an
>  eeepc, both with openSUSE 11.2 (the desktop has the X86_64 version)  and
>  when I first tried the NX-6000, I had the same messages on both system.
>  Here are the one from the desktop:
> Dec  1 00:43:29 linux-l8hb kernel: [165305.462577] uvcvideo: Found UVC 1.00
> device Microsoft® LifeCam NX-6000 (045e:00f8)
> Dec  1 00:43:29 linux-l8hb kernel: [165305.462899] uvcvideo: UVC non
> compliance - GET_DEF(PROBE) not supported. Enabling workaround.
> Dec  1 00:43:29 linux-l8hb kernel: [165305.463498] input: Microsoft®
>  LifeCam NX-6000 as
> /devices/pci:00/:00:1d.7/usb2/2-1/2-1.1/2-1.1.1/2-1.1.1:1.0/inp
> ut/input10
> Dec  1 00:43:30 linux-l8hb kernel: [165306.269428] uvcvideo: Failed to
>  query (1) UVC control 3 (unit 5) : -110 (exp. 2).
> Dec  1 00:43:30 linux-l8hb kernel: [165306.569245] uvcvideo: Failed to
>  query (135) UVC control 7 (unit 5) : -110 (exp. 2).
> Dec  1 00:43:30 linux-l8hb kernel: [165306.869099] uvcvideo: Failed to
>  query (135) UVC control 9 (unit 5) : -110 (exp. 2).
> Dec  1 00:43:31 linux-l8hb kernel: [165307.169093] uvcvideo: Failed to
>  query (135) UVC control 6 (unit 5) : -110 (exp. 2).
> Dec  1 00:43:31 linux-l8hb kernel: [165307.376088] ALSA
> /usr/src/packages/BUILD/kernel-
> desktop-2.6.31.5/linux-2.6.31/sound/usb/usbmixer.c:405: cannot get current
> value for control 1 ch 1: err = -22
> Dec  1 00:43:32 linux-l8hb kernel: [165308.440797] ALSA
> /usr/src/packages/BUILD/kernel-
> desktop-2.6.31.5/linux-2.6.31/sound/usb/usbmixer.c:405: cannot get current
> value for control 1 ch 1: err = -22
> [and so on...]
> 
> I then borrowed a LifeCam Cinema (045e:075d) from a friend of mine and it
> works perfectly on luvcview, skype and kopete, on both systems.
> 
> Saturday I re-attached my NX-6000 to answer your questions, and it seemed
>  to work fine!
> Dec  5 19:41:54 linux-l8hb kernel: [579205.650965] uvcvideo: Found UVC 1.00
> device Microsoft® LifeCam NX-6000 (045e:00f8)
> Dec  5 19:41:54 linux-l8hb kernel: [579205.651398] uvcvideo: UVC non
> compliance - GET_DEF(PROBE) not supported. Enabling workaround.
> Dec  5 19:41:54 linux-l8hb kernel: [579205.652136] input: Microsoft®
>  LifeCam NX-6000 as
> /devices/pci:00/:00:1d.7/usb2/2-1/2-1.1/2-1.1.1/2-1.1.1:1.0/inp
> ut/input21
> 
> I could see it working in lucview, while in Skype and Kopete it didn't
> work...but it seemed a step forward.
> But now I'm back on square one! When I attach the cam, it says:
> 
> 
> Dec  7 16:55:04 linux-l8hb kernel: [741992.357149] usb 2-1.1.1: Product:
> Microsoft® LifeCam NX-6000
> Dec  7 16:55:04 linux-l8hb kernel: [741992.357156] usb 2-1.1.1:
>  Manufacturer: Microsoft
> Dec  7 16:55:04 linux-l8hb kernel: [741992.357300] usb 2-1.1.1:
>  configuration #1 chosen from 1 choice
> Dec  7 16:55:04 linux-l8hb kernel: [741992.357968] uvcvideo: Found UVC 1.00
> device Microsoft® LifeCam NX-6000 (045e:00f8)
> Dec  7 16:55:04 linux-l8hb kernel: [741992.358337] uvcvideo: UVC non
> compliance - GET_DEF(PROBE) not supported. Enabling workaround.
> Dec  7 16:55:04 linux-l8hb kernel: [741992.358958] input: Microsoft®
>  LifeCam NX-6000 as
> /devices/pci:00/:00:1d.7/usb2/2-1/2-1.1/2-1.1.1/2-1.1.1:1.0/input/i
> nput25 Dec  7 16:55:05 linux-l8hb kernel: [741993.160295] uvcvideo: Failed
>  to query (1) UVC control 3 (unit 5) : -110 (exp. 2).
> Dec  7 16:55:05 linux-l8hb kernel: [741993.460201] uvcvideo: Failed to
>  query (135) UVC control 7 (unit 5) : -110 (exp. 2).
> Dec  7 16:55:06 linux-l8hb kernel: [741993.760222] uvcvideo: Failed to
>  query (135) UVC control 9 (unit 5) : -110 (exp. 2).
> Dec  7 16:55:06 linux-l8hb kernel: [741993.980246] ALSA
> /usr/src/packages/BUILD/kernel-
> desktop-2.6.31.5/linux-2.6.31/sound/usb/usbmixer.c:405: cannot get current
> value for control 1 ch 1: err = -22
> Dec  7 16:55:06 linux-l8hb kernel: [741994.060260] uvcvideo: Failed to
>  query (135) UVC control 6 (unit 5) : -110 (exp. 2).
> Dec  7 16:55:07 linux-l8hb kernel: [741995.051221] ALSA
> /usr/src/packages/BUILD/kernel-
> des

Re: [Linux-uvc-devel] How can I use a UVC Device in OMAP3530

2009-12-19 Thread Laurent Pinchart
On Saturday 19 December 2009 06:40:40 Brian Pin wrote:
> In this case I think you can't blame UVC, because it is shown your USB host
> controller can not get descriptor successfully, let alone to let UVC driver
> bind the device. So I think you should first check the device. See if its
> working anywhere. Or check the roothub of the port, maybe it has something
> wrong on it.

Try to add an external hub, the device might require more power than the OMAP 
board can provide.

> In anycase, it has nothing to do with UVC module because the host
>  controller driver doesn't even have a chance to bring up the UVC driver.

-- 
Regards,

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


Re: [Linux-uvc-devel] Is it possible to have two streaming interfaces for ISOC & BULK under one configuration ?

2009-12-26 Thread Laurent Pinchart
Hi Ramesh,

On Wednesday 23 December 2009 12:10:24 Ramesh Rajagopal wrote:
> Hi,
> I want my webcam to provide two streaming interfaces one with ISOC transfer,
> another with BULK transfer. On the fly user can choose any of the transfer
> and do capture. I am planning to try like following
> 
> One control interface with interrupt endpoint for status.
> Two streaming interface, one with alternate settings for ISOC with
> supported formats(MJPEG, YUYV)
> another video streaming interface without alternate settings for BULK
> transfer with supported formats.
> 
> First off all, is it possible to try this practically ? Will the host be
> able to handle both the streamings ?

Yes, but only if the two streaming interfaces are associated with different 
UVC input or output terminals in the control interface.

> I tried in the above way, the camera enumeration seemed successful, however
> I did get only one device on the host (/dev/vide0). I hope for two streaming
> interfaces you should get two devices on the host
> isn't it?

I suspect that you're trying to use two different streaming interfaces with 
the same USB output terminal. That's not possible.

-- 
Regards,

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


Re: [Linux-uvc-devel] has no release call back

2009-12-26 Thread Laurent Pinchart
Hi,

On Wednesday 23 December 2009 08:06:03 nitesh suthar wrote:
> hello,dear all
> 
> I having problem when using uvcvideo.ko ,Would any one help me in this.
> 
> I got error as :
> 
> videodev:  has no release callback. Please fix your driver for proper sysfs
> support
> 
> I am using linux 2.6.24 kernel . And download latest uvc driver .I am using
> cross compiler gcc- 4.2.2-eabi
> 
> while I am compiling uvc driver using this compiler and kernel path I got
> error in v4l2-dev.h file that
> 
> In file included from
> /home/rajiv/6410/ExperimentUVC/UVC/uvcvideo-033b5968aa1a/v4l/../linux/inclu
> de/media/v4l2-common.h:30, from
> /home/rajiv/6410/ExperimentUVC/UVC/uvcvideo-033b5968aa1a/v4l/uvc_driver.c:3
> 7:
>  /home/rajiv/6410/ExperimentUVC/UVC/uvcvideo-033b5968aa1a/v4l/../linux/incl
> ude/media/v4l2-dev.h: In function 'video_device_node_name':
> /home/rajiv/6410/ExperimentUVC/UVC/uvcvideo-033b5968aa1a/v4l/../linux/inclu
> de/media/v4l2-dev.h:159: error: implicit declaration of function 'dev_name'
> /home/rajiv/6410/ExperimentUVC/UVC/uvcvideo-033b5968aa1a/v4l/../linux/inclu
> de/media/v4l2-dev.h:159: warning: return makes pointer from integer without
>  a cast
> 
> after getting this error I change  function video_device_node_name as:
> old function is
> static inline const char *video_device_node_name(struct video_device *vdev)
> {
> #if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 19)
> return vdev->dev.class_id;
> #else
> return dev_name(&vdev->dev);
> #endif
> }
> 
> I have changed this function as
> static inline const char *video_device_node_name(struct video_device *vdev)
> {
> #if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 19)
> return vdev->dev.class_id;
> #else
> return "/dev/video0";
> #endif
> }
> 
> 
> after replacing this dev_name it is got compiled easily.

This issue has been fixed in the uvcvideo tree on linuxtv.org. Could you get 
the latest version and see if you still get an oops ?

> and when I loaded it and trying to execute test program for dev/video0 then
> I got error as
> 
> Unable to handle kernel NULL pointer dereference at virtual address
>  0004 pgd=c6a54000
> [0004] *pgd=56b57031, *pte=0000,*ppte=0000
> internal error:Oops:17[#1]
> Modules linked in : uvcvideo
> .so many lines and last line is
> Sementation fault
> 
> If any one knows the solution for this problem Please guide me

-- 
Regards,

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


Re: [Linux-uvc-devel] How can I use a UVC Device in OMAP3530

2009-12-26 Thread Laurent Pinchart
Hi,

On Tuesday 22 December 2009 03:43:05 Yanbin Yue wrote:
> The device is is a  WIFI USB 2.0 device, it use the same USB slot, so I
> think the USB controller could work fine now. The error message as fllowing
> 
> 
> usb 1-1.4: device descriptor read/64, error 2
> usb 1-1.4: new full speed USB device using musb_hdrc and address 5
> usb 1-1.4: device descriptor read/8, error 2
> usb 1-1.4: device descriptor read/8, error 2
> usb 1-1.4: new full speed USB device using musb_hdrc and address 6
> usb 1-1.4: device descriptor read/8, error 2
> usb 1-1.4: device descriptor read/8, error 2
> 
>  I think the USB controller  couldn't find the right dirver, so it
> display these error message.

No, those messages indicate that the host can't read the device descriptor. 
That's a very low-level error completely unrelated to the uvcvideo driver.

-- 
Regards,

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


Re: [Linux-uvc-devel] How can I use a UVC Device in OMAP3530

2009-12-26 Thread Laurent Pinchart
Hi,

On Tuesday 22 December 2009 04:32:27 Yanbin Yue wrote:
> And my UVC device id is 0c45 : 62c0.  When I search this code in the UVC
> dirver source, I can't find any item.  Whether this device information need
> I add to the source code?

You don't need to add it. The uvcvideo driver matches against the device using 
interface class and subclass, not the device vendor and product IDs.

-- 
Regards,

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


Re: [Linux-uvc-devel] Microsoft Lifecam NX-6000

2009-12-26 Thread Laurent Pinchart
Hi Alessandro,

On Saturday 19 December 2009 15:04:32 Alessandro Bonometti wrote:
> On Sunday 13 December 2009 13:23:49 Laurent Pinchart wrote:
> > It might be possible to work around the problem. Could you try to load the
> > driver with quirks=0x102 and timeout=3000 ? If that help, please try only
> > one of those parameters to see which one fixes the problem.
> 
> "timeout" gives "unknow parameter".

That's probably because the uvcvideo driver version used on your system is too 
old.

> With "Quirks=0x102" the camera works in luvcview, but not in Skype and
> kopete. I think I'll buy myself a new webcam for Christmas :-]

What happens in Skype and Kopete ? Note that those applications are not known 
to be webcam-friendly, so it might not be your camera's fault.

-- 
Regards,

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


Re: [Linux-uvc-devel] uvc camera

2009-12-26 Thread Laurent Pinchart
Hi Alexksandr,

On Friday 18 December 2009 18:39:47 Aleksandr Zagorodnikov wrote:
> I have notebook hp tx2650er and my UVC device is not listed.

Thanks for the report.

[snip]

> # dmesg | egrep -i uvc
> uvcvideo: disagrees about version of symbol
> v4l_compat_translate_ioctl
> uvcvideo: Unknown symbol v4l_compat_translate_ioctl
> uvcvideo: disagrees about version of symbol video_devdata
> uvcvideo: Unknown symbol video_devdata
> uvcvideo: disagrees about version of symbol
> video_unregister_device
> uvcvideo: Unknown symbol video_unregister_device
> uvcvideo: disagrees about version of symbol video_device_alloc
> uvcvideo: Unknown symbol video_device_alloc
> uvcvideo: disagrees about version of symbol
> video_register_device
> uvcvideo: Unknown symbol video_register_device
> uvcvideo: disagrees about version of symbol video_usercopy
> uvcvideo: Unknown symbol video_usercopy
> uvcvideo: disagrees about version of symbol
> video_device_release
> uvcvideo: Unknown symbol video_device_release
> uvcvideo: disagrees about version of symbol
> v4l_compat_translate_ioctl
> uvcvideo: Unknown symbol v4l_compat_translate_ioctl
> uvcvideo: disagrees about version of symbol video_devdata
> uvcvideo: Unknown symbol video_devdata
> uvcvideo: disagrees about version of symbol
> video_unregister_device
> uvcvideo: Unknown symbol video_unregister_device
> uvcvideo: disagrees about version of symbol video_device_alloc
> uvcvideo: Unknown symbol video_device_alloc
> uvcvideo: disagrees about version of symbol
> video_register_device
> uvcvideo: Unknown symbol video_register_device
> uvcvideo: disagrees about version of symbol video_usercopy
> uvcvideo: Unknown symbol video_usercopy
> uvcvideo: disagrees about version of symbol
> video_device_release
> uvcvideo: Unknown symbol video_device_release

Those errors are caused by loading a version of the uvcvideo driver compiled 
from a linuxtv.org repository with core v4l modules provided by your 
distribution. You should use the core v4l modules from the uvcvideo tree.

> dmesg | grep uvc
> uvcvideo: Found UVC 1.00 device CKF7073 (04f2:b103)
> uvcvideo: Failed to query (135) UVC control 1 (unit 0) : -32 (exp.
> 26).
> uvcvideo: Failed to query (129) UVC control 1 (unit 0) : -32 (exp.
> 26).
> uvcvideo: Failed to initialize the device (-5).
> usbcore: registered new interface driver uvcvideo

Ouch. That seems to be a very buggy webcam. Could you please try to load the 
uvcvideo driver with quirks=0x100 and see if it helps ?

-- 
Regars,

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


Re: [Linux-uvc-devel] uvcvideo Logitech patch

2009-12-26 Thread Laurent Pinchart
Hi Mitar,

On Tuesday 15 December 2009 22:15:19 Ondrej Zary wrote:
> On Tuesday 15 December 2009 20:03:36 Mitar wrote:
> > Hi!
> >
> > I have Logitech QuickCam Pro 9000 webcam and I had the same problems
> > described here:
> >
> > http://patchwork.kernel.org/patch/52261/
> >
> > I have applied the patch and it did not help. But it helped when I
> > increased UVC_CTRL_CONTROL_TIMEOUT to 1000 and UVC_CTRL_STREAMING_TIMEOUT
> > 5000. So 300 and 3000 values were not enough.
> > I do not know if it was really necessary to increase
> > UVC_CTRL_CONTROL_TIMEOUT or if it would be enough something between 3000
> > and 5000 for UVC_CTRL_STREAMING_TIMEOUT as I did not have more time to
> > test it.
> >
> > So maybe 5000 would be a good default for UVC_CTRL_STREAMING_TIMEOUT?

Could be, but I'd like to know if increasing the control streaming timeout is 
required as well.

-- 
Regards,

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


Re: [Linux-uvc-devel] [UVC] Break => http://lxr.linux.no/#linux+v2.6.32/drivers/media/video/uvc/uvc_video.c#L955

2009-12-26 Thread Laurent Pinchart
Hi,

On Wednesday 16 December 2009 20:33:55 Brian Pin wrote:
> 
> I think you might misunderstood the code, the code in line 955 which you
> pointed out means when there is a alternative interface whose endpoint has
> enough packet size for transferring the "bandwidth" amount of data which is
> decided by the streaming negotiation, then it is time to break the loop.
> 
> It is quite normal, I think nothing wrong in it, isn't it?

That's correct. In the most recent uvcvideo version that code has been 
modified to find the alternate setting with the smallest bandwidth big enough 
to accommodate the device needs, not just the first one.

-- 
Regards,

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


Re: [Linux-uvc-devel] Timestamp Accuracy Patch

2010-01-01 Thread Laurent Pinchart
Hi Jacob,

On Tuesday 22 December 2009 19:32:38 Jacob Fehr wrote:
> Hey Laurent,
> 
> I'm just having a quick look at section 2.4.3.3 in the UVC spec. If I read
> that correctly, the SCR SOF counter is not necessarily the same as the USB
> SOF frame number. The device can maintain it's own 1 KHz counter and send
> that instead of the USBS SOF frame number.

That's correct.

> That would mean that there is no way to correlate device time to USB time
> for devices that maintain their own counter. The only thing the PTS, SCR
> could be used for is to determine interframe jitter/skew.
>
> I have a camera that seems to take advantage of this. I modified the UVC
> driver to print out the SCR SOF and urb.start_frame then I plugged two
> cameras into the same USB controller. This is a sample log:
> 
> [  249.799452] uvcvideo: stream = 0xe9ea2000, urb->start_frame = 7590
> [  249.812207] uvcvideo: stream = 0xe9ea5000, sof = 1158
> [  249.812217] uvcvideo: stream = 0xe9ea5000, urb->start_frame = 7700
> [  249.815195] uvcvideo: stream = 0xe9ea2000, sof = 843
> [  249.815203] uvcvideo: stream = 0xe9ea2000, urb->start_frame = 7723
> [  249.830206] uvcvideo: stream = 0xe9ea5000, sof = 1174
> [  249.830216] uvcvideo: stream = 0xe9ea5000, urb->start_frame = 7834
> [  249.833196] uvcvideo: stream = 0xe9ea2000, sof = 860
> [  249.833205] uvcvideo: stream = 0xe9ea2000, urb->start_frame = 7857
> [  249.845958] uvcvideo: stream = 0xe9ea5000, sof = 1191
> [  249.845967] uvcvideo: stream = 0xe9ea5000, urb->start_frame = 7967
> [  249.848949] uvcvideo: stream = 0xe9ea2000, sof = 877
> [  249.848957] uvcvideo: stream = 0xe9ea2000, urb->start_frame = 7990
> [  249.861710] uvcvideo: stream = 0xe9ea5000, sof = 1208
> [  249.861720] uvcvideo: stream = 0xe9ea5000, urb->start_frame = 8100
> [  249.864701] uvcvideo: stream = 0xe9ea2000, sof = 893
> [  249.864710] uvcvideo: stream = 0xe9ea2000, urb->start_frame = 8123
> [  249.879704] uvcvideo: stream = 0xe9ea5000, sof = 1224
> [  249.879714] uvcvideo: stream = 0xe9ea5000, urb->start_frame = 41
> [  249.882696] uvcvideo: stream = 0xe9ea2000, sof = 910
> [  249.882705] uvcvideo: stream = 0xe9ea2000, urb->start_frame = 64
> [  249.895457] uvcvideo: stream = 0xe9ea5000, sof = 1241
> [  249.895466] uvcvideo: stream = 0xe9ea5000, urb->start_frame = 175
> [  249.898451] uvcvideo: stream = 0xe9ea2000, sof = 927
> 
> Camera 0xe9ea5000 seems to be running off a different time reference from
> camera 0xe9ea2000. If the cameras did echo the USB SOF into the SCR they
> should track with urb->start_frame.

Just for the sake of correctness, the start_frame field isn't the SOF counter. 
It seems to wrap around at 8192, so I guess it's a micro-frame count for high-
speed transfers.

> As far as I can tell there is no way to correlate the SCR SOF counter to
> the USB SOF. It looks like there is no way to (generically) determine the
> device latency...

The SCR SOF and USB SOF *are* correlated. They run at the same speed and 
differ by a fixed (but non-deterministic) value.

The PTS/SCR relationship can be computed using the PTS/SCR fields in video 
data headers. The SCR/SOF relationship is known (except for the constant 
difference), and the SOF/host clock relationship can be computed using the SOF 
counter and the system time. With all those information, the PTS timestamp 
associated with the image can be converted to a system time, eliminating clock 
drift between the camera and system clocks. That's what the PTS/SCR fields are 
for.

> I can't tell when a device will use it's own counter or when it'll echo the
> USB SOF frame number.

-- 
Regards,

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


Re: [Linux-uvc-devel] Is it possible to have two streaming interfaces for ISOC & BULK under one configuration ?

2010-01-01 Thread Laurent Pinchart
Hi Ramesh,

On Sunday 27 December 2009 07:20:19 Ramesh Rajagopal wrote:
> Hi Laurent,
> Thanks for the reply. Yes, I tried with same INPUT/OUTPUT terminal for
> both Video streaming interfaces.
> I will try with different INPUT/OUTPUT terminal. But physcially there is
> only one INPUT/OUTPUT terminal in the device.
> Can I logically create two INPUT/OUTPUT terminal both pointing the same
> physical entity?

You shouldn't do that.

> Both there INPUT/OUTPUT terminal are part of the same CONTROL interface
> right?

That's right.

> Basically what I am trying to acheive is, give user a flexiblity of
> choosing the transfer type based on thier required bandwidth.
> I decided to give two logical devices on the host side, so that user
> can exclusively select one device and stream it.
> Will the above approach work in this way or i am missing something here,
> suggestions?

UVC doesn't provide any support for that. You can't provide both isochronous 
and bulk transfers for the main video stream in a single configuration. 
However, you could have two configurations, one with isochronous transfers and 
the other with bulk transfers.

-- 
Regars,

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


Re: [Linux-uvc-devel] another UVC-compatible webcam

2010-01-01 Thread Laurent Pinchart
Hi Michael,

On Monday 28 December 2009 14:17:51 Michael Schmidt wrote:
> Hi,
> 
> The 'avatec CMA-L688' (USB 'Microdia 0c45:62f1') works flawlessly under
> Ubuntu Linux 9.10 (PC, 32 bit). Both camera and microphone work.

Thanks for the report. Could you please send me the output of

lsusb -v -d 0c45:62f1

with your webcam plugged in ?

-- 
Regards,

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


Re: [Linux-uvc-devel] Unlisted supported webcam

2010-01-05 Thread Laurent Pinchart
Hi Pat,

On Saturday 02 January 2010 10:29:55 Pat Carr wrote:
> Hi,
> 
>   I plugged an unlisted webcam and am happy to report that it worked
> properly, video and mic. It's an Agama V-315 device. I tested in on
> Ubuntu 9.10 (2.6.31-16) i386, and Ubuntu 9.10 PPC.
> 
>   As reported by dmesg:
> [1365347.342003] uvcvideo: Found UVC 1.00 device Agama V-315 (093a:2900)
> [1365347.358070] input: Agama V-315 as
> /devices/pci:00/:00:1a.0/usb3/3-2/3-2:1.0/input/input11
> 
> Sorry for the lengthy output that follows. It's from libusb, as
> requested recently in the mailing list.

Thanks for the report and the lsusb output. No need to be sorry, that's 
exactly what I wanted :-)

I've updated the supported devices list on the website.

-- 
Regards,

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


Re: [Linux-uvc-devel] Webcam: Microsoft LifeCam VX-800

2010-01-05 Thread Laurent Pinchart
Hi Chetan,

> -- Forwarded message --
> From: chetan bl 
> To: linux-uvc-devel@lists.berlios.de
> Date: Sat, 2 Jan 2010 17:45:35 -0400
> Subject: Webcam: Microsoft LifeCam VX-800
> Webcam: Microsoft LifeCam VX-800 is working.
> 
> 1) I added the following section in uvc_driver.c
> 
> /* Microsoft Lifecam VX-800 */
> { .match_flags  = USB_DEVICE_ID_MATCH_DEVICE
> 
> | USB_DEVICE_ID_MATCH_INT_INFO,
> 
>   .idVendor = 0x045e,
>   .idProduct= 0x0766,
>   .bInterfaceClass  = USB_CLASS_VIDEO,
>   .bInterfaceSubClass   = 1,
>   .bInterfaceProtocol   = 0,
>   .driver_info  = UVC_QUIRK_PROBE_MINMAX },
> 
> 2) Compiled the uvcvideo.ko module
> 
> make -C /lib/modules/2.6.26/build/ CONFIG_USB_VIDEO_CLASS=m
> SUBDIRS=/home/chetan/linux-2.6.26/drivers/media/video/uvc modules
> 
> 3) Inserting the modules in this order
> 
> insmod compat_ioctl32.ko
> insmod v4l1_compat.ko
> insmod videodev.ko
> insmod uvcvideo.ko
> 
> lsmod: (showing only the needed modules)
> uvcvideo   49800  0
> videodev   29952  1 uvcvideo
> v4l1_compat16004  2 uvcvideo,videodev
> compat_ioctl32  5248  1 uvcvideo
> 
> 4) In skype->options->Video Devices I was able to see the device Microsoft
> LifeCam VX-800
> (/dev/video0) and test it to see myself in the video.

Thanks for the report.

Could you please confirm that the device didn't work without the patch ? The 
uvcvideo driver should have printed an error message in the kernel log 
(dmesg).

> Thanks to all the developers for this driver.

You're welcome.

-- 
Regards,

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


Re: [Linux-uvc-devel] 064e:d101 Suyin Corp. Acer CrystalEye Webcam supported with uvcvideo

2010-01-05 Thread Laurent Pinchart
Hi Nicky,

On Sunday 03 January 2010 12:47:43 Nicky Chorley wrote:
> Hi,
> 
> This is just to make the developers aware that the aforementioned
> webcam is supported with their driver. I have this device in an Acer
> Aspire One (AOA 150-Ab) netbook..

Thanks for the report. Could you please send me the output of

lsusb -v -d 064e:d101

using usbutils 0.72 or newer (0.73+ preferred) ? I'll then update the 
supported devices list on the uvcvideo driver's website.

-- 
Regards,

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


Re: [Linux-uvc-devel] Genius iSlim 1300 V2

2010-01-05 Thread Laurent Pinchart
Hi,

On Monday 04 January 2010 21:21:12 Freimanis Renars wrote:
> Device ID: 0458:7071
> Name: Genius iSlim 1300 V2
> Manufacturer: Genius
> 
> This device works on openSUSE 11.2

Thanks for the report. Could you please send me the output of

lsusb -v -d 0458:7071

using usbutils 0.72 or newer (0.73+ preferred) ? I'll then update the 
supported devices list on the uvcvideo driver's website.

-- 
Regards,

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


Re: [Linux-uvc-devel] Microsoft LifeCam Cinema (045e:075d) bandwidth reservation issues?

2010-01-05 Thread Laurent Pinchart
 each.
> 
> 
> 
> 
> I had planned on showing the example from dmesg of the same allocation when
> using mencoder with --v4l2-chroma=mjpeg ; but unfortunately the machine is
> remote and just died...
> 
> At any rate, if anyone can verify that this is the (in)correct behavior of
> uvcvideo i would appreciate it (but I am under the impression it is not
> supposed to work this way, and is supposed to allocate bandwidth based on
> the input parameters). I would be happy to provide any debugging
>  information necessary.

Could you please send me the lsusb -v output for your cameras ?

-- 
Regards,

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


Re: [Linux-uvc-devel] UVC device not listed

2010-01-05 Thread Laurent Pinchart
Hi Oliver,

On Tuesday 05 January 2010 17:30:45 Oliver B. wrote:
> Hi,
> 
> The listed device:
> 
> 0c45:62c0
> Microdia Sonix USB 2.0 Camera
> 
> is actually also sold as:
> 
> Trust SpotLight Webcam Pro
> (see http://www.trust.com/products/product.aspx?artnr=16428)
> 
> So it should be listed under this name as well in your list.

Thanks for the report. Website updated.

> Thanks a lot for your support.

You're welcome.

-- 
Regards,

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


Re: [Linux-uvc-devel] uvcvideo Logitech patch

2010-01-05 Thread Laurent Pinchart
Hi Mitar,

On Tuesday 29 December 2009 17:51:14 Mitar wrote:
> Hi!
> 
> > Could be, but I'd like to know if increasing the control streaming
> > timeout is required as well.
> 
> I had some time now and have tested it and it is enough just to increase
> UVC_CTRL_STREAMING_TIMEOUT to 5000, I left UVC_CTRL_CONTROL_TIMEOUT at
> 300. And everything seems to work.

Thanks. I'll increase the streaming timeout value to 5000.

-- 
Regards,

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


Re: [Linux-uvc-devel] Disconnect video out device from non-root hub.

2010-01-05 Thread Laurent Pinchart
Hi Robert,

On Tuesday 05 January 2010 13:49:34 Robert Lukassen wrote:
> Hi,
> 
> In Ubuntu 9.10, support for Video Out devices (bulk-only) has been added.

That's right. Just out of curiosity, could you tell me which video output 
device you're working with ? I'm only aware of a single one so far.

Support for isochronous video output devices could also be implemented, feel 
free to contact me if needed.

>  We noticed that when such a device is disconnected from a non-root hub,
>  the queued urbs are returned with usb->status == -EPROTO. The video
>  completion callback cancels the queue, and does not re-submit the urb.
> 
> Because the hub driver needs some time to process the disconnect properly,
>  there is a brief interval in time where queued urbs for the disconnected
>  device do not result in -ESHUTDOWN, as expected, but with other error
>  codes (such as EPROTO).
> 
> We have found that (in case of status == -EPROTO) resubmitting the urb and
>  not canceling the queue results in the correct behaviour. Eventually one
>  of the urbs indeed comes back with status == -ESHUTDOWN and the device is
>  properly administrated as disconnected. Subsequent QBUF attempts then also
>  result in correct user-space experience.
>
> We propose the following simple patch:
> 
> In uvc_video.c:
> 
> static void uvc_video_complete(struct urb *urb)
> {
>   struct uvc_video_device *video = urb->context;
>   struct uvc_video_queue *queue = &video->queue;
>   struct uvc_buffer *buf = NULL;
>   unsigned long flags;
>   int ret;
> 
>   switch (urb->status) {
>   case 0:
>   break;
> 
>   default:
>   uvc_printk(KERN_WARNING, "Non-zero status (%d) in video "
>   "completion handler.\n", urb->status);
> + break;
> 
>   case -ENOENT:   /* usb_kill_urb() called. */
>   if (video->frozen)
>   return;
> 
>   case -ECONNRESET:   /* usb_unlink_urb() called. */
>   case -ESHUTDOWN:/* The endpoint is being disabled. */
>   uvc_queue_cancel(queue, urb->status == -ESHUTDOWN);
>   return;
>   }
> 
>   spin_lock_irqsave(&queue->irqlock, flags);
>   if (!list_empty(&queue->irqqueue))
>   buf = list_first_entry(&queue->irqqueue, struct uvc_buffer,
>  queue);
>   spin_unlock_irqrestore(&queue->irqlock, flags);
> 
>   video->decode(urb, video, buf);
> 
>   if ((ret = usb_submit_urb(urb, GFP_ATOMIC)) < 0) {
>   uvc_printk(KERN_ERR, "Failed to resubmit video URB (%d).\n",
>   ret);
>   }
> }

That would work in your case, but devices that constantly return -EPROTO will 
never see their queue canceled and will flood the kernel log.

A possible solution would be to count the number of URBs returning with the -
EPROTO status and cancel the queue only when a hardcoded limit is reached. 
Could you count how many URBs you get back with a -EPROTO state before the 
driver receives -ESHUTDOWN ?

Another solution would be to cancel all buffer queues when the uvc_disconnect 
function is called. The QBUF ioctl could still be called during to "EPROTO - 
ESHUTDOWN" window, but buffers would be woken up again when uvc_disconnect is 
called.

The best solution might be a mix between those two: ignore -EPROTO/-EILSEQ/-
ETIME errors up to a maximum number (the threshold could be the total number 
or errors, or the number of consecutive errors), and cancel the queues anyway 
when the device is disconnected. What's your opinion ?

-- 
Regards,

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


Re: [Linux-uvc-devel] Philips webcam spc2050nc support

2010-01-09 Thread Laurent Pinchart
Hi Antonio,

On Friday 08 January 2010 20:47:21 Antonio C. Costantino wrote:
> In data martedì 27 ottobre 2009 11:16:47, Laurent Pinchart ha scritto:
> > On Monday 26 October 2009 13:05:58 Antonio C. Costantino wrote:
> > > Hi all,
> > >
> > > I'm pretty new to the Linux "video sphere", so I thought writing to the
> > >  list to get some facts about a webcam I'd like to buy.
> > >
> > > Indeed, I'm going to buy a spc2050nc from Philips. I was induced to
> > > Philips by the extensive list of supported devices at this link
> > > (http://linux- uvc.berlios.de/).
> 
> I finally got it.
> 
> > > Although the spc2050nc is not listed as a supported device, the
> > > data-sheet
> > > (http://www.p4c.philips.com/files/s/spc2050nc_93/spc2050nc_93_pss_aen.p
> > >df ) states clearly that the webcam is an UVC USB video class. So my
> > > question is, being it a UVC device, will it work out of the box? or
> > > will I need to provide you with some data for you to "enable" spc2050nc
> > > support?
> >
> > It should work out of the box. At least in theory :-)
> 
> It works indeed, although I'm still checking different programmes and
> resolutions.
> 
> > In practice webcams can be buggy. The same applies to the uvcvideo driver
> >  of course, but experience showed that there are nowadays more bugs in
> > the webcams than in the driver.
> >
> > The uvcvideo driver has a list of "quirks" it can use for various devices
> >  that are not 100% UVC compatible. If you're not lucky your camera will
> >  need one of those, and you'll have to pass an extra parameter when
> > loading the driver until I fix it. If you're really not lucky your camera
> > will require a new quirk and will steal a few hours of my sleep. And if
> > you're really really really not lucky it might not work at all, but that
> > tends to be quite uncommon nowadays.
> 
> When you have time, tell me what output I may provide you in order to add
>  the device to the list of supported webcams.

All I need it the output of lsusb -v for your webcam.

-- 
Regards,

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


Re: [Linux-uvc-devel] Microsoft LifeCam Cinema (045e:075d) bandwidth reservation issues?

2010-01-10 Thread Laurent Pinchart
Hi Seth,

On Wednesday 06 January 2010 03:54:11 Seth W wrote:
> Here you are. Thanks  in advance for your assistance. (PS - Please note
> there are two cameras, both same make/model therefore share the same ID)

Thanks for the information. The device supports the following bandwidths 
(unrelated information removed for the sake of clarity):

> wMaxPacketSize 0x0080  1x 128 bytes
> wMaxPacketSize 0x0100  1x 256 bytes
> wMaxPacketSize 0x0200  1x 512 bytes
> wMaxPacketSize 0x0400  1x 1024 bytes
> wMaxPacketSize 0x0c00  2x 1024 bytes
> wMaxPas.cketSize 0x1400  3x 1024 bytes

Your previous e-mail included an excerpt from the kernel log clearly showing 
that the device asked for 3x 1024 bytes per microframe in both 640x480 and 
1280x800.

The default frame rate at those resolutions is 30fps and 10fps respectively. 
As every pixel takes 2 bytes in uncompressed YUV, this leads to

640*480*2*30 = 18000 KiB/s
1280*800*2*10 = 2 KiB/s

Divided by 8000 microframes per second, we get

640x480 -> 2304 bytes / microframe
1280x800 -> 2560 bytes / microframe

The lowest bandwidth compatible with those values is 3x 1024 bytes per 
microframe, which is too high to stream from both cameras at the same time.

You could try lowering the frame rate. The average required bandwidth will be 
lower, but the device might not have enough internal memory to store a 
complete frame and smooth bandwidth usage. In that case it will still ask for 
a high bandwidth, and streaming from two devices simultaneously will fail.

The other option is to use MJPEG instead of YUV. That will reduce the 
bandwidth requirements drastically, but you will have to decompress the MJPEG 
stream

-- 
Regards,

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


Re: [Linux-uvc-devel] Philips webcam spc2050nc support

2010-01-14 Thread Laurent Pinchart
Hi Antonio,

On Saturday 09 January 2010 14:40:52 Antonio C. Costantino wrote:
> [...]
> 
> > > When you have time, tell me what output I may provide you in order to
> > > add the device to the list of supported webcams.
> >
> > All I need it the output of lsusb -v for your webcam.
> 
> I'm sending it as attachment (does it look "good"?)

That's exactly what I needed, thanks. I'll update the list as soon as Berlios 
becomes responsive again.

-- 
Regards,

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


Re: [Linux-uvc-devel] Microsoft LifeCam Cinema (045e:075d) bandwidth reservation issues?

2010-01-14 Thread Laurent Pinchart
Hi Seth,

On Monday 11 January 2010 03:45:21 Seth W wrote:
> Thanks for the prompt response

I wouldn't call it prompt, and I apologize for that.

> - I had actually tried MJPEG in mencoder (not sure how to test it in
> ffmpeg); but for some reason it allocates the same exact bandwidth as well,
> no matter what resolution, codec (mjpeg or yuv), or frame rate. If you can
> provide any insight into this or suggest any other methods of testing I
> would greatly appreciate it.

Could you set the trace parameter to 0x40f and send me all messages printed by 
the driver to the kernel log when running mencoder in MJPEG mode ?

> Once again, I'd like to thank you for your time.

You're really welcome.

-- 
Regards,

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


Re: [Linux-uvc-devel] Yet another unlisted, supported webcam

2010-01-14 Thread Laurent Pinchart
Hi Celejar,

On Wednesday 13 January 2010 00:12:27 Celejar wrote:
> Hi,
> 
> I have a cheap, no-name webcam from FocalPoint.com.  Video seems to
> basically work (tried with xawtv and mplayer), but with banding
> (regularly spaced bluish horizontal bands that seem to move vertically
> upward, taking about a second or two to travel from the bottom of the
> image to the top).

That's usually caused by a mismatch between the power supply frequency and the 
sensor sampling rate. Have you tried in plain daylight ?

> Haven't tried sound since the short lengths of the USB and mic cables and
> the location of my machine's ports make plugging both in simultaneously
> difficult or impossible.
> 
> Thanks for your work on this project!

You're welcome. Thanks for the report. I'll update the supported devices list 
as soon as Berlios become responsive again.

> The camera is (similar to?) this one:
> 
> http://www.focalprice.com/CW013B/USB_Digital_Video_4_LED_Webcam_PC_Camera_w
> ith_Microphone_Black.html
> 
> From syslog:
> 
> [12312.163037] usb 1-3: new high speed USB device using ehci_hcd and address
> 6
> [12312.287782] uvcvideo: Found UVC 1.00 device USB2.0 Camera (1e4e:0100)
> [12312.292382] uvcvideo: UVC non compliance - GET_DEF(PROBE) not supported.
> Enabling workaround.
> [12312.293512] input: USB2.0 Camera as
> /devices/pci:00/:00:1d.7/usb1/1-3/1-3:1.0/input/input14
> 
> Note that the camera doesn't seem to work when plugged into my (cheap)
> USB hub - both mplayer and xawtv complain of "select timeout".
> 
> From syslog (when plugged into the hub):
> 
> [12132.686602] usb 3-1.1: new full speed USB device using uhci_hcd and
> address 4
> [12132.793599] usb 3-1.1: not running at top speed; connect to a high speed
> hub
> [12132.837654] uvcvideo: Found UVC 1.00 device USB2.0 Camera (1e4e:0100)
> [12132.843584] uvcvideo: UVC non compliance - GET_DEF(PROBE) not supported.
> Enabling workaround. Jan 12 17:49:00 localhost kernel:
> [12132.844729] input: USB2.0 Camera as
> /devices/pci:00/:00:1d.1/usb3/3-1/3-1.1/3-1.1:1.0/input/input13

As stated by the log, you should connect the camera to a high speed hub :-) 
Your hub is probably running at full speed only (12 Mb/s), and the camera 
seems to require high speed (480 Mb/s).

-- 
Regards,

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


Re: [Linux-uvc-devel] AF on Syntek 174f:5271

2010-01-15 Thread Laurent Pinchart
Hi Alex,

On Friday 15 January 2010 12:50:43 Alex Makarov wrote:
> Hi,
> 
> It looks like it does not export any focus:
> 
>  VideoControl Interface Descriptor:
>   bLength18
>   bDescriptorType36
>   bDescriptorSubtype  2 (INPUT_TERMINAL)
>   bTerminalID 1
>   wTerminalType  0x0201 Camera Sensor
>   bAssocTerminal  0
>   iTerminal   0
>   wObjectiveFocalLengthMin  0
>   wObjectiveFocalLengthMax  0
>   wOcularFocalLength0
>   bControlSize  3
> 
> >>   bmControls   0x000a
> >> Auto-Exposure Mode
> >> Exposure Time (Absolute)
> 
> VideoControl Interface Descriptor:
> 
> Does that mean the camera has no focus control at all?

It means the camera doesn't advertise any standard focus control. It could 
still implement a standard focus control but not advertise it, or implement a 
vendor-specific focus control through an extension unit.

-- 
Regards,

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


Re: [Linux-uvc-devel] Minoru Webcam with python-opencv: VIDIOC_STREAMON error 28, No space left on device

2010-01-15 Thread Laurent Pinchart
Hi Javier,

On Friday 15 January 2010 15:45:31 Javier Candeira wrote:
> On Sat, Jan 16, 2010 at 1:30 AM, Paulo Assis  wrote:
> > 2010/1/15 Javier Candeira :
> >> I am working with minoru3D, a dual-webcam that is really two z-star
> >> vimicro webcams and a usb hub in a single package.
> >>
> >> I can get images from either one of the cameras using python-opencv
> >> (Ubuntu 9.10, 32 bits), but when I try to capture from both cameras in
> >> sequence I get this error:
> >>
> >> "VIDIOC_STREAMON error 28, No space left on device"
> >
> > It seems there is not enough USB bandwidth for streaming from both
> > cameras at the specified resolution/Mode.
> >
> > I'm not a opencv expert but it looks you are asking for a  640x480
> > resolution, this shouldn't be a problem even for a uncompressed yuv
> > stream, in any case if the camera supports MJPG could you force that
> 
> Unfortunately the Minoru cams do not support MJPG.
> 
> > mode instead and check if you still get the same error. Also try other
> > applications (luvcview, guvcview, cheese, )
> 
> I have tried running two instances of luvcview, two instances of
> guvcview, one of each, one of either and one of cheese, to no avail.
> 
> When I try to run two instances of luvcview, one with /dev/video0 and
> the other with /dev/video1, the first works fine, but the second
> instance exits with this error:
> 
> kandin...@derive:~/data/work/hack/pyralax$ luvcview -d /dev/video1
> luvcview 0.2.4
> 
> SDL information:
>   Video driver: x11
>   A window manager is available
> Device information:
>   Device path:  /dev/video1
> Stream settings:
>   Frame format: YUYV (MJPG is not supported by device)
>   Frame size:   640x480
>   Frame rate:   30 fps
> Unable to start capture: No space left on device
> Error grabbing
> Cleanup done. Exiting ...

Could you please set the trace parameter to 0x400 and check the kernel log to 
see how much bandwidth the driver requests ? You will need to use the latest 
driver version from linuxtv.org for that.

-- 
Regards,

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


Re: [Linux-uvc-devel] 04f2:a216

2010-01-17 Thread Laurent Pinchart
Hi Jean-Luc-Ernest,

On Friday 15 January 2010 19:52:23 jean-luc-ernest grimard-gauthereau wrote:
> Bonjour,
>
> I saw the mailing list looking for any solution to make a hd-dv
> camcorder (camileo from toshiba) work like a usb-cam  (on hardy heron -
> Ubuntu 8.04). did not find any at this time . (i tried a quick
> "modprobe uvcvideo -f id=04f2:a216 with no result)
>
> If this can help i paste here what lsusb gives:

[snip]

The camera is not UVC-compatible, so it will not be supported by the uvcvideo 
driver.

> seems to be the same camera than the dragon D 50H from chicony
> 
> i'm not very familiar with tweaking and looking at  hardware but i'll
> disponible to communicate the result of some commands you'd give
> P.S.:j'habite Paris et voyant votre nom je serais bien sûr heureux de
> prêter cette camera pour du "back-engeneering" si besoin . (il semble
> que ce soit le même chip/ID sur la webcam de pas mal de portables)

Thanks for your offer, but I'm not involved with USB camera drivers beside 
uvcvideo. You could try contacting the linux-media mailing list, maybe someone 
there could be able to help you.

-- 
Regards,

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


Re: [Linux-uvc-devel] Microsoft LifeCam Cinema (045e:075d) bandwidth reservation issues?

2010-01-24 Thread Laurent Pinchart
Hi Seth,

On Thursday 21 January 2010 04:54:34 Seth W wrote:
> Hi Laurent,
> 
> I hate to be a pest

Don't worry. I may be slow to answer due to my current work load, but I'm not 
ignoring you :-)

> but am curious as to whether or not you think this issue will be solvable.
> I am trying to determine if I will be keeping these two cameras or returning
> them, as they are only useful to me if they will both work (simultaneously)
> within the uvcvideo project. Thanks again for your time.

>From the kernel log messages, it seems your camera requests the highest 
bandwidth even though it should be able to work with a much lower one. It's 
worth a try giving the camera less bandwidth that it asks for.

Bandwidth supported by the camera are 128, 256, 512, 1024, 2048 and 3072. 
Could you try to replace

bandwidth = stream->ctrl.dwMaxPayloadTransferSize;

in uvc_video.c by all of the above bandwidths in turn to see which one work in 
1280x720 (MJPEG) ?

-- 
Regards,

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


Re: [Linux-uvc-devel] Driver webcam ID 1b3b:2937

2010-01-24 Thread Laurent Pinchart
Hi Sergio,

On Friday 22 January 2010 09:08:03 Sergio wrote:
> Hello.
> 
> Recently I've bought a MSI starcam mini+ Webcam and it doesn't have support
> under Linux..
> 
> The driver disk that shipped with it contains a Windows program named
> iP293x.exe.  A Google search based on that suggests that this web cam is
> based on the iPassion iP2936/37 series of chips.
> Given that the USB product id is 2937, I assume that this one uses the
> iP2397 chip. This web cam has a microphone and the iP2937 chip supports
> microphones.
> The technical brochure for this chip is
> http://www.ipassion.com.tw/pdf/iP2937_DSH_1.pdf.
> 
> ID 1b3b:2937

Please read http://linux-uvc.berlios.de/faq/ to check if the camera is UVC 
compatible. If it is, please send me the output of

lsusb -v -d 1b3b:2937

as well as all messages printed to the kernel log when you plug the camera to 
your system.

If the camera isn't UVC compatible I'm afraid I won't be able to help you.

-- 
Regards,

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


Re: [Linux-uvc-devel] 0ac8:0332 webcam

2010-01-25 Thread Laurent Pinchart
Hi,

On Sunday 24 January 2010 20:29:30 pduran...@libertysurf.fr wrote:
> Hi,
> 
> If anyone has get good with webcam Targus AVC05EU, I'm interested:
> 
> Ubuntu Hardy Heon
> lsusb
> Bus 004 Device 004: ID 0ac8:0332 Z-Star Microelectronics Corp.
> uname -a
> Linux cascade 2.6.24-26-generic #1 SMP Tue Dec 1 18:37:31 UTC 2009 i686
> GNU/Linux
> dmseg
> [ 3310.922125] uvcvideo: Found UVC 1.00 device USB 2.0 Camera (0ac8:0332)
> [ 3310.939188] input: USB 2.0 Camera as
> /devices/pci:00/:00:1d.7/usb4/4-1/4-1:1.0/input/input10
> [ 3310.950460] usbcore: registered new interface driv

That looks fine, what's your issue ?

-- 
Regards,

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


Re: [Linux-uvc-devel] MSI starcam mini+ compatible with Linux

2010-02-02 Thread Laurent Pinchart
Hi Sergio,

On Monday 25 January 2010 20:31:32 Sergio wrote:
> Hello,
> 
> I think that the camera MSI starcam mini+ isn't compatible with Linux,
> because the command doesn't output anything. I thought that it could be
> compatible becouse other model from MSI "1b3b:2951 MSI StarCam 370i" is
> compatible with the uvc driver.
> 
> # lsusb -v -d 1b3b:2937 | grep "14 Video"
> Doesn't print anything.

That means the camera isn't UVC compatible, so it won't be supported by the 
uvcvideo driver.

Your webcam can still be supported by another Linux driver, such as gspca.

-- 
Regards,

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


Re: [Linux-uvc-devel] Unlisted partially-supported webcam

2010-02-02 Thread Laurent Pinchart
Hi Bram,

On Tuesday 26 January 2010 16:12:02 Bram Senders wrote:
> Hi there,
> 
> I have here a partially working webcam which is unlisted on the list
> of known cameras; it's the built-in camera found in the Asus EeePC T91
> netbook.

Thanks for the report.

> "dmesg" says:
> ===
> [3.683885] uvcvideo: Found UVC 1.00 device USB 2.0 Camera (13d3:509b)
> [3.685259] Error: Driver 'pcspkr' is already registered, aborting...
> [3.695705] input: USB 2.0 Camera as
> /devices/pci:00/:00:1d.7/usb1/1-7/1-7:1.0/input/input6
> [3.695886] usbcore: registered new interface driver uvcvideo
> [3.695898] USB Video Class driver (v0.1.0)
> ===
> 
> "lsusb -v" says:

[snip]

> Now, as far as the working status of this camera is concerned, some
> apps work and others don't.  For example, I can display video with the
> GUVCView application, and I can record video with FFmpeg using "ffmpeg
> -f video4linux2 -s 640x480 -r 30 -i /dev/video0 -vcodec copy bla.avi".
>  However, particularly GStreamer-based applications seem not to work
> at all; for example the standard GNOME webcam app Cheese does not
> work.
> 
> This seems to be the case because GStreamer's v4l2src element want to
> get a camera attribute which seems to be not supported by the driver.
> For example, gst-launch says:
> 
> $ gst-launch v4l2src ! filesink location=foo
> Setting pipeline to PAUSED ...
> ERROR: Pipeline doesn't want to pause.
> ERROR: from element /GstPipeline:pipeline0/GstV4l2Src:v4l2src0: Failed
> getting controls attributes on device '/dev/video0'.
> Additional debug info:
> v4l2_calls.c(264): gst_v4l2_fill_lists ():
> /GstPipeline:pipeline0/GstV4l2Src:v4l2src0:
> Failed querying control 9963795 on device '/dev/video0'. (5 -
> Input/output error)
> Setting pipeline to NULL ...
> Freeing pipeline ...
> 
> 
> When I execute this command, I get the following message from dmesg:
> 
> [ 1799.428886] uvcvideo: Failed to query (135) UVC control 4 (unit 3)
> 
> : -32 (exp. 2).
> 
> 
> 
> This is using kernel 2.6.32-trunk-686 from Debian unstable.
> 
> Now I don't really know what control 9963795 is, or what UVC control 4
> (unit 3) is,

That's V4L2_CID_GAIN.

> but since I would like to do some simple GStreamer-based development with
> this webcam myself, any help on getting this to work would be appreciated! 
> I don't know whether this is a bug in the kernel driver or in GStreamer or
> possibly in the camera itself,

It looks like a camera bug. The camera claims to support the gain control, but
 any attempt to access it fails.

> but any way in which I could try to get this to work (either by patching
> the kernel driver, or possibly trying to patch the GStreamer v4l2src
> element to not query the relevant control?) or further debug this
> thing would be really really helpful.

Could you please try the following patch and let me know if it helps ?

diff --git a/drivers/media/video/uvc/uvc_ctrl.c 
b/drivers/media/video/uvc/uvc_ctrl.c
index f90319e..60f40d9 100644
--- a/drivers/media/video/uvc/uvc_ctrl.c
+++ b/drivers/media/video/uvc/uvc_ctrl.c
@@ -1453,6 +1453,7 @@ uvc_ctrl_prune_entity(struct uvc_device *dev, struct 
uvc_entity *entity)
struct usb_device_id id;
        u8 index;
} blacklist[] = {
+   { { USB_DEVICE(0x13d3, 0x509b) }, 4 }, /* Gain */
{ { USB_DEVICE(0x1c4f, 0x3000) }, 6 }, /* WB Temperature */
{ { USB_DEVICE(0x5986, 0x0241) }, 2 }, /* Hue */
};


-- 
Regards,

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


Re: [Linux-uvc-devel] Yet another unlisted, supported webcam

2010-02-02 Thread Laurent Pinchart
Hi Celejar,

On Sunday 31 January 2010 01:59:53 Celejar wrote:
> On Fri, 15 Jan 2010 01:32:03 +0100
> Laurent Pinchart  wrote:
> > On Wednesday 13 January 2010 00:12:27 Celejar wrote:
> > > Hi,
> 
> ...
> 
> > > Thanks for your work on this project!
> >
> > You're welcome. Thanks for the report. I'll update the supported devices
> > list as soon as Berlios become responsive again.
> 
> Hi Laurent,
> 
> Just a reminder to add my camera to the list (unless Berlios is still
> unresponsive):
> 
> https://lists.berlios.de/pipermail/linux-uvc-devel/2010-January/005483.html
> 
> [The web archive seems to have chopped off much of my message,
> including the log output and the lsusb output - I can repost them if
> necessary.]

Berlios is now responsive again, the website has been updated.

-- 
Regards,

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


Re: [Linux-uvc-devel] Webcam report

2010-02-02 Thread Laurent Pinchart
Hi Yury,

On Sunday 31 January 2010 16:58:35 Chudnovsky Yury wrote:
> Hi, All!
> I've just tested UVC webcam Genius iSlim 2000 AF (ID 0458:705d KYE
> Systems Corp. (Mouse Systems)), not listed in
> http://linux-uvc.berlios.de/#devices and found it good working,
> including microphone (ALSA). Not working only camera buttons, but who
> care of this :)
> Thanks to all of you who worked on GNU/Linux UVC support!

Thanks for the report.

Could you please send me the output of

lsusb -v -d 0458:705d

I will then update the supported devices list.

-- 
Regards,

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


Re: [Linux-uvc-devel] Thinkpad T410 support

2010-02-02 Thread Laurent Pinchart
Hi,

On Monday 01 February 2010 18:14:26 Omari Stephens wrote:
> Howdy, all
> 
> So, it turns out that the new camera in the Lenovo Thinkpad T410 is
> (mostly) supported by the uvcvideo driver.  The USB id is 17ef:480f.  I
> copied the stanza from 17ef:480b (another Lenovo-branded camera) in
> uvc_driver.c and it Just Worked... well... mostly.
> 
> After a quick recompile (I'm running 2.6.33-rc6 with uvcvideo as a
> module), it's been pretty straightforward to get JPEG out of the webcam,
> but that "M" is still a challenge — I only seem to get a single frame
> each time I start a recording.  I've tried with  a bunch of different
> luvcview params, as well as with an ffmpeg incantation I found on the
> antiquated OpenFacts UVC page.
> 
> I also noticed that using guvcview, I can consistently get a frame out
> every time I change the resolution, even going up to 1600x1200.
> Furthermore, I get that frame regardless of whether I'm in MJPEG or YUYV
> mode.  But I still never get two frames. I found a historical post ([1])
> describing the exact same problem I'm running into, but unfortunately it
> looks like the solution was "this was fixed in subversion", not any
> actual hints.
> 
> I've attached the output of `lsusb -v -s 1:4` as root, in case it helps
> give some insight.  Any help getting the camera to display more than one
> frame at a time would be appreciated.

Have you tried using the driver without adding the USB VID:PID to uvc_driver.c 
? What happens then ?

-- 
Regards,

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


Re: [Linux-uvc-devel] [UVC] VS_PROBE_CONTROL

2010-02-03 Thread Laurent Pinchart
Hi Palmax,

On Wednesday 03 February 2010 12:11:31 pal...@gmail.com wrote:
> Hello there,
> 
> I want to get some information about my webcam: size of still image
> captures, size of transfers, ... I think that I have to use
> VS_PROBE_CONTROL, but I don't know how.
> 
> Could you explain my one example?

Most information available can be retrieved from the USB descriptors. You 
won't need to issue any UVC request for that.

The VS_PROBE_CONTROL is used to negotiate frame format, size and interval with 
the camera and retrieve streaming parameters (such as the required bandwidth). 
Have a look at the uvc_get_video_ctrl function in uvc_ctrl.c. It queries the 
VS_PROBE_CONTROL (when probe == 1) or VS_COMMIT_CONTROL (when probe == 0) 
using GET_CUR/DEF/MIN/MAX/RES depending on the query parameter. The data 
retrieved from the camera is then converted to a uvc_streaming_control 
structure.

-- 
Regards,

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


Re: [Linux-uvc-devel] Unlisted partially-supported webcam

2010-02-06 Thread Laurent Pinchart
Hi Bram,

On Friday 05 February 2010 14:30:32 Bram Senders wrote:
> Hi Laurent,
> 
> Thanks for your help so far!
> 
> On Wed, Feb 3, 2010 at 1:23 AM, Laurent Pinchart
> 
>  wrote:
> > Hi Bram,
> >
> > On Tuesday 26 January 2010 16:12:02 Bram Senders wrote:
> >> Hi there,
> >>
> >> I have here a partially working webcam which is unlisted on the list
> >> of known cameras; it's the built-in camera found in the Asus EeePC T91
> >> netbook.
> >
> > Thanks for the report.
> >
> >> "dmesg" says:
> >> ===
> >> [3.683885] uvcvideo: Found UVC 1.00 device USB 2.0 Camera
> >> (13d3:509b)
> 
> [snip]
> 
> >> but any way in which I could try to get this to work (either by patching
> >> the kernel driver, or possibly trying to patch the GStreamer v4l2src
> >> element to not query the relevant control?) or further debug this
> >> thing would be really really helpful.
> >
> > Could you please try the following patch and let me know if it helps ?
> >
> > diff --git a/drivers/media/video/uvc/uvc_ctrl.c
> > b/drivers/media/video/uvc/uvc_ctrl.c index f90319e..60f40d9 100644
> > --- a/drivers/media/video/uvc/uvc_ctrl.c
> > +++ b/drivers/media/video/uvc/uvc_ctrl.c
> > @@ -1453,6 +1453,7 @@ uvc_ctrl_prune_entity(struct uvc_device *dev,
> > struct uvc_entity *entity) struct usb_device_id id;
> >u8 index;
> >} blacklist[] = {
> > +   { { USB_DEVICE(0x13d3, 0x509b) }, 4 }, /* Gain */
> >{ { USB_DEVICE(0x1c4f, 0x3000) }, 6 }, /* WB Temperature
> > */ { { USB_DEVICE(0x5986, 0x0241) }, 2 }, /* Hue */
> >};
> 
> Unfortunately this patch does not work for me; the errors I get from
> GStreamer and in dmesg are exactly the same as without this patch.  I
> see in the kernel source that some debug info should be printed using
> uvc_trace when performing the actual blacklisting; how can I get at
> this debug info?
> 
> PS: I see you're doing a talk at FOSDEM -- I'll be there!

Let's debug that live at the FOSDEM then :-)

-- 
Regards,

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


Re: [Linux-uvc-devel] Logitech QC 9000 camera on ARM platform

2010-02-18 Thread Laurent Pinchart
Hi Sascha,

On Wednesday 10 February 2010 12:25:06 Sascha Lumma wrote:
> Hi all,
> 
> I've a problem with that setup and it's quite difficult to explain. I
> searched on the Internet for that issue but I found nothing appropriate,
> hence I will try to explain it here...
> 
> I am using a Logitech QC Pro 9000 connected with a beagleboard (OMAP35 -
> ARM Cortex 8 & TMS320C64x DSP) running Angstrom (kernel 2.6.29). That
> setup is running fine so far and I can use all of the required features
> (fps from ~10 to ~15 with VGA resolution). But the frames I get from the
> camera contain some errors (stripes with inverted colors) randomly.
> Unfortunately, there is no regularity (position and length) and it
> happens not in all frames. I am using memory mapped buffers to get the
> frames. The first idea rising up in my mind is it could be caused by a
> race condition somewhere, but it's only an idea.
> 
> I tried already two other cameras (but same type) and other beagleboards
> as well, no change. Furthermore, I compiled my program on an 686-Box and
> it is working there without that errors (unfortunately with a newer
> kernel 2.6.31 and 32). Were there related Issues in 2.6.29?

That kind of problem is usually caused by lost USB packets. There's not much 
the driver can do. It could be anything from a USB controller driver bug to 
bad USB cable, through a USB bandwidth limitation on the OMAP35xx processor 
(in that case you could try capturing in MJPEG instead of YUYV) or a board 
routing issue.

-- 
Regards,

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


Re: [Linux-uvc-devel] Logitech QC 9000 camera on ARM platform

2010-02-18 Thread Laurent Pinchart
Hi Sascha,

On Friday 12 February 2010 14:28:28 Sascha Lumma wrote:
> Hi all,
> 
> Unfortunately nobody answered till now :-(
> 
> However, just a short remark. If I stop capturing (VIDIOC_STREAMOFF) and
> unmap the buffers I get "dma_free_coherent: bad page in kernel page
> table" through the kernel log. Maybe it helps to get a clue.

Could you send me a copy of the kernel log ?

-- 
Regards,

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


Re: [Linux-uvc-devel] [UVC] Rats results

2010-02-18 Thread Laurent Pinchart
Hi Palmax,

On Thursday 11 February 2010 13:30:16 pal...@gmail.com wrote:
> Hello there,
> 
> In order to do a good documentation, I was finding a static code
> analyzer (do you know a good one?) when I found a "auditing tool"
> called Rats, and it thinks that some parts of linux-uvc code can be
> problematic.
> 
> I don't believe so much in this kind of programs, but I prefer to
> contact you with Rats results warnings.
> 
> I use "rats -i -r -w 3 --html --columns --context
> /usr/src/linux/drivers/media/video/uvc > ~/rats_results.html" for
> getting this errors (it needs 0.01 second to study all uvc driver :D).

Thank you for testing the uvcvideo driver and helping improving its quality.

I've checked the report you've attached to your e-mail, and it turned out that 
the problems were false positives. Less work for me :-) But thanks anyway.

-- 
Regards,

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


Re: [Linux-uvc-devel] Model: LPC-UC35

2010-02-18 Thread Laurent Pinchart
Hi Arun,

On Monday 15 February 2010 12:22:23 Arun Prasath S.P. wrote:
> Hi ,
> 
> USB Webcam with the following details is not supported/listed in the UVC
> supported devices' list.
> 
> Model: LPC-UC35
> Manufacturer: LG
> Device details: Bus 003 Device 005: ID 043e:8585 LG Electronics USA, Inc.
> LPC-UC35 Webcam
> 
> 
> *Machine details:*
> Processor: X86 Core2Duo
> OS: Linux Fedora
> Kernel: 2.6.27.41-170.2.117.fc10.i686
> 
> The device is detected as a USB device, but not detected as a video class
> device. Is there any device drivers for this device.

If the camera isn't a video class device it won't work with the uvcvideo 
driver. The gspca driver supports many webcams, you might have more luck with 
it.

-- 
Regards,

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


Re: [Linux-uvc-devel] Motorola ROKR E6 'webcam' and resolution issues

2010-02-18 Thread Laurent Pinchart
Hi Michał,

On Monday 15 February 2010 18:50:10 Michał Górny wrote:
> Hello,
> 
> I am using an Motorola ROKR E6 cell phone as a webcam and although it is
> listed on 'Supported devices' list as working, I am unable to get it fully
> working.

Sorry for that. The report I got 2 years and a half ago was thus inaccurate, 
the reporter had probably tested 640x480 only (or your device is broken and 
his wasn't :-)).

> The driver reports five different modes (resolutions) for the device,
> which are (output of guvcview):
> 
> { pixelformat = 'YUYV', description = 'YUV 4:2:2 (YUYV)' }
> { discrete: width = 352, height = 288 }
>   Time interval between frame: 1/20,
> { discrete: width = 176, height = 144 }
>   Time interval between frame: 1/20,
> { discrete: width = 640, height = 480 }
>   Time interval between frame: 1/15,
> { discrete: width = 320, height = 240 }
>   Time interval between frame: 1/20,
> { discrete: width = 160, height = 120 }
>   Time interval between frame: 1/20,
> 
> But in fact only 640x480 works correctly. 320x240 shows only quarter of
> the image which three other quarters lightly overlaying on it, and 160x120
> works on similar manner. The 352x288 and 176x144 modes show only junk.
> This makes the webcam unusable for applications such as Skype which
> request one of the smaller modes.

Ouch.

> I was able to workaround the issue through hardcoding the 640x480 mode in
> the driver (applications used software scaling then) but that's only an
> ugly workaround. I would appreciate if you could give me further tips on
> diagnosing the issue or simply implement a quirk allowing to drop unusable
> video modes (or even leave only the one with largest resolution).

Would you be able to test the device in Windows ? If it works there we could 
try to capture USB traffic to find out how the Windows driver initializes it.

I've seen similar problems with Ricoh webcams. It was caused by the uvcvideo 
driver selecting an alternate setting with a too high bandwidth (which is 
allowed, but not very optimum). Your device has a single alternate setting for 
the streaming interface, so it doesn't seem to be the same issue.

-- 
Regards,

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


Re: [Linux-uvc-devel] Unlisted partially-supported webcam

2010-02-18 Thread Laurent Pinchart
Hi Bram,

On Tuesday 16 February 2010 11:19:28 Bram Senders wrote:
> Hey Laurent,
> 
> On Wed, Feb 10, 2010 at 1:24 AM, Laurent Pinchart
> 
>  wrote:
> > I think I made a small mistake, could you replace the index 4 by 9 in the
> > patch I've sent you ?
> 
> Yes!  Now the webcam works correctly :-)  Thank you very much!  Can
> this be updated on the list of UVC devices?  If there is anything else
> you need from me, feel free to ask :-)

You're welcome.

I've added the camera to the supported devices list.

-- 
Regards,

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


Re: [Linux-uvc-devel] Techsolo TCA-4900 is supported!

2010-02-18 Thread Laurent Pinchart
Hi,

On Tuesday 16 February 2010 15:19:32 l...@mail.ru wrote:
> Hello!
> 
> The Techsolo webcam TCA-4900 is supported by UVC, no drivers
> needed! Techsolo has some linux "drivers", but they not for this model.
> 
> It is actually:
> Bus 002 Device 005: ID 0ac8:332d Z-Star Microelectronics Corp. Vega USB 2.0
> Camera And works!
> 
> The product link:
> http://www.techsolo.net/site/product.php?lang=en&do=show&product_id=224&&cl
> ass_id=53

Thanks for the report. The device was already listed, albeit not under that 
name. I've updated the website.

-- 
Regards,

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


Re: [Linux-uvc-devel] Unlisted partially-supported webcam

2010-02-18 Thread Laurent Pinchart
Hi Bram,

On Thursday 18 February 2010 23:43:59 Bram Senders wrote:
> Hey Laurent,
> 
> On Thu, Feb 18, 2010 at 11:06 PM, Laurent Pinchart
> 
>  wrote:
> >>  wrote:
> >> > I think I made a small mistake, could you replace the index 4 by 9 in
> >> > the patch I've sent you ?
> >> 
> >> Yes!  Now the webcam works correctly :-)  Thank you very much!  Can
> >> this be updated on the list of UVC devices?  If there is anything else
> >> you need from me, feel free to ask :-)
> > 
> > You're welcome.
> > 
> > I've added the camera to the supported devices list.
> 
> Thanks!  Does this mean that the kernel blacklist patch will also go
> upstream?

Yes, it should be in 2.6.34.

-- 
Regards,

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


Re: [Linux-uvc-devel] frame rate dropping when capturing from webcam

2010-03-04 Thread Laurent Pinchart
Hi Cesar,

On Tuesday 23 February 2010 01:48:10 Cesar Maciel wrote:
> Hello,
> 
> I am trying to capture from a webcam with a fixed frame rate. I am using
> ffmpeg (svn revision 21498) with the following options:
> 
> 
> ./ffmpeg -y -t 00:01:00 -f video4linux2  -r 30 -s 352x288   -i
> /dev/video0 -vcodec msmpeg4v2 -f avi -r 30 video.avi
> 
> 
> I used two webcams where uvcvideo shows being capable of 352x288 at
> 30fps. For some reason, ffmpeg cannot keep the input frame rate, and it
> starts to go down. There are processing resources available in the
> system (Ubuntu Karmic 9.10, and also Voyage Linux 0.62 (Debian-based). I
> have tried specifying the qscale option, but it did not make any
> difference. Also, both cameras can output raw and mjpeg, but it also did
> not make a difference.

Have you tried disabling auto-exposure ? Most cameras adjust the frame rate 
based on lightning conditions.

> I have updated uvc on Karmic to the version available as a gzip file on
> the official website. dmesg shows tons of
> 
> uvcvideo: Dropping payload (out of sync).
> 
> and every now and then:
> 
> [28339.492016] uvcvideo: uvc_v4l2_ioctl(VIDIOC_QBUF)
> [28339.492022] uvcvideo: Queuing buffer 30.
> [28339.492030] uvcvideo: uvc_v4l2_ioctl(VIDIOC_DQBUF)
> 
> 
> for both cameras. On Voyage Linux (kernel 2.6.30), it shows several msgs
> like the following ones
> 
> [26440.191029] uvcvideo: Queuing buffer 3.
> [26440.191405] uvcvideo: uvc_v4l2_ioctl(VIDIOC_DQBUF)
> [26440.201496] uvcvideo: uvc_v4l2_ioctl(VIDIOC_DQBUF)
> [26440.211579] uvcvideo: uvc_v4l2_ioctl(VIDIOC_DQBUF)
> [26440.221661] uvcvideo: uvc_v4l2_ioctl(VIDIOC_DQBUF)
> [26440.230034] uvcvideo: Frame complete (EOF found).
> [26440.231743] uvcvideo: uvc_v4l2_ioctl(VIDIOC_DQBUF)
> [26440.231753] uvcvideo: Dequeuing buffer 4 (3, 14800 bytes).
> [26440.249905] uvcvideo: uvc_v4l2_ioctl(VIDIOC_QBUF)
> [26440.249921] uvcvideo: Queuing buffer 4.
> [26440.249950] uvcvideo: uvc_v4l2_ioctl(VIDIOC_DQBUF)
> 
> Cameras are Microsoft NX-3000 and Genius eFace 1325R
> 
> Does anyone have an idea, or need more info?

-- 
Regards,

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


Re: [Linux-uvc-devel] Model: LPC-UC35

2010-03-04 Thread Laurent Pinchart
Hi Arun,

On Monday 22 February 2010 06:23:01 Arun Prasath S.P. wrote:
> I tried with gspca driver also. It is not supporting my webcam. Is there
> any other solution?

There are a few other drivers, but they don't support many cameras. Yours 
might be unsupported. Try to report the problem on the linux-media mailing 
list, someone might be able to help you. You should post the lsusb -v output 
for your camera in the report.

-- 
Regards,

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


Re: [Linux-uvc-devel] uvcvideo broke my vloopback module?

2010-03-09 Thread Laurent Pinchart
Hi Bart,

On Friday 05 March 2010 23:28:22 Bart Koppe wrote:
> (sorry for my empty reply just before this one)
> 
> Hi Paulo,
> 
> I got vloopback running in the first place with this link. I remember
> insmod did not work, but 'make install' and then 'modprobe vloopback'
> did. So I didn't bother with it, untill after installing uvc-video it
> stopped working.
> Maybe i got the same message as now, but i don't remember.
> # insmod vloopback.ko
> insmod: error inserting 'vloopback.ko': -1 Unknown symbol in module
> 
> In the readme of vloopback they mention this error and the solution:
> 
>Solution : You must load videodev module :
>   'insmod videodev ; insmod ./vloopback.ko'
> 
> Also they mention:
> 
> To compile and install :
> make ; su - ; make install
> /sbin/modprobe videodev
> /sbin/modprobe vloopback
> 
> 
> But I now don't have videodev and it is not included in
> svn co http://www.lavrsen.dk/svn/vloopback/trunk/ vloopback

The videodev.ko module provides the V4L2 core. If you're running a distro 
kernel the module was shipped with your kernel.

For backward-compatibility reasons (to make the latest driver work on older 
kernels), the uvcvideo driver ships with a copy of the whole V4L2 subsystem 
source. When installing the uvcvideo module, you've also installed the latest 
version of the V4L2 core and other V4L2 drivers.

> Basically I have no clue why it ever worked, I had no videodev module
> installed unless it came with another software package, could that be?
> I also remember having videdodev in the last few days, so maybe somehow
> I removed it.. I guess installed uvc-version over it, and then with
> 'make rminstall' i deleted it. Does that make sense?

It could make sense yes.

> Trying to install the uvc-video version of videodev (I already ran 'make
> minstall', then 'make') I get:
> # insmod v4l/videodev.ko
> insmod: error inserting 'v4l/videodev.ko': -1 Unknown symbol in module

This kind of message is caused by incompatibilities between driver versions. 
Basically, the videodev.ko module you're trying to load depends on other 
modules, but the version of those modules that are already loaded came from 
your distro and are not recent enough.

To solve this problem, you need to either:

- install the V4L2 subsystem that comes with uvcvideo, replacing the one that 
came with your distro (you might need to remove the distro one manually, as 
the new one might probably installs in a new location), or

- load all the required V4L2 modules in order using insmod (in this case you 
would need to load v4l/v4l2-compat-ioctl32.ko before loading v4l/videodev.ko).

The first solution is easier.

> When i run just 'make install' as in the uvc-video readme, it installs
> and I can 'modprobe videodev'.
> Then back to my vloopback source and
> # insmod vloopback.ko
> insmod: error inserting 'vloopback.ko': -1 Unknown symbol in module

This is because the vloopback.ko module has been compiled against your kernel 
distro, while the loaded videodev.ko module came with uvcvideo and is more 
recent.

> When I do 'make install' instead of insmod I get the same old error again
> # modprobe vloopback
> FATAL: Error inserting vloopback
> (/lib/modules/2.6.26-2-686/kernel/drivers/misc/vloopback.ko): Unknown
> symbol in module, or unknown parameter (see dmesg)
> 
> Any idea?

To solve your problem, you need to recompile vloopback against the uvcvideo 
tree.

-- 
Regards,

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


Re: [Linux-uvc-devel] syntek 174f:8a12 unsupported?

2010-03-09 Thread Laurent Pinchart
Hi,

On Sunday 07 March 2010 14:40:58 martuf1 wrote:
> > On Wednesday 28 July 2008, Laurent wrote:
> > 
> > I'm afraid there's not much I can do. The camera refuses to answer
> > perfectly valid requests and I got no idea why.
> 
> Hi Laurent,
> (... so long ago, isn't it?)
> 
> I just discovered that there is a way to make the
> webcam working, found on
> http://www.mepisimo.com/forum/index.php?topic=305.msg1143 (Spanish)
> 
> 174f:8a12 Syntek Syntek 0.3MPixel USB 2.0 UVC PC Camera (despues de
> instalar dfu-util y ejcutar update-usbids). Carga uvcvideo, que no
> va, después de trastear un rato, puesto que en linux-uvc.berlios.de
> aparecía como no soportada, compilaciones frustradas..., con la
> opción quirks=16 rula con cheese (peta la grabación de video, parece
> que por cuestiones de librerías), kopete, xawtv, luvcview, sin poder
> realizarse ajustes de ningún tipo, camorama ni arranca. En fin :
> Código:
> 
> ##/etc/modprobe.d/uvcvideo.conf
> options uvcvideo quirks=16
> 
> I confirm that with amsn, cheese, luvcview and skype 2.1.x.x the cam is
> working fine!!!

Thanks a lot for the information. I will fix the driver to set the quirk 
automatically and update the supported devices list. Could you please tell me 
in which notebook model that webcam can be found ?

-- 
Regards,

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


Re: [Linux-uvc-devel] problems with uvc cameras and gstreamer on gentoo

2010-03-09 Thread Laurent Pinchart
Hi Christopher,

On Friday 05 March 2010 18:43:13 Christopher Harvey wrote:
> I've been trying to fix a problem with one of my computers that is
> preventing me from using gstreamer with uvc cameras for a while now. I
> asked on the gstreamer lists recently, but got no answer.
> 
> Firstly, my camera runs fine with guvcview, and I haven't had problems with
> this camera on other computers. (Namely a default OpenSUSE install, even
> with gstreamer)
> 
> I have a gentoo computer here that refuses to run the camera with
> gstreamer.
> 
> ERROR: from element /GstPipeline:pipeline0/GstV4l2Src:v4l2src0: Device
> '/dev/video0' cannot capture at 320x240
> Additional debug info:
> gstv4l2object.c(1919): gst_v4l2_object_set_format ():
> /GstPipeline:pipeline0/GstV4l2Src:v4l2src0:
> Call to S_FMT failed for YU12 @ 320x240: Invalid argument

It's quite simple, your webcam doesn't support the YU12 format requested by 
gstreamer. You need to select another format (YUYV should work).

> Before I dive into gstreamer source code I wanted to see if anybody here
> happened to have any tips for uvc cameras and gstreamer. (Yes Cameras, I
> tried a few)
> 
> Here is some system information:
> $ uname -a
> Linux Tool 2.6.31-gentoo-r6 #7 SMP PREEMPT Sat Feb 20 13:32:41 EST 2010
> x86_64 AMD Athlon(tm) 64 X2 Dual Core Processor 4200+ AuthenticAMD
> GNU/Linux
> 
> Bus 001 Device 003: ID 046d:08ca Logitech, Inc. Mic (Fusion)
> 
> [I--] [ ~] media-libs/gstreamer-0.10.25 (0.10) (tried 0.10.24 as well)
> 
> # zcat /proc/config.gz | grep V4L
> CONFIG_VIDEO_V4L2_COMMON=y
> # CONFIG_VIDEO_ALLOW_V4L1 is not set
> # CONFIG_VIDEO_V4L1_COMPAT is not set
> CONFIG_VIDEO_V4L2=y
> CONFIG_V4L_USB_DRIVERS=y
> 
> Does this look familiar to anybody?

-- 
Regards,

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


Re: [Linux-uvc-devel] can't find /dev/videoX on 18ec:3299 ARKMICRO

2010-03-09 Thread Laurent Pinchart
Hi Teguh,

On Friday 05 March 2010 08:29:35 Teguh Iskanto wrote:
> Hi List,
> 
> I've got a problem with my webcam on UVC driver, seemed like whatever I try
> I still couldn't get it working.
> The one thing that I know is /dev/videoX is not being created (not quite
> sure why). really appreciate if anyone on this list could shed me a light
> on how to fix this problem.
> 
> BTW:
> I've compiled the source with the latest UVC driver from the tree
> with : hg clone http://linuxtv.org/hg/~pinchartl/uvcvideo/

Could you please try to set the quirks parameter to 0x100 when loading the 
uvcvideo driver ?

-- 
Regards,

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


Re: [Linux-uvc-devel] Vimicro USB Camera (Altair)

2010-03-09 Thread Laurent Pinchart
Hi Simon,

On Monday 01 March 2010 19:43:43 Simon Danner wrote:
> Hello,
> i own a webcam which is not mentioned on the website.

Thanks for the report.

> It works okay with skype, mplayer and with lucview. (I get some pixels
> with wrong color), but the image in cheese is totally broken. Is this a
> cheese bug or a driver bug.

Could be either, or both :-)

If other applications work correctly I would be tempted to say the bug is in 
Cheese (or possibly in any middleware it uses, such as gstreamer or libv4l). 
It could still be a driver bug (or worse, webcam bug) that is only triggered 
by the specific calls sequence Cheese happens to make.

Do you get any error message in the kernel log ?

> The device also has lights built around it, is it possible to turn them
> on in linux?

It should, but it won't be straightforward. The UVC specification doesn't 
address lights, so the driver doesn't know about them.

Devices are allowed to extend the UVC specification to expose controls not 
present in the standard. This is done through extension units, and your device 
has one of them:

[snip]

>   VideoControl Interface Descriptor:
> bLength28
> bDescriptorType36
> bDescriptorSubtype  6 (EXTENSION_UNIT)
> bUnitID 4
> guidExtensionCode {5dc717a9-1941-da11-ae0e-000d56ac7b4c}
> bNumControl 8
> bNrPins 1
> baSourceID( 0)  1
> bControlSize3
> bmControls( 0)   0x59
> bmControls( 1)   0x80
> bmControls( 2)   0x80
> iExtension  0

The bmControls field is a bitmask that lists all supported controls. The 
values above mean that controls 0, 3, 4, 6, 15 and 23 are supported. 
Unfortunately no documentation is available to describe those controls. I'm 
pretty sure that one of them controls the lights. Guessing will be required.

WARNING: This could damage your device. Some vendors export firmware update 
controls, and accessing them incorrectly could erase the firmware.

You will first need to download and install the uvcdynctrl tool that comes 
with libwebcam (available through www.quickcamteam.net). Make sure you get the 
SVN version, last time I checked the tarball was outdated.

Then, you will need to create an XML file that describes mappings between the 
extension unit controls and V4L2 controls. To do so, take the Logitech sample 
XML file and adapt it to your extension unit. You can map all the available 
controls to V4L2 controls (pick some private value). The missing piece of 
information is the control selector: to access a control, the driver needs to 
pass a selector value to the device. For extension units selectors are usually 
equal to the control index in the bmControls bitmask plus 1, but that's not 
required by the spec. It's a safe first guess though.

The next step is to configure the uvcvideo driver with the extension unit 
controls information using uvcdynctrl and the XML file you've created. You 
will then be able to access the controls through the V4L2 API.

-- 
Regards,

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


Re: [Linux-uvc-devel] IPEVO Point 2 View supported

2010-03-10 Thread Laurent Pinchart
Hi,

On Monday 01 March 2010 11:46:06 Per Thomas Jahr wrote:
> 
> I just wanted to report that the IPEVO Point 2 View webcam works fine
> with uvcvideo. I've tested it with various applications (Skype, UCView,
> Flash ...) and found that it works in all except "Cheese Webcam Booth".

What happens in Cheese ?

> This message always shows in dmesg once I start one of the video apps:
> uvcvideo:
> Failed to query (135) UVC control 11 (unit 3) : -32 (exp. 1).
> (but it works ok)

That's the "White Balance Temperature, Auto" control. The driver tries to 
retrieve its default value. According to the UVC spec, supporting that request 
is mandatory on that control, so it's probably a webcam bug. No big deal 
though.

> There are two buttons on the webcam. One of them is to set focus and the
> other is for taking a picture. The one that sets focus works as
> expected, but nothing happens when I press the snapshot button. Should
> it be supported?

Yes it should. The uvcvideo creates an evdev device when you plug your camera 
in:

> input: IPEVO Point 2 View as
> /devices/pci:00/:00:1d.7/usb2/2-4/2-4.4/2-4.4:1.0/input/input12

The device is then used to report the KEY_CAMERA event when the button is 
pressed. The event might not be mapped to any action on your system though.

> Also, about setting the focus: the hardware button for this works, but is it
> possible to control focus from software? It seems that the software that
> follows the webcam supports this (you click on the part of the image that
> you want in focus).

It should be possible yes. Your camera has two focus controls (auto-focus and 
absolute focus) that are accessible through the V4L2_CID_FOCUS_AUTO and 
V4L2_CID_FOCUS_ABSOLUTE V4L2 controls.

-- 
Regards,

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


Re: [Linux-uvc-devel] frame rate dropping when capturing from webcam

2010-03-17 Thread Laurent Pinchart
Hi Cesar,

On Tuesday 09 March 2010 06:12:19 Cesar Maciel wrote:
> Hi Laurent,
> No, I did not. Does it depend on the camera model to set a given flag,
> or is it universal provided that the camera is uvc compliant?

UVC webcams are not required to support disabling the auto-exposure, but if 
they do, that's done through a standard UVC control, mapped to the 
V4L2_CID_EXPOSURE_AUTO control.

> How could I do it?

There's a few command line tools that let you modify controls, as well as GUI 
applications. v4l2-ctl is a good candidate as a low-level command line tool.

-- 
Regards,

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


Re: [Linux-uvc-devel] Motorola ROKR E6 'webcam' and resolution issues

2010-03-17 Thread Laurent Pinchart
Hi Michał,

On Wednesday 10 March 2010 22:27:20 Michał Górny wrote:
> On Thu, 4 Mar 2010 11:31:55 +0100 Laurent Pinchart wrote:
> > I don't have much experience with Windows, so I can't advice for a
> > test application that would allow you to configure the resolution.
> > I've heard that amcap is often used for testing, maybe you could give
> > it a try.
> 
> amcap wasn't much of help but I've tested several applications and all
> provided resolutions seem to work on Windows. And I'm especially sure
> that 160x120 works fine (which seems to be the preferred one with most
> of the software).
> 
> What should I do now?

The next step would be to use a software USB sniffer on Windows to capture the 
device initialization sequence in Windows, and compare that to what's done by 
the uvcvideo driver.

-- 
Regards,

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


Re: [Linux-uvc-devel] [Fwd: Re: frame rate dropping when capturing from webcam]

2010-03-17 Thread Laurent Pinchart
Hi Cesar,

On Tuesday 09 March 2010 18:46:28 Cesar Maciel wrote:
> Laurent, I replied to you instead of to the list.
> OK, I found the answer on how to set auto exposure off (using
> uvcdynctrl), but from as far as I found out, it really depends on the HW
> supporting it, and even on the value tto be used.
> Anyway, I believe I am missing the basics here. If the webcam is varying
> the frame rate, it is still keeping the elapsed time the same as the
> wall clock, correct? If I record 10 seconds, it will be 10 seconds,
> regardless of the changes in frame rate. Is that correct?

Yes it will. Of course, if you store the frames in a container that expects a 
constant frame rate (let's say an AVI file, I think those don't support 
variable frame rates) then the playback might take less than 10 seconds.

-- 
Regards,

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


Re: [Linux-uvc-devel] can't find /dev/videoX on 18ec:3299 ARKMICRO

2010-03-17 Thread Laurent Pinchart
Hi,

On Wednesday 10 March 2010 08:01:39 Teguh Iskanto wrote:
> Hi Laurent, thanks heaps for the help,
> 
> but now the device was complaining that it couldn't initialized  (seemed
> like it couldn't find the suitable pic mode):
> Do I need to put the 'right' quirks again to let the camera initialized
> correctly ?
> 
> Thanks again for your help,
> 
> Followings are the excerpts:
> --
> streamer -d -c /dev/video0 -b 16 -o test.jpeg
> checking writer files [multiple image files] ...
>   video name=ppm ext=ppm: ext mismatch [need jpeg]
>   video name=pgm ext=pgm: ext mismatch [need jpeg]
>   video name=jpeg ext=jpeg: OK
> files / video: JPEG (JFIF) / audio: none
> vid-open: trying: v4l2-old...
> vid-open: failed: v4l2-old
> vid-open: trying: v4l2...
> v4l2: open
> v4l2: device info:
>   uvcvideo 0.1.0 / USB2.0 PC CAMERA @ usb-:00:07.2-1
> vid-open: ok: v4l2
> movie_init_writer start
> setformat: JPEG (JFIF) (320x240): failed
> setformat: 12 bit YUV 4:2:0 (planar) (320x240): failed
> setformat: 16 bit YUV 4:2:2 (planar) (320x240): failed
> setformat: 24 bit TrueColor (BE: rgb) (320x240): failed
> setformat: 24 bit TrueColor (LE: bgr) (320x240): failed
> no way to get: 320x240 JPEG (JFIF)

Your application tries 5 different frame formats, but none of them are 
supported by the camera (it only supports YUV 4:2:2 packed). You will need to 
fix the application to support the YUYV format used by the camera. 
libv4lconvert might help if you need transcoding.

-- 
Regards,

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


Re: [Linux-uvc-devel] Webcam 05a9:2641 on linux 2.6.33

2010-03-18 Thread Laurent Pinchart
Hi Fabrizio,

On Saturday 13 March 2010 15:09:26 Fabrizio Regalli wrote:
> Dear list,
> 
> my webcam does not work anymore after update the kernel to 2.6.33
> I see this message on /var/log/messages
> 
> 
> Mar 13 13:30:38 debiancasa kernel: [7.544918] uvcvideo: Found UVC 1.00
> device Monitor Integrated Webcam (05a9:2641)
> Mar 13 13:30:38 debiancasa kernel: [7.545946] uvcvideo: UVC non
> compliance - GET_DEF(PROBE) not supported. Enabling workaround.
> Mar 13 13:30:38 debiancasa kernel: [7.547677] usbcore: registered new
> interface driver uvcvideo
> 
> Cheese and mercury doesn't recognize the webcam.

Do they print any error message ? Does the driver print messages to the kernel 
log when you start cheese or mercury ?

-- 
Regards,

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


Re: [Linux-uvc-devel] IPEVO Point 2 View supported

2010-03-18 Thread Laurent Pinchart
Hi,

On Thursday 11 March 2010 22:05:30 Per Thomas Jahr wrote:
> On Tue, 2010-03-09 at 12:51 +0100, Laurent Pinchart wrote:
> > On Monday 01 March 2010 11:46:06 Per Thomas Jahr wrote:
> > > I just wanted to report that the IPEVO Point 2 View webcam works fine
> > > with uvcvideo. I've tested it with various applications (Skype, UCView,
> > > Flash ...) and found that it works in all except "Cheese Webcam Booth".
> > 
> > What happens in Cheese ?
> 
> I just see a test picture, but I have a feeling that it is related to
> another v4l2 device (tv tuner). Cheese seems to be stuck on /dev/video0
> for some reason. It never switches over to /dev/video1 where the webcam
> is (even when I change devices in preferences).

So it's not a uvcvideo driver issue, good :-)

> > > This message always shows in dmesg once I start one of the video apps:
> > > uvcvideo:
> > > Failed to query (135) UVC control 11 (unit 3) : -32 (exp. 1).
> > > (but it works ok)
> > 
> > That's the "White Balance Temperature, Auto" control. The driver tries to
> > retrieve its default value. According to the UVC spec, supporting that
> > request is mandatory on that control, so it's probably a webcam bug. No
> > big deal though.
> > 
> > > There are two buttons on the webcam. One of them is to set focus and
> > > the other is for taking a picture. The one that sets focus works as
> > > expected, but nothing happens when I press the snapshot button. Should
> > > it be supported?
> > 
> > Yes it should. The uvcvideo creates an evdev device when you plug your
> > camera
> > 
> > in:
> > > input: IPEVO Point 2 View as
> > > /devices/pci:00/:00:1d.7/usb2/2-4/2-4.4/2-4.4:1.0/input/input12
> > 
> > The device is then used to report the KEY_CAMERA event when the button is
> > pressed. The event might not be mapped to any action on your system
> > though.
> 
> I'm running Fedora 12. How can I test that the event comes through to
> evdev? Tried with "xev", but nothing there.

You need to open the /dev/video0 device for the driver to generate events. The 
reason for that is to allow the device to be auto-suspended when not in use.

-- 
Regards,

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


Re: [Linux-uvc-devel] some questions about uvc

2010-03-18 Thread Laurent Pinchart
Hi Miloody,

On Thursday 11 March 2010 17:28:35 loody wrote:
> Dear all:
> I try to fix the uvc driver on my mips platform.
> But I got the messages as I append at the end of letter, the messages
> are triggered by capture.c the sample c code at the official website.
> I have some questions:
> 1. why the uvc resend the urb in uvc_video_complete?

Because the USB core doesn't resubmit URBs automatically. If the driver didn't 
do it there, it would only receive a few URBs (currently hardcoded to 5 in the 
driver) and then stop.

> 2. from the log, it seems uvc keep catching when the VIDIOC_STREAMON
> passed from v4l2 to uvc.

I'm not sure to get what you mean.

> 3. if the answer of 1 is yes; what will uvc does when he get
> VIDIOC_QBUF and VIDIOC_DQBUF ?
> ( in my opinion, uvc should starting catpureing when he receives
> VIDIOC_QBUF and stop when the buffer is full. Then it pass the buffer
> above when he got VIDIOC_DQBUF. But from the log below, it start
> captureing when he got VIDIOC_STREAMON. Am i right?)

THe driver instructs the device to start sending data when it receives 
VIDIOC_STREAMON. If there's no buffer queued the data will just be discarded.

> 4. if my assumption above is correct, uvc start capture at
> VIDIOC_DQBUF and stop when buffer full. it should stop capture when
> frame complete in the log appears.

It could, but just discarding the data is enough.

> VIDIOC_STREAMON
> uvcvideo: Failed to resubmit video URB (-38).
> uvcvideo: Failed to resubmit video URB (-38).

-38 is -ENOSYS, and that error is returned by very few USB host controller 
drivers. Which controller are you using on your platform ? Chances are you 
might need to fix it.

> uvcvideo: Frame complete (overflow).
> uvcvideo: Dropping payload (out of sync).
> uvcvideo: Dropping payload (out of sync).
> uvcvideo: Dropping payload (out of sync).
> uvcvideo: Dropping payload (out of sync).
> uvcvideo: Dropping payload (out of sync).

-- 
Regards,

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


Re: [Linux-uvc-devel] Not found Device ID(0ac8:3313) of TopSpeed USB 2.0 Camera B in source code

2010-03-18 Thread Laurent Pinchart
Hi,

On Tuesday 16 March 2010 08:07:27 liangyong wrote:
> I am using TopSpeed USB 2.0 Camera, and Device ID is 0ac8:3313. I
> downloaded http://linuxtv.org/hg/~pinchartl/uvcvideo/archive/tip.tar.gz .
> But I didn't found Device ID(0ac8:3313) in source code.

The driver matches devices based on their class and subclass, not on their 
vendor and product ID. UVC compatible cameras should be supported out of the 
box without any need to modify 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


Re: [Linux-uvc-devel] problems with uvc cameras and gs treamer on gentoo

2010-03-19 Thread Laurent Pinchart
Hi Christopher,

On Wednesday 10 March 2010 08:40:14 Christopher Harvey wrote:
> Hi again,
> I tried a slightly different command:
> gst-launch-0.10 v4l2src ! video/x-raw-yuv,width=640,height=480 !
> xvimagesink
> 
> (gst-launch-0.10:6239): GLib-WARNING **: g_set_prgname() called multiple
> times Setting pipeline to PAUSED ...
> Pipeline is live and does not need PREROLL ...
> ERROR: from element /GstPipeline:pipeline0/GstV4l2Src:v4l2src0: Device
> '/dev/video0' cannot capture at 640x480
> Additional debug info:
> gstv4l2object.c(1854): gst_v4l2_object_set_format ():
> /GstPipeline:pipeline0/GstV4l2Src:v4l2src0:
> Call to S_FMT failed for YUYV @ 640x480: Input/output error
> ERROR: pipeline doesn't want to preroll.
> Setting pipeline to PAUSED ...
> Setting pipeline to READY ...
> Setting pipeline to NULL ...
> Freeing pipeline ...
> 
> and I KNOW this camera works at that resolution and video format.
> I setup the same camera on the other laptop that previously had OpenSUSE
> installed and it worked with kernel version 2.6.31-r10 (x86, gentoo this
> time).
> The broken one is 2.6.31-r6 amd 64bit.
> 
> are
> CONFIG_USB_VIDEO_CLASS=m
> CONFIG_USB_VIDEO_CLASS_INPUT_EVDEV=y
> the only kernel parameters that matter? I tried with both the usb audio
> module enabled and disabled. (built in for the audio) The camera has a
> mic, but I don't care about it.

Could you check if the driver prints anything to the kernel log (use the dmesg 
command) when you get the above error with GStreamer ?

-- 
Regards,

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


Re: [Linux-uvc-devel] turn off the autofocus

2010-03-31 Thread Laurent Pinchart
Hi Luis,

On Tuesday 23 March 2010 21:12:22 Luis Felipe Zeni wrote:
> Hello,
> 
> i have a Microsoft Lifecam Cinema and it works very well with the driver.
> My question is:
> 
> Is possible turn off the autofocus by software?

I'll assume you're referring to the 045e:075d model (there could be more than 
one Microsoft Lifecam Cinema). That webcam exposes an auto-focus control which 
you can access through the V4L2_CID_FOCUS_AUTO V4L2 control.

-- 
Regards,

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


Re: [Linux-uvc-devel] cam support request!

2010-03-31 Thread Laurent Pinchart
Hi Frederic,

On Thursday 25 March 2010 18:35:21 Frederic Robinson II wrote:
> Creative Live! ProID 041e:4038
> 
> Here's my complete lsusb output.  It'd be awesome if it would be supported
> soon  (^_^)
> 
> if it's been tried and its just a hassle, just lmk
> 
> i'll go buy a compatible device.
> 
> 
> Bus 003 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
> Bus 002 Device 003: ID 04fc:05d8 Sunplus Technology Co., Ltd
> Bus 002 Device 002: ID 15ca:00c3 Textech International Ltd. Mini Optical
> Mouse
> Bus 002 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
> Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
> Bus 001 Device 003: ID 041e:4038 Creative Technology, Ltd ORITE CCD Webcam
> [PC370R]

The uvcvideo driver supports UVC-compatible devices only. To find out if your 
camera is one of them, please have a look at http://linux-uvc.berlios.de/faq/.

If your device is UVC compatible, please post the output of

lsusb -v -d 041e:4038

with an explanation of the problem(s) you experience (kernel log messages are 
always helpful).

Otherwise I'm afraid I won't be able to help you. You might have more luck 
with the gspca driver.

-- 
Regards,

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


Re: [Linux-uvc-devel] A4Tech PK-333E is supported by uvc

2010-03-31 Thread Laurent Pinchart
Hi Andrey,

On Tuesday 30 March 2010 19:49:39 Andrey Skvortsov wrote:
> Hi!
> 
> The webcam works perfect out of the box. I've tested it with skype and
> cheese. All is right. Shot button works in cheese also perfect.
> Thank you for a good job!
> 
> here is some information about webcam.

[snip]

Thanks a lot for the report. I'll update the supported devices list.

-- 
Regards,

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


Re: [Linux-uvc-devel] OmniVision / I've screwed my system

2010-03-31 Thread Laurent Pinchart
Hi Paulo,

Thanks for providing help on the linux-uvc-devel mailing list, I really 
appreciate that.

On Tuesday 30 March 2010 16:08:33 Paulo Assis wrote:
> Jeff Hi,
> 
> You should have followed the v4l-dvb wiki:
> http://www.linuxtv.org/wiki/index.php/How_to_Obtain,_Build_and_Install_V4L-
> DVB_Device_Drivers
> 
> you now have mixed modules (new and old) and this is causing the errors.
> 
> get mercurial, the kernel headers and the full v4l tree from linuxtv.
> 
> from the top of the hg tree:
> 
> make rminstall
> make distclean
> sudo make menuconfig   <--- disable fireDTV or you will end up
> with errors when building

Quick side note, I don't think sudo is required for make menuconfig.

> make
> sudo make install
> sudo make unload
> sudo modprobe uvcvideo

-- 
Regards,

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


Re: [Linux-uvc-devel] Image format set with VIDIOC_S_FMT successfully on host PC, yet failed on target ARM dev-board.

2010-03-31 Thread Laurent Pinchart
Hi,

On Wednesday 31 March 2010 12:37:36 Gallon Fr wrote:
> 2010/3/30 Paulo Assis 
> > >> > usb 1-1: new full speed USB device using s3c2410-ohci and address 5
> > 
> > I think this explains why you only have MJPG on the ARM board.
> > YUYV requires a higher bandwidth, so it's only available in usb2.
> > 
> > But MJPG should also be available with usb2 and from what I understand
> > you only have YUYV ?
> > If this is true then its a bit strange.
> > 
> > Best regards,
> > Paulo
> 
> I've confirmed that I can ONLY use "YUYV"  format on PC, "MJPG" will end up
> with an error.

It's weird, but not unusual. There's no technical reason not to provide MJPEG 
on high-speed USB (USB 2.0). There could be a marketing reason though: MJPEG 
being compressed, it will produce lower quality images than YUYV (although 
with the bad sensors found on most webcams that doesn't really matter). The 
vendor might not want customers seeing lower quality images when "higher" 
quality is available.

> Then I test another cam embedded in my laptop (04f2:b13e from Chicony).I
> don't want to mix up the two cam,so just call the "PC Cam" and the "Laptop
> Cam".
> --
> result of Laptop Cam   (just make sense as you say)
> It says:
> Index:0  Format:YUV 4:2:2 (YUYV)
> Index:1  Format:MJPEG
> --
> result of PC Cam on PC
> It says:
> Index:0  Format:YUV 4:2:2 (YUYV)
> --
> result of PC Cam on laptop
> It says:
> Index:0  Format:YUV 4:2:2 (YUYV)
> --
> result of PC Cam on ARM
> It says:
> Index=0 Format:MJPEG
> --
> Do this mean the PC cam don't work well with the UVC driver?It seem I can
> only choose one format, no matter on USB1.1 or USB2.0.

It just means that it only exposes a single format (YUYV) on USB 2.0 for 
whatever reason the vendor came up with during development. The camera 
otherwise works.

-- 
Regards,

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


Re: [Linux-uvc-devel] problems with uvc cameras and gstreamer on gentoo

2010-03-31 Thread Laurent Pinchart
Hi Christopher,

Sorry for the late reply.

On Thursday 18 March 2010 04:32:09 Christopher Harvey wrote:
> Yes, there is some dmesg text
> This is both plugging in the camera and from running
> gst-launch-0.10 v4l2src ! video/x-raw-yuv,width=640,height=480 !
> xvimagesink
> 
> [ 8064.905024] usb 1-4: new high speed USB device using ehci_hcd and
> address 3 [ 8065.166803] usb 1-4: configuration #1 chosen from 1 choice
> [ 8065.538788] uvcvideo: Found UVC 1.00 device  (046d:08ca)
> [ 8065.558724] input: UVC Camera (046d:08ca) as
> /devices/pci:00/:00:02.1/usb1/1-4/1-4:1.0/input/input4
> [ 8065.558790] usbcore: registered new interface driver uvcvideo
> [ 8065.558793] USB Video Class driver (v0.1.0)
> [ 8121.352316] uvcvideo: Failed to query (131) UVC probe control : -32
> (exp. 26).

The camera seems to crashed at this point. Could you please try to load the 
driver with the quirks=2 option ?

> [ 8121.355309] uvcvideo: Failed to set UVC probe control : -32 (exp. 26).
> [ 8122.355194] uvcvideo: Failed to set UVC probe control : -110 (exp. 26).
> [ 8123.355068] uvcvideo: Failed to set UVC probe control : -110 (exp. 26).
> [ 8124.355069] uvcvideo: Failed to set UVC probe control : -110 (exp. 26).

-- 
Regards,

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


Re: [Linux-uvc-devel] ViMicro Webcam 0ac8:3420 bug+fix

2010-04-11 Thread Laurent Pinchart
Hi Sansegu,

On Thursday 08 April 2010 18:12:30 Santiago Segura wrote:
> Hello,
> 
> working with the same camera (ID 0ac8:3420 Z-Star Microelectronics Corp),
> I'm not able to acquire images in mjpeg format.
> 
> Reading this post it seems that its possible, once the patch is applied.
> 
> I'm working with the latest release of the uvc video driver
> (uvcvideo-553dfd853cba).
> 
> Comparing the source code, it seems that the patch is effectively applied,
> but not results.
> 
> Querying the capabilities of the webcam, only YUV its available.

If the webcam reports YUYV only, it probably means it doesn't support MJPEG. 
It's not uncommon for vendors to ship different products under the same 
VID:PID, and your model is probably restricted to YUYV.

> There is any workaroud about this?

-- 
Regards,

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


Re: [Linux-uvc-devel] Lenovo T510 camera works

2010-04-11 Thread Laurent Pinchart
Hi Kurt,

On Thursday 08 April 2010 15:13:43 Kurt Rosenfeld wrote:
> Hello,
> 
> The UVC camera in the Lenovo T510 works if this small modification is
> made to uvc_driver.c:
> http://w140.com/kurt/lenovo_t510_linux_uvc_camera.html

Thanks for the report, but I really can't see why the patch is required. If 
the webcam works with that patch, it should work without it.

Could you retest using the same driver version, without the patch applied ? If 
you still experience problems, please describe them in details on the list 
(don't forget kernel log messages).

Please also report the output of

lsusb -v -d 17ef:480f

-- 
Regards,

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


Re: [Linux-uvc-devel] some questions about uvc

2010-04-11 Thread Laurent Pinchart
Hi,

On Monday 05 April 2010 18:41:21 loody wrote:
> >> Dear all:
> >> I try to fix the uvc driver on my mips platform.
> >> But I got the messages as I append at the end of letter, the messages
> >> are triggered by capture.c the sample c code at the official website.
> >> I have some questions:
> >> 1. why the uvc resend the urb in uvc_video_complete?
> > 
> > Because the USB core doesn't resubmit URBs automatically. If the driver
> > didn't do it there, it would only receive a few URBs (currently
> > hardcoded to 5 in the driver) and then stop.
> 
> I find the place where you mention and it seems we use a recursive
> method to send urbs in UVC, right?

It's not recursive. The uvc_video_complete function is called in response to a 
USB controller interrupt. It will resubmit the URB, and then return without 
waiting for the URB to be completed. The function will then be called again 
when the next URB completes.

> >> 2. from the log, it seems uvc keep catching when the VIDIOC_STREAMON
> >> passed from v4l2 to uvc.
> > 
> > I'm not sure to get what you mean.
> > 
> >> 3. if the answer of 1 is yes; what will uvc does when he get
> >> VIDIOC_QBUF and VIDIOC_DQBUF ?
> >> ( in my opinion, uvc should starting catpureing when he receives
> >> VIDIOC_QBUF and stop when the buffer is full. Then it pass the buffer
> >> above when he got VIDIOC_DQBUF. But from the log below, it start
> >> captureing when he got VIDIOC_STREAMON. Am i right?)
> > 
> > THe driver instructs the device to start sending data when it receives
> > VIDIOC_STREAMON. If there's no buffer queued the data will just be
> > discarded.
> > 
> >> 4. if my assumption above is correct, uvc start capture at
> >> VIDIOC_DQBUF and stop when buffer full. it should stop capture when
> >> frame complete in the log appears.
> > 
> > It could, but just discarding the data is enough.
> > 
> >> VIDIOC_STREAMON
> >> uvcvideo: Failed to resubmit video URB (-38).
> >> uvcvideo: Failed to resubmit video URB (-38).
> > 
> > -38 is -ENOSYS, and that error is returned by very few USB host
> > controller drivers. Which controller are you using on your platform ?
> > Chances are you might need to fix it.
> 
> EHCI controller and I am wondering whether the error comes from my slowly
> cpu. My cpu is running at 400Mhz

Now that's weird. The ENOSYS error isn't documented in the USB error codes, 
and I can't find any reference to it in the EHCI driver. Are you using some 
sort of exotic platform, with a vendor-specific kernel ?

> >> uvcvideo: Frame complete (overflow).
> >> uvcvideo: Dropping payload (out of sync).
> >> uvcvideo: Dropping payload (out of sync).
> >> uvcvideo: Dropping payload (out of sync).
> >> uvcvideo: Dropping payload (out of sync).
> >> uvcvideo: Dropping payload (out of sync).
> 
> BTW, if I look at the correct place in the driver, why uvc doesn't
> support r/w io and userptr?

Because nobody bothered to implement that :-)

read/write support is slow, and I'm not sure it will be implemented. I got a 
patch for userptr support, I need to clean and submit it.

-- 
Regards,

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


Re: [Linux-uvc-devel] How do I set PIXELFORMAT for...

2010-04-11 Thread Laurent Pinchart
Hi Ricardo,

On Wednesday 31 March 2010 14:04:29 Ricardo Martinez Monje wrote:
> Hi,
> 
> I have a webcam with two pixel formats:
> 
> $ v4l2-ctl --list-formats-ext
> 
> ioctl: VIDIOC_ENUM_FMT
> Index   : 0
> Type: Video Capture
> Pixel Format: 'YUYV'
> Name: YUV 4:2:2 (YUYV)
> Size: Discrete 640x480
> Interval: Discrete 0.040 s (25.000 fps)
> Interval: Discrete 0.100 s (10.000 fps)
> Interval: Discrete 0.200 s (5.000 fps)
> Index   : 1
> Type: Video Capture
> Pixel Format: ''
> Name: 20363159--0010-8000-00aa003
> Size: Discrete 640x480
> Interval: Discrete 0.040 s (25.000 fps)
> Interval: Discrete 0.100 s (10.000 fps)
> Interval: Discrete 0.200 s (5.000 fps)
> 
> The first is 8bit YUYV and the second is 14bit Y6 (FOURCC 0x20363159)
> compliant...

The Y16 format is not supported by the uvcvideo driver.

I can fix that, could you please send me the output of 'lsusb -v' for your 
webcam ?

-- 
Regards,

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


Re: [Linux-uvc-devel] Support for Vimicro USB 2.0 PC Camera (0ac8:3420)

2010-04-11 Thread Laurent Pinchart
Hi,

On Saturday 27 February 2010 02:29:23 Manolis Nazlidis wrote:
> Hello everyone,
> 
> I own this webcamera: Vimicro USB 2.0 PC Camera (Venus) (0ac8:3420)
> Kernel I use is: 2.6.31-19-generic #56-Ubuntu SMP
> 
> My webcamera seems to be found ok
> when i try to test it using guvcview i get a black picture and this message
> (repeated)
> 
>Could not grab image (select timeout): Resource temporarily unavailable
> 
> and at my syslog i get (repeated)
> 
>uvcvideo: USB isochronous frame lost (-71).
> 
> when i change image controls values i may get a picture which seems like a
> sequence of random size blocks, arranged horizontally (if attachments of
> such files are allowed here, i can include one)
> 
> Webcamera has this behaviour also with other programs including luvcview,
> mplayer, amsn etc. I could make it work with no program.
> 
> I have tried the drivers provided by my distro for this camera.
> I have also compiled latest drivers as found at
> http://linuxtv.org/hg/~pinchartl/uvcvideo/
> I havent tried vanilla kernel drivers
> I 've experimented a bit with the quirks= module parameter
> 
> nevertheless nothing changed this behaviour.

The -71 error often indicates bad hardware, including buggy firmwares or bad 
cables. Try plugging your webcam into another port, changing the external hub 
(if any) or hub cables. It would also be interesting to test the camera with 
another computer.

-- 
Regards,

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


Re: [Linux-uvc-devel] How do I set PIXELFORMAT for...

2010-04-12 Thread Laurent Pinchart
Hi Ricardo,

On Monday 12 April 2010 11:32:44 Ricardo Martinez Monje wrote:
> Hi Laurent,
> 
> 1st of all, thank you for your interest. Here is the information you
> requested:
> 
> http://pastebin.com/cFpfwZVJ

Thanks for the information.

Looking at the USB descriptors, your webcam isn't UVC compatible. It's then 
not supported by the uvcvideo driver, you're probably using another driver.

I maintain the uvcvideo driver only, you will need to contact your driver 
mailing list or author for support.

-- 
Regards,

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


Re: [Linux-uvc-devel] Lenovo T510 camera works

2010-04-12 Thread Laurent Pinchart
Hi,

On Monday 12 April 2010 05:36:49 Omari Stephens wrote:
> On 04/11/2010 10:36 AM, Laurent Pinchart wrote:
> > On Thursday 08 April 2010 15:13:43 Kurt Rosenfeld wrote:
> >> Hello,
> >> 
> >> The UVC camera in the Lenovo T510 works if this small modification is
> >> made to uvc_driver.c:
> >> http://w140.com/kurt/lenovo_t510_linux_uvc_camera.html
> > 
> > Thanks for the report, but I really can't see why the patch is required.
> > If the webcam works with that patch, it should work without it.
> 
> Sorry for not getting back to you before.  Without a patch like this,
> the driver doesn't pick up the webcam — you modprobe the driver and it
> doesn't recognize anything it should try to support, so it doesn't do
> anything.

Does the unpatched driver print anything to the kernel log (you can read the 
kernel log by issuing the dmesg command) when you load it ?

> > Could you retest using the same driver version, without the patch applied
> > ? If you still experience problems, please describe them in details on
> > the list (don't forget kernel log messages).
> > 
> > Please also report the output of
> > 
> > lsusb -v -d 17ef:480f

Thanks.

-- 
Regards,

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


Re: [Linux-uvc-devel] How do I set PIXELFORMAT for...

2010-04-12 Thread Laurent Pinchart
Hi Ricardo,

On Monday 12 April 2010 11:48:00 Ricardo Martinez Monje wrote:
> Laurent,
> 
> I'm sure that the camera is UVC compliant,
> 
> $dmesg | tail
> 
> [ 8583.393067] usb 1-1: new high speed USB device using ehci_hcd and
> address 4
> [ 8583.537905] usb 1-1: configuration #1 chosen from 1 choice
> [ 8583.585815] uvcvideo: Unknown video format
> 20363159--0010-8000-00aa00389b71
> [ 8583.592560] uvcvideo: Found UVC 1.00 device Miricle 307K (17dc:0202)
> [ 8583.592566] uvcvideo: Forcing device quirks to 0x10 by module parameter
> for testing purpose.
> [ 8583.592569] uvcvideo: Please report required quirks to the
> linux-uvc-devel mailing list

The lsusb output you posted on pastebin.com is for device 17dc:0200, not 
17dc:0202.

-- 
Regards,

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


Re: [Linux-uvc-devel] How do I set PIXELFORMAT for...

2010-04-12 Thread Laurent Pinchart
Hi Ricardo,

On Monday 12 April 2010 12:39:44 Ricardo Martinez Monje wrote:
> Laurent,
> 
> Here is the output for the device 17dc:0202
> 
> http://pastebin.com/JU1qLmBS

Thanks. Could you please try the following patch ?

diff --git a/drivers/media/video/uvc/uvc_driver.c 
b/drivers/media/video/uvc/uvc_driver.c
index 43892bf..c8dd892 100644
--- a/drivers/media/video/uvc/uvc_driver.c
+++ b/drivers/media/video/uvc/uvc_driver.c
@@ -90,10 +90,15 @@ static struct uvc_format_desc uvc_fmts[] = {
.fcc= V4L2_PIX_FMT_UYVY,
},
{
-   .name   = "Greyscale",
+   .name   = "Greyscale (8-bit)",
.guid   = UVC_GUID_FORMAT_Y800,
.fcc= V4L2_PIX_FMT_GREY,
},
+   {
+   .name   = "Greyscale (16-bit)",
+   .guid   = UVC_GUID_FORMAT_Y16,
+   .fcc= V4L2_PIX_FMT_Y16,
+   },
{
.name   = "RGB Bayer",
.guid   = UVC_GUID_FORMAT_BY8,
diff --git a/drivers/media/video/uvc/uvcvideo.h 
b/drivers/media/video/uvc/uvcvideo.h
index 2bba059..d1f8840 100644
--- a/drivers/media/video/uvc/uvcvideo.h
+++ b/drivers/media/video/uvc/uvcvideo.h
@@ -131,11 +131,13 @@ struct uvc_xu_control {
 #define UVC_GUID_FORMAT_Y800 \
{ 'Y',  '8',  '0',  '0', 0x00, 0x00, 0x10, 0x00, \
 0x80, 0x00, 0x00, 0xaa, 0x00, 0x38, 0x9b, 0x71}
+#define UVC_GUID_FORMAT_Y16 \
+   { 'Y',  '1',  '6',  ' ', 0x00, 0x00, 0x10, 0x00, \
+0x80, 0x00, 0x00, 0xaa, 0x00, 0x38, 0x9b, 0x71}
 #define UVC_GUID_FORMAT_BY8 \
{ 'B',  'Y',  '8',  ' ', 0x00, 0x00, 0x10, 0x00, \
 0x80, 0x00, 0x00, 0xaa, 0x00, 0x38, 0x9b, 0x71}
 
-
 /* 
  * Driver specific constants.
  */

-- 
Regards,

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


Re: [Linux-uvc-devel] How do I set PIXELFORMAT for...

2010-04-12 Thread Laurent Pinchart
Hi Ricardo,

On Monday 12 April 2010 15:16:21 Ricardo Martinez Monje wrote:
> Laurent,
> 
> Thank you very much!!! That Works like a charm...
> 
> $ v4l2-ctl --list-formats
> ioctl: VIDIOC_ENUM_FMT
>   Index   : 0
>   Type: Video Capture
>   Pixel Format: 'YUYV'
>   Name: YUV 4:2:2 (YUYV)
> 
>   Index   : 1
>   Type: Video Capture
>   Pixel Format: 'Y16 '
>   Name: Greyscale (16-bit)

Great. I'll commit the patch. Could you please give me the brand and name of 
the device ?

-- 
Regards,

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


Re: [Linux-uvc-devel] Question about crash issue

2010-04-25 Thread Laurent Pinchart
Hi Mustafa,

Sorry for the late reply.

On Friday 16 April 2010 09:06:48 Mustafa CAMURLI wrote:
> Hi everyone,
> 
> I am Mustafa from Turkey. I have a school project named "eye-tracker and
> viewer" in this semester. I have two cameras. One for retrieving eye frames
> to find where pupil is, second for viewer frame where the user looking at.
> So, we are using opencv in order to grap frames and for vision
> functionalities. In Windows, surprisingly, we can grab frames both cameras,
> but unfortunately, in Linux we can't. We can open just one camera at the
> same time. When we try to grab a frame from second one, "VIDIOC_STREAMON no
> left memory on the device 28" error occurs. Please help us for this problem.
> If you need any additional info, just reply this mail.

Error 28 is ENOSPC. This means the operation you tried to perform would use 
more USB bandwidth than available. This is usually the case when you capture 
uncompressed high-resolution video from two webcams simultaneously.

You could try to select a smaller frame size, or use a compressed format if 
your cameras support that (many UVC camera support MJPEG).

-- 
Regards,

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


Re: [Linux-uvc-devel] [Linux-uvc] [UVC] Searching my webcam

2010-04-25 Thread Laurent Pinchart
Hi Palmax,

On Saturday 24 April 2010 01:04:43 Palmax Maverick wrote:
> Hello Laurent and others linux-uvc developers,
> 
> I want to know what is the "struct usb_device *udev" of my webcam.
> Have I to search in /sys/devices/pci:XX/:XX:XX:XX/usbX/
> directory?
> I think that you should know a function that helps me in this work :-).
> 
> I need it because I want to get some control information of my webcam:
> maximum packet sizes, resolutions of still image formats, ...
> I think that I should use uvc_probe_video for getting this
> information, after I uvc_init_video my webcam.

The usb_device structure represents the USB device in kernel space. The 
uvcvideo driver receives a pointer to a USB interface in its probe function, 
and gets the USB device pointer for that interface. The USB device is then 
used for various purposes, such as printing messages to the kernel log.

You can get to the USB interface in sysfs through the 
/sys/class/video4linux/videoX/device symlink. The parent of that device is the 
USB device.

-- 
Regards,

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


Re: [Linux-uvc-devel] support for high speed uvc cam in USB 1.1

2010-04-25 Thread Laurent Pinchart
Hi Nitesh,

On Monday 12 April 2010 14:46:38 nitesh suthar wrote:
> dear all,

As your greetings message mentions "all", I suppose you meant to CC the linux-
uvc-devel list. I've done so in this reply.

> I have a High speed UVC cam , which is working properly in USB 2.0 but
> camera is not working in USB 1.1
> Is there any solution or process by which we can achieve that same camera
> which is working in usb 2.0, will work properly in usb 1.1 too.
> 
> I want to make camera workable with usb 1.1 . So please guide me how to
> proceed with it .

USB 1.1 has a much lower bandwidth than USB 2.0 (or, to be accurate, USB 2.0 
supports high-speed USB mode which offers a much higher bandwidth than what 
full-speed in USB 1.1 can offer). You can't thus expect a USB 2.0 camera that 
uses high-speed mode to transfer high-resolution uncompressed data to offer 
the same performances when connected to a USB 1.1 host.

Most UVC cameras will work when connected to a USB 1.1 host, in a smaller 
resolution or in a compressed format (MJPEG). Some are buggy and don't work at 
all with USB 1.1, and there's not much we can do about it.

How does your camera fail to work exactly ?

-- 
Regards,

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


Re: [Linux-uvc-devel] problems with uvc cameras and gstreamer on gentoo

2010-04-25 Thread Laurent Pinchart
Hi Christopher,

On Thursday 01 April 2010 03:00:31 Christopher Harvey wrote:
> No worries with reply time.
> 
> I used modprobe uvcvideo quriks=2
> 
> the output is the same, with the addition of :
> [19551.461076] uvcvideo: Found UVC 1.00 device  (046d:08ca)
> [19551.461080] uvcvideo: Forcing device quirks 0x2 by module parameter for
> testing purpose.
> [19551.461082] uvcvideo: Please report required quirks to the
> linux-uvc-devel mailing list.

That's weird. The

uvcvideo: Failed to query (131) UVC probe control : -32 (exp. 26).

message you got shouldn't be printed anymore, as quirk 2 prevents the driver 
from issuing the GET_MAX request (131). Could you please double-check ? What 
kernel version are you using (assuming the uvcvideo driver comes from the 
kernel ebuild) ?

> I've never messed with kernel modules before, but if you want I can
> compile/patch code from source to figure this out.

-- 
Regards,

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


Re: [Linux-uvc-devel] (no subject)

2010-04-27 Thread Laurent Pinchart
On Tuesday 27 April 2010 15:13:10 Paulo Assis wrote:
> Phil,
> mercurial is just the version control system used by linuxtv, if you
> want you can also download a tarball with the code from here:
> http://linuxtv.org/hg/~pinchartl/uvcvideo/archive/tip.tar.gz

The UVC driver now uses git for development. You then have two options:

- checkout the latest driver sources from the git tree at 
http://git.linuxtv.org/pinchartl/uvcvideo.git

- get the latest v4l-dvb hg snapshot at http://linuxtv.org/hg/v4l-dvb/

The former will require recompiling the whole kernel, while the later will let 
you update the v4l-dvb subsystem completely (highly recommended for end 
users).

> Note however that uvc is integrated in the kernel since 2.6.27, so if
> you are using a recent kernel version you really don't need to build
> it from source.

-- 
Regards,

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


Re: [Linux-uvc-devel] Philips SPC530NC (0471:2034) fails

2010-05-07 Thread Laurent Pinchart
Hi Paulo,

On Wednesday 05 May 2010 10:59:26 Paulo Assis wrote:
> Hi,
> Are you sure the camera supports MJPG ?

That's indeed the problem.

> It seems to report only a uncompressed format (YUYV ?).
> You can check the supported formats with luvcview, guvcview or
> uvcdynctrl (libwebcam)

It can also be checked from the USB descriptors:

[snip]

> >   Interface Descriptor:
> > bLength 9
> > bDescriptorType 4
> > bInterfaceNumber1
> > bAlternateSetting   0
> > bNumEndpoints   0
> > bInterfaceClass14 Video
> > bInterfaceSubClass  2 Video Streaming
> > bInterfaceProtocol  0
> > iInterface  0

in the Video Streaming interface,

> > VideoStreaming Interface Descriptor:
> >   bLength27
> >   bDescriptorType36
> >   bDescriptorSubtype  4 (FORMAT_UNCOMPRESSED)
> >   bFormatIndex1
> >   bNumFrameDescriptors2
> >   guidFormat
> >  {59555932--1000-8000-00aa00389b71}
> >   bBitsPerPixel  16
> >   bDefaultFrameIndex  1
> >   bAspectRatioX   0
> >   bAspectRatioY   0
> >   bmInterlaceFlags 0x00
> > Interlaced stream or variable: No
> > Fields per frame: 1 fields
> > Field 1 first: No
> > Field pattern: Field 1 only
> > bCopyProtect  0

descriptors of type 36 (class-specific) report, among other information, the 
formats supported by the device. In this case there's a single format 
descriptor, of subtype 4 (FORMAT_UNCOMPRESSED). Devices supporting MJPEG have 
a subtype 6 descriptor (in addition to the FORMAT_UNCOMPRESSED descriptor if 
they support uncompressed formats).

There's no need to verify this with luvcview.

Alternatively, setting the trace level to 3 when loading the uvcvideo driver 
will print the formats supported by the device.

-- 
Regards,

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


Re: [Linux-uvc-devel] Framerate of Quickcam Pro 9000

2010-05-07 Thread Laurent Pinchart
Hi Paulo,

On Tuesday 04 May 2010 10:36:19 Paulo Assis wrote:
> > What happens to the camera settings when the computer is rebooted? Are
> > they stored in some non-volatile memory in the camera? That would be
> > awesome.
> 
> If I'm not mistaken USB keeps the power on, even during a reboot, so
> the camera should maintain the control settings.

I'm not sure that's guaranteed by the USB standard. I believe the camera 
should be reset when the computer is restarted. Whether it will loose its 
settings might depend on the camera firmware.

In any case, there's no non-volatile memory to store the controls in any of 
the consumer webcams I know of.

> You would have to unplug the camera to loose the settings.
> This is not always a good think, sometimes the camera may crash,
> meaning that you must physically unplug it to make it work again.

-- 
Regards,

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


Re: [Linux-uvc-devel] Multiple camera framerate.

2010-05-07 Thread Laurent Pinchart
Hi Dennis,

On Tuesday 27 April 2010 18:19:01 Dennis Muhlestein wrote:
> On 04/27/2010 05:48 AM, Paulo Assis wrote:
> > 2010/4/27 Ian Latter:
> >>> You can grab frames at whatever speed you want, but it's the camera
> >>> framerate that will make a difference in the usb bandwidth and not the
> >>> amount of frames you get with your application.
> >> 
> >> So, if you don't take a frame from the UVC driver, it will simply
> >> continue to refresh an internal buffer with new frames from the camera
> >> device?
> > 
> > Think of it like this, the necessary bandwidth is requested by the device
> > and it will depend on the compression, resolution and framerate, in fact I
> > think some ("buggy") devices will always request the maximum bandwidth
> > causing problems on initialization, for these devices I think uvcvideo
> > uses it's own algorithm to calc the necessary bandwidth.

That's right. The uvcvideo driver tries to compute an estimate of the required 
bandwidth. That only works for uncompressed formats.

> Do the number of URBs have any effect at all?  I made an initial attempt
> to check this a while back by recompiling the driver with UVC_URBS as 1
> or 2 instead of 5.

Not on the bandwidth, no. The number of URBs will influence the memory used by 
the driver, and the real-time requirements. The less URBs, the fastest the 
driver needs to process the complete URBs and resubmit them to avoid running 
out of them.

> Changed the MAX_ISO_PACKETS a lot smaller too.

The number of packets influences the URB size for isochronous transfers. URBs 
complete when the maximum of packets have been transmitted. The larger the 
number, the less frequent the driver gets interrupted to process URBs (but it 
will also have to process more packets in one go, making the processing a bit 
longer).

> I wanted to see if perhaps submitting less URBs would somehow lessen the
> bandwidth requirements.  It didn't fix the problem though.

The driver explicitly selects the bandwidth by switching to an alternate 
setting. The USB core allocates the bandwidth when the URB are submitted, so 
the alternate setting selection call might succeed and the URB submission fail 
later. Please note that, with USB 3.0, the xHCI driver will perform the 
allocation when selecting the alternate setting.

The driver choose the alternate setting with the lowest bandwidth compatible 
with the bandwidth requirements reported by the camera. The number of URBs or 
packets will have no influence there.

> I suspect that somewhere in an underlying layer, whether kernel or physical,
> something is checking that bandwidth requirement for the configured
> endpoints and then denying new URBs being submitted.  I'm not opposed to
> modifying something at a lower level but I haven't found the spot at this
> point. I guess if the error comes from the physical hub there isn't much to
> be done then.

The USB core checks the bandwidth. There's an allocation process defined by 
the USB standard, and there's pretty much no way around that. You could modify 
the EHCI host controller driver to allow more than 80% of the total bandwidth 
to be allocated to periodic transfers. Another solution, as you pointed out 
below, is not to submit the URBs. That's very similar to performing the 
STREAMON/QBUF/DQBUF/STREAMOFF sequences in userspace on all devices one after 
the other, except that you might be able to get slightly better performances 
by avoiding context switches.

> > Also the device will always try to dispatch frames at the requested
> > framerate, if you don't grab them they will simply be dropped by the
> > driver.
> 
> I wonder if there is some way to restrict URB submitting to around 10
> fps? Perhaps a semaphore on the number of cameras that can be submitting
> URBs at all.  If I go ahead and configure all the cameras to run at 15 fps
> but only submit URBs for say 3 of the cameras at a time it seems it would
> work. I'm not worried about dropping 1/3 of the frames.

That might work, but it would be quite hackish. You wouldn't be able to 
synchronize to the frame start, so you will loose half a frame on average 
every time you "start" a camera.

You would basically need to keep a list of cameras and handle them in a round-
robin way. When one of the cameras completes a frame, you will have to stop 
submitting URBs for it, wait until all URBs have completed, and submit the 
URBs for the next camera in the list.

> I don't think I can write them all out to storage fast enough anyway.
> (I can come close to keeping up with 10 fps on 8 cameras though.)

-- 
Regards,

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


Re: [Linux-uvc-devel] Multiple camera framerate.

2010-05-07 Thread Laurent Pinchart
Hi Denis,

On Tuesday 04 May 2010 17:37:13 Dennis Muhlestein wrote:
> On 04/29/2010 12:40 PM, Dennis Muhlestein wrote:
> > One idea I've been toying with is to add a semaphore around submitting
> > the URBs.
> > 
> > In uvc_video.c, where the URBs are submitted, I'd acquire a semephore
> > for each device currently submitting URBs. The semaphore would limit the
> > number of devices to whatever number I decide can safely submit URBs
> > simultaneously on the bus without throwing out of space errors.
> > 
> > I did an initial test of this and it looks promising. I can configure
> > all the cameras. As long as I don't submit the URBs for the number of
> > devices beyond that which will work at the same time, the other cameras
> > simply drop the data.
> > 
> > I'm not sure the best places to control the locking and unlocking of the
> > semaphore are. Right now, I lock it before submitting URBs in
> > uvc_init_video. In uvc_video_complete, I unlock it and relock it if the
> > buffer is complete (allowing another camera to acquire it and capture a
> > frame).
> > 
> > Anyway, it isn't working perfectly yet but I think I can debug it and at
> > least get to a point where I know if it's worth pursuing. I'm curious if
> > anyone can provide thoughts or alternatives.
> 
> I have two solutions that I've come up with this so far.
> 1) Modify the uvc_video.c to queue urbs in a list in the urb completion
> handler.  A driver level semaphore controls the number of currently
> submitting cameras.  You can adjust the initial sem_count in
> uvc_driver.c.  Ideally, that would be a module parameter but I'm just
> getting things to work.
> 
> I found capture speeds quite a bit slower than I'd like with this method
> though.  I can capture with 8 cameras at 10 FPS without overwhelming the
> ISO bus but if I change to 15 FPS I can only capture with 3 cameras at a
> time.  Adding the patch, I then can configure and capture from all 8
> cameras running at 15 FPS but only submitting URBs for 3 at a time.
> Depending on how many frames I let those cameras capture I got captured
> frame rates from around 4 to 6.
> 
> I'm attaching the patch in case anyone wants to play with this or
> suggest ways to improve it.

Interesting approach, but definitely a hack. I'm not sure if it has a chance 
to make it to the driver.

> One thing I had a problem with is that it seems some of the capture images
> are corrupted. This patch was against 2.6.27.2. A little old I know but I'm
> working on an embedded device.
> 
> 2) I modified ehci-sched.c to not raise the ENOSPC error.  That solution
> actually lets me capture on all 8 cameras at 15 FPS.  This has other
> implications though and I'm not sure it is a very good solution.  It
> does tell me that perhaps the Linux ISO scheduler could perhaps use look
> through.  One major discrepancy is that bandwidth is allocated based on
> the max packet size I think but for my compressed images (MJPG) each
> frame is only a fraction of the max allocated bandwidth.

That might be the real culprit. Maybe the camera is simply requesting too much 
bandwidth compared to its real requirements.

Can you check whether the video streaming interface has multiple alternate 
settings ? If so, which one does the uvcvideo driver chose ? You can get the 
information from the kernel log if you set the UVC_TRACE_VIDEO flag.

If the camera request an alternate setting that isn't the smallest, you might 
try to experiment with hardcoding a lower bandwidth in uvc_video_init.

-- 
Regards,

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


Re: [Linux-uvc-devel] Quickcam Pro 9000 LED control

2010-05-07 Thread Laurent Pinchart
Hi Alan,

On Thursday 29 April 2010 19:23:19 Alan wrote:
> Thanks a lot, I ran udevadm and now the led control is working :)

Great. Glad to hear it now works.

> By the way, I just had a thought that it would be cool to export the
> led control of the webcam using leds-class:
> 
> http://www.mjmwired.net/kernel/Documentation/leds-class.txt

I've thought about it, but that would be difficult. The uvcvideo driver has no 
idead that the control actually controls a LED. Having access to that 
information isn't straightforward, as it's not reported by the device.

-- 
Regards,

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


Re: [Linux-uvc-devel] unsupported integrated webcam

2010-05-19 Thread Laurent Pinchart
Hi Enrique,

On Tuesday 11 May 2010 19:56:06 Enrique A Segni wrote:
> Hello,
> 
> I'm very new at this but from what I see in your site the integrated
> webcam on my HP Touchsmart 300-1025 is not supported.

Not being listed on the website doesn't mean being unsupported. In theory the 
uvcvideo driver should support UVC-compatible cameras out of the box. In 
practice bugs in camera firmwares sometimes prevents that.

> I'm enclosing lsusb, lsusb -v and dmesg for your info.

The attached lsusb -v output doesn't include the beginning of the webcam USB 
descriptors. Could you please resend the output of the following command ?

lsusb -d 04f2:b14c -v

> If there is any other info you need please let me know...

Have you tried using the webcam ? Does it work ? If it doesn't, can you 
describe the problem(s) ?

> My sound, touchscreen and tvtuner are not either, any suggestions or
> info would be welcome.

That's out of my area of expertize, sorry :-)

-- 
Regards,

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


Re: [Linux-uvc-devel] [UVC] VS Interface

2010-05-19 Thread Laurent Pinchart
Hi,

On Sunday 09 May 2010 20:55:56 Palmax Maverick wrote:
> Dear developers of linux-uvc,
> 
> I want to list all VS Interfaces of my devices (
> /sys/class/video4linux/video0, /sys/class/video4linux/video1, ...,
> /sys/class/video4linux/videoN ).
> I think that I should use VS_PROBE_CONTROL, but do you know a good
> example for doing it?

The VS_PROBE_CONTROL is used to negotiate the video streaming parameters, not 
to list the VS interfaces.

> I need it for getting each Input Header of each VS Interface.

Do you need to do it manually or in a software ? In the first case why don't 
you just use lsusb ?

-- 
Regards,

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


Re: [Linux-uvc-devel] Stream from multimple cameras

2010-05-19 Thread Laurent Pinchart
Hi Adrian,

On Monday 17 May 2010 09:24:04 Adrian Sergiu DARABANT wrote:
> Hello all,
> 
> In my case I tested with the cameras plugged into 2 differens hubs (I have
> 2 pairs on two sides of my netbook) and the result is the same. I have to
> open the laptop however to see if the hubs are really different as the
> port pairs are on adjacent sides of the notebook and not on opposite sides
> (far enough to ensure the hubs are really different). On windows I see
> listed one USB2(Enhanced) controller and 4 USB Universal controllers- so I
> guess is just one USB2
> 
> Using 2 hubs is not a solution for me as it doesn't work right now although
> I have 4 external USB ports on one of the machines and 6 on another (plus
> some internal ports on both of them)
> 
> As I am a developer, so in practice I could modify things inside the driver
> or somewhere in order to try to make things work.
> 
> My question is - who does/requests the USB bandwidth allocation ? The uvc
> driver or the camera itself ?  Is this happening directly in hardware or is
> mediated by the uvc/ehci driver?

The uvcvideo driver requests bandwidth based on values reported by the camera.

There are two settings involved there. The first one is the alternate settings 
for the video streaming interface. The video streaming interface has an 
isochronous endpoint for video streaming, and each alternate setting has a 
different maximum packet size for the endpoint, resulting in different 
bandwidth requirements.

The second one is the dwMaxPayloadTransferSize value reported by the camera 
when querying its video streaming control. The driver selects the alternate 
setting with the lowest bandwidth that fulfills the dwMaxPayloadTransferSize 
requirements.

If your camera has a single alternate setting (this can be checked using 
lsusb) you're probably screwed, as the bandwidth is fixed. If it has multiple 
alternate settings, it might be requesting a bandwidth higher than what it 
really needs. In that case you could try to hardcode a lower bandwidth (see 
the uvc_init_video function in uvc_video.c), or let the driver compute a 
bandwidth estimation on its own by setting the UVC_QUIRK_FIX_BANDWIDTH quirk.

It's also possible to play with URB submission order to use higher bandwidths 
and alternate capture between the different webcams. Dennis Muhlestein 
investigated that and got interesting results. Search the list archives for a 
thread called "Multiple camera framerate".

> In the second case can we force the driver on the allocation problem if it
> is in the driver ?
> I don't know yet the answer to this - and having a few
> pointers/explanations from the UVC implementors might help here !
> 
> I saw the other forums and their approach - and somebody proposed there

-- 
Regards,

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


  1   2   3   4   5   6   7   8   9   10   >