Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 702422bd authored by R.M. Thomas's avatar R.M. Thomas Committed by Greg Kroah-Hartman
Browse files

Staging: easycap: add easycap driver



This adds the easycap USB video adapter driver to
the staging directory.

Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent 178f16db
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -149,5 +149,7 @@ source "drivers/staging/mrst-touchscreen/Kconfig"

source "drivers/staging/msm/Kconfig"

source "drivers/staging/easycap/Kconfig"

endif # !STAGING_EXCLUDE_BUILD
endif # STAGING
+1 −0
Original line number Diff line number Diff line
@@ -55,3 +55,4 @@ obj-$(CONFIG_ADIS16255) += adis16255/
obj-$(CONFIG_FB_XGI)		+= xgifb/
obj-$(CONFIG_TOUCHSCREEN_MRSTOUCH)	+= mrst-touchscreen/
obj-$(CONFIG_MSM_STAGING)	+= msm/
obj-$(CONFIG_EASYCAP)		+= easycap/
+16 −0
Original line number Diff line number Diff line
config EASYCAP
	tristate "EasyCAP USB ID 05e1:0408 support"

	---help---
	  This is an integrated audio/video driver for EasyCAP cards with
	  USB ID 05e1:0408.  It supports two hardware variants:

	  *  EasyCAP USB 2.0 Video Adapter with Audio, Model DC60,
	     having input cables labelled CVBS, S-VIDEO, AUDIO(L), AUDIO(R)

	  *  EasyCAP002 4-Channel USB 2.0 DVR, having input cables labelled
	     1, 2, 3, 4 and an unlabelled input cable for a microphone.

	  To compile this driver as a module, choose M here: the
	  module will be called easycap
+13 −0
Original line number Diff line number Diff line

obj-$(CONFIG_EASYCAP)	+= easycap.o

easycap-objs	:= easycap_main.o easycap_low.o easycap_sound.o
easycap-objs	+= easycap_ioctl.o easycap_settings.o
easycap-objs	+= easycap_testcard.o

EXTRA_CFLAGS += -Wall
# Impose all or none of the following:
EXTRA_CFLAGS += -DEASYCAP_IS_VIDEODEV_CLIENT
EXTRA_CFLAGS += -DEASYCAP_NEEDS_V4L2_DEVICE_H
EXTRA_CFLAGS += -DEASYCAP_NEEDS_V4L2_FOPS
+130 −0
Original line number Diff line number Diff line

        ***********************************************************
        *   EasyCAP USB 2.0 Video Adapter with Audio, Model DC60  *
        *                            and                          *
        *             EasyCAP002 4-Channel USB 2.0 DVR            *
        ***********************************************************
                     Mike Thomas  <rmthomas@sciolus.org>



SUPPORTED HARDWARE
------------------

This driver is intended for use with hardware having USB ID 05e1:0408.
Two kinds of EasyCAP have this USB ID, namely:

    *  EasyCAP USB 2.0 Video Adapter with Audio, Model DC60,
       having input cables labelled CVBS, S-VIDEO, AUDIO(L), AUDIO(R)

    *  EasyCAP002 4-Channel USB 2.0 DVR, having input cables labelled
       1, 2, 3, 4 and an unlabelled input cable for a microphone.


BUILD OPTIONS AND DEPENDENCIES
------------------------------

If the parameter EASYCAP_IS_VIDEODEV_CLIENT is undefined during compilation
the built module is entirely independent of the videodev module, and when
the EasyCAP is physically plugged into a USB port the special files
/dev/easycap0 and /dev/easysnd1 are created as video and sound sources
respectively.

If the parameter EASYCAP_IS_VIDEODEV_CLIENT is defined during compilation
the built easycap module is configured to register with the videodev module,
in which case the special files created when the EasyCAP is plugged in are
/dev/video0 and /dev/easysnd0.  Use of the easycap module as a client of
the videodev module has received very little testing as of June 2010.


KNOWN BUILD PROBLEMS
--------------------

(1) Recent gcc versions may generate the message:

     warning: the frame size of .... bytes is larger than 1024 bytes

This warning can be suppressed by specifying in the Makefile:

     EXTRA_CFLAGS += -Wframe-larger-than=8192

but it would be preferable to remove the cause of the warning.


KNOWN RUNTIME ISSUES
--------------------

(1) Randomly (maybe 5 to 10% of occasions) the driver fails to produce any
output at start-up.  Closing mplayer (or whatever the user program is) and
restarting it restores normal performance without any other remedial action
being necessary.  The reason for this is not known.

(2) Intentionally, this driver will not stream material which is unambiguously
identified by the hardware as copy-protected.  The video output will freeze
within about a minute when this situation arises.

(3) The controls for luminance, contrast, saturation, hue and volume may not
always work properly.

(4) Reduced-resolution S-Video seems to suffer from moire artefacts.  No
attempt has yet been made to rememdy this.


SUPPORTED TV STANDARDS AND RESOLUTIONS
--------------------------------------

The following TV standards are natively supported by the hardware and are
usable as (for example) the "norm=" parameter in the mplayer command:

    PAL_BGHIN,    NTSC_N_443,
    PAL_Nc,       NTSC_N,
    SECAM,        NTSC_M,        NTSC_M_JP,
    PAL_60,       NTSC_443,
    PAL_M.

The available picture sizes are:

     at 25 frames per second:   720x576, 704x576, 640x480, 360x288, 320x240;
     at 30 frames per second:   720x480, 640x480, 360x240, 320x240;


WHAT'S TESTED AND WHAT'S NOT
----------------------------

This driver is known to work with mplayer, mencoder, tvtime and sufficiently
recent versions of vlc.  An interface to ffmpeg is implemented, but serious
audio-video synchronization problems remain.

The driver is designed to support all the TV standards accepted by the
hardware, but as yet it has actually been tested on only a few of these.

I have been unable to test and calibrate the S-video input myself because I
do not possess any equipment with S-video output.

This driver does not understand the V4L1 IOCTL commands, so programs such
as camorama are not compatible.  There are reports that the driver does
work with sufficiently recent (V4L2) versions of zoneminder, but I have not
attempted to confirm this myself.


UDEV RULES
----------

In order that the special files /dev/easycap0 and /dev/easysnd1 are created
with conveniently relaxed permissions when the EasyCAP is plugged in, a file
is preferably to be provided in directory /etc/udev/rules.d with content:

ACTION!="add|change", GOTO="easycap_rules_end"
ATTRS{idVendor}=="05e1", ATTRS{idProduct}=="0408", \
	MODE="0666", OWNER="root", GROUP="root"
LABEL="easycap_rules_end"


ACKNOWLEGEMENTS AND REFERENCES
------------------------------
This driver makes use of information contained in the Syntek Semicon DC-1125
Driver, presently maintained at http://sourceforge.net/projects/syntekdriver/
by Nicolas Vivien.  Particularly useful has been a patch to the latter driver
provided by Ivor Hewitt in January 2009.  The NTSC implementation is taken
from the work of Ben Trask.
Loading