Re: [Linux-uvc-devel] Minoru stereo webcam

2009-02-03 Thread Jan Ciger
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Simone Freddio wrote:
> Hi Laurent,
> 
>here the results of my tests:
> 
>MaxPayloadTransferSizeValue Returned from device   
> Result
>0128   
>  uvcvideo: USB isochronous frame lost (-71).
>1128   
>  uvcvideo: USB isochronous frame lost (-71).
>42  128   
>  uvcvideo: USB isochronous frame lost (-71).
>1024  1024
>   works right with few USB iso frame lost
>0x   3072   
>   no error but also no capture :-(
> 
>My conclusion is that MaxPayloadTransferSize, regardless of
> specification, is not readonly... seems to be that device round this
> value to the closest that is supported (see also my lsusb in file
> lsusb.txt).

I have tried this too and regardless what I put as the
PayloadTransferSize, the Minoru camera will always ask for 3072 back.

Jan


-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.9 (GNU/Linux)
Comment: Using GnuPG with Mandriva - http://enigmail.mozdev.org

iD8DBQFJiNCUn11XseNj94gRAg/gAJ0dORAwgwUJ0EYqA9O0vG0XgBtGDgCdHXCx
0igBKNMX3tSawbs0+L4hz/M=
=ok3d
-END PGP SIGNATURE-
___
Linux-uvc-devel mailing list
Linux-uvc-devel@lists.berlios.de
https://lists.berlios.de/mailman/listinfo/linux-uvc-devel


[Linux-uvc-devel]

2009-02-03 Thread Jens Gottstein
Hi all,

I am using Ubuntu 8.10 and a Crative VF0540 Webcam. Which identifies 
isself as:

$ dmesg
[26238.642082] uvcvideo: Found UVC 1.00 device Vimicro USB 2.0 PC Camera 
(Venus) (0ac8:3420)
[26238.642675] uvcvideo: No valid video chain found.

The problem is:  uvcvideo: No valid video chain found.

The funny thing is, It worked before (about a month ago.) But back than 
I did not investigate anything - it just worked. Now it does not work 
anymore. I constantly updated my Ubuntu. Booting an old kernel did not 
do it. On a other Ubuntu 8.10 which is almost the same it doesn't work 
either.

Funny is also that 0ac8:3420 is listed as working on 
http://linux-uvc.berlios.de/.


I downloaded the latest uvcvideo-f5c337ded781.tar.gz from 02. Feb 2009, 
compiled is and run it (see listings below). No help.

I got no Idea any more, I would appreciate any help.

I look forward to your answers.


ruena




$modinfo uvcvideo
filename: 
/lib/modules/2.6.27-11-generic/kernel/drivers/media/video/uvc/uvcvideo.ko
version:v0.1.0
license:GPL
description:USB Video Class driver
author: Laurent Pinchart 
srcversion: 413A0ECBDFDB0F4525A35E3
alias:  usb:v*p*d*dc*dsc*dp*ic0Eisc01ip00*
alias:  usb:v1C4Fp3000d*dc*dsc*dp*ic0Eisc01ip00*
alias:  usb:v19ABp1000d00*dc*dsc*dp*ic0Eisc01ip00*
alias:  usb:v19ABp1000d01[0-1]*dc*dsc*dp*ic0Eisc01ip00*
alias:  usb:v19ABp1000d012[0-6]dc*dsc*dp*ic0Eisc01ip00*
alias:  usb:v18CDpCAFEd*dc*dsc*dp*ic0Eisc01ip00*
alias:  usb:v17EFp480Bd*dc*dsc*dp*ic0Eisc01ip00*
alias:  usb:v174Fp8A33d*dc*dsc*dp*ic0Eisc01ip00*
alias:  usb:v174Fp8A31d*dc*dsc*dp*ic0Eisc01ip00*
alias:  usb:v174Fp5931d*dc*dsc*dp*ic0Eisc01ip00*
alias:  usb:v174Fp5212d*dc*dsc*dp*ic0Eisc01ip00*
alias:  usb:v0E8Dp0004d*dc*dsc*dp*ic0Eisc01ip00*
alias:  usb:v05E3p0505d*dc*dsc*dp*ic0Eisc01ip00*
alias:  usb:v05ACp8501d*dc*dsc*dp*ic0Eisc01ip00*
alias:  usb:v058Fp3820d*dc*dsc*dp*ic0Eisc01ip00*
alias:  usb:v046Dp08C7d*dc*dsc*dp*icFFisc01ip00*
alias:  usb:v046Dp08C6d*dc*dsc*dp*icFFisc01ip00*
alias:  usb:v046Dp08C5d*dc*dsc*dp*icFFisc01ip00*
alias:  usb:v046Dp08C3d*dc*dsc*dp*icFFisc01ip00*
alias:  usb:v046Dp08C2d*dc*dsc*dp*icFFisc01ip00*
alias:  usb:v046Dp08C1d*dc*dsc*dp*icFFisc01ip00*
alias:  usb:v045Ep0723d*dc*dsc*dp*ic0Eisc01ip00*
alias:  usb:v045Ep00F8d*dc*dsc*dp*ic0Eisc01ip00*
depends:usbcore,videodev,v4l1-compat
vermagic:   2.6.27-11-generic SMP mod_unload modversions 586
parm:   nodrop:Don't drop incomplete frames (uint)
parm:   quirks:Forced device quirks (uint)
parm:   trace:Trace level bitmask (uint)



$ ls -l 
/lib/modules/2.6.27-11-generic/kernel/drivers/media/video/uvc/uvcvideo.ko
-rw-r--r-- 1 root root 83156 2009-02-02 23:07 
/lib/modules/2.6.27-11-generic/kernel/drivers/media/video/uvc/uvcvideo.ko


$ uname -a
Linux core 2.6.27-11-generic #1 SMP Thu Jan 29 19:24:39 UTC 2009 i686 
GNU/Linux


$ sudo lsusb -vv -d 0ac8:3420
Bus 004 Device 016: ID 0ac8:3420 Z-Star Microelectronics Corp.
Device Descriptor:
  bLength18
  bDescriptorType 1
  bcdUSB   2.00
  bDeviceClass  239 Miscellaneous Device
  bDeviceSubClass 2 ?
  bDeviceProtocol 1 Interface Association
  bMaxPacketSize064
  idVendor   0x0ac8 Z-Star Microelectronics Corp.
  idProduct  0x3420
  bcdDevice   83.14
  iManufacturer   1 Vimicro
  iProduct2 Vimicro USB 2.0 PC Camera (Venus)
  iSerial 0
  bNumConfigurations  1
  Configuration Descriptor:
bLength 9
bDescriptorType 2
wTotalLength  252
bNumInterfaces  2
bConfigurationValue 1
iConfiguration  0
bmAttributes 0x80
  (Bus Powered)
MaxPower  256mA
Interface Association:
  bLength 8
  bDescriptorType11
  bFirstInterface 0
  bInterfaceCount 2
  bFunctionClass 14 Video
  bFunctionSubClass   3 Video Interface Collection
  bFunctionProtocol   0
  iFunction   2 Vimicro USB 2.0 PC Camera (Venus)
Interface Descriptor:
  bLength 9
  bDescriptorType 4
  bInterfaceNumber0
  bAlternateSetting   0
  bNumEndpoints   1
  bInterfaceClass14 Video
  bInterfaceSubClass  1 Video Control
  bInterfaceProtocol  0
  iInterface  2 Vimicro USB 2.0 PC Camera (Venus)
  VideoControl Interface Descriptor:
bLength13
bDescriptorType36
bDescriptorSubtype  1 (HEADER)
bcdUVC   1.00
wTotalLength   79
dwClockFrequency   30.00MHz
bInCollection   1

Re: [Linux-uvc-devel] Minoru stereo webcam

2009-02-03 Thread Simone Freddio

Hi Laurent,

   here the results of my tests:

   MaxPayloadTransferSizeValue Returned from device
Result
   0128
 uvcvideo: USB isochronous frame lost (-71).
   1128
 uvcvideo: USB isochronous frame lost (-71).
   42  128
 uvcvideo: USB isochronous frame lost (-71).
   1024  1024 
  works right with few USB iso frame lost
   0x   3072
  no error but also no capture :-(


   My conclusion is that MaxPayloadTransferSize, regardless of 
specification, is not readonly... seems to be that device round this 
value to the closest that is supported (see also my lsusb in file 
lsusb.txt).


   I think that the right bandwidth allocation must be calculated in 
the driver and set up in the device (the same you have done for 
frameinterval value :-).


BR Simone.

Laurent Pinchart wrote:

Hi Simone,

On Tuesday 03 February 2009, Simone Freddio wrote:
  

Hi Jan, hi Laurent...

i have the same problem with different webcam... i think to have
found the problem, Laurent tell me if i am wrong, i'll go to explain:

The problem is in the bandwidth, the uvcdriver ALWAYS ask to usb
layer a dw_MaxPayloadTransferSize that is fetched only when the device
is opening;

In my case is always set to 3072 (3x1024). I have tried changing
uvc_video.c in a very dirty manner (excuse me Laurent)



Don't worry :-)

  
in this way: 


In function 'uvc_set_video_ctrl' where there is:
 put_unaligned_le32(ctrl->dwMaxVideoFrameSize, &data[18]);
 put_unaligned_le32(ctrl->dwMaxPayloadTransferSize, &data[22]);

i have commented out the second line and changed it in:
put_unaligned_le32(1024, &data[22]);

In this way i have always force uvc driver to ask for a payload size
of 1024.



According to the UVC 1.1 specification, the dwMaxPayloadTransferSize is set by 
the device and read only from the host. The value set by the host shouldn't 
matter.


  

After recompiling, reinstalling, unload e load the module, i can get
two webcam working fine and simultaneously.

Now i didn't have a big experience and i can't change source myself
in the right way... but i think that my observation can be usefull.



It is, thanks.

  

I think that the best way to re-negotiate the bandwidth is to set
video streaming parameters (framesize and frameinterval) and after ask
the device wich bandwidth it requests.



That's exactly what the driver does. In uvc_probe_video, each SET_CUR request 
is followed by a GET_CUR to retrieve the bandwidth requested by the camera.


  

In a short way, at the end of uvc_set_video_ctrl function a call to
uvc_get_video_ctrl will solve the problem... what do you think Laurent?)



This is already handled by uvc_probe_video. From your report it seems that the 
device doesn't touch the dwMaxPayloadTransferSize at all and just returns the 
value sets by the host.


Could you (or Jan) try to set dwMaxPayloadTransferSize to a weird value (let's 
say 42) and see what the device returns in the next GET_CUR call ?


Best regards,

Laurent Pinchart

  


Bus 001 Device 005: ID 0ac8:332d Z-Star Microelectronics Corp. 
Device Descriptor:
  bLength18
  bDescriptorType 1
  bcdUSB   2.00
  bDeviceClass  239 Miscellaneous Device
  bDeviceSubClass 2 ?
  bDeviceProtocol 1 Interface Association
  bMaxPacketSize064
  idVendor   0x0ac8 Z-Star Microelectronics Corp.
  idProduct  0x332d 
  bcdDevice1.00
  iManufacturer   1 Vimicro Corp.
  iProduct2 Vega USB 2.0 Camera.
  iSerial 0 
  bNumConfigurations  1
  Configuration Descriptor:
bLength 9
bDescriptorType 2
wTotalLength  581
bNumInterfaces  2
bConfigurationValue 1
iConfiguration  0 
bmAttributes 0x80
  (Bus Powered)
MaxPower  500mA
Interface Association:
  bLength 8
  bDescriptorType11
  bFirstInterface 0
  bInterfaceCount 2
  bFunctionClass 14 Video
  bFunctionSubClass   3 Video Interface Collection
  bFunctionProtocol   0 
  iFunction   2 Vega USB 2.0 Camera.
Interface Descriptor:
  bLength 9
  bDescriptorType 4
  bInterfaceNumber0
  bAlternateSetting   0
  bNumEndpoints   1
  bInterfaceClass14 Video
  bInterfaceSubClass  1 Video Control
  bInterfaceP

Re: [Linux-uvc-devel] Minoru stereo webcam

2009-02-03 Thread Jan Ciger
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Laurent Pinchart wrote:

> Could you (or Jan) try to set dwMaxPayloadTransferSize to a weird
> value (let's say 42) and see what the device returns in the next
> GET_CUR call ?

I can give this a shot later today and will report back.

Jan

-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.9 (GNU/Linux)
Comment: Using GnuPG with Mandriva - http://enigmail.mozdev.org

iD8DBQFJiAzYn11XseNj94gRAjwdAKCDQSQZg7roZ/yd+fdupmHXEfrwRACg3Q9c
+HFiZEpU/q2XzpbRWXcOKtQ=
=MkLd
-END PGP SIGNATURE-
___
Linux-uvc-devel mailing list
Linux-uvc-devel@lists.berlios.de
https://lists.berlios.de/mailman/listinfo/linux-uvc-devel