Share

Syntek Semicon DC-1125 Driver

Subscribe

stk1160 in EasyCAP USB 2.0 (05e1:0408)

  1. 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
  2. nobody

    2007-11-28 00:36:53 UTC
    I'm planning to buy this device too.
    But before I do i want to make shure there is a linux driver for it.

    I just stared to lean C at my education, so maybe i can be of some help.

    If this device could be supported, it will be much appreciated!
  3. 2007-11-28 09:00:16 UTC
    I think that you need an other driver.

    Moreover, you need support audio feature.

    If you want to help, I need USB logs from Windows driver.

    Regards,

    Nicolas
  4. 2007-11-28 09:56:42 UTC
    Hi Nicolas, I've got usbsnoop for Windows. How do you want the logs taken?

    Do you want separate logs for when:

    -the device is inserted into the USB port
    -when the viewing application starts
    -when controls are adjusted?

    I was going to have a go at adding the configs myself but got sidelined by a Gtk project and put this on a backburner.

    But it would be very cool to get the video part to work with Linux. :)

    Tony
  5. nobody

    2007-11-28 16:15:28 UTC
    It would be very cool indeed!
    I don't need the audio part, it's just for a security cam.

    if you need any help, you can contact me at f.vandenijssel (at character) gmail.com
    I'm not a linux professional, but i know my way around.

  6. nobody

    2008-01-07 06:19:04 UTC
    Tony, have you provided the usbsnoop info required by Nicklas?
    I have one of these vidcaps too.There will be more call for drivers soon enough.
  7. nobody

    2008-02-14 17:16:58 UTC
    Anyone ever get the EasyCap USB 2.0 working with this driver. I don't see any other Syntek based drivers out there.
  8. 2008-12-29 12:50:11 UTC
    hello there
    i just bought this stk1160 adapter, and i've discovered that the good old em28xx driver doesnt' apply, so i found this project which *seems* to address my needs :)

    my question is: any chance to get this working, long time passed since this thread was started, any news?
  9. 2008-12-31 09:15:31 UTC
    Hi,

    You can use this driver ; but you have to adapt the driver :(

    You have to add a new file stk11xx-dev-0408.c

    1) At first, get the USB logs from Windows
    2) Parse the logs with tools (in repository)
    3) Then write the good command in the stk11xx-dev-0408 file (as the stk11xx-dev-XXXX)

    Regards,

    Nicolas
  10. 2008-12-31 10:57:56 UTC
    thanks nicolas for your answer and explanation...

    unfortunately i am stuck with the second point of your explanation: i've recorded a stream of raw packets with usbmon but the parser seems not giving anything - i wonder if this is because i used the latest version of the windows software because the one uploaded on svn didn't install on my windows machine, and usbsnoop wasn't recording anything :s

    anyway if you don't mind taking a look, here's the dump (~24MiB): "http://c10ud.altervista.org/Syntek STK1160$081231$001.dmslog.tar.gz"

    i will try on another machine asap, and btw thanks for your efforts :)
  11. 2009-01-07 20:28:15 UTC
    A user on the ubuntu forum said, although this device uses the syntek usb bridge, it uses an SAA7113 chip for the video.

    The previous version of this device used the em2861 USB video bridge, but that wasn't a problem since em2xxx supports SAA7xxx...

    What can be done about this?
  12. 2009-01-07 20:36:56 UTC
    see the other thread about this - I'm currently implementing support for STK1160 in the driver.
    I currently have video capture working for a single input.
< Previous | 1 | Next >

Add a Reply

This forum does not allow anonymous participation.

Log in to add a reply. Not registered? Create an account to participate and receive email updates when replies are posted to this topic.