Commit graph

6528 commits

Author SHA1 Message Date
Jean-François Moine
73e4934c80 V4L/DVB: gspca - sonixj: Let the JPEG header in the device
Signed-off-by: Jean-François Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-05-19 12:57:34 -03:00
Jean-François Moine
27c6f9e548 V4L/DVB: gspca: Change some copyrights and module authors
Signed-off-by: Jean-François Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-05-19 12:57:34 -03:00
Dan Carpenter
a41b2ea73a V4L/DVB: cx88: improve error handling
Return -EINVAL if we don't find the right query control id.

Signed-off-by: Dan Carpenter <error27@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-05-19 12:57:31 -03:00
Dan Carpenter
8e47567f7d V4L/DVB: cx231xx: improve error handling
Return -EINVAL if we don't find the control id.

Signed-off-by: Dan Carpenter <error27@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-05-19 12:57:30 -03:00
Randy Dunlap
f76280154c V4L/DVB: [-next] gspca: fix build for INPUT=m or INPUT=n
Handle case of GSPCA=m, INPUT=m when building gspca core;
also handle case of INPUT=n by using stubs.

drivers/media/video/gspca/gspca.c:662: error: implicit declaration of function 'gspca_input_destroy_urb'
drivers/media/video/gspca/gspca.c:668: error: implicit declaration of function 'gspca_input_create_urb'
drivers/media/video/gspca/gspca.c:2284: error: implicit declaration of function 'gspca_input_connect'

Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-05-19 12:57:30 -03:00
Dmitri Belimov
b400f09246 V4L/DVB: Fix default state Beholder H6 tuner
The hybrid tuner FMD1216MEX_MK3 after cold start has disabled IF. This
tuner has internal I2C switch. This switch switch I2C bus between DVB-T
and IF part. Default state is DVB-T. When module saa7134 is load it
can't find IF tda9887 and disable analog TV mode.

Sets internal I2C switch of the tuner to IF by send special value to the
tuner as for receive analog TV from low band. It can be usefule for
other cards.

I didn't set configure a tuner by a tuner model because this tuner can
have different I2C address. May be we can do it later after discuss for
more robust support a tuners.

Signed-off-by: Beholder Intl. Ltd. Dmitry Belimov <d.belimov@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-05-19 12:57:29 -03:00
Dan Carpenter
124371e33c V4L/DVB: video/sn9c102: improve error handling
Return an error if the controller is not found.

Signed-off-by: Dan Carpenter <error27@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-05-19 12:57:27 -03:00
Dan Carpenter
67e13e7709 V4L/DVB: video/et61x251: improve error handling
The original code doesn't handle the situation where the controller is
not found.

Signed-off-by: Dan Carpenter <error27@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-05-19 12:57:26 -03:00
Dan Carpenter
f24350b48e V4L/DVB: video/zc0301: improve error handling
Return an error if the controller is not found.

Signed-off-by: Dan Carpenter <error27@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-05-19 12:57:26 -03:00
Dan Carpenter
a9fac6b148 V4L/DVB: video/cx231xx: cleanup. remove unneed null checks
"dev" is never NULL here so there is no need to check.

Signed-off-by: Dan Carpenter <error27@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-05-19 12:57:25 -03:00
Dean Anderson
3a67b5cc6f V4L/DVB: s2255drv: adding v4l2_device structure. video_register_device cleanup
adding v4l2_device structure.
if one video_register_device call fails, allows use of other devices
or channels.

Signed-off-by: Dean Anderson <dean@sensoray.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-05-19 12:57:25 -03:00
Dean Anderson
85b85482c2 V4L/DVB: s2255drv: cleanup of debug messages
Signed-off-by: Dean Anderson <dean@sensoray.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-05-19 12:57:24 -03:00
Dean Anderson
a5ef91c9a5 V4L/DVB: s2255drv: removal of big kernel lock
big kernel lock removed from open function.
v4l2 code does not require locking the open function except
to check asynchronous firmware load state, which is protected
by a mutex

Signed-off-by: Dean Anderson <dean@sensoray.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-05-19 12:57:23 -03:00
Dean Anderson
c0a2ec956d V4L/DVB: s2255drv: video_device_alloc call not checked fix
call to video_device_alloc was not being checked in probe function.
code simplified and uses video_device inside device structure.

Signed-off-by: Dean Anderson <dean@sensoray.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-05-19 12:57:23 -03:00
Dean Anderson
ab85c6a33c V4L/DVB: s2255drv: code cleanup
removal of unused pipe array (of size one).

Signed-off-by: Dean Anderson <dean@sensoray.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-05-19 12:57:22 -03:00
Dean Anderson
ff7e22dfa1 V4L/DVB: s2255drv: cleanup of driver disconnect code
simplifies use of kref in driver

Signed-off-by: Dean Anderson <dean@sensoray.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-05-19 12:57:22 -03:00
Dan Carpenter
f5e20c34e9 V4L/DVB: video/au0828: off by one bug
The "AUVI_INPUT(tmp)" macro uses "tmp" as an index of an array with
AU0828_MAX_INPUT elements.

Signed-off-by: Dan Carpenter <error27@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-05-19 12:57:21 -03:00
istvan_v@mailbox.hu
6e1f4df7da V4L/DVB: cx88: fix checks for analog TV inputs
The following patch fixes code that checks for CX88_VMUX_TELEVISION,
but not CX88_VMUX_CABLE. This prevented for example the audio standard
from being set when using the cable input.

Signed-off-by: Istvan Varga <istvanv@users.sourceforge.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-05-19 12:57:21 -03:00
Christoph Fritz
10f1a6e8ed V4L/DVB: pwc Kconfig dependency fix
makes USB_PWC_INPUT_EVDEV to depend also on USB_PWC

Signed-off-by: Christoph Fritz <chf.fritz@googlemail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-05-19 12:57:20 -03:00
Mauro Carvalho Chehab
b4bc3dcbef V4L/DVB: cpia1: comment unused command_setlights()
drivers/media/video/gspca/cpia1.c:1063: warning: ‘command_setlights’ defined but not used

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-05-19 12:57:14 -03:00
Andreas Bombe
dab7e3106d V4L/DVB: V4L2: Replace loops for finding max buffers in VIDIOC_REQBUFS callbacks
Due to obvious copy and paste coding a number of video capture drivers
which implement a limit on the buffer memory decremented the user
supplied buffer count in a while loop until it reaches an acceptable
value.

This is a silly thing to do when the maximum value can be directly
computed.

Signed-off-by: Andreas Bombe <aeb@debian.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-05-19 12:57:13 -03:00
Herton Ronaldo Krzesinski
0a062033f7 Revert "V4L/DVB (11906): saa7134: Use v4l bounding/alignment function"
This reverts commit bc52d6eb44.

On newer kernels, a saa7134 board stopped to display TV video output
properly. After a bisect, I found it as the commit causing the issue.
Turns out that v4l_bound_align_image isn't doing the same bounding
calculation as manually done previously in saa7134_try_fmt_vid_cap.

What isn't equal is the calculation done in clamp align, while
previously it did "f->fmt.pix.width &= ~0x03", clamp_align function
does "Round to nearest aligned value" as stated in the comment, which
yields a different result. If I comment the round calculation in
clamp_align like this: "x = (x /*+ (1 << (align - 1))*/) & mask",
I get it fixed too, because this way the calculation is the same then.

Signed-off-by: Herton Ronaldo Krzesinski <herton@mandriva.com.br>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-05-19 12:57:13 -03:00
Hans Verkuil
ce68025e9f V4L/DVB: ivtv: move the _IO() decoder ioctls into vidioc_default
Now that video_ioctl2 no longer clobbers the argument for _IO() ioctls we
can move these into vidioc_default where they really belong.

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-05-19 12:57:10 -03:00
Hans Verkuil
6a717883e7 V4L/DVB: video_ioctl2: handle the v4l1 compat bit first and move VIDIOCGMBUF into the switch
Try to make a more sensible sequence of events in __video_do_ioctl: first
check for a valid ops pointer, then get the compat part done. The VIDIOCGMBUF
command is now part of the big switch.

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-05-19 12:57:10 -03:00
Hans Verkuil
626e2acfdc V4L/DVB: w9966: convert to V4L2
Note that I have not been able to find anyone with this hardware. I tried
contacting the author without success, searched on eBay and similar places
without luck either.

So this conversion is untested. That said, it was pretty straightforward
so it is time to have this driver join the V4L2 world at last.

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-05-19 12:57:09 -03:00
Hans Verkuil
fa0290eaee V4L/DVB: usbvision: remove non-working vbi device
The usbvision driver created vbi device nodes but the actual implementation
was just stubs and only returned errors to userspace.

In addition it used video_usercopy() and we want to remove that eventually.

So remove all the vbi code except for the vbi flag in the card definition
should someone ever be mad enough to work on a proper implementation for this
driver.

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-05-19 12:57:07 -03:00
Hans Verkuil
3f5e18249c V4L/DVB: video_ioctl2: don't return, use break
You want to be able to reach the debug code at the end of this function,
so don't use return, use break.

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-05-19 12:57:07 -03:00
Hans Verkuil
1d94aa369d V4L/DVB: video_ioctl2: do not replace arg with NULL for _IO() ioctls
If the ioctl was defined without direction (e.g. _IO('o', 25)), then
the arg as passed to vidioc_default was NULL instead of the original
argument.

Several ioctls in e.g. include/linux/dvb/video.h and audio.h use this type
of ioctl to pass simple numerical values to the driver.

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-05-19 12:57:06 -03:00
Dan Carpenter
2b080c5df0 V4L/DVB: davinci: don't return under lock on error path
If the kmalloc() failed for "ccdc_cfg = kmalloc(...);" then we would exit
with the lock held.  I moved the mutex_lock() below the allocation
because it isn't protecting anything in that block and allocations are
allocations are sometimes slow.

Signed-off-by: Dan Carpenter <error27@gmail.com>
Acked-by: Vaibhav Hiremath <hvaibhav@ti.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-05-19 12:57:05 -03:00
David Härdeman
724e249550 V4L/DVB: Teach drivers/media/IR/ir-raw-event.c to use durations
drivers/media/IR/ir-raw-event.c is currently written with the assumption
that all "raw" hardware will generate events only on state change (i.e.
when a pulse or space starts).

However, some hardware (like mceusb, probably the most popular IR receiver
out there) only generates duration data (and that data is buffered so using
any kind of timing on the data is futile).

Furthermore, using signed int's to represent pulse/space durations is a
well-known approach when writing ir decoders.

With this patch:

- s64 int's are used to represent pulse/space durations in ns

- a workqueue is used to decode the ir protocols outside of interrupt context

- #defines are added to make decoders clearer

- decoder reset is implemented by passing a zero duration to the kfifo queue
  and decoders are updated accordingly

Signed-off-by: David Härdeman <david@hardeman.nu>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-05-19 12:57:03 -03:00
Mauro Carvalho Chehab
626cf6979e V4L/DVB: ir-core: Distinguish sysfs attributes for in-hardware and raw decoders
Some devices have in-hardware Remote Controller decoder, while others
need a software decoder to get the IR code. As each software decoder
can be enabled/disabled individually, allowing multiple protocol
decoding capability.

On the other hand, hardware decoders have a limited protocol
support, often being able of decoding just one protocol each time.
So, each type needs a different set of capabilities to control the
supported protocol(s).

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-05-19 12:57:02 -03:00
Mauro Carvalho Chehab
c373cabfbb V4L/DVB: em28xx: fix a regression caused by the rc-map changes
The patch that adds the rc-map changes didn't take into account that an
a table with IR_TYPE_UNKNOWN would make change_protocol to return -EINVAL.

As this function is fundamental to initialize some data, including a
callback to the getkey function, this caused the driver to stop working,
hanging the machine most of the times.

The fix were simply to add a handler for the IR type, but, to avoid further
issues, explicitly call change_protocol and handle the error before
initializing the IR. Also, let input_dev to start/stop IR handling,
after the opening of the input device.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-05-19 12:57:00 -03:00
Mauro Carvalho Chehab
9dfe4e8339 V4L/DVB: ir-core: Add support for badly-implemented hardware decoders
A few hardware Remote Controller decoders, even using a standard protocol,
aren't able to provide the entire scancode. Due to that, the capability
of using other IR's are limited on those hardware.

Adds a way to indicate to ir-core what are the bits that the hardware
provides, from a scancode, allowing the addition of a complete IR table
to the kernel and allowing a limited support for changing the Remote
Controller on those devices.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-05-19 12:56:58 -03:00
Mauro Carvalho Chehab
26d5683d36 V4L/DVB: cx88: don't handle IR on Pixelview too fast
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-05-19 12:56:57 -03:00
Mauro Carvalho Chehab
2f16f6315f V4L/DVB: ir-nec-decoder: Reimplement the entire decoder
Thanks to Andy Walls <awalls@md.metrocast.net> for pointing me his
code, that gave me some ideas to better implement it.

After some work with saa7134 bits, I found a way to catch both IRQ
edge pulses. By enabling it, the NEC decoder can now take both
pulse and spaces into account, making it more precise.

Instead of the old strategy of handling the events all at once,
this code implements a state machine. Due to that, it handles
individual pulse or space events, validating them against the
protocol, producing a much more reliable decoding.

With the new implementation, the protocol trailer bits are properly
handled, making possible for the repeat key to work.

Also, the code is now capable of handling both NEC and NEC extended
IR devices. With NEC, it produces a 16 bits code, while with NEC
extended, a 24 bits code is returned.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-05-19 12:56:55 -03:00
Mauro Carvalho Chehab
bdf1c98e42 V4L/DVB: saa7134: Add support for both positive and negative edge IRQ
The code that enables IRQ for the Remote Controller on saa7134 is a little
messy: it is outside saa7134-input, it checks if RC is GPIO based, and
it mixes both serial raw decode with parallel reads from a hardware-based
IR decoder.

Also, currently, it doesn't allow to trigger both transition edges at GPIO16
and GPIO18 lines. A rework on the code is needed to provide a better way
to specify what saa7134-input needs, maybe even moving part of the code from
saa7134-core and saa7134-cards into saa7134-input.

Yet, as a large rework is happening at RC core, it is better to wait until
the core changes stablize, in order to rework saa7134 RC internals.While
this don't happen, let's just change the logic a little bit to allow
enabling IRQ to be generated on both edge transitions, in order to better
support pulse/space raw decoders.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-05-19 12:56:52 -03:00
Mauro Carvalho Chehab
3629e1dadf V4L/DVB: saa7134: Fix IRQ2 bit names for the register map
There's an error at the IRQ2 bit map registers. Also, it doesn't
show what bits are needed for positive and for negative edge.

In the case of IR raw decoding, for some protocols, it is important
to detect both positive and negative edges. So, a latter patch
will need to use the other values.

Also, the code that detects problems on IRQ handling is incomplete,
as it disables only one of the IRQ bits for GPIO16 and GPIO18.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-05-19 12:56:52 -03:00
Mauro Carvalho Chehab
02858eedcb V4L/DVB: ir-core: Make use of the new IR keymap modules
Instead of using the ugly keymap sequences, use the new rc-*.ko keymap
files. For now, it is still needed to have one keymap loaded, for the
RC code to work. Later patches will remove this depenency.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-05-19 12:56:50 -03:00
Mauro Carvalho Chehab
b2245ba164 V4L/DVB: ir: prepare IR code for a parameter change at register function
A latter patch will reuse the ir_input_register with a different meaning.
Before it, change all occurrences to a temporary name.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-05-19 12:56:50 -03:00
Mauro Carvalho Chehab
d705d2ab75 V4L/DVB: ir: use IR_KEYTABLE where an IR table is needed
Replaces most of the occurences of IR keytables on V4L drivers by a macro
that evaluates to provide the name of the exported symbol.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-05-19 12:56:45 -03:00
Joe Perches
42397ce42c V4L/DVB: ov511: Fix continuation lines
Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Douglas Schilling Landgraf <dougsland@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-05-19 12:56:43 -03:00
Vladimir Ermakov
e838326312 V4L/DVB: saa7134: fix GPIO HW-404M7
Signed-off-by: Vladimir Ermakov <vooon341@gmail.com>
Reviewed-by: hermann pitton <hermann-pitton@arcor.de>
Signed-off-by: Douglas Schilling Landgraf <dougsland@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-05-19 12:56:43 -03:00
Julia Lawall
e20144770f V4L/DVB: drivers/media/video: avoid NULL dereference
It seems impossible for ov to be NULL at this point.

The semantic match that finds the problem is as follows:
(http://coccinelle.lip6.fr/)

// <smpl>
@r exists@
expression E, E1;
identifier f;
statement S1,S3;
iterator iter;
@@

if ((E == NULL && ...) || ...)
{
  ... when != false ((E == NULL && ...) || ...)
      when != true  ((E != NULL && ...) || ...)
      when != iter(E,...) S1
      when != E = E1
(
  sizeof(E->f)
|
* E->f
)
  ... when any
  return ...;
}
else S3
// </smpl>

Signed-off-by: Julia Lawall <julia@diku.dk>
Signed-off-by: Douglas Schilling Landgraf <dougsland@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-05-19 12:56:42 -03:00
Ricardo Maraschini
d49f7a2405 V4L/DVB: cx88-dvb: fix on switch identation
[dougsland@redhat.com: fixed reject due changes in cx88-dvb.c]
Signed-off-by: Ricardo Maraschini <ricardo.maraschini@gmail.com>
Signed-off-by: Douglas Schilling Landgraf <dougsland@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-05-19 12:56:41 -03:00
Dan Carpenter
b084307c75 V4L/DVB: cx23885: strcpy() => strlcpy()
cap->driver is a 16 char buffer and dev->name is a 32 char buffer.
I don't see an actual problem, but we may as well make the static
checkers happy.

Signed-off-by: Dan Carpenter <error27@gmail.com>
Signed-off-by: Douglas Schilling Landgraf <dougsland@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-05-19 12:56:41 -03:00
Mauro Carvalho Chehab
92f4fc10d7 V4L/DVB: cx88: Only start IR if the input device is opened
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-05-18 00:53:04 -03:00
Mauro Carvalho Chehab
716aab44df V4L/DVB: ir-core: Add callbacks for input/evdev open/close on IR core
Especially when IR needs to do polling, it generates lots of wakeups per
second. This makes no sense, if the input event device is closed.

Adds a callback handler to the IR hardware driver, to allow registering
an open/close ops.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-05-18 00:53:03 -03:00
Mauro Carvalho Chehab
d89b4bd2b4 V4L/DVB: saa7134: clear warning noise
drivers/media/video/saa7134/saa7134-input.c: In function ‘saa7134_raw_decode_irq’:
drivers/media/video/saa7134/saa7134-input.c:957: warning: unused variable ‘oldpulse’
drivers/media/video/saa7134/saa7134-input.c:957: warning: unused variable ‘count’

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-05-18 00:53:01 -03:00
Mauro Carvalho Chehab
93c312ff21 V4L/DVB: ir-core: prepare to add more operations for ir decoders
Some decoders and a lirc_dev interface may need some other operations to work.
For example: IR device register/unregister and ir_keydown events may need to
be tracked.

As some operations can occur in interrupt time, and a lock is needed to prevent
un-registering a decode while decoding a key, the lock needed to be convert
into a spin lock.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-05-18 00:53:00 -03:00
Mauro Carvalho Chehab
9f1547829a V4L/DVB: saa7134: don't wait too much to generate an IR event on raw_decode
At raw_decode mode, the key is processed after the end of a timer. The
previous code resets the timer every time something is received at the IR
port. While this works fine with IR's that don't implement repeat, like
Avermedia RM-JX IR, it keeps waiting until keydown, on IR's that implement
NEC repeat command, like the Terratec yellow.

The solution is to change the behaviour to do the timeout after the first
received data.

The timeout is currently set to 15 ms, as it works fine with NEC protcocol.
It may need some adjustments to support other protocols and to better handle
spurious detections that may happen with some IR sensors.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-05-18 00:52:58 -03:00
Mauro Carvalho Chehab
ada39630c7 V4L/DVB: ir-core/saa7134: Move ir keyup/keydown code to the ir-core
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-05-18 00:52:57 -03:00
Mauro Carvalho Chehab
a3572c34da V4L/DVB: ir-core: Add logic to decode IR protocols at the IR core
Adds a method to pass IR raw pulse/code events into ir-core. This is
needed in order to support LIRC. It also helps to move common code
from the drivers into the core.

In order to allow testing, it implements a simple NEC protocol decoder
at ir-nec-decoder.c file. The logic is about the same used at saa7134
driver that handles Avermedia M135A and Encore FM53 boards.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-05-18 00:52:56 -03:00
Mauro Carvalho Chehab
0210894956 V4L/DVB: saa7134: add code to allow changing IR protocol
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-05-18 00:52:55 -03:00
Mauro Carvalho Chehab
d152b8b624 V4L/DVB: saa7134: use a full scancode table for M135A
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-05-18 00:52:54 -03:00
Laurent Pinchart
ed3de6015a V4L/DVB: uvcvideo: Use POLLOUT and POLLWRNORM for output devices
The V4L2 specification requires drivers to use the write events in the
file operations poll handler for output devices. The uvcvideo driver
erroneously used read events for all devices. Fix this.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-05-18 00:52:52 -03:00
Laurent Pinchart
35a00c41ea V4L/DVB: uvcvideo: Support iris absolute and relative controls
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-05-18 00:52:52 -03:00
Laurent Pinchart
48213fe3f9 V4L/DVB: v4l: Add V4L2_CID_IRIS_ABSOLUTE and V4L2_CID_IRIS_RELATIVE controls
Those control, as their names imply, control the camera aperture
settings.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-05-18 00:52:51 -03:00
Laurent Pinchart
f129b03ba2 V4L/DVB: uvcvideo: Add support for Packard Bell EasyNote MX52 integrated webcam
The camera requires the STREAM_NO_FID quirk. Add a corresponding entry
in the device IDs list.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-05-18 00:52:50 -03:00
Laurent Pinchart
1e4d05bc95 V4L/DVB: uvcvideo: Add support for unbranded Arkmicro 18ec:3290 webcams
The camera requires the PROBE_DEF quirk. Add a corresponding entry in
the device IDs list.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-05-18 00:52:49 -03:00
Jean-François Moine
dbad345e6a V4L/DVB: sn9c102 / zc0301: Handle webcams when no gspca subdriver conflict
Some webcams handled by both sn9c102 or zc0301 and some gspca subdrivers
(sonixb, sonixj and zc3xx) were not handled when gspca was generated but
not the associated subdrivers.

Signed-off-by: Jean-François Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-05-18 00:52:49 -03:00
Costantino Leandro
be1da9ee83 V4L/DVB: gspca - t613: Add color controls
- Rename controls to fit real behaviour
- Add global gain , r/b balance.

Signed-off-by: Costantino Leandro <lcostantino@gmail.com>
Signed-off-by: Jean-François Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-05-18 00:52:48 -03:00
Vaibhav Hiremath
63b59cecb2 V4L/DVB: V4L: tvp514x: Add Powerup sequence during s_input to lock the signal properly
For the sequence streamon -> streamoff and again s_input, it fails
to lock the signal, since streamoff puts TVP514x into power off state
which leads to failure in sub-sequent s_input.

So add powerup sequence in s_routing (if disabled), since it is
important to lock the signal at this stage.

Signed-off-by: Vaibhav Hiremath <hvaibhav@ti.com>
Signed-off-by: Sudhakar Rajashekhara <sudhakar.raj@ti.com>
Signed-off-by: Muralidharan Karicheri <mkaricheri@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-05-18 00:52:47 -03:00
Vaibhav Hiremath
844cc0dcb5 V4L/DVB: V4L: vpfe_capture: Add support for USERPTR mode of operation
Signed-off-by: Vaibhav Hiremath <hvaibhav@ti.com>
Signed-off-by: Muralidharan Karicheri <mkaricheri@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-05-18 00:52:46 -03:00
Vaibhav Hiremath
e333bab73e V4L/DVB: V4L: dm644x_ccdc: Add Suspend/Resume Support
Signed-off-by: Vaibhav Hiremath <hvaibhav@ti.com>
Signed-off-by: Muralidharan Karicheri <mkaricheri@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-05-18 00:52:45 -03:00
Vaibhav Hiremath
aa2dc90348 V4L/DVB: V4L: vpfe_capture: Return 0 from suspend/resume
Now Suspend/Resume functionality is being handled by respective CCDC
code, so return true (0) from bridge suspend/resume function.

Signed-off-by: Vaibhav Hiremath <hvaibhav@ti.com>
Signed-off-by: Muralidharan Karicheri <mkaricheri@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-05-18 00:52:45 -03:00
Vaibhav Hiremath
21aa300e16 V4L/DVB: V4L: dm644x_ccdc: Add 10bit BT support
Signed-off-by: Vaibhav Hiremath <hvaibhav@ti.com>
Signed-off-by: Muralidharan Karicheri <mkaricheri@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-05-18 00:52:44 -03:00
Vaibhav Hiremath
085b54a24f V4L/DVB: V4L: vpfe_capture: Add call back function for interrupt clear for vpfe_cfg
For the devices like AM3517, it is expected that driver clears the
interrupt in ISR. Since this is device spcific, callback function
added to the platform_data.

Signed-off-by: Vaibhav Hiremath <hvaibhav@ti.com>
Signed-off-by: Muralidharan Karicheri <mkaricheri@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-05-18 00:52:43 -03:00
Vaibhav Hiremath
fcc63274e6 V4L/DVB: V4L: dm644x_ccdc: Debug register read prints removed
Signed-off-by: Vaibhav Hiremath <hvaibhav@ti.com>
Signed-off-by: Muralidharan Karicheri <mkaricheri@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-05-18 00:52:42 -03:00
Hans Verkuil
b8e56b6f6e V4L/DVB: arv: convert to V4L2
Converted this old V4L1 driver to V4L2.
I would like to thank Takeo Takahashi who very kindly tested this
driver for me. Much appreciated!

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Tested-by: Takeo Takahashi <takahashi.takeo@renesas.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-05-18 00:52:42 -03:00
Hans Verkuil
debff5a795 V4L/DVB: zoran: remove V4L1 videodev.h include
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-05-18 00:52:41 -03:00
Hans Verkuil
51270617a5 V4L/DVB: meye: remove last V4L1 remnants from the code and add v4l2_device
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-05-18 00:52:36 -03:00
Hans Verkuil
c1f2b0f29e V4L/DVB: w9966: remove camelCase
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-05-18 00:51:31 -03:00
Hans Verkuil
271922c0ce V4L/DVB: w9966: reorganize the order of functions
Get rid of completely unnecessary function prototypes.

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-05-18 00:51:30 -03:00
Hans Verkuil
467422678e V4L/DVB: pms: remove unnecessary exclusive open/close
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-05-18 00:51:30 -03:00
Hans Verkuil
4bfdd58604 V4L/DVB: w9966: coding style cleanup
Clean up the coding style before we convert this driver to V4L2.

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-05-18 00:51:28 -03:00
Hans Verkuil
88f4423454 V4L/DVB: arv: coding style cleanup
Clean up the coding style before we convert this driver to V4L2.

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-05-18 00:51:27 -03:00
Hans Verkuil
1d61aac099 V4L/DVB: bw-qcam: coding style cleanup
Clean up the coding style before we convert this driver to V4L2.

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-05-18 00:51:26 -03:00
Hans Verkuil
51224aa436 V4L/DVB: c-qcam: coding style cleanup
Clean up the coding style before we convert this driver to V4L2.

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-05-18 00:51:26 -03:00
Jonathan Corbet
380de498e2 V4L/DVB: ov7670: silence some compiler warnings
Get rid of some "unused variable" warnings.  These were the result of
sloppiness and should not have happened; I'll go stand in the corner now.

Reported-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-05-18 00:51:25 -03:00
Jonathan Corbet
a8e68c37c8 V4L/DVB: ov7670: Always rewrite clkrc when setting format
That makes frame rate configuration persistent.

Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-05-18 00:51:24 -03:00
Jonathan Corbet
467142093d V4L/DVB: ov7670: Restore SMBUS I/O for the XO 1.0
The Cafe controller doesn't do non-SMBUS I/O, so we have to use it there.

Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-05-18 00:51:23 -03:00
Jonathan Corbet
364e93372f V4L/DVB: ov7670: wire up controls for exposure and autoexposure
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-05-18 00:51:22 -03:00
Jonathan Corbet
8189867124 V4L/DVB: ov7670: Wire up V4L2_CID_GAIN and V4L2_CID_AUTOGAIN
Allow applications to play with the gain settings.

Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-05-18 00:51:21 -03:00
Jonathan Corbet
2bf7de4888 V4L/DVB: ov7670: Don't use SMBUS I/O
Contrary to my earlier belief, the ov7670 is not actually an SMBUS device,
though it will pretend to be one if it's in a good mood.  Unfortunately,
it's rarely in a good mood, especially on the XO 1.5.  So use low-level i2c
I/O instead.

Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-05-18 00:51:21 -03:00
Jonathan Corbet
d8d201552f V4L/DVB: ov7670: Avoid reading clkrc
Reading the clkrc register creates flaky behavior in some situations, and
we can easily track its state separately.

Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-05-18 00:51:20 -03:00
Jonathan Corbet
97693f9178 V4L/DVB: ov7670: Use CCIR601 in all video modes
Also provide for a longer delay after reset - the XO 1.5 needs it.

Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-05-18 00:51:19 -03:00
Dan Carpenter
4a3eaee4d0 V4L/DVB: em28xx: "Empia Em28xx Audio" too long
card->driver is 15 characters and a NULL.  The original code
goes past the end of the array.

Signed-off-by: Dan Carpenter <error27@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-05-18 00:51:18 -03:00
Dan Carpenter
935539c97e V4L/DVB: cx231xx: card->driver "Conexant cx231xx Audio" too long
card->driver is 15 characters and a NULL, the original code could
cause a buffer overflow.

Signed-off-by: Dan Carpenter <error27@gmail.com>
Acked-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-05-18 00:51:17 -03:00
Dan Carpenter
d72d7c1df9 V4L/DVB: ivtv: sizeof() => ARRAY_SIZE()
This fixes a smatch warning:
drivers/media/video/ivtv/ivtv-vbi.c +138 ivtv_write_vbi(43)
	error: buffer overflow 'vi->cc_payload' 256 <= 1023

Signed-off-by: Dan Carpenter <error27@gmail.com>
Reviewed-by: Andy Walls <awalls@radix.net>
Signed-off-by: Andy Walls <awalls@radix.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-05-18 00:50:26 -03:00
Pawel Osciak
7a02264ca9 V4L/DVB: v4l: videobuf: code cleanup
Make videobuf pass checkpatch; minor code cleanups.

Signed-off-by: Pawel Osciak <p.osciak@samsung.com>
Reviewed-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-05-18 00:50:25 -03:00
Dmitri Belimov
85e092190b V4L/DVB: Add SPI support to V4L2
Add support SPI bus to v4l2. Useful for control some device with SPI bus like
hardware MPEG2 encoders and etc.

Signed-off-by: Beholder Intl. Ltd. Dmitry Belimov <d.belimov@gmail.com>
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-05-18 00:50:24 -03:00
Devin Heitmueller
443fed9fa4 V4L/DVB: em28xx: add em286x/tvp5150 reference design
Add support for design which has an em2863/tvp5150 and uses the standard
empia USB ID.  In Sander's case, it was branded as an "Eminent model EM3705"

Thanks to Sander Van Ginkel for testing and help debugging the support.

[mchehab@redhat.com: move it to a vague card number slot (card=29)]
Signed-off-by: Devin Heitmueller <dheitmueller@kernellabs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-05-18 00:50:24 -03:00
Mauro Carvalho Chehab
d1875d6559 V4L/DVB: gspca: fixes compilation when input is not selected
It seems that I merged a wrong version of the patch or that
changeset 4d770eeb926d0bc44c0bd68d051d3d2a5568ef41 got mangled somehow:

It were missed the #else to avoid compilation troubles.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-05-18 00:50:21 -03:00
Devin Heitmueller
f1a4f9eab2 V4L/DVB: v4l2-common: add ability to use v4l2_ctrl_query_fill for chroma gain
Add the ability to use the v4l2_ctrl_query_fill() function for the newly
introduced chroma gain control.

Also, make use of the centralized function by the one caller.

This work was sponsored by EyeMagnet Limited.

Signed-off-by: Devin Heitmueller <dheitmueller@kernellabs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-05-18 00:50:17 -03:00
Devin Heitmueller
87a6fe4a53 V4L/DVB: saa115: add support for chroma AGC and chroma gain
Add support for chroma agc and gain to the saa7115 driver.  This allows for
users to do manual adjustment for abnormal signal conditions.

This work was sponsored by EyeMagnet Limited.

Signed-off-by: Devin Heitmueller <dheitmueller@kernellabs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-05-18 00:50:16 -03:00
Devin Heitmueller
fea551fae9 V4L/DVB: saa7115: enable anti-alias filter
This patch enables the anti-alias filter, which was originally enabled for
the saa7113, but the saa7115_init_misc was trampling the value.  Without this
patch, there would be visible vertical bands in the chroma.

Thanks to Andy Walls for helping test this change against other ivtv products.

This work was sponsored by EyeMagnet Limited.

Signed-off-by: Devin Heitmueller <dheitmueller@kernellabs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-05-18 00:50:15 -03:00
Devin Heitmueller
5fee334039 V4L/DVB: em28xx: rework buffer pointer tracking for offset to start of video
Rework the logic for tracking the amount of data copied to the VBI buffer, to
address problem found where the video lines are several bytes shifted to the
right (and the leading pixels in the first line rendered are garbage).  This
would occur because the copy function would advance the pointer when detecting
headers, but the caller would not adjust the length actually copied.

This work was sponsored by EyeMagnet Limited.

Signed-off-by: Devin Heitmueller <dheitmueller@kernellabs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-05-18 00:50:14 -03:00
Devin Heitmueller
1744feab9a V4L/DVB: em28xx: reduce cropping for VBI area
It turns up we can reduce the starting line for the active area, which results
in more data being captured when under PAL (while the full VBI capture window
still stays properly encoded).

This work was sponsored by EyeMagnet Limited.

Signed-off-by: Devin Heitmueller <dheitmueller@kernellabs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-05-18 00:50:13 -03:00
Devin Heitmueller
33c02facb5 V4L/DVB: em28xx: adjust number of packets per URB
Increase the packets per URB count from 40 to 64.  I suspect that whoever was
looking at the usbsnoop captures saw "0x40" packets and mistook it for "40".

As a result of this change, I can see a 25% reduction in the number of
interrupts generated via powertop.

This work was sponsored by EyeMagnet Limited.

Signed-off-by: Devin Heitmueller <dheitmueller@kernellabs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-05-18 00:50:13 -03:00
Hans de Goede
f0dbf82bf1 V4L/DVB: sn9c102: Make hv7131d sensor code also recognize the HV7131E
The hv7131d sensor code also works for the hv7131e, this patch changes
it to also recognize the hv7131e sensor id.

Tested-by: Frank Danapfel <fdanapfe@redhat.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-05-18 00:50:12 -03:00
Hans de Goede
436c2c533a V4L/DVB: gspca_spca561: Add support for camera button
gspca_spca561: Add support for camera button

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-05-18 00:50:11 -03:00
Hans de Goede
6b33e5e7fe V4L/DVB: gspca_spca561: Fix LED on rev12a cameras
Fix LED control on rev12a cameras and remove the unneeded
sd_stop0 callback function.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-05-18 00:50:10 -03:00
Brian Johnson
cc2a833590 V4L/DVB: gspca - sn9c20x: Fix bug with OV9655 code
Fixed buggy init sequence for the OV9655 sensor.
Tested with a 0c45:6288 and 0c45:62b3.

Signed-off-by: Brian Johnson <brijohn@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-05-18 00:50:09 -03:00
Brian Johnson
e99ac54da6 V4L/DVB: gspca - sn9c20x: Add support for cameras using the MT9M112 sensor
Adds the following models:
	- 0c45:624c
	- 0c45:628c
	- 0458:704a
	- 0458:704c

Signed-off-by: Brian Johnson <brijohn@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-05-18 00:50:09 -03:00
Brian Johnson
7ddaac7fcb V4L/DVB: gspca - sn9c20x: Add upside down detection
Add support for detecting webcams that are mounted
upside down in laptops. Currently the only two known
are two MSI modesl using the 0c45:624f.

Signed-off-by: Brian Johnson <brijohn@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-05-18 00:50:08 -03:00
Brian Johnson
0c045eb752 V4L/DVB: gspca - sn9c20x: Add support for camera LEDs
Signed-off-by: Brian Johnson <brijohn@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-05-18 00:50:07 -03:00
Mauro Carvalho Chehab
a39db27a08 V4L/DVB: gspca - sn9c20x: use gspca's input device handling
Drop custom code for handling the input button in
favor of using gspca's input hanlding mechinism.

Signed-off-by: Brian Johnson <brijohn@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-05-18 00:49:44 -03:00
Jean-François Moine
ad98c0f674 V4L/DVB: gspca - sonixj: Add webcam 0c45:6142 with sensors gc0307 and po2030n
Signed-off-by: Jean-François Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-05-18 00:47:23 -03:00
Jean-François Moine
9c33afc610 V4L/DVB: gspca - sonixj: More static const and better array initialization
Signed-off-by: Jean-François Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-05-18 00:47:22 -03:00
Hans Verkuil
771075bb46 V4L/DVB: videobuf-core: fix spelling mistake in debug message
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-05-18 00:47:20 -03:00
Vladimir Ermakov
8f27fd9605 V4L/DVB: saa7134: add capture boards Hawell HW-404M7 and HW-808M7
Adds new capture boards Hawell HW-404M7 and HW-808M7. Those cards have 4
or 8 SAA7130 chips and for the work it only needs initialize registers.
The value of those registers were dumped under Windows using flytest.
But board haven't EEPROM.

For the first chip:

 SAA7130 (0x7130, SubVenID:1131, SubDevID:0000, Rev: 01)

 I2C slave devices found:
 No devices

 GPIO pins:
 Mode : 0x00389C00
 Value: 0x00016C00

 Video input: 3
 Audio input: Analog Line1

For other chips:

 SAA7130 (0x7130, SubVenID:1131, SubDevID:0000, Rev: 01)

 I2C slave devices found:
 No devices

 GPIO pins:
 Mode : 0x00389200
 Value: 0x00010000

 Video input: 3
 Audio input: Analog Line1

Signed-off-by: Vladimir Ermakov <vooon341@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-05-18 00:47:19 -03:00
Frank Schaefer
a3415c15e1 V4L/DVB: v4l2_ctrl_get_name(): add missing control names, and make title for V4L2_CID_BG_COLOR consistent
v4l2_ctrl_get_name(): add missing control names, and make title for
V4L2_CID_BG_COLOR consistent

V4L2_CID_AUTOBRIGHTNESS   was introduced with kernel 2.6.31
V4L2_CID_BAND_STOP_FILTER was introduced with kernel 2.6.32

Signed-off-by: Frank Schaefer <fschaefer.oss@googlemail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-05-18 00:47:19 -03:00
Huang Weiyi
4d36ec7fbf V4L/DVB: tlg2300: remove unused #include <linux/version.h>
Remove unused #include <linux/version.h>('s) in
  drivers/media/video/tlg2300/pd-main.c

Signed-off-by: Huang Weiyi <weiyi.huang@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-05-18 00:47:17 -03:00
Julia Lawall
728385c4d3 V4L/DVB: drivers/media/video: move dereference after NULL test
In quickcam_messenger.c, if the NULL test on uvd is needed, then the
dereference should be after the NULL test.

In vpif_display.c, std_info is initialized to the address of a structure
field.  This seems unlikely to be NULL.  Test std_info->stdid instead.

In saa7134-alsa.c, the function is only called from one place, where the
chip argument has already been dereferenced.  On the other hand, if it
should be kept, then card should be initialized after it.

A simplified version of the semantic match that detects this problem is as
follows (http://coccinelle.lip6.fr/):

// <smpl>
@match exists@
expression x, E;
identifier fld;
@@

* x->fld
  ... when != \(x = E\|&x\)
* x == NULL
// </smpl>

Signed-off-by: Julia Lawall <julia@diku.dk>
Acked-by: Muralidharan Karicheri <m-karicheri2@ti.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-05-18 00:47:16 -03:00
Andy Walls
4e1af31aaa V4L/DVB: ivtv, ivtvfb: Use a define for the output line and field register address
Get rid of the magic number 0x28c0 used in several places in the ivtv and
ivtvfb driver and define the register address to a meaningful name.

Signed-off-by: Andy Walls <awalls@radix.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-05-18 00:47:15 -03:00
Ian Armstrong
2443baeaa0 V4L/DVB: ivtv: Avoid hard system lock on decoder output mode change
Changing the decoder video standard just prior to, or during, the output of
the lower field may result in a hard system lock. To avoid this, try to ensure
the firmware call occurs only during the first 100 lines of the top field.

(Minor comment addition and a line break added Andy Walls <awalls@radix.net>.)

Signed-off-by: Ian Armstrong <ian@iarmst.demon.co.uk>
Signed-off-by: Andy Walls <awalls@radix.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-05-18 00:47:15 -03:00
Andy Walls
f978ac90b2 V4L/DVB: cx18: Add a component video input to the PVR2100 and DVR3200H card entries
This is a guess at the proper configuration for component video on the Leadtek
PVR2100 and DVR3100 H.

Signed-off-by: Andy Walls <awalls@radix.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-05-18 00:47:14 -03:00
Andy Walls
d9a325a865 V4L/DVB: cx18: Add support for component video inputs
Signed-off-by: Andy Walls <awalls@radix.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-05-18 00:47:13 -03:00
Jean Delvare
c6ebc6c4ac V4L/DVB: saa7134: Fix IR support of some ASUS TV-FM 7135 variants
Some variants of the ASUS TV-FM 7135 are handled as the ASUSTeK P7131
Analog (card=146). However, by the time we find out, some
card-specific initialization is missed. In particular, the fact that
the IR is GPIO-based. Set it when we change the card type, and run
saa7134_input_init1().

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-05-18 00:47:12 -03:00
Mauro Carvalho Chehab
727e625cc2 V4L/DVB: ir-core: export driver name used by IR via uevent
Now, both driver and keytable names are exported to userspace. This
will help userspace to decide when a table need to be replaced
by another one.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-05-18 00:47:05 -03:00
Mauro Carvalho Chehab
000f64efc7 V4L/DVB: Fix bad whitespacing
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-05-18 00:47:01 -03:00
Max Thrun
6721b51ece V4L/DVB: gspca - ov534: Update copyright info
Signed-off-by: Max Thrun <bear24rw@gmail.com>
Signed-off-by: Antonio Ospite <ospite@studenti.unina.it>
Signed-off-by: Jean-François Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-05-18 00:47:01 -03:00
Mosalam Ebrahimi
4b7875407b V4L/DVB: gspca - ov534: Add Powerline Frequency control
Note that setting this options to 50Hz can reduce the framerate, so it is
still disabled (60Hz) by default.

Signed-off-by: Mosalam Ebrahimi <m.ebrahimi@ieee.org>
Signed-off-by: Antonio Ospite <ospite@studenti.unina.it>
Signed-off-by: Jean-François Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-05-18 00:47:00 -03:00
Antonio Ospite
7f9e9e8dc2 V4L/DVB: gspca - ov534: Cosmetics: fix indentation and hex digits
* Indent with tabs, not with spaces, nor with mixed style.
  * Less indentation for controls index comments.
  * Use lowercase hex digits.

Signed-off-by: Antonio Ospite <ospite@studenti.unina.it>
Signed-off-by: Jean-François Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-05-18 00:46:59 -03:00
Max Thrun
eb171073b6 V4L/DVB: gspca - ov534: Fix unsetting hflip and vflip bits
Also set default values unconditionally, for readability.

Signed-off-by: Max Thrun <bear24rw@gmail.com>
Signed-off-by: Antonio Ospite <ospite@studenti.unina.it>
Signed-off-by: Jean-François Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-05-18 00:46:58 -03:00
Max Thrun
3149cfbfac V4L/DVB: gspca - ov534: Fixes for sharpness control
* Adjust comments for sharpness control
  * Set default value unconditionally, for readability

Signed-off-by: Max Thrun <bear24rw@gmail.com>
Signed-off-by: Antonio Ospite <ospite@studenti.unina.it>
Signed-off-by: Jean-François Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-05-18 00:46:58 -03:00
Max Thrun
8fef9d9622 V4L/DVB: gspca - ov534: Fix Auto White Balance control
Set only the needed bits for AWB, and enable it by default.

Signed-off-by: Max Thrun <bear24rw@gmail.com>
Signed-off-by: Antonio Ospite <ospite@studenti.unina.it>
Signed-off-by: Jean-François Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-05-18 00:46:57 -03:00
Antonio Ospite
18cf8c91ad V4L/DVB: gspca - ov534: Fix and document setting manual exposure
Document that even if the state is a u8 value, both MSB and LSB are set
as sd->exposure represents half of the value we are going to set into
registers.

Skip setting exposure when AEC is enabled.

Signed-off-by: Antonio Ospite <ospite@studenti.unina.it>
Signed-off-by: Jean-François Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-05-18 00:46:56 -03:00
Max Thrun
f293882252 V4L/DVB: gspca - ov534: Add Auto Exposure
This also makes manual exposure actually work: it never worked before
because AEC was always enabled.

Signed-off-by: Max Thrun <bear24rw@gmail.com>
Signed-off-by: Antonio Ospite <ospite@studenti.unina.it>
Signed-off-by: Jean-François Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-05-18 00:46:55 -03:00
Max Thrun
8b7fbda484 V4L/DVB: gspca - ov534: Fix autogain control, enable it by default
* Use 'agc' instead of 'autogain' in the code so to align the naming
    as in AEC/AWB.
  * Tweak brightness and contrast default values.
  * Fix setting/resetting registers values for AGC.
  * Set actual gain back when disabling AGC.
  * Skip setting GAIN register when AGC is enabled.
  * Enable AGC by default.

Note that as Auto Gain Control is now enabled by default, if you are
using the driver for visual computing applications you might need to
disable it explicitly in your software.

Signed-off-by: Max Thrun <bear24rw@gmail.com>
Signed-off-by: Antonio Ospite <ospite@studenti.unina.it>
Signed-off-by: Jean-François Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-05-18 00:46:54 -03:00
Antonio Ospite
0c41acf158 V4L/DVB: gspca - ov534: Remove hue control
Hue control doesn't work and the sensor datasheet is not clear about how
to set hue properly.

Signed-off-by: Antonio Ospite <ospite@studenti.unina.it>
Signed-off-by: Jean-François Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-05-18 00:46:54 -03:00
Max Thrun
c3f52f630d V4L/DVB: gspca- ov534: Remove ambiguous controls
Remove Blue/Red Channel Target Value, they are meant for Black Level
Calibration but it is not completely clear how to use them.

Signed-off-by: Max Thrun <bear24rw@gmail.com>
Signed-off-by: Antonio Ospite <ospite@studenti.unina.it>
Signed-off-by: Jean-François Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-05-18 00:46:53 -03:00
Ian Armstrong
947f04cba2 V4L/DVB: cx2341x: Remove temporal filter control restriction
Since the change that stops the CX23415/6 firmware-intiiated secondary stream
appears to fix the temporal filter, it's now fully re-enabled for all capture
resolutions.

Signed-off-by: Ian Armstrong <ian@iarmst.demon.co.uk>
Signed-off-by: Andy Walls <awalls@radix.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-05-18 00:46:44 -03:00
Ian Armstrong
9a766d55b7 V4L/DVB: ivtv: Really stop capture on device close
When a capture is started, the firmware also appears to start a secondary
stream. Unless this secondary stream is also stopped, the encoder will remain
active and not reinitialise for the next capture. Unfortunately, setting up
the video source can glitch the encoder and result in undesirable effects that
this initialisation will clear.

Signed-off-by: Ian Armstrong <ian@iarmst.demon.co.uk>
Signed-off-by: Andy Walls <awalls@radix.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-05-18 00:46:43 -03:00
Andy Walls
283328c29d V4L/DVB: ivtv: Combine capture start delays into a single delay
Combine the two 150 ms delays into a single 300 ms delay.  Ian Armstrong has
noted that the delay between CX2341X_ENC_INITIALIZE_INPUT and
CX2341X_ENC_START_CAPTURE can cause problems if the temporal filter is allowed
to be enabled.

Signed-off-by: Andy Walls <awalls@radix.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-05-18 00:46:43 -03:00
Abylay Ospan
2a8f960854 V4L/DVB: configurable IRQ from CAM
IRQ from CAM disabled by default. In some environment enabled IRQ can cause of
machine freeze.

Signed-off-by: Abylay Ospan <aospan@netup.ru>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-05-18 00:46:42 -03:00
Dean Anderson
e6b44bc521 V4L/DVB: s2255drv: support for frame skipping
adds hardware frame skipping using VIDIOC_S_PARM ioctl.
adds support for VIDIOC_ENUM_FRAMEINTERVALS.

Signed-off-by: Dean Anderson <dean@sensoray.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-05-18 00:46:39 -03:00
Márton Németh
e7c3ee6302 V4L/DVB: gspca cpia1: make local functions static
Make the local functions static. Note that the function command_setlights() is
currently not called from anywhere.

This will remove the following sparse warnings (see "make C=1"):
 * symbol 'command_setformat' was not declared. Should it be static?
 * symbol 'command_setcolourparams' was not declared. Should it be static?
 * symbol 'command_setapcor' was not declared. Should it be static?
 * symbol 'command_setvloffset' was not declared. Should it be static?
 * symbol 'command_setexposure' was not declared. Should it be static?
 * symbol 'command_setcolourbalance' was not declared. Should it be static?
 * symbol 'command_setcompressiontarget' was not declared. Should it be static?
 * symbol 'command_setyuvtresh' was not declared. Should it be static?
 * symbol 'command_setcompressionparams' was not declared. Should it be static?
 * symbol 'command_setcompression' was not declared. Should it be static?
 * symbol 'command_setsensorfps' was not declared. Should it be static?
 * symbol 'command_setflickerctrl' was not declared. Should it be static?
 * symbol 'command_setecptiming' was not declared. Should it be static?
 * symbol 'command_pause' was not declared. Should it be static?
 * symbol 'command_resume' was not declared. Should it be static?
 * symbol 'command_setlights' was not declared. Should it be static?

Signed-off-by: Márton Németh <nm127@freemail.hu>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-05-18 00:46:38 -03:00
Dmitri Belimov
2ffbb64c67 V4L/DVB: fix broken I2C IR for Beholder
Fix broken I2C IR for TV cards of Beholder.

Signed-off-by: Beholder Intl. Ltd. Dmitry Belimov <d.belimov@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-05-18 00:46:37 -03:00
Dean Anderson
5a34d9dfaf V4L/DVB: s2255drv: Add support for 2257 device
2257 is 2255 with 2 svideo inputs

Signed-off-by: Dean Anderson <dean@sensoray.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-05-18 00:46:36 -03:00
Dean Anderson
2e70db9a45 V4L/DVB: s2255drv: cleanup of V4L2 controls
Signed-off-by: Dean Anderson <dean@sensoray.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-05-18 00:46:36 -03:00
Dean Anderson
3fa0060526 V4L/DVB: s2255drv: fixes for big endian arch
s2255drv fixes for big endian architecture

Signed-off-by: Dean Anderson <dean@sensoray.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-05-18 00:46:35 -03:00
Antonio Larrosa
811fab623f V4L/DVB: em28xx: Support for Kworld VS-DVB-T 323UR
This patch adapts the changes submitted by Dainius Ridzevicius to the
linux-media mailing list on 8/14/09, to the current sources in order
to make the Kworld VS-DVB-T 323UR usb device work.

I also removed the "not validated" flag since I own the device and validated
that it works fine after the patch is applied.

Thanks to Devin Heitmueller for his guidance with the code.

Signed-off-by: Antonio Larrosa <larrosa@kde.org>
Acked-by: Devin Heitmueller <dheitmueller@kernellabs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-05-18 00:46:34 -03:00
Dean Anderson
4de39f5d6f V4L/DVB: s2255drv: adding video input status capability
Video status capability for inputs on Sensoray 2255 driver.

Signed-off-by: Dean Anderson <dean@sensoray.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-05-18 00:46:33 -03:00
Jean-François Moine
a4fa8e9e85 V4L/DVB: gspca - cpia1 / sn9c2028: Make control descriptors constant
Signed-off-by: Jean-François Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-05-18 00:46:31 -03:00
Paulo Assis
2f51d00ffa V4L/DVB: gspca - main: Use ktime instead of jiffies for buffer timestamping
Signed-off-by: Jean-François Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-05-18 00:46:30 -03:00
German Galkin
e10f73194d V4L/DVB: gspca - sn9c20x: Fix exposure control for HV7131R sensor
Make the range of exposure values (0-0x1770) distribute evenly through
HV7131R's exposure control bytes.

Signed-off-by: German Galkin <galkinga@gmail.com>
Signed-off-by: Jean-François Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-05-18 00:46:29 -03:00
Jean-François Moine
24f222e77a V4L/DVB: gspca - t613: Check the result of kmalloc
Signed-off-by: Jean-François Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-05-18 00:46:28 -03:00
Erik Andrén
52897d86b1 V4L/DVB: gspca - pac207: Let all pac207 ctrls have a coherent naming
Signed-off-by: Erik Andrén <erik.andren@gmail.com>
Signed-off-by: Jean-François Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-05-18 00:46:28 -03:00
Márton Németh
278a58cf2a V4L/DVB: tlg2300: make local variables and functions static
Make the local variables and functions static. Some of them are not exported by their
symbol name but used trough other means. For example a pointer of the operation
structure is passed through a function call.

This will remove the following sparse warnings (see "make C=1"):
 * pd-video.c:20:5: warning: symbol 'usb_transfer_mode' was not declared. Should it be static?
 * pd-video.c:621:5: warning: symbol 'fire_all_urb' was not declared. Should it be static?
 * pd-video.c:881:5: warning: symbol 'vidioc_s_std' was not declared. Should it be static?
 * pd-video.c:1024:5: warning: symbol 'vidioc_g_audio' was not declared. Should it be static?
 * pd-video.c:1033:5: warning: symbol 'vidioc_s_audio' was not declared. Should it be static?
 * pd-video.c:1193:5: warning: symbol 'usb_transfer_stop' was not declared. Should it be static?
 * pd-video.c:1522:14: warning: symbol 'pd_video_poll' was not declared. Should it be static?
 * pd-video.c:1528:9: warning: symbol 'pd_video_read' was not declared. Should it be static?
 * pd-radio.c:164:5: warning: symbol 'tlg_fm_vidioc_g_tuner' was not declared. Should it be static?
 * pd-radio.c:206:5: warning: symbol 'fm_get_freq' was not declared. Should it be static?
 * pd-radio.c:249:5: warning: symbol 'fm_set_freq' was not declared. Should it be static?
 * pd-radio.c:261:5: warning: symbol 'tlg_fm_vidioc_g_ctrl' was not declared. Should it be static?
 * pd-radio.c:267:5: warning: symbol 'tlg_fm_vidioc_g_exts_ctrl' was not declared. Should it be static?
 * pd-radio.c:288:5: warning: symbol 'tlg_fm_vidioc_s_exts_ctrl' was not declared. Should it be static?
 * pd-radio.c:315:5: warning: symbol 'tlg_fm_vidioc_s_ctrl' was not declared. Should it be static?
 * pd-radio.c:321:5: warning: symbol 'tlg_fm_vidioc_queryctrl' was not declared. Should it be static?
 * pd-radio.c:340:5: warning: symbol 'tlg_fm_vidioc_querymenu' was not declared. Should it be static?
 * pd-main.c:58:12: warning: symbol 'firmware_name' was not declared. Should it be static?
 * pd-main.c:59:19: warning: symbol 'poseidon_driver' was not declared. Should it be static?

Signed-off-by: Márton Németh <nm127@freemail.hu>
Acked-by: Huang Shijie <shijie8@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-05-18 00:46:25 -03:00
Márton Németh
6c9eaa82da V4L/DVB: tlg2300: cleanups when power management is not configured
When power management is not configured (CONFIG_PM) then some code is no longer
necessary.

This patch will remove the following compiler warnings:
 * pd-dvb.c: In function 'poseidon_fe_release':
 * pd-dvb.c:101: warning: unused variable 'pd'
 * pd-video.c:14: warning: 'pm_video_suspend' declared 'static' but never defined
 * pd-video.c:15: warning: 'pm_video_resume' declared 'static' but never defined

Signed-off-by: Márton Németh <nm127@freemail.hu>
Acked-by: Huang Shijie <shijie8@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-05-18 00:46:24 -03:00
Marton Balint
d044189dfe V4L/DVB: cx88: increase BUFFER_TIMEOUT to 2 seconds
When temporarily there is no video signal, sometimes it takes more than 0.5
secs for the cx88 chip to generate a single frame. If a dma timeout occurs
during recording, it confuses the recording application (at least mencoder)
and the recording stops.

Since there is already an #if 0 for 2 seconds buffer timeout in the code
at the -hg development tree, re-enabling that seemed the most simple
solution.

Signed-off-by: Marton Balint <cus@fazekas.hu>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-05-18 00:46:23 -03:00
Valentin Longchamp
535653b1c2 V4L/DVB: mt9t031: use runtime pm support to restore ADDRESS_MODE registers
If the platform hooks are provided, soc_camera powers off the device
on close and powers it on on open. This resets the ADDRESS_MODE registers
which then can be different to the value the driver has computed for them.

This patch setups runtime pm usage for mt9t031 and uses the resume function
to write the ADDRESS_MODE registers in order to fix the above described
problem.

Signed-off-by: Valentin Longchamp <valentin.longchamp@epfl.ch>
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-05-18 00:46:21 -03:00
Mauro Carvalho Chehab
4f9fb5ed02 V4L/DVB: soc-camera: add runtime pm support for subdevices
To save power soc-camera powers subdevices down, when they are not in use,
if this is supported by the platform. However, the V4L standard dictates,
that video nodes shall preserve configuration between uses. This requires
runtime power management, which is implemented by this patch. It allows
subdevice drivers to specify their runtime power-management methods, by
assigning a type to the video device.

Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-05-18 00:46:09 -03:00
Márton Németh
e26b314491 V4L/DVB: The first two parameters of soc_camera_limit_side() are usually pointers to struct v4l2_rect elements. They are signed, so adjust the prototype accordingly
This will remove the following sparse warning (see "make C=1"):

 * incorrect type in argument 1 (different signedness)
       expected unsigned int *start
       got signed int *<noident>

as well as a couple more signedness mismatches.

Signed-off-by: Márton Németh <nm127@freemail.hu>
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-05-18 00:44:09 -03:00
Stefan Herbrechtsmeier
a47f6be456 V4L/DVB: pxa_camera: move fifo reset direct before dma start
Move the fifo reset from pxa_camera_start_capture to pxa_camera_irq direct
before the dma start after an end of frame interrupt to prevent images from
shifting because of old data at the begin of the frame.

Signed-off-by: Stefan Herbrechtsmeier <hbmeier@hni.uni-paderborn.de>
Acked-by: Robert Jarzmik <robert.jarzmik@free.fr>
Tested-by: Antonio Ospite <ospite@studenti.unina.it>
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-05-06 19:20:52 -03:00
Dan Carpenter
981cbef2c3 V4L/DVB: video: testing unsigned for less than 0
soc_mbus_bytes_per_line() returns -EINVAL on error but we store it in an
unsigned int so the test for less than zero doesn't work.  I think it
always returns "small" positive values so we can just cast it to int
here.

Signed-off-by: Dan Carpenter <error27@gmail.com>
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-05-06 19:20:52 -03:00
Uwe Kleine-König
b7d41d6d58 V4L/DVB: mx1-camera: compile fix
This fixes a regression of

	7d58289 (mx1: prefix SOC specific defines with MX1_ and deprecate old names)

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Acked-by: Sascha Hauer <s.hauer@pengutronix.de>
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-05-06 19:20:51 -03:00
Hans Verkuil
03b1930efd V4L/DVB: saa7146: fix regression of the av7110/budget-av driver
An earlier regression fix for the mxb driver (V4L/DVB: saa7146_vv: fix
regression where v4l2_device was registered too late) caused a new
regression in the av7110 driver.

Reverted the old fix and fixed the problem in the mxb driver instead.
Tested on mxb and budget-av cards.

The real problem is that the saa7146 framework has separate probe()
and attach() driver callbacks which should be rolled into one. This
is now done for the mxb driver, but others should do the same. Lack
of hardware makes this hard to do, though. I hope to get hold of some
hexium cards and then I can try to improve the framework to prevent
this from happening again.

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-05-06 19:20:50 -03:00
Hans Verkuil
d2f2d6d0a1 V4L/DVB: v4l: fix config dependencies: mxb and saa7191 are V4L2 drivers, not V4L1
v4l: fix config dependencies: mxb and saa7191 are V4L2 drivers, not V4L1

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-05-06 19:20:50 -03:00
Muralidharan Karicheri
6a4f0623a4 V4L/DVB: V4L - vpfe capture - fix for kernel crash
As part of upstream merge, set_params() function was removed from isif.c.
This requires removal of BUG_ON() and check for set_params ptr in
vpfe_capture.c. Without this kernel crash dump is seen while bootup on DM365

Also made following changes:-

 1) converted error messages to debug messages since it is not right to flood
    the console with error messages for user mistakes.
 2) returns -EINVAL if ioctl is not supported

Signed-off-by: Muralidharan Karicheri <m-karicheri2@ti.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-05-06 19:19:05 -03:00
John Ellson
f8f73d01a3 V4L/DVB: gspca: make usb id 0461:0815 get handled by the right driver
The 0461:0815 camera is spca561 based not spca508

Signed-off-by: John Ellson <john.ellson@comcast.net>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-05-06 19:19:05 -03:00
Erik Andrén
55e0b489a3 V4L/DVB: gspca - stv06xx: Remove the 046d:08da from the stv06xx driver
The 046d:08da usb id shouldn't be associated with the stv06xx driver as they're
not compatible with each other.
This fixes a bug where Quickcam Messenger cams fail to use its proper driver
(gspca-zc3xx), rendering the camera inoperable.

Signed-off-by: Erik Andrén <erik.andren@gmail.com>
Tested-by: Gabriel Craciunescu <nix.or.die@googlemail.com>
Signed-off-by: Jean-François Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-05-06 19:19:04 -03:00
Yong Zhang
a76b9f49ba V4L/DVB: gspca - sn9c20x: Correct onstack wait_queue_head declaration
Use DECLARE_WAIT_QUEUE_HEAD_ONSTACK to make lockdep happy

Signed-off-by: Yong Zhang <yong.zhang0@gmail.com>
Signed-off-by: Jean-François Moine <moinejf@free.fr>
CC: Brian Johnson <brijohn@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-05-06 19:19:04 -03:00
Murali Karicheri
ab51bec1f8 V4L/DVB: V4L: vpfe_capture - free ccdc_lock when memory allocation fails
This patch fixes a bug in vpfe_probe() that doesn't call mutex_unlock() if memory
allocation for ccdc_cfg fails. See also the smatch warning report from Dan
Carpenter that shows this as an issue.

Signed-off-by: Murali Karicheri <m-karicheri2@ti.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-05-06 19:19:02 -03:00
Vaibhav Hiremath
b704e82a54 V4L/DVB: V4L - Makfile:Removed duplicate entry of davinci
Signed-off-by: Vaibhav Hiremath <hvaibhav@ti.com>
Signed-off-by: Muralidharan Karicheri <mkaricheri@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-05-06 19:19:00 -03:00
Dan Carpenter
2132deff69 V4L/DVB: omap24xxcam: potential buffer overflow
The previous loop goes until last == VIDEO_MAX_FRAME, so this could
potentially go one past the end of the loop.

Signed-off-by: Dan Carpenter <error27@gmail.com>
Acked-by: Sakari Ailus <sakari.ailus@maxwell.research.nokia.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-05-06 19:18:58 -03:00
Wolfram Sang
12765517d9 device_attributes: add sysfs_attr_init() for dynamic attributes
Made necessary by 6992f53349 ("sysfs: Use
one lockdep class per sysfs attribute").

Prevents further "key xxx not in .data" bug-reports.  Although some
attributes could probably be converted to static ones, this is left for
people having hardware to test.

Found by this semantic patch:

@ init @
type T;
identifier A;
@@

        T {
                ...
                struct device_attribute A;
                ...
        };

@ main extends init @
expression E;
statement S;
identifier err;
T *name;
@@

        ... when != sysfs_attr_init(&name->A.attr);
(
+       sysfs_attr_init(&name->A.attr);
        if (device_create_file(E, &name->A))
                S
|
+       sysfs_attr_init(&name->A.attr);
        err = device_create_file(E, &name->A);
)

While reviewing, I put the initialization to apropriate places.

Signed-off-by: Wolfram Sang <w.sang@pengutronix.de>
Cc: Eric W. Biederman <ebiederm@xmission.com>
Cc: Greg KH <gregkh@suse.de>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Grant Likely <grant.likely@secretlab.ca>
Cc: Mike Isely <isely@pobox.com>
Cc: Mauro Carvalho Chehab <mchehab@infradead.org>
Cc: Sujith Thomas <sujith.thomas@intel.com>
Cc: Matthew Garrett <mjg@redhat.com>
Cc: Len Brown <len.brown@intel.com>
Cc: Krzysztof Helt <krzysztof.h1@wp.pl>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2010-04-07 08:38:03 -07:00
Tejun Heo
5a0e3ad6af include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h
percpu.h is included by sched.h and module.h and thus ends up being
included when building most .c files.  percpu.h includes slab.h which
in turn includes gfp.h making everything defined by the two files
universally available and complicating inclusion dependencies.

percpu.h -> slab.h dependency is about to be removed.  Prepare for
this change by updating users of gfp and slab facilities include those
headers directly instead of assuming availability.  As this conversion
needs to touch large number of source files, the following script is
used as the basis of conversion.

  http://userweb.kernel.org/~tj/misc/slabh-sweep.py

The script does the followings.

* Scan files for gfp and slab usages and update includes such that
  only the necessary includes are there.  ie. if only gfp is used,
  gfp.h, if slab is used, slab.h.

* When the script inserts a new include, it looks at the include
  blocks and try to put the new include such that its order conforms
  to its surrounding.  It's put in the include block which contains
  core kernel includes, in the same order that the rest are ordered -
  alphabetical, Christmas tree, rev-Xmas-tree or at the end if there
  doesn't seem to be any matching order.

* If the script can't find a place to put a new include (mostly
  because the file doesn't have fitting include block), it prints out
  an error message indicating which .h file needs to be added to the
  file.

The conversion was done in the following steps.

1. The initial automatic conversion of all .c files updated slightly
   over 4000 files, deleting around 700 includes and adding ~480 gfp.h
   and ~3000 slab.h inclusions.  The script emitted errors for ~400
   files.

2. Each error was manually checked.  Some didn't need the inclusion,
   some needed manual addition while adding it to implementation .h or
   embedding .c file was more appropriate for others.  This step added
   inclusions to around 150 files.

3. The script was run again and the output was compared to the edits
   from #2 to make sure no file was left behind.

4. Several build tests were done and a couple of problems were fixed.
   e.g. lib/decompress_*.c used malloc/free() wrappers around slab
   APIs requiring slab.h to be added manually.

5. The script was run on all .h files but without automatically
   editing them as sprinkling gfp.h and slab.h inclusions around .h
   files could easily lead to inclusion dependency hell.  Most gfp.h
   inclusion directives were ignored as stuff from gfp.h was usually
   wildly available and often used in preprocessor macros.  Each
   slab.h inclusion directive was examined and added manually as
   necessary.

6. percpu.h was updated not to include slab.h.

7. Build test were done on the following configurations and failures
   were fixed.  CONFIG_GCOV_KERNEL was turned off for all tests (as my
   distributed build env didn't work with gcov compiles) and a few
   more options had to be turned off depending on archs to make things
   build (like ipr on powerpc/64 which failed due to missing writeq).

   * x86 and x86_64 UP and SMP allmodconfig and a custom test config.
   * powerpc and powerpc64 SMP allmodconfig
   * sparc and sparc64 SMP allmodconfig
   * ia64 SMP allmodconfig
   * s390 SMP allmodconfig
   * alpha SMP allmodconfig
   * um on x86_64 SMP allmodconfig

8. percpu.h modifications were reverted so that it could be applied as
   a separate patch and serve as bisection point.

Given the fact that I had only a couple of failures from tests on step
6, I'm fairly confident about the coverage of this conversion patch.
If there is a breakage, it's likely to be something in one of the arch
headers which should be easily discoverable easily on most builds of
the specific arch.

Signed-off-by: Tejun Heo <tj@kernel.org>
Guess-its-ok-by: Christoph Lameter <cl@linux-foundation.org>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: Lee Schermerhorn <Lee.Schermerhorn@hp.com>
2010-03-30 22:02:32 +09:00
Linus Torvalds
c32da02342 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial: (56 commits)
  doc: fix typo in comment explaining rb_tree usage
  Remove fs/ntfs/ChangeLog
  doc: fix console doc typo
  doc: cpuset: Update the cpuset flag file
  Fix of spelling in arch/sparc/kernel/leon_kernel.c no longer needed
  Remove drivers/parport/ChangeLog
  Remove drivers/char/ChangeLog
  doc: typo - Table 1-2 should refer to "status", not "statm"
  tree-wide: fix typos "ass?o[sc]iac?te" -> "associate" in comments
  No need to patch AMD-provided drivers/gpu/drm/radeon/atombios.h
  devres/irq: Fix devm_irq_match comment
  Remove reference to kthread_create_on_cpu
  tree-wide: Assorted spelling fixes
  tree-wide: fix 'lenght' typo in comments and code
  drm/kms: fix spelling in error message
  doc: capitalization and other minor fixes in pnp doc
  devres: typo fix s/dev/devm/
  Remove redundant trailing semicolons from macros
  fix typo "definetly" -> "definitely" in comment
  tree-wide: s/widht/width/g typo in comments
  ...

Fix trivial conflict in Documentation/laptops/00-INDEX
2010-03-12 16:04:50 -08:00
Jiri Kosina
318ae2edc3 Merge branch 'for-next' into for-linus
Conflicts:
	Documentation/filesystems/proc.txt
	arch/arm/mach-u300/include/mach/debug-macro.S
	drivers/net/qlge/qlge_ethtool.c
	drivers/net/qlge/qlge_main.c
	drivers/net/typhoon.c
2010-03-08 16:55:37 +01:00
Uwe Kleine-König
ea180ca4d6 media: move omap24xxcam's probe function to .devinit.text
A pointer to omap24xxcam_probe is passed to the core via
platform_driver_register and so the function must not disappear when the
.init sections are discarded.  Otherwise (if also having HOTPLUG=y)
unbinding and binding a device to the driver via sysfs will result in an
oops as does a device being registered late.

An alternative to this patch is using platform_driver_probe instead of
platform_driver_register plus removing the pointer to the probe function
from the struct platform_driver.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Acked-by: Sakari Ailus <sakari.ailus@maxwell.research.nokia.com>
Acked-by: Trilok Soni <soni.trilok@gmail.com>
Cc: Hans Verkuil <hverkuil@xs4all.nl>
Cc: Mauro Carvalho Chehab <mchehab@redhat.com>
Cc: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-03-07 17:04:50 -08:00
Oliver Neukum
86266452f8 USB: Push BKL on open down into the drivers
Straightforward push into the drivers to allow
auditing individual drivers separately

Signed-off-by: Oliver Neukum <oliver@neukum.org>
Acked-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Cc: Jiri Kosina <jkosina@suse.cz>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-03-02 14:54:23 -08:00
Mauro Carvalho Chehab
3621263a4d V4L-DVB: cx88-dvb: remove extra attribution for core
This is not needed, since the function already do it. Also, it causes
a warning at the compilation, since a new var is declared in the middle
of the code.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-02-26 15:58:11 -03:00
Baruch Siach
84f3751d6a V4L/DVB: v4l: soc_camera: fix bound checking of mbus_fmt[] index
When code <= V4L2_MBUS_FMT_FIXED soc_mbus_get_fmtdesc returns a pointer to
mbus_fmt[x], where x < 0. Fix this.

Signed-off-by: Baruch Siach <baruch@tkos.co.il>
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
CC: stable@kernel.org
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-02-26 15:11:11 -03:00
Dirk Herrendoerfer
4f3ca2f152 V4L/DVB: Add support for SMT7020 to cx88
This patch adds support for the built-in dvb device
of a Samsung SMT7020s (x86 based STB) to the cx88 family.

Signed-off-by: Dirk Herrendoerfer <d.herrendoerfer@herrendoerfer.name>
Signed-off-by: Helmut Auer <helmut@helmutauer.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-02-26 15:11:11 -03:00
Hans de Goede
0158e98fa1 V4L/DVB: gspca_stv06xx: Add support for camera button
Only tested with an stv6422 based cam, as that is the only stv06xx cam
I have with a button.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-02-26 15:11:10 -03:00
Hans de Goede
88e8d20a8c V4L/DVB: gspca_ov519: add support for the button on ov511 based cams
Due to hardware limitations this only works while the camera is
streaming.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-02-26 15:11:10 -03:00
Hans de Goede
92e232acd6 V4L/DVB: gspca_ov519: Add support for the button on ov518 based cams
Due to hardware limitations this only works while the camera is
streaming.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-02-26 15:11:10 -03:00
Hans de Goede
417a4d2659 V4L/DVB: gspca_ov519: add support for the button on ov519 based cams
Note due to hardware limitiations (no interrupt endpoint), this only works
when the camera is streaming.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-02-26 15:11:10 -03:00
Hans de Goede
e7637521ac V4L/DVB: gspca_main: Fix a compile error when CONFIG_INPUT is not set
gspca_main: Fix a compile error when CONFIG_INPUT is not set.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-02-26 15:11:10 -03:00
Hans de Goede
10ee240200 V4L/DVB: gspca_main: some input error handling fixes
2 small changes to input device error handling:
1) Make it fatal when we fail to create an input device (it is either this
   or add checks for gspca_dev->input_dev being NULL in a lot of places)
2) Since we allow gspca_input_create_urb() to fail everywhere we call it,
   and thus never check its return value, make it void.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-02-26 15:11:09 -03:00
Hans de Goede
ac82f59f9c V4L/DVB: gspca_main: Allow use of input device creation code for non int. inputs
Allow use of the gspca core input device creation code by subdrivers which
have non interrupt driven camera buttons.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-02-26 15:11:09 -03:00
Hans de Goede
5fb2dde281 V4L/DVB: gspca_pac7302: much improved exposure control
My experience with fixing up the controls for the PAS sensors in
sonixb, has lead me to re-investigate the exposure control for the
pac7302. I've now found a regular exposure register in register bank 3
(which seems to be the sensor registers bank), and with this added a proper
fine grained exposure control. This patch also updates the do_autogain
function to work properly with this new finer grained control.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-02-26 15:11:09 -03:00
Hans de Goede
0e4b91c306 V4L/DVB: gspca_sonixb: Make sonixb driver handle pas106 and pas202 cameras
Make the sonixb driver handle pas106 and pas202 cameras, when both it
and the sn9c102 driver are enabled in the kernel configuration.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-02-26 15:11:09 -03:00
Hans de Goede
421763e776 V4L/DVB: gspca_sonixb: pas106: fixup bright ctrl and add gain and exposure ctrls
Fixup brightness ctrl and add gain and exposure ctrls for PAS106B sensors,
this allows enabling autogain (done), and makes the cam usable in low light
conditions.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-02-26 15:11:09 -03:00
Hans de Goede
606f8428ca V4L/DVB: Documentation: gspca.txt: update known mr97310a cams
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-02-26 15:11:09 -03:00
Theodore Kilgore
9d3103d061 V4L/DVB: gspca_mr97310a: add support for the Sakar 1638x CyberPix
This camera has a sensor type we did not support sofar, this patch adds
support for the new sensor type found in the Sakar 1638x CyberPix.

Signed-off-by: Theodore Kilgore <kilgota@banach.math.auburn.edu>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-02-26 15:11:09 -03:00
Hans de Goede
10bb753010 V4L/DVB: gscpa_sonixb: limit ov7630 max framerate at 640x480
In 640x480, if the reg11 has less than 4, the image is
unstable (the bridge goes into a higher compression mode
which we have not reverse engineered yet).

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-02-26 15:11:08 -03:00
Hans de Goede
82e839c9c5 V4L/DVB: gspca_sonixb: pas202: fixup brightness ctrl and add gain and exposure ctrls
Fixup brightness ctrl and add gain and exposure ctrls for PAS202BCB sensors,
this allows enabling autogain (done), and makes the cam usable in low light
conditions.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-02-26 15:11:08 -03:00
Hans de Goede
26984b0995 V4L/DVB: gscpa_sonixb: Differentiate between sensors with a coarse and fine expo ctrl
Some sensors only allow controlling the exposure by changing the clockdiv,
which means that exposure takes pretty large jumps (for example when going
from a div of 1 to 2, the exposure doubles). Use 2 different entries in
the controls array for these 2 different types of exposure (always
disabling one), and;

Add a new autogain algorithm for the coarse exposure case, which normally
changes the gain setting, only touching the exposure setting if the desired
luminance cannot be reached with gain, and after an exposure change once more
first tries gain, etc. Thus avoiding exposure changes, and the resulting
oscilation because of the huge steps these exposure controls take.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-02-26 15:11:08 -03:00
Hans de Goede
4efcfa0af1 V4L/DVB: gspca_sonixb: leave bridge gain at 1.0 when we have a sensor gain
Leave bridge gain at 1.0 when we have a sensor gain, while at it also
change the bridge gain setting code to write both registers in one go
saving us a usb transaction.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-02-26 15:11:08 -03:00
Hans de Goede
9712a8be6b V4L/DVB: gspca_sonixj: Add camera button support
gspca_sonixj: Add camera button support

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-02-26 15:11:08 -03:00
Hans de Goede
f65e93d600 V4L/DVB: gspca_sonixb: Add support for camera button
gspca_sonixb: Add support for camera button

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-02-26 15:11:08 -03:00
Hans de Goede
1a3510265b V4L/DVB: gscpa_zc3xx: Add support for camera button
gscpa_zc3xx: Add support for camera button

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-02-26 15:11:08 -03:00
Hans de Goede
32ea3e44b9 V4L/DVB: gscpa_pac7311: Add support for camera button
gscpa_pac7311: Add support for camera button

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-02-26 15:11:08 -03:00
Hans de Goede
937a6f54e3 V4L/DVB: gscpa_pac207: Add support for camera button
gscpa_pac207: Add support for camera button

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-02-26 15:11:07 -03:00
Hans de Goede
eb90069051 V4L/DVB: gspca_sq905c: Add an additional USB-ID
gspca_sq905c: Add an additional USB-ID

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-02-26 15:11:07 -03:00
Theodore Kilgore
c260fe936d V4L/DVB: gspca_mr97310a: Simplify sensor detection
Simplify sensor detection a bit (share more of the code between cif and vga
cameras). Also remove an unnecessary write from zero_the_pointer().

Signed-off-by: Theodore Kilgore <kilgota@banach.math.auburn.edu>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-02-26 15:11:07 -03:00
Andy Walls
c1ea5b7424 V4L/DVB: ivtv: Tweak Sony GigaPocket Kikyou card entry based on experiments
Based on experiments by Eric Wescott, edit the Sony GigaPocket (Kikyou)
card entry video and audio mux settings.

Signed-off-by: Andy Walls <awalls@radix.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-02-26 15:11:07 -03:00