Commit Graph

13 Commits (066d6c7f4ec94d40d13061714489783916548cdb)

Author SHA1 Message Date
Mike Thomas 268dfede46 staging/easycap: Improve interface to the videodev module
The changes here represent an intermediate step towards bringing the
driver within the V4L2 framework.

Signed-off-by: Mike Thomas <rmthomas@sciolus.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-11-09 16:31:16 -08:00
Mike Thomas ae59dad4fe staging/easycap: Eliminate BKL
No locking is required for normal operation of the driver, but locking
is needed to prevent an Oops during some hot-unplugging scenarios.  The
BKL is replaced here by mutex locks together with traps to detect null
pointers following asynchronous device disconnection.

Signed-off-by: Mike Thomas <rmthomas@sciolus.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-11-09 16:31:15 -08:00
Mike Thomas 2a87a0b922 staging/easycap: Avoid compiler warning about frame size ... larger than ...
Replacing some of the large automatic variables by dynamically allocated
variables in the IOCTL routines gets rid of the compiler warning.

Signed-off-by: Mike Thomas <rmthomas@sciolus.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-11-09 16:31:15 -08:00
Mike Thomas 94155cf419 staging/easycap: Add option to set the hardware audio gain
A new module parameter adjusts the gain of the AC'97 audio chip, if
one is present.  Attenuation as well as amplification should be possible
according to the datasheet, but attenuation seems not to work yet.

Signed-off-by: Mike Thomas <rmthomas@sciolus.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-11-09 16:31:15 -08:00
Mike Thomas 40b8d50ac9 staging/easycap: Implement interlaced modes and reduced framerates
Interlaced modes are requested by tvtime.  Reduced framerates are
preferred by some userspace programs, e.g. astronomy applications.

Signed-off-by: Mike Thomas <rmthomas@sciolus.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-11-09 16:31:15 -08:00
Mike Thomas f36bc37a48 staging/easycap: Improve hardware initialization
Sometimes at startup the video urbs consistently and persistently deliver
bad data, each video frame (not isoc frame) containing an excess of
precisely two bytes.  A brute-force cure implemented here is to
repeatedly reinitialize the registers of the SAA7113H chip and the
STK1160 USB bridge until good behaviour is obtained.

Signed-off-by: Mike Thomas <rmthomas@sciolus.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-11-09 16:31:14 -08:00
Mike Thomas e68703cfe8 staging/easycap: Make code re-entrant
In order to allow multiple EasyCAP dongles to operate simultaneously
without mutual interference all static variables have been eliminated
except for a persistent inventory of plugged-in dongles at module level.

Signed-off-by: Mike Thomas <rmthomas@sciolus.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-11-09 16:31:14 -08:00
Mike Thomas ce36cedab3 staging/easycap: Remove obsolete routines
The so-called bridger routine has proved unnecessary following general
improvements elsewhere.  The explain_() functions were a convenience
during early development, but are unnecessary and inappropriate now.

Signed-off-by: Mike Thomas <rmthomas@sciolus.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-11-09 16:31:14 -08:00
Frederic Weisbecker 5ef06839f5 staging: Pushdown bkl to easycap ioctl handlers
These were amongst the last users of struct file_operations:ioctl

Signed-off-by: Frederic Weisbecker <fweisbec@gmail.com>
2010-08-09 03:28:40 +02:00
Joe Perches ba952d84e1 Staging: Remove unnecessary casts of private_data
Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-07-22 14:43:51 -07:00
Mike Thomas 7ebc8760b3 Staging: easycap: Upsample microphone audio
Upsampling from 8000 Hz mono to 32000 Hz stereo improves audio/video
synchronization when userspace programs adopt default buffering.  This
is an experimental feature.

Signed-off-by: Mike Thomas <rmthomas@sciolus.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-07-22 11:08:55 -07:00
Mike Thomas 3d423e91b4 Staging: easycap: Replace some global variables
New members of struct easycap take the place of undesirable global variables.

Signed-off-by: Mike Thomas <rmthomas@sciolus.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-07-22 11:08:01 -07:00
R.M. Thomas 702422bd2d Staging: easycap: add easycap driver
This adds the easycap USB video adapter driver to
the staging directory.

Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-06-18 12:34:42 -07:00