2007-10-31 17:13:55 UTC
Hello, I have a cheap USB video capture device from eBay containing an stk1160, which I hope to get working with the stk11xx driver under Linux (which I've pulled out of SVN).
It's called EasyCAP 2.0 USB:
http://cgi.ebay.co.uk/ws/eBayISAPI.dll?ViewItem&rd=1&item=220146944440&ssPageName=STRK:MEWN:IT&ih=012
There are lots of them for sale, so I expect more people will try your driver. :)
I've added the device ID etc, and tried all combinations of webcam_model.
On modprobe it always fails in dev_stk11xx_camera_on().
EG, if I select:
webcam_model = SYNTEK_STK_M811;
webcam_type = STK11XX_VGA;
On modprobe:
[1112211.135452] Linux video capture interface: v2.00
[1112211.148543] stk11xx: Syntek USB2.0 webcam driver startup
[1112211.148663] stk11xx: Syntek USB2.0 - STK-1160 based capture device found.
[1112211.148668] stk11xx: Syntek EasyCAP USB2.0 - Product ID 0x0408.
[1112211.148677] stk11xx: Release: 0005
[1112211.148680] stk11xx: Number of interfaces : 3
[1112211.148688] /build/buildd/linux-source-2.6.22-2.6.22/drivers/usb/core/message.c: selecting invalid altsetting 5
[1112211.148694] stk11xx: usb_set_interface failed !
[1112211.151203] stk11xx: Initialize USB2.0 Syntek Camera
[1112212.177476] stk11xx: Check device return error (0x0201 = 0D) !
[1112212.943261] stk11xx: Check device return error (0x0201 = 0D) !
[1112213.500110] stk11xx: Check device return error (0x0201 = 0D) !
[1112214.055953] stk11xx: Check device return error (0x0201 = 0D) !
[1112214.116930] stk11xx: Check device return error (0x0201 = 0C) !
[1112214.116976] stk11xx: Load default sensor settings fail !
[1112214.130925] stk11xx: Syntek USB2.0 Camera is ready
[1112214.131019] stk11xx: Syntek USB2.0 Camera is now controlling video device /dev/video0
[1112214.131085] usbcore: registered new interface driver usb_stk11xx_driver
[1112214.131092] stk11xx: v1.2.0 : Syntek USB Video Camera
Then if I try and cat /dev/video0:
[1112258.476669] stk11xx: Check device return error (0x0201 = 0C) !
[1112258.476732] stk11xx: Load default sensor settings fail !
[1112258.489706] stk11xx: Check device return error (0x0201 = 0C) !
[1112258.497662] stk11xx: Check device return error (0x0201 = 0C) !
[1112259.894285] /build/buildd/linux-source-2.6.22-2.6.22/drivers/usb/core/message.c: selecting invalid altsetting 5
[1112259.894301] stk11xx: usb_set_interface failed !
[1112259.933259] stk11xx: Check device return error (0x0201 = 0C) !
[1112259.933304] stk11xx: Load default sensor settings fail !
[1112259.940255] stk11xx: Check device return error (0x0201 = 0C) !
[1112259.947253] stk11xx: Check device return error (0x0201 = 0C) !
[1112260.964008] stk11xx: isoc_init() submit_urb 0 failed with error -90
[1112260.964065] stk11xx: EMSGSIZE
[1112260.964097] stk11xx: isoc_init() submit_urb 1 failed with error -90
[1112260.964135] stk11xx: EMSGSIZE
[1112260.964166] stk11xx: isoc_init() submit_urb 2 failed with error -90
[1112260.964204] stk11xx: EMSGSIZE
[1112260.964235] stk11xx: isoc_init() submit_urb 3 failed with error -90
[1112260.964273] stk11xx: EMSGSIZE
[1112260.964303] stk11xx: isoc_init() submit_urb 4 failed with error -90
[1112260.964342] stk11xx: EMSGSIZE
[1112260.964372] stk11xx: isoc_init() submit_urb 5 failed with error -90
[1112260.964409] stk11xx: EMSGSIZE
[1112260.964437] stk11xx: isoc_init() submit_urb 6 failed with error -90
[1112260.964476] stk11xx: EMSGSIZE
[1112260.964504] stk11xx: isoc_init() submit_urb 7 failed with error -90
[1112260.964542] stk11xx: EMSGSIZE
[1112260.964572] stk11xx: isoc_init() submit_urb 8 failed with error -90
[1112260.964611] stk11xx: EMSGSIZE
[1112260.964641] stk11xx: isoc_init() submit_urb 9 failed with error -90
[1112260.964679] stk11xx: EMSGSIZE
[1112260.964710] stk11xx: isoc_init() submit_urb 10 failed with error -90
[1112260.964748] stk11xx: EMSGSIZE
[1112260.964779] stk11xx: isoc_init() submit_urb 11 failed with error -90
[1112260.964817] stk11xx: EMSGSIZE
[1112260.964847] stk11xx: isoc_init() submit_urb 12 failed with error -90
[1112260.964885] stk11xx: EMSGSIZE
[1112260.964912] stk11xx: isoc_init() submit_urb 13 failed with error -90
[1112260.964945] stk11xx: EMSGSIZE
[1112260.964979] stk11xx: isoc_init() submit_urb 14 failed with error -90
[1112260.965018] stk11xx: EMSGSIZE
[1112260.965046] stk11xx: isoc_init() submit_urb 15 failed with error -90
[1112260.965084] stk11xx: EMSGSIZE
I'm a competent C programmer (my job is writing drivers for professional broadcast video equipment) so would like to have a stab at getting this device working. I have a little experience with Linux device drivers.
How did you find out the interface details for the other chips? What is the best way to get started?
Here is the section from lsusb -vv:
Bus 001 Device 004: ID 05e1:0408 Syntek Semiconductor Co., Ltd
Device Descriptor:
bLength 18
bDescriptorType 1
bcdUSB 2.00
bDeviceClass 0 (Defined at Interface level)
bDeviceSubClass 0
bDeviceProtocol 0
bMaxPacketSize0 64
idVendor 0x05e1 Syntek Semiconductor Co., Ltd
idProduct 0x0408
bcdDevice 0.05
iManufacturer 1 Syntek Semiconductor
iProduct 2 USB 2.0 Video Capture Controller
iSerial 0
bNumConfigurations 1
Configuration Descriptor:
bLength 9
bDescriptorType 2
wTotalLength 182
bNumInterfaces 3
bConfigurationValue 1
iConfiguration 0
bmAttributes 0x80
(Bus Powered)
MaxPower 500mA
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 0
bAlternateSetting 0
bNumEndpoints 2
bInterfaceClass 255 Vendor Specific Class
bInterfaceSubClass 255 Vendor Specific Subclass
bInterfaceProtocol 255 Vendor Specific Protocol
iInterface 0
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x81 EP 1 IN
bmAttributes 3
Transfer Type Interrupt
Synch Type None
Usage Type Data
wMaxPacketSize 0x0000 1x 0 bytes
bInterval 16
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x82 EP 2 IN
bmAttributes 1
Transfer Type Isochronous
Synch Type None
Usage Type Data
wMaxPacketSize 0x0000 1x 0 bytes
bInterval 1
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 0
bAlternateSetting 1
bNumEndpoints 2
bInterfaceClass 255 Vendor Specific Class
bInterfaceSubClass 255 Vendor Specific Subclass
bInterfaceProtocol 255 Vendor Specific Protocol
iInterface 0
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x81 EP 1 IN
bmAttributes 3
Transfer Type Interrupt
Synch Type None
Usage Type Data
wMaxPacketSize 0x0002 1x 2 bytes
bInterval 16
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x82 EP 2 IN
bmAttributes 1
Transfer Type Isochronous
Synch Type None
Usage Type Data
wMaxPacketSize 0x0300 1x 768 bytes
bInterval 1
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 0
bAlternateSetting 2
bNumEndpoints 2
bInterfaceClass 255 Vendor Specific Class
bInterfaceSubClass 255 Vendor Specific Subclass
bInterfaceProtocol 255 Vendor Specific Protocol
iInterface 0
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x81 EP 1 IN
bmAttributes 3
Transfer Type Interrupt
Synch Type None
Usage Type Data
wMaxPacketSize 0x0002 1x 2 bytes
bInterval 16
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x82 EP 2 IN
bmAttributes 1
Transfer Type Isochronous
Synch Type None
Usage Type Data
wMaxPacketSize 0x03fc 1x 1020 bytes
bInterval 1
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 1
bAlternateSetting 0
bNumEndpoints 0
bInterfaceClass 1 Audio
bInterfaceSubClass 1 Control Device
bInterfaceProtocol 0
iInterface 11 USB Audio Interface
AudioControl Interface Descriptor:
bLength 9
bDescriptorType 36
bDescriptorSubtype 1 (HEADER)
bcdADC 1.00
wTotalLength 38
bInCollection 1
baInterfaceNr( 0) 2
AudioControl Interface Descriptor:
bLength 12
bDescriptorType 36
bDescriptorSubtype 2 (INPUT_TERMINAL)
bTerminalID 1
wTerminalType 0x0602 Digital Audio Interface
bAssocTerminal 0
bNrChannels 2
wChannelConfig 0x0003
Left Front (L)
Right Front (R)
iChannelNames 0
iTerminal 0
AudioControl Interface Descriptor:
bLength 9
bDescriptorType 36
bDescriptorSubtype 3 (OUTPUT_TERMINAL)
bTerminalID 2
wTerminalType 0x0101 USB Streaming
bAssocTerminal 0
bSourceID 3
iTerminal 0
AudioControl Interface Descriptor:
bLength 8
bDescriptorType 36
bDescriptorSubtype 6 (FEATURE_UNIT)
bUnitID 3
bSourceID 1
bControlSize 1
bmaControls( 0) 0x01
Mute
iFeature 0
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 2
bAlternateSetting 0
bNumEndpoints 1
bInterfaceClass 1 Audio
bInterfaceSubClass 2 Streaming
bInterfaceProtocol 0
iInterface 11 USB Audio Interface
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x84 EP 4 IN
bmAttributes 5
Transfer Type Isochronous
Synch Type Asynchronous
Usage Type Data
wMaxPacketSize 0x0000 1x 0 bytes
bInterval 1
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 2
bAlternateSetting 1
bNumEndpoints 1
bInterfaceClass 1 Audio
bInterfaceSubClass 2 Streaming
bInterfaceProtocol 0
iInterface 11 USB Audio Interface
AudioStreaming Interface Descriptor:
bLength 7
bDescriptorType 36
bDescriptorSubtype 1 (AS_GENERAL)
bTerminalLink 2
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] 48000
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x84 EP 4 IN
bmAttributes 5
Transfer Type Isochronous
Synch Type Asynchronous
Usage Type Data
wMaxPacketSize 0x0100 1x 256 bytes
bInterval 1
AudioControl Endpoint Descriptor:
bLength 7
bDescriptorType 37
bDescriptorSubtype 1 (EP_GENERAL)
bmAttributes 0x00
bLockDelayUnits 0 Undefined
wLockDelay 0 Undefined
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: 0x0002
(Bus Powered)
Remote Wakeup Enabled
Kind regards,
Tony