Often when the STK1160 device is plugged in the '''snd_usb_audio''' module conflicts with the easycap module and the EasyALSA0 soundcard is not created. As a workaround you need to unplug the device, unload the module (rmmod snd_usb_audio) and then plug in the device again.

−

==== stk1160 driver ====

==== stk1160 driver ====

−

The stk1160 driver is the successor of the easycap driver. It supports video capturing and audio capturing via ALSA. This driver doesn't suffer from the limitations of the easycap driver. The stk1160 module replaces the easycap module in the 3.7 kernel release.

+

The stk1160 driver is in the mainline kernel since version 3.7. It is the successor of the legacy easycap driver (see below).

Often when the STK1160 device is plugged in the '''snd_usb_audio''' module conflicts with the easycap module and the EasyALSA0 soundcard is not created. As a workaround you need to unplug the device, unload the module (rmmod snd_usb_audio) and then plug in the device again.

+

===Sample Kernel Output===

===Sample Kernel Output===

Revision as of 11:01, 3 June 2013

This article covers all the tunerless USB 2.0 video and audio capture devices which are based on the STK1160 chip from Syntec Semiconductor.co.ltd.. This device is convenient for capturing from cameras, VHS-tapes, receivers ... and even for small surveillance installation (4 inputs model).

Many but not all of these devices are branded as Easycap. Althought this device is sold with different names and labels, in many forums and blogs this device is called "EasyCAP DC60".

Identification

Identify the audiotype of your device

The following shell command reports the audiorate (sampling frequency) of your STK1160 based device:

lsusb -v -d 05e1:0408 | grep tSamFreq | sed -e "s,^.* ,,"

48000 = Model with AC'97 chip

8000 = Model without AC'97 chip

If you encounter audio problems while capturing you need to specify the correct audiorate of your model in the capturing program.

Making it Work

STK1160 based devices ar supported under Linux since kernel 2.6.38

Drivers

stk1160 driver

The stk1160 driver is in the mainline kernel since version 3.7. It is the successor of the legacy easycap driver (see below).
The stk1160 module supports video capturing and audio capturing via ALSA.
This driver doesn't suffer from the limitations of the easycap driver. The stk1160 module replaces the easycap module in the 3.7 kernel release.

If you want to use the stk1160 driver under previous kernels (3.2, 3.4 or 3.6 kernel only !), you can get the sourcecode frome here:

stk1160 audio support

The stk1160 module registers a control-only alsa soundcard. This sound card is called stk1160-mixer.
The real sound capture is done through the Controlle soundcard which is created after plugging in the STK1160 device by the snd_usb_audio module.

To enable sound capture you have to select in alsamixer the 'Line' item on the capture menu for stk1160-mixer when the STK1160 device is plugged in:
You can do this in the terminal as well with this command:

# amixer -c stk1160mixer sset Line unmute cap

Note! In the viewing- or capturing program you must then select the 'Controlle' soundcard or its number to hear sound!

legacy easycap driver

The easycap driver is part of the kernel from 2.6.38 up to 3.6.x and supports all the features of the STK1160 based devices but has some limitations (framedropping, stability, sound issues).

easycap audio support

The easycap module creates an additional ALSA soundcard EasyALSA0.

Often when the STK1160 device is plugged in the snd_usb_audio module conflicts with the easycap module and the EasyALSA0 soundcard is not created. As a workaround you need to unplug the device, unload the module (rmmod snd_usb_audio) and then plug in the device again.

Usage

The driver for the STK1160 device creates a /dev/videoN node and an ALSA soundcard, The different video-inputs of the device can be accessed by their inputnumber (starting at 0). From the two or four video cables on the device only one (!) can be used at the same time. If you want to switch through the different inputs of your card you need to start the capturing program again with the next input number.

In the viewing/ capturing program (e.g. mplayer) you must specify

the videodevicenode of the STK1160 card (/dev/videoN),

the input number of the cable where the source is plugged in,

the TV norm of the videosource and (e.g. PAL, NTSC)

the ALSA sounddevice if you want to capture audio. Get a list of ALSA soundcards with this command:

# cat /proc/asound/cards

If you encounter audio problems while capturing you need to specify the correct audiorate of your model in the capturing program.

Example for mplayer

Assumed that your STK1160 device is the second videodevice (the first is your webcam) and the second soundcard on your system, and that on the first CVBS input a PAL camera is plugged in and sound also comes from the STK1160 device, the mplayer command for viewing would look like this:

Any other program which is capable of analogue video- and audiocapturing will probably work with STK1160 devices.

Short linux driver history

In early 2010 Mike Thomas started developing a driver for the STK1160 based video capture device which is sold as EasyCAP DC60. He used the stk11xx driver and some existing patches for the "05e1:0408" Syntek device as a basis for his project. Since the easycapdriver (version 0.9) has been added to the staging directory of the Linux kernel in November 2011 Mike Thomas stopped his development and support.

Some people added changes in order to clean up the sourcecode. These changes didn't hardly affect the limitations (framedropping, stability) of the driver.

At the middle of 2012 Ezequiel Garcia decided to rework the easycapdriver. He changed the drivers name to "stk1160".

In the 3.7 kernel release the old easycapdriver has been replaced by the stk1160 driver.