GitHub/moto-9609/android_kernel_motorola_exynos9610.git
14 years agoV4L/DVB: Add RC6 support to ir-core
David Härdeman [Thu, 8 Apr 2010 23:04:40 +0000 (20:04 -0300)]
V4L/DVB: Add RC6 support to ir-core

This patch adds an RC6 decoder (modes 0 and 6A) to ir-core.

Signed-off-by: David Härdeman <david@hardeman.nu>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB: Add NECx support to ir-core
David Härdeman [Thu, 8 Apr 2010 23:04:35 +0000 (20:04 -0300)]
V4L/DVB: Add NECx support to ir-core

This patch adds NECx support to drivers/media/IR/ir-nec-decoder.c

Signed-off-by: David Härdeman <david@hardeman.nu>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB: Add RC5x support to ir-core
David Härdeman [Thu, 8 Apr 2010 23:04:30 +0000 (20:04 -0300)]
V4L/DVB: Add RC5x support to ir-core

This patch adds RC5x support to drivers/media/IR/ir-rc5-decoder.c

Signed-off-by: David Härdeman <david@hardeman.nu>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB: ds3000: fix divide-by-zero error in ds3000_read_snr()
Nicolas Noirbent [Mon, 22 Mar 2010 17:54:43 +0000 (14:54 -0300)]
V4L/DVB: ds3000: fix divide-by-zero error in ds3000_read_snr()

Fix a divide-by-zero error in ds3000's ds3000_read_snr(), when getting
a very low signal reading (dvbs2_signal_reading >= 1). This prevents
some nasty EIPs when running szap-s2 with a very low signal strength.

Signed-off-by: Nicolas Noirbent <nicolas.noirbent@smartjog.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB: cpia1: comment unused command_setlights()
Mauro Carvalho Chehab [Thu, 8 Apr 2010 22:09:13 +0000 (19:09 -0300)]
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>
14 years agoV4L/DVB: ir-core: Remove warining noise if decoders compiled builtin
Mauro Carvalho Chehab [Thu, 8 Apr 2010 22:04:06 +0000 (19:04 -0300)]
V4L/DVB: ir-core: Remove warining noise if decoders compiled builtin

drivers/media/IR/ir-raw-event.c:55: warning: ‘wq_load’ defined but not used
drivers/media/IR/ir-raw-event.c:222: warning: ‘init_decoders’ defined but not used
drivers/media/IR/rc-map.c: In function ‘get_rc_map’:
drivers/media/IR/rc-map.c:40: warning: unused variable ‘rc’

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB: V4L2: Replace loops for finding max buffers in VIDIOC_REQBUFS callbacks
Andreas Bombe [Sun, 21 Mar 2010 19:02:45 +0000 (16:02 -0300)]
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>
14 years agoRevert "V4L/DVB (11906): saa7134: Use v4l bounding/alignment function"
Herton Ronaldo Krzesinski [Fri, 19 Mar 2010 17:58:23 +0000 (14:58 -0300)]
Revert "V4L/DVB (11906): saa7134: Use v4l bounding/alignment function"

This reverts commit bc52d6eb44de8f19934768d4d10d19fdbdc99950.

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>
14 years agoV4L/DVB: dvb/dib8000: fix build warning
Wolfram Sang [Mon, 5 Apr 2010 04:14:26 +0000 (01:14 -0300)]
V4L/DVB: dvb/dib8000: fix build warning

In file included from drivers/media/dvb/dvb-usb/dib0700_devices.c:14:
  drivers/media/dvb/frontends/dib8000.h: In function 'dib8000_get_adc_power':
  drivers/media/dvb/frontends/dib8000.h:112: warning: no return statement in function returning non-void

Fixed by adding a return to the dummy function.

Signed-off-by: Wolfram Sang <w.sang@pengutronix.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB: DVB: ngene, remove unused #include <linux/version.h>
Huang Weiyi [Thu, 8 Apr 2010 11:50:17 +0000 (08:50 -0300)]
V4L/DVB: DVB: ngene, remove unused #include <linux/version.h>

Remove unused #include <linux/version.h>('s) in
  drivers/media/dvb/ngene/ngene-core.c

Signed-off-by: Huang Weiyi <weiyi.huang@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB: ivtv: move the _IO() decoder ioctls into vidioc_default
Hans Verkuil [Tue, 6 Apr 2010 18:58:53 +0000 (15:58 -0300)]
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>
14 years agoV4L/DVB: video_ioctl2: handle the v4l1 compat bit first and move VIDIOCGMBUF into...
Hans Verkuil [Tue, 6 Apr 2010 18:56:08 +0000 (15:56 -0300)]
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>
14 years agoV4L/DVB: v4l2-framework.txt: fix incorrect statement
Hans Verkuil [Tue, 6 Apr 2010 14:44:39 +0000 (11:44 -0300)]
V4L/DVB: v4l2-framework.txt: fix incorrect statement

After unregister_device all fileops are blocked, except for ioctls.
So it is not just the open that is blocked, others are as well.

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB: w9966: convert to V4L2
Hans Verkuil [Tue, 6 Apr 2010 14:36:39 +0000 (11:36 -0300)]
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>
14 years agoV4L/DVB: DocBook/v4l/compat.xml: add missing </section>
Hans Verkuil [Tue, 6 Apr 2010 13:32:19 +0000 (10:32 -0300)]
V4L/DVB: DocBook/v4l/compat.xml: add missing </section>

The indentation of the sections had gone wrong, causing a mistake with
section nesting. Fixed.

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB: usbvision: remove non-working vbi device
Hans Verkuil [Tue, 6 Apr 2010 11:20:56 +0000 (08:20 -0300)]
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>
14 years agoV4L/DVB: video_ioctl2: don't return, use break
Hans Verkuil [Tue, 6 Apr 2010 11:14:11 +0000 (08:14 -0300)]
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>
14 years agoV4L/DVB: video_ioctl2: do not replace arg with NULL for _IO() ioctls
Hans Verkuil [Tue, 6 Apr 2010 11:12:21 +0000 (08:12 -0300)]
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>
14 years agoV4L/DVB: videodev2.h: move definition of enum v4l2_ctrl_type to the other control...
Hans Verkuil [Tue, 6 Apr 2010 09:53:57 +0000 (06:53 -0300)]
V4L/DVB: videodev2.h: move definition of enum v4l2_ctrl_type to the other control types

For some reason the definition of enum v4l2_ctrl_type is far from the
place where it is actually needed. This makes it hard to work with this
header.

Move it to just before struct v4l2_queryctrl, which is the one that
actually uses it.

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB: V4L2 Spec: fix V4L2_CTRL_TYPE_CTRL_CLASS documentation
Hans Verkuil [Tue, 6 Apr 2010 09:41:28 +0000 (06:41 -0300)]
V4L/DVB: V4L2 Spec: fix V4L2_CTRL_TYPE_CTRL_CLASS documentation

The spec says that the control ID for these types of controls is the same
as that of the control class. But it should read: 'control class + 1'.

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB: davinci: don't return under lock on error path
Dan Carpenter [Wed, 7 Apr 2010 09:21:05 +0000 (06:21 -0300)]
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>
14 years agoV4L/DVB: ir-core: move subsystem internal calls to ir-core-priv.h
Mauro Carvalho Chehab [Thu, 8 Apr 2010 18:10:27 +0000 (15:10 -0300)]
V4L/DVB: ir-core: move subsystem internal calls to ir-core-priv.h

ir-core.h has the kABI to be used by the bridge drivers, when needing to register
IR protocols and pass IR events. However, the same file also contains IR subsystem
internal calls, meant to be used inside ir-core and between ir-core and the raw
decoders.

Better to move those functions to an internal header, for some reasons:

1) Header will be a little more cleaner;

2) It avoids the need of recompile everything (bridge/hardware drivers, etc),
   just because a new decoder were added, or some other internal change were needed;

3) Better organize the ir-core API, splitting the functions that are internal to
   IR core and the ancillary drivers (decoders, lirc_dev) from the features that
   should be exported to IR subsystem clients.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB: Teach drivers/media/IR/ir-raw-event.c to use durations
David Härdeman [Thu, 8 Apr 2010 16:10:00 +0000 (13:10 -0300)]
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>
14 years agoV4L/DVB: ir-core: fix gcc warning noise
Mauro Carvalho Chehab [Thu, 8 Apr 2010 12:33:45 +0000 (09:33 -0300)]
V4L/DVB: ir-core: fix gcc warning noise

drivers/media/IR/ir-sysfs.c: In function ‘store_protocol’:
drivers/media/IR/ir-sysfs.c:93: warning: suggest parentheses around assignment used as truth value

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB: ir-core: properly present the supported and current protocols
Mauro Carvalho Chehab [Thu, 8 Apr 2010 04:02:49 +0000 (01:02 -0300)]
V4L/DVB: ir-core: properly present the supported and current protocols

Hardware decoders have a more limited set of decoders than software ones.
In general, they support just one protocol at a given time, but allow
changing between a few options.

Rename the previous badly named "current_protocol" as just "protocol",
meaning the current protocol(s) accepted by the driver, and
add a "support_protocols" to represent the entire universe of supported
protocols by that specific hardware.

As commented on http://lwn.net/Articles/378884/, the "one file, one value"
rule doesn't fit nor does make much sense for bitmap or enum values. So, the
supported_protocols will enum all supported protocols, and the protocol
will present all active protocols.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB: ir-core: Distinguish sysfs attributes for in-hardware and raw decoders
Mauro Carvalho Chehab [Wed, 7 Apr 2010 02:21:46 +0000 (23:21 -0300)]
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>
14 years agoV4L/DVB: rename sysfs remote controller devices from rcrcv to rc
David Härdeman [Sun, 28 Mar 2010 21:38:49 +0000 (18:38 -0300)]
V4L/DVB: rename sysfs remote controller devices from rcrcv to rc

When the remote controller class is anyway being renamed from ir to rc
this would be a good time to also rename the devices from rcrcvX to rcX.

I know we haven't reached any agreement on whether transmission will
eventually be handled by the same device, but this change will at
least make the device name non-receive-specific which will make it
possible in the future (and if a different approach is finally
agreed upon, the device name still works).

Signed-off-by: David Härdeman <david@hardeman.nu>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB: ir: Make sure that the spinlocks are properly initialized
Mauro Carvalho Chehab [Wed, 7 Apr 2010 19:19:36 +0000 (16:19 -0300)]
V4L/DVB: ir: Make sure that the spinlocks are properly initialized

Some spinlocks are not properly initialized on ir core:

[  471.714132] BUG: spinlock bad magic on CPU#0, modprobe/1899
[  471.719838]  lock: f92a08ac, .magic: 00000000, .owner: <none>/-1, .owner_cpu: 0
[  471.727301] Pid: 1899, comm: modprobe Not tainted 2.6.33 #36
[  471.733062] Call Trace:
[  471.735537]  [<c1498793>] ? printk+0x1d/0x22
[  471.739866]  [<c12694e3>] spin_bug+0xa3/0xf0
[  471.744224]  [<c126962d>] do_raw_spin_lock+0x7d/0x160
[  471.749364]  [<f92a01ff>] ? ir_rc5_register+0x6f/0xf0 [ir_rc5_decoder]

So, use static initialization for the static spinlocks, instead of the
dynamic ones (currently used), as proposed by David Härdeman on one
of his RFC patches.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB: em28xx: fix a regression caused by the rc-map changes
Mauro Carvalho Chehab [Thu, 8 Apr 2010 01:57:04 +0000 (22:57 -0300)]
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>
14 years agoV4L/DVB: ir-rc5-decoder: fix state machine
Mauro Carvalho Chehab [Tue, 6 Apr 2010 05:29:42 +0000 (02:29 -0300)]
V4L/DVB: ir-rc5-decoder: fix state machine

Reimplement the RC-5 decoder state machine. Code is now clear, and works
properly. It is also simpler than the previous implementations.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB: re-add enable/disable check to the IR decoders
Mauro Carvalho Chehab [Sun, 4 Apr 2010 17:45:04 +0000 (14:45 -0300)]
V4L/DVB: re-add enable/disable check to the IR decoders

A previous cleanup patch removed more than needed. Re-add the logic that
disable the decoders.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB: ir-core: Add support for badly-implemented hardware decoders
Mauro Carvalho Chehab [Sun, 4 Apr 2010 17:06:55 +0000 (14:06 -0300)]
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>
14 years agoV4L/DVB: ir-core: move rc map code to rc-map.h
Mauro Carvalho Chehab [Sun, 4 Apr 2010 15:38:57 +0000 (12:38 -0300)]
V4L/DVB: ir-core: move rc map code to rc-map.h

The keymaps don't need to be recompiled every time a change at ir-core.h
happens, since it only depends on rc-map defines. By moving those
definitions to the proper header, the code became cleaner, and avoids
needing to recompile all the RC maps every time a non-related change
is introduced.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L-DVB: ir-core: remove the ancillary buffer
Mauro Carvalho Chehab [Sun, 4 Apr 2010 13:44:51 +0000 (10:44 -0300)]
V4L-DVB: ir-core: remove the ancillary buffer

Now that the decoders are state machine, there's no need to create
an ancillary buffer while decoding the protocol. Just call the decoders
code directly, event by event.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB: cx88: don't handle IR on Pixelview too fast
Mauro Carvalho Chehab [Sun, 4 Apr 2010 13:32:04 +0000 (10:32 -0300)]
V4L/DVB: cx88: don't handle IR on Pixelview too fast

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L-DVB: ir-rc5-decoder: Add a decoder for RC-5 IR protocol
Mauro Carvalho Chehab [Sun, 4 Apr 2010 13:27:20 +0000 (10:27 -0300)]
V4L-DVB: ir-rc5-decoder: Add a decoder for RC-5 IR protocol

This decoder is also based on a state machine, just like the NEC protocol
decoder. It is pedantic in the sense that accepts only 14 bits. As there
are some variants that outputs less bits, it needs to be improved to also
handle those.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB: ir-nec-decoder: Cleanups
Mauro Carvalho Chehab [Sat, 3 Apr 2010 23:33:00 +0000 (20:33 -0300)]
V4L/DVB: ir-nec-decoder: Cleanups

Remove dead code and properly name a few constants

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB: ir-nec-decoder: Reimplement the entire decoder
Mauro Carvalho Chehab [Sat, 3 Apr 2010 21:51:50 +0000 (18:51 -0300)]
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>
14 years agoV4L/DVB: Convert drivers/media/dvb/ttpci/budget-ci.c to use ir-core
David Härdeman [Fri, 2 Apr 2010 18:58:30 +0000 (15:58 -0300)]
V4L/DVB: Convert drivers/media/dvb/ttpci/budget-ci.c to use ir-core

Converts drivers/media/dvb/ttpci/budget-ci.c to use ir-core rather than
rolling its own keydown timeout handler and reporting keys via
drivers/media/IR/ir-functions.c.

[mchehab@redhat.com: Drop the call to ir_input_init() as it is no longer needed]

Signed-off-by: David Härdeman <david@hardeman.nu>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB: ir-core: improve keyup/keydown logic
David Härdeman [Fri, 2 Apr 2010 18:58:29 +0000 (15:58 -0300)]
V4L/DVB: ir-core: improve keyup/keydown logic

Rewrites the keyup/keydown logic in drivers/media/IR/ir-keytable.c.

All knowledge of keystates etc is now internal to ir-keytable.c
and not scattered around ir-raw-event.c and ir-nec-decoder.c (where
it doesn't belong).

In addition, I've changed the API slightly so that ir_input_dev is
passed as the first argument rather than input_dev. If we're ever
going to support multiple keytables we need to move towards making
ir_input_dev the main interface from a driver POV and obscure away
the input_dev as an implementational detail in ir-core.

Signed-off-by: David Härdeman <david@hardeman.nu>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB: ir-core: re-add some debug functions for keytable changes
Mauro Carvalho Chehab [Sat, 3 Apr 2010 19:53:16 +0000 (16:53 -0300)]
V4L/DVB: ir-core: re-add some debug functions for keytable changes

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB: drivers/media/IR - improve keytable code
David Härdeman [Fri, 2 Apr 2010 18:58:28 +0000 (15:58 -0300)]
V4L/DVB: drivers/media/IR - improve keytable code

The attached patch rewrites much of the keytable code in
drivers/media/IR/ir-keytable.c.

The scancodes are now inserted into the array in sorted
order which allows for a binary search on lookup.

The code has also been shrunk by about 150 lines.

In addition it fixes the following bugs:

Any use of ir_seek_table() was racy.

ir_dev->driver_name is leaked between ir_input_register() and
ir_input_unregister().

ir_setkeycode() unconditionally does clear_bit() on dev->keybit
when removing a mapping, but there might be another mapping with
a different scancode and the same keycode.

This version has been updated to incorporate patch feedback from
Mauro Carvalho Chehab.

[mchehab@redhat.com: Fix a conflict with RC keytable breakup patches and input changes]

Signed-off-by: David Härdeman <david@hardeman.nu>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB: saa7134: Add support for both positive and negative edge IRQ
Mauro Carvalho Chehab [Sat, 3 Apr 2010 14:26:01 +0000 (11:26 -0300)]
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>
14 years agoV4L/DVB: saa7134: Fix IRQ2 bit names for the register map
Mauro Carvalho Chehab [Sat, 3 Apr 2010 04:43:36 +0000 (01:43 -0300)]
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>
14 years agoV4L/DVB: ir-common: remove keymap tables from the module
Mauro Carvalho Chehab [Fri, 2 Apr 2010 23:11:45 +0000 (20:11 -0300)]
V4L/DVB: ir-common: remove keymap tables from the module

Now that the remote keymaps were broken into separate modules,
get rid of the keycode tables that were hardcoded into ir-common.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB: ir-core: Make use of the new IR keymap modules
Mauro Carvalho Chehab [Fri, 2 Apr 2010 23:01:00 +0000 (20:01 -0300)]
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>
14 years agoV4L/DVB: ir: prepare IR code for a parameter change at register function
Mauro Carvalho Chehab [Fri, 2 Apr 2010 16:18:42 +0000 (13:18 -0300)]
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>
14 years agoV4L/DVB: Break Remote Controller keymaps into modules
Mauro Carvalho Chehab [Fri, 2 Apr 2010 06:05:46 +0000 (03:05 -0300)]
V4L/DVB: Break Remote Controller keymaps into modules

The original Remote Controller approach were very messy: a big file,
that were part of ir-common kernel module, containing 64 different
RC keymap tables, used by the V4L/DVB drivers.

Better to break each RC keymap table into a separate module,
registering them into rc core on a process similar to the fs/nls tables.

As an userspace program is now in charge of loading those tables,
adds an option to allow the complete removal of those tables from
kernelspace.

Yet, on embedded devices like Set Top Boxes and TV sets, maybe the
only available input device is the IR. So, we should keep allowing
the usage of in-kernel tables, but a latter patch should change
the default to 'n', after giving some time for distros to add
the v4l-utils with the ir-keytable program, to allow the table
load via userspace.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB: ir-core: Add support for RC map code register
Mauro Carvalho Chehab [Fri, 2 Apr 2010 05:33:35 +0000 (02:33 -0300)]
V4L/DVB: ir-core: Add support for RC map code register

Instead of having all RC tables hardcoded on one file with
all tables there, add infrastructure for registering and dynamically
load the table(s) when needed.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB: ir-common: move IR tables from ir-keymaps.c to a separate file
Mauro Carvalho Chehab [Fri, 2 Apr 2010 01:43:29 +0000 (22:43 -0300)]
V4L/DVB: ir-common: move IR tables from ir-keymaps.c to a separate file

Instead of having one big file with lots of keytables, create one include
file for each IR keymap.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB: ir-common: Use macros to define the keytables
Mauro Carvalho Chehab [Fri, 2 Apr 2010 01:23:38 +0000 (22:23 -0300)]
V4L/DVB: ir-common: Use macros to define the keytables

The usage of macros ensures that the proper namespace is being used
by all tables. It also makes easier to associate a keytable with
the name used inside the drivers.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB: rename all *_rc_keys to ir_codes_*_nec_table
Mauro Carvalho Chehab [Fri, 2 Apr 2010 00:35:32 +0000 (21:35 -0300)]
V4L/DVB: rename all *_rc_keys to ir_codes_*_nec_table

Several DVB drivers use a different name convention. As we're moving
the keytables, we need to use the same convention on all places.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB: ir: use IR_KEYTABLE where an IR table is needed
Mauro Carvalho Chehab [Fri, 2 Apr 2010 00:27:04 +0000 (21:27 -0300)]
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>
14 years agoV4L/DVB: ir-common: re-order keytables by name and remove duplicates
Mauro Carvalho Chehab [Fri, 2 Apr 2010 00:10:58 +0000 (21:10 -0300)]
V4L/DVB: ir-common: re-order keytables by name and remove duplicates

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB: ir-common: Use a function to declare an IR table
Mauro Carvalho Chehab [Fri, 2 Apr 2010 00:05:21 +0000 (21:05 -0300)]
V4L/DVB: ir-common: Use a function to declare an IR table

This is the first patch of a series of changes that will break the IR
tables into a series of small modules that can be dynamically loaded,
or just loaded from userspace.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB: Add CHIP ID of the uPD61151
Dmitri Belimov [Thu, 18 Mar 2010 07:00:19 +0000 (04:00 -0300)]
V4L/DVB: Add CHIP ID of the uPD61151

Add CHIP ID of the NEC MPEG2 encoders uPD61151 and uPD61152.

Signed-off-by: Beholder Intl. Ltd. Dmitry Belimov <d.belimov@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB: ov511: Fix continuation lines
Joe Perches [Wed, 7 Apr 2010 05:59:26 +0000 (02:59 -0300)]
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>
14 years agoV4L/DVB: saa7134: fix GPIO HW-404M7
Vladimir Ermakov [Wed, 7 Apr 2010 05:23:31 +0000 (02:23 -0300)]
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>
14 years agoV4L/DVB: drivers/media/video: avoid NULL dereference
Julia Lawall [Tue, 6 Apr 2010 05:51:04 +0000 (02:51 -0300)]
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>
14 years agoV4L/DVB: cx88-dvb: fix on switch identation
Ricardo Maraschini [Tue, 6 Apr 2010 05:40:43 +0000 (02:40 -0300)]
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>
14 years agoV4L/DVB: cx23885: strcpy() => strlcpy()
Dan Carpenter [Tue, 6 Apr 2010 05:26:48 +0000 (02:26 -0300)]
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>
14 years agoV4L/DVB: cx25821: fix coding style issues in cx25821-video-upstream.c
Olimpiu Pascariu [Tue, 6 Apr 2010 05:09:00 +0000 (02:09 -0300)]
V4L/DVB: cx25821: fix coding style issues in cx25821-video-upstream.c

This is a patch to cx25821-video-upstream.c file that fixes up warnings
and errors found by the checkpatch.pl tool

Signed-off-by: Olimpiu Pascariu <olimpiu.pascariu@gmail.com>
Signed-off-by: Douglas Schilling Landgraf <dougsland@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB: cx88: Only start IR if the input device is opened
Mauro Carvalho Chehab [Wed, 31 Mar 2010 19:07:49 +0000 (16:07 -0300)]
V4L/DVB: cx88: Only start IR if the input device is opened

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB: ir-core: Add callbacks for input/evdev open/close on IR core
Mauro Carvalho Chehab [Wed, 31 Mar 2010 17:40:35 +0000 (14:40 -0300)]
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>
14 years agoV4L/DVB: ir-core: rename sysfs remote controller class from ir to rc
Mauro Carvalho Chehab [Sat, 27 Mar 2010 01:45:16 +0000 (22:45 -0300)]
V4L/DVB: ir-core: rename sysfs remote controller class from ir to rc

IR is an alias for Infrared Remote, while RC is an alias for Remote
Controller.

While currently all implementations are with Infrared Remote Controller,
this subsystem is not meant to be used only by IR type of RC's. So,
as discussed on both linux-media and linux-input, the better is to
rename the subsystem as Remote Controller.

While, currently, the only application that uses the /sys/class/irrcv is
ir-keytable application, and its sysfs support works only with the
current linux-next code, it is still possible to change the userspace API
without the risk of breaking applications. So, better to rename this
sooner than later.

Later patches will be needed to rename the files and to move them away
from drivers/media, but this is not a critical issue. So, for now,
let's just change the name of the sysfs class/nodes.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB: saa7134: clear warning noise
Mauro Carvalho Chehab [Sat, 27 Mar 2010 01:39:29 +0000 (22:39 -0300)]
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>
14 years agoV4L/DVB: ir-nec-decoder: Add sysfs node to enable/disable per irrcv
Mauro Carvalho Chehab [Fri, 26 Mar 2010 02:49:46 +0000 (23:49 -0300)]
V4L/DVB: ir-nec-decoder: Add sysfs node to enable/disable per irrcv

With the help of raw_register/raw_unregister, adds a sysfs group
associated with the decoder, inside the corresponding irrcv node.

Writing 1 to nec_decoder/enabled enables the decoder, while
writing 0 disables it.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB: ir-core: prepare to add more operations for ir decoders
Mauro Carvalho Chehab [Fri, 26 Mar 2010 00:13:43 +0000 (21:13 -0300)]
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>
14 years agoV4L/DVB: ir-core: dynamically load the compiled IR protocols
Mauro Carvalho Chehab [Wed, 24 Mar 2010 23:47:53 +0000 (20:47 -0300)]
V4L/DVB: ir-core: dynamically load the compiled IR protocols

Instead of hardcoding the protocols into ir-core, add a register interface
for the IR protocol decoders, and convert ir-nec-decoder into a client of
ir-core.

With this approach, it is possible to dynamically load the needed IR protocols,
and to add a RAW IR interface module, registered as one IR raw protocol decoder.

This patch opens a way to register a lirc_dev interface to work as an userspace
IR protocol decoder.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB: saa7134: don't wait too much to generate an IR event on raw_decode
Mauro Carvalho Chehab [Sun, 21 Mar 2010 16:00:55 +0000 (13:00 -0300)]
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>
14 years agoV4L/DVB: ir-core/saa7134: Move ir keyup/keydown code to the ir-core
Mauro Carvalho Chehab [Sun, 21 Mar 2010 15:24:24 +0000 (12:24 -0300)]
V4L/DVB: ir-core/saa7134: Move ir keyup/keydown code to the ir-core

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB: ir-core: add two functions to report keyup/keydown events
Mauro Carvalho Chehab [Sun, 21 Mar 2010 15:15:16 +0000 (12:15 -0300)]
V4L/DVB: ir-core: add two functions to report keyup/keydown events

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB: ir-core: Add logic to decode IR protocols at the IR core
Mauro Carvalho Chehab [Sat, 20 Mar 2010 23:59:44 +0000 (20:59 -0300)]
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>
14 years agoV4L/DVB: saa7134: add code to allow changing IR protocol
Mauro Carvalho Chehab [Sat, 20 Mar 2010 03:25:37 +0000 (00:25 -0300)]
V4L/DVB: saa7134: add code to allow changing IR protocol

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB: saa7134: use a full scancode table for M135A
Mauro Carvalho Chehab [Sat, 20 Mar 2010 03:23:30 +0000 (00:23 -0300)]
V4L/DVB: saa7134: use a full scancode table for M135A

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB: ir-core: be less pedantic with RC protocol name
Mauro Carvalho Chehab [Sat, 20 Mar 2010 03:17:58 +0000 (00:17 -0300)]
V4L/DVB: ir-core: be less pedantic with RC protocol name

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB: uvcvideo: Use POLLOUT and POLLWRNORM for output devices
Laurent Pinchart [Wed, 31 Mar 2010 15:29:26 +0000 (12:29 -0300)]
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>
14 years agoV4L/DVB: uvcvideo: Support iris absolute and relative controls
Laurent Pinchart [Wed, 20 Jan 2010 15:13:46 +0000 (12:13 -0300)]
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>
14 years agoV4L/DVB: v4l: Add V4L2_CID_IRIS_ABSOLUTE and V4L2_CID_IRIS_RELATIVE controls
Laurent Pinchart [Wed, 20 Jan 2010 15:12:57 +0000 (12:12 -0300)]
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>
14 years agoV4L/DVB: uvcvideo: Add support for Packard Bell EasyNote MX52 integrated webcam
Laurent Pinchart [Sat, 13 Mar 2010 21:12:15 +0000 (18:12 -0300)]
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>
14 years agoV4L/DVB: uvcvideo: Add support for unbranded Arkmicro 18ec:3290 webcams
Laurent Pinchart [Thu, 4 Mar 2010 10:51:25 +0000 (07:51 -0300)]
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>
14 years agoV4L/DVB: sn9c102 / zc0301: Handle webcams when no gspca subdriver conflict
Jean-François Moine [Mon, 29 Mar 2010 06:51:18 +0000 (03:51 -0300)]
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>
14 years agoV4L/DVB: gspca - t613: Add color controls
Costantino Leandro [Tue, 23 Mar 2010 15:31:16 +0000 (12:31 -0300)]
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>
14 years agoV4L/DVB: V4L: tvp514x: Add Powerup sequence during s_input to lock the signal properly
Vaibhav Hiremath [Sat, 27 Mar 2010 12:37:54 +0000 (09:37 -0300)]
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>
14 years agoV4L/DVB: V4L: vpfe_capture: Add support for USERPTR mode of operation
Vaibhav Hiremath [Sat, 27 Mar 2010 12:37:23 +0000 (09:37 -0300)]
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>
14 years agoV4L/DVB: V4L: dm644x_ccdc: Add Suspend/Resume Support
Vaibhav Hiremath [Sat, 27 Mar 2010 12:37:19 +0000 (09:37 -0300)]
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>
14 years agoV4L/DVB: V4L: vpfe_capture: Return 0 from suspend/resume
Vaibhav Hiremath [Sat, 27 Mar 2010 12:37:16 +0000 (09:37 -0300)]
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>
14 years agoV4L/DVB: V4L: dm644x_ccdc: Add 10bit BT support
Vaibhav Hiremath [Sat, 27 Mar 2010 12:37:12 +0000 (09:37 -0300)]
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>
14 years agoV4L/DVB: V4L: vpfe_capture: Add call back function for interrupt clear for vpfe_cfg
Vaibhav Hiremath [Sat, 27 Mar 2010 12:37:07 +0000 (09:37 -0300)]
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>
14 years agoV4L/DVB: V4L: dm644x_ccdc: Debug register read prints removed
Vaibhav Hiremath [Sat, 27 Mar 2010 12:37:03 +0000 (09:37 -0300)]
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>
14 years agoV4L/DVB: arv: convert to V4L2
Hans Verkuil [Mon, 29 Mar 2010 19:05:33 +0000 (16:05 -0300)]
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>
14 years agoV4L/DVB: zoran: remove V4L1 videodev.h include
Hans Verkuil [Mon, 22 Mar 2010 08:25:46 +0000 (05:25 -0300)]
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>
14 years agoV4L/DVB: meye: remove last V4L1 remnants from the code and add v4l2_device
Hans Verkuil [Mon, 22 Mar 2010 08:22:34 +0000 (05:22 -0300)]
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>
14 years agoV4L/DVB: w9966: remove camelCase
Hans Verkuil [Mon, 22 Mar 2010 08:15:14 +0000 (05:15 -0300)]
V4L/DVB: w9966: remove camelCase

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB: w9966: reorganize the order of functions
Hans Verkuil [Mon, 22 Mar 2010 08:13:17 +0000 (05:13 -0300)]
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>
14 years agoV4L/DVB: pms: remove unnecessary exclusive open/close
Hans Verkuil [Mon, 22 Mar 2010 08:09:07 +0000 (05:09 -0300)]
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>
14 years agoV4L/DVB: v4l: add V4L2_PIX_FMT_Y4 and V4L2_PIX_FMT_Y6 pixelformats
Hans Verkuil [Mon, 22 Mar 2010 07:52:21 +0000 (04:52 -0300)]
V4L/DVB: v4l: add V4L2_PIX_FMT_Y4 and V4L2_PIX_FMT_Y6 pixelformats

Old 4 and 6 bit greyscale pixel formats for the old bw-qcam webcam.
This is needed to convert it to V4L2.

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB: w9966: coding style cleanup
Hans Verkuil [Mon, 22 Mar 2010 07:47:27 +0000 (04:47 -0300)]
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>
14 years agoV4L/DVB: arv: coding style cleanup
Hans Verkuil [Mon, 22 Mar 2010 07:44:29 +0000 (04:44 -0300)]
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>
14 years agoV4L/DVB: bw-qcam: coding style cleanup
Hans Verkuil [Mon, 22 Mar 2010 07:36:04 +0000 (04:36 -0300)]
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>