VAD Laplace: Difference between revisions

From LinuxTVWiki
Jump to navigation Jump to search
Line 25: Line 25:
==Advanced Hardware Specs of the Webcam==
==Advanced Hardware Specs of the Webcam==
* Not UVC Compliant
* Not UVC Compliant
* Main chip (large) - See also [[VAD_Laplace#Pictures|Pictures]] below
* Video bridge (main chip, large) - See also [[VAD_Laplace#Pictures|Pictures]] below


EMPIA EM2765
EMPIA EM2765
6Z523-500
6Z523-500
0711-118G
0711-118G
* Other chips (small)


Chip ID (reg 0x0A) is 0x36

* Other chips (small)
IDT
IDT
STAC9753AX
STAC9753AX
Line 39: Line 41:


* Image sensor (from USB-logs)
* Image sensor (from USB-logs)
OV2640 (http://read.pudn.com/downloads128/doc/543891/OV2640_spec.pdf)
OV2640 (http://read.pudn.com/downloads128/doc/543891/OV2640_spec.pdf)<br>
Product ID: 0x2642 (reg 0x0A, OxOB)
Product ID: 0x2642 (reg 0x0A, OxOB)<br>
Uses i2c/sccb slave address 0x60


* Output from lsusb (and /proc/bus/usb/devices)
* Output from lsusb (and /proc/bus/usb/devices)

Revision as of 15:08, 24 October 2011

Webcam VAD (Vicious and Divine) Laplace

Vad5m.jpg

I recently bought a nice new webcam. The webcam is called VAD (Vicious and Divine) Laplace from the manufacturer Speed Link.

I thought I can do some helping to get a driver developed for this cam. What I can offer is USB sniffing on a certain OS (no MAC drivers available too so there is not much choice). I already know that the cam is not UVC compliant.

Currently I'm using Mandriva 2009.1 distribution with distribution kernel 2.6.29.1-desktop-4mnb. Self-made realtime kernel based on Vanilla 2.6.29.2 is available too (but untested).

Basic Hardware Specs of the Webcam

  • 2 MP Photo, 1.3 MP Video resolution
  • USB 2.0 Interface (USB 1.1 supported)
  • 3x digital zoom (button)
  • Flash (switch on/off via button)
  • Night illumination (switch on/off via button)
  • Noise-suppressing microphone (so there is already a filter ...)
  • Mute button
  • Z-fold positioning
  • 0.6m cable at the Webcam itself
  • 1.4m extra USB extension cable
  • max. video resolution 1280x960/15fps, 640x480/30fps
  • max. photo resolution 1600x1200
  • available in white (1ae7:9003) and black (1ae7:9004)

Advanced Hardware Specs of the Webcam

  • Not UVC Compliant
  • Video bridge (main chip, large) - See also Pictures below
EMPIA EM2765
6Z523-500
0711-118G

Chip ID (reg 0x0A) is 0x36

  • Other chips (small)
IDT
STAC9753AX
MPG
E10745Z
UT10953
  • Image sensor (from USB-logs)

OV2640 (http://read.pudn.com/downloads128/doc/543891/OV2640_spec.pdf)
Product ID: 0x2642 (reg 0x0A, OxOB)
Uses i2c/sccb slave address 0x60

  • Output from lsusb (and /proc/bus/usb/devices)
Bus 006 Device 008: ID 1ae7:9003  
Device Descriptor:
 bLength                18
 bDescriptorType         1
 bcdUSB               2.00
 bDeviceClass            0 (Defined at Interface level)
 bDeviceSubClass         0 
 bDeviceProtocol         0 
 bMaxPacketSize0        64
 idVendor           0x1ae7 
 idProduct          0x9003 
 bcdDevice            2.03
 iManufacturer           0 
 iProduct                0 
 iSerial                 0 
 bNumConfigurations      1
 Configuration Descriptor:
   bLength                 9
   bDescriptorType         2
   wTotalLength          126
   bNumInterfaces          3
   bConfigurationValue     1
   iConfiguration          0 
   bmAttributes         0x80
     (Bus Powered)
   MaxPower              500mA
   Interface Descriptor:
     bLength                 9
     bDescriptorType         4
     bInterfaceNumber        0
     bAlternateSetting       0
     bNumEndpoints           0
     bInterfaceClass         1 Audio
     bInterfaceSubClass      1 Control Device
     bInterfaceProtocol      0 
     iInterface              0 
     AudioControl Interface Descriptor:
       bLength                 9
       bDescriptorType        36
       bDescriptorSubtype      1 (HEADER)
       bcdADC               1.00
       wTotalLength           40
       bInCollection           1
       baInterfaceNr( 0)       1
     AudioControl Interface Descriptor:
       bLength                12
       bDescriptorType        36
       bDescriptorSubtype      2 (INPUT_TERMINAL)
       bTerminalID             1
       wTerminalType      0x0201 Microphone
       bAssocTerminal          0
       bNrChannels             2
       wChannelConfig     0x0000
       iChannelNames           0 
       iTerminal               0 
     AudioControl Interface Descriptor:
       bLength                10
       bDescriptorType        36
       bDescriptorSubtype      6 (FEATURE_UNIT)
       bUnitID                 2
       bSourceID               1
       bControlSize            1
       bmaControls( 0)      0x03
         Mute
         Volume
       bmaControls( 1)      0x00
       bmaControls( 2)      0x00
       iFeature                0 
     AudioControl Interface Descriptor:
       bLength                 9
       bDescriptorType        36
       bDescriptorSubtype      3 (OUTPUT_TERMINAL)
       bTerminalID             3
       wTerminalType      0x0101 USB Streaming
       bAssocTerminal          0
       bSourceID               2
       iTerminal               0 
   Interface Descriptor:
     bLength                 9
     bDescriptorType         4
     bInterfaceNumber        1
     bAlternateSetting       0
     bNumEndpoints           0
     bInterfaceClass         1 Audio
     bInterfaceSubClass      2 Streaming
     bInterfaceProtocol      0 
     iInterface              0 
   Interface Descriptor:
     bLength                 9
     bDescriptorType         4
     bAlternateSetting       1
     bNumEndpoints           1
     bInterfaceClass         1 Audio
     bInterfaceSubClass      2 Streaming
     bInterfaceProtocol      0 
     iInterface              0 
     AudioStreaming Interface Descriptor:
       bLength                 7
       bDescriptorType        36
       bDescriptorSubtype      1 (AS_GENERAL)
       bTerminalLink           3
       bDelay                  1 frames
       wFormatTag              1 PCM
     AudioStreaming Interface Descriptor:
       bLength                11
       bDescriptorType        36
       bDescriptorSubtype      2 (FORMAT_TYPE)
       bFormatType             1 (FORMAT_TYPE_I)
       bNrChannels             2
       bSubframeSize           2
       bBitResolution         16
       bSamFreqType            1 Discrete
       tSamFreq[ 0]         8000
     Endpoint Descriptor:
       bLength                 9
       bDescriptorType         5
       bEndpointAddress     0x83  EP 3 IN
       bmAttributes            1
         Transfer Type            Isochronous
         Synch Type               None
         Usage Type               Data
       wMaxPacketSize     0x00c8  1x 200 bytes
       bInterval               4
       bRefresh                0
       bSynchAddress           0
       AudioControl Endpoint Descriptor:
         bLength                 7
         bDescriptorType        37
         bDescriptorSubtype      1 (EP_GENERAL)
         bmAttributes         0x00
         bLockDelayUnits         0 Undefined
         wLockDelay              0 Undefined
   Interface Descriptor:
     bLength                 9
     bDescriptorType         4
     bInterfaceNumber        3
     bAlternateSetting       0
     bNumEndpoints           1
     bInterfaceClass       255 Vendor Specific Class
     bInterfaceSubClass    234 
     bInterfaceProtocol      0 
     iInterface              0 
     Endpoint Descriptor:
       bLength                 7
       bDescriptorType         5
       bEndpointAddress     0x82  EP 2 IN
       bmAttributes            2
         Transfer Type            Bulk
         Synch Type               None
         Usage Type               Data
       wMaxPacketSize     0x0200  1x 512 bytes
       bInterval               1
Device Qualifier (for other device speed):
 bLength                10
 bDescriptorType         6
 bcdUSB               2.00
 bDeviceClass            0 (Defined at Interface level)
 bDeviceSubClass         0 
 bDeviceProtocol         0 
 bMaxPacketSize0        64
 bNumConfigurations      1
Device Status:     0x0000
 (Bus Powered)

/proc/usb/devices:

T:  Bus=01 Lev=01 Prnt=01 Port=04 Cnt=02 Dev#= 16 Spd=480 MxCh= 0
D:  Ver= 2.00 Cls=00(>ifc ) Sub=00 Prot=00 MxPS=64 #Cfgs=  1
P:  Vendor=1ae7 ProdID=9003 Rev= 2.03
C:* #Ifs= 3 Cfg#= 1 Atr=80 MxPwr=500mA
I:* If#= 0 Alt= 0 #EPs= 0 Cls=01(audio) Sub=01 Prot=00 Driver=snd-usb-audio
I:* If#= 1 Alt= 0 #EPs= 0 Cls=01(audio) Sub=02 Prot=00 Driver=snd-usb-audio
I:  If#= 1 Alt= 1 #EPs= 1 Cls=01(audio) Sub=02 Prot=00 Driver=snd-usb-audio
E:  Ad=83(I) Atr=01(Isoc) MxPS= 200 Ivl=1ms
I:* If#= 3 Alt= 0 #EPs= 1 Cls=ff(vend.) Sub=ea Prot=00 Driver=(none)
E:  Ad=82(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms

/proc/asound/cards:

1 [U0x1ae70x9003  ]: USB-Audio - USB Device 0x1ae7:0x9003
                     USB Device 0x1ae7:0x9003 at usb-0000:00:13.5-5, high speed

/proc/asound/devices:

32: [ 1]   : control
33:        : timer
56: [ 1- 0]: digital audio capture

Pictures

Vad2m.jpg
Vad3m.jpg

All pictures in larger size can be found on this page: http://s42.photobucket.com/albums/e344/suamor/webcam_vad Copyright (C) Reinhard Katzmann 2009. Distributed under Creative Common License ca. by is optional but wished (to make it easier for inclusion in mail (mailing list) and forums).

Tools for testing

Reverse Engineering (evaluation of USB-logs)

The device is controlled with USB-control-messages (watch out for URB_FUNCTION_CONTROL_TRANSFER, if you are using SniffUSB)

Byte 1:  c0 = read from USB device
         40 = write to USB device
Byte 2:  00 = read/write from/to EM2765 register
         02 = i2c read
         03 = i2c write
         06 = read/write from/to sensor register
         08 = check success of read/write from/to sensor register
Byte 3:  always 00
Byte 4:  always 00
Byte 5:  register low byte
Byte 6:  register high byte
Byte 7:  buffer size
Byte 8:  always 00
  • Reads/writes from/to the EM2765 register:
Setup Data:                    Buffer:
c0 00 00 00 0a 00 01 00        36		=> Read reg 0x000a, value is 0x36
40 00 00 00 08 00 01 00        f7		=> Write value 0xf7 to reg 0x0008


  • Reads from i2c-device with slave address 0xa0 (eeprom ?):
Setup Data:                    Buffer:
40 03 00 00 a0 00 02 00        00 86		=> Select reg 0x0086 of I2C device 0xa0
c0 00 00 00 05 00 01 00        00		=> Check success of i2c operation: 0x00 = success
c0 02 00 00 a0 00 04 00        1e 40 1e 72	=> Read 4 bytes from i2c device 0xa0: 0x1e 0x40 0x1e 0x72
c0 00 00 00 05 00 01 00        00		=> Check success of i2c operation: 0x00 = success


  • Reads/writes from/to the sensor (likely connected via SCCB):
Setup Data:                    Buffer:
40 06 00 00 60 00 01 00        0a              => Select sensor register 0x0a
c0 08 00 00 00 00 01 00        00              => Check success of sensor operation: 0x00 = success
c0 06 00 00 60 00 01 00        26              => Read from current sensor register (0x0a): 0x26
c0 08 00 00 00 00 01 00        00              => Check success of sensor operation: 0x00 = success
40 06 00 00 60 00 02 00        ff 01           => Write value 0x01 to sensor register 0xff
c0 08 00 00 00 00 01 00        00              => Check success of sensor operation: 0x00 = success