platform/kernel/linux-amlogic.git
14 years agoV4L/DVB: videobuf-dma-sg: remove external function videobuf_dma_sync()
Mauro Carvalho Chehab [Wed, 5 May 2010 19:23:09 +0000 (16:23 -0300)]
V4L/DVB: videobuf-dma-sg: remove external function videobuf_dma_sync()

While analyzing one of the videobuf patches, I noticed that
videobuf_dma_sync is only used internally inside videobuf-dma-sg.
So, let's remove this function, merging the code at __videobuf_dma_sync()

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB: Add documentation for the new error flag
Pawel Osciak [Wed, 28 Apr 2010 07:05:23 +0000 (04:05 -0300)]
V4L/DVB: Add documentation for the new error flag

Add documentation for V4L2_BUF_FLAG_ERROR.

Signed-off-by: Pawel Osciak <p.osciak@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB: videobuf: Add support for V4L2_BUF_FLAG_ERROR
Hans Verkuil [Wed, 28 Apr 2010 07:05:22 +0000 (04:05 -0300)]
V4L/DVB: videobuf: Add support for V4L2_BUF_FLAG_ERROR

For recoverable stream errors dqbuf() now returns 0 and the error flag
is set instead of returning EIO.

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB: Add a new ERROR flag for DQBUF after recoverable streaming errors
Pawel Osciak [Wed, 28 Apr 2010 07:05:21 +0000 (04:05 -0300)]
V4L/DVB: Add a new ERROR flag for DQBUF after recoverable streaming errors

This flag is intended to indicate streaming errors, which might have
resulted in corrupted video data in the buffer, but the buffer can still
be reused and streaming may continue.

Setting this flag and returning 0 is different from returning EIO. The
latter should now indicate more serious (unrecoverable) errors.

This patch also solves a problem with the ioctl handling code in
vl42-ioctl.c, which does not copy buffer identification data back to the
userspace when EIO is returned, so there is no way for applications
to discover on which buffer the operation failed in such cases.

Signed-off-by: Pawel Osciak <p.osciak@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB: cx25821-video-upstream.c: Added severity to printk calls
Ricardo Maraschini [Tue, 20 Apr 2010 17:22:31 +0000 (14:22 -0300)]
V4L/DVB: cx25821-video-upstream.c: Added severity to printk calls

Signed-off-by: Ricardo Maraschini <ricardo.maraschini@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB: staging:cx25821:fixes coding styles in cx25821-i2c.c
sai [Sat, 20 Mar 2010 05:34:22 +0000 (02:34 -0300)]
V4L/DVB: staging:cx25821:fixes coding styles in cx25821-i2c.c

This is a patch to the cx25821-i2c.c file that fixes warning and errors found by checkpatch.pl tool

[mchehab@redhat.com: fix conflicts with changeset 2587a7ef7b8bc3c7db7c43659297b45b168922ab]
Signed-off-by: sai<tsg321@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB: staging:cx2581: fixes coding style issues in cx25821-cards.c
sai [Tue, 23 Mar 2010 02:29:25 +0000 (23:29 -0300)]
V4L/DVB: staging:cx2581: fixes coding style issues in cx25821-cards.c

This patch fixes all the coding style issues reported by checkpatch.pl tool

Signed-off-by: sai <tsg321@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB: cx25821: fix coding style issues in cx25821-alsa.c
sai gopal [Wed, 28 Apr 2010 17:17:00 +0000 (14:17 -0300)]
V4L/DVB: cx25821: fix coding style issues in cx25821-alsa.c

This is a patch to cx25821-alsa.c file that fixes of most of the
warning & errors found by checkpatch.pl tool

[mchehab@redhat.com: Fix conflicts with changeset 4e0c923a0d23f86c7331b32bc2aeb280e10e029e]
Signed-off-by: sai gopal <tsg321@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB: dvb-usb: gp8psk, fix potential null derefernce
Jiri Slaby [Tue, 27 Apr 2010 21:11:20 +0000 (18:11 -0300)]
V4L/DVB: dvb-usb: gp8psk, fix potential null derefernce

Stanse found that in gp8psk_load_bcm4500fw there is missing a check for
return value of kmalloc. Add one and bail out appropriatelly.

Signed-off-by: Jiri Slaby <jslaby@suse.cz>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB: dib3000mc: reduce large stack usage
Randy Dunlap [Mon, 8 Feb 2010 23:30:33 +0000 (20:30 -0300)]
V4L/DVB: dib3000mc: reduce large stack usage

This patch reduces static stack usage of one of the 2 top offenders
as listed by 'make checkstack':

Building with CONFIG_FRAME_WARN=2048 produces:

drivers/media/dvb/frontends/dib3000mc.c:853: warning: the frame size of 2224 bytes is larger than 2048 bytes

and in 'make checkstack', the stack usage goes from:
0x00000bbd dib3000mc_i2c_enumeration [dib3000mc]: 2232
to unlisted with this patch.

I don't have the hardware that is needed to test this patch.

Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Acked-by: Patrick Boettcher <pboettcher@kernellabs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB: dib7000p: reduce large stack usage fix
Andrew Morton [Tue, 27 Apr 2010 22:09:45 +0000 (19:09 -0300)]
V4L/DVB: dib7000p: reduce large stack usage fix

Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB: dib7000p: reduce large stack usage
Randy Dunlap [Mon, 8 Feb 2010 23:30:44 +0000 (20:30 -0300)]
V4L/DVB: dib7000p: reduce large stack usage

This patch reduces static stack usage of one of the 2 top offenders
as listed by 'make checkstack':

Building with CONFIG_FRAME_WARN=2048 produces:

drivers/media/dvb/frontends/dib7000p.c:1367: warning: the frame size of 2320 bytes is larger than 2048 bytes

and in 'make checkstack', the stack usage goes from:
0x00002409 dib7000p_i2c_enumeration [dib7000p]: 2328
to unlisted with this patch.

Also change one caller of dib7000p_i2c_enumeration() to check its
return value.

I don't have the hardware that is needed to test this patch.

Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB: Add Elgato EyeTV Diversity to dibcom driver
Michael Müller [Tue, 27 Apr 2010 01:18:57 +0000 (22:18 -0300)]
V4L/DVB: Add Elgato EyeTV Diversity to dibcom driver

This patch introduces support for DVB-T for the following dibcom
based card: Elgato EyeTV Diversity (USB-ID: 0fd9:0011)

Support for the Elgato silver IR remote is added too (set parameter
dvb_usb_dib0700_ir_proto=0)

[w.sang@pengutronix.de: rebased to current linuxtv-master]
Signed-off-by: Michael Müller <mueller_michael@alice-dsl.net>
Signed-off-by: Wolfram Sang <w.sang@pengutronix.de>
Signed-off-by: Patrick Boettcher <pboettcher@kernellabs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB: bttv: Add another ids for IVC-200
Kirill Smelkov [Tue, 27 Apr 2010 16:17:51 +0000 (13:17 -0300)]
V4L/DVB: bttv: Add another ids for IVC-200

I have 3 IVC-200 cards (with 4 video channels on each).

2 of the cards identify theirselves as 000[0-3]:a155 (ids already in
cardlist) and another one identifies itself as 080[0-3]:a155, which ids
were unknown so far.

Note - it's IVC-200, not IVC-200G.

Signed-off-by: Kirill Smelkov <kirr@mns.spb.ru>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB: Read MAC for TeVii S470 PCI-e DVB-S2 card
Pierre Gronlier [Mon, 26 Apr 2010 16:26:29 +0000 (13:26 -0300)]
V4L/DVB: Read MAC for TeVii S470 PCI-e DVB-S2 card

This patch retrieve the correct mac address from the eeprom for TeVii
S470 card.

Signed-off-by: Pierre Gronlier <pierre.gronlier@gmail.com>
Cc: Steven Toth <stoth@kernellabs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB: em28xx: fix locks during dvb init sequence
Mauro Carvalho Chehab [Wed, 7 Apr 2010 20:07:58 +0000 (17:07 -0300)]
V4L/DVB: em28xx: fix locks during dvb init sequence

Serialize DVB initialization, to avoid it to happen while analog
initialization is still happening.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB: cx88: fix setting input when using DVB
Istvan Varga [Sat, 27 Mar 2010 12:47:45 +0000 (09:47 -0300)]
V4L/DVB: cx88: fix setting input when using DVB

In cx88-mpeg.c, there is code that sets core->input to CX88_VMUX_DVB.
However, this may be incorrect, since core->input is actually an
index to core->board.input[], which has not enough elements to be
indexed by the value of CX88_VMUX_DVB. So, the modified code searches
core->board.input[] for an input with a type of CX88_VMUX_DVB, and if
it does not find one, the index is simply set to zero.
The change may not have much effect, though, since it appears the only
case when core->input is actually used is when the current input is
being queried.

Signed-off-by: Istvan Varga <istvanv@users.sourceforge.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB: IR/imon: add proper auto-repeat support
Jarod Wilson [Fri, 30 Apr 2010 19:06:12 +0000 (16:06 -0300)]
V4L/DVB: IR/imon: add proper auto-repeat support

Simplified from version 1, in that hacks heisted from ati_remote2.c
aren't actually necessary, the real fix for too many repeats was
from setting too long a timer release value (200ms) on repeats in
mce mode -- this patch drops the release timeout to 33ms, matching
the input subsystem default input_dev->rep[REP_PERIOD].

Signed-off-by: Jarod Wilson <jarod@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB: IR/imon: minor change_protocol fixups
Jarod Wilson [Wed, 28 Apr 2010 17:37:29 +0000 (14:37 -0300)]
V4L/DVB: IR/imon: minor change_protocol fixups

This is a follow-up to my prior patch implementing ir-core's
change_protocol functionality in the imon driver, which eliminates
a false warning when change_protocol is called without a specific
protocol selected yet (i.e., still IR_TYPE_UNKNOWN). It also removes
some extraneous blank lines getting spewn into dmesg.

Signed-off-by: Jarod Wilson <jarod@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB: ir-core: remove ir-functions usage from cx231xx
David Härdeman [Sat, 24 Apr 2010 21:14:16 +0000 (18:14 -0300)]
V4L/DVB: ir-core: remove ir-functions usage from cx231xx

Convert drivers/media/video/cx231xx/cx231xx-input.c to not
rely on ir-functions.c.

(I do not have the hardware so I can only compile test this)

Signed-off-by: David Härdeman <david@hardeman.nu>
Cc: Srinivasa Deevi <srinivasa.deevi@conexant.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB: ir-core: remove IR_TYPE_PD
David Härdeman [Sat, 24 Apr 2010 21:14:00 +0000 (18:14 -0300)]
V4L/DVB: ir-core: remove IR_TYPE_PD

Pulse-distance is not a protocol, it is a line coding (used by some protocols,
like NEC). Looking at the uses of IR_TYPE_PD, the real protocol seems to be
NEC in all cases (drivers/media/video/cx88/cx88-input.c is the only user).

So, remove IR_TYPE_PD while it is still easy to do so.

Signed-off-by: David Härdeman <david@hardeman.nu>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB: IR/imon: convert to ir-core protocol change handling
Jarod Wilson [Fri, 23 Apr 2010 05:27:11 +0000 (02:27 -0300)]
V4L/DVB: IR/imon: convert to ir-core protocol change handling

Drop the imon driver's internal protocol definitions in favor of using
those provided by ir-core. Should make ir-keytable Just Work for
switching protocol on the fly on the imon devices that support both the
native imon remotes and mce remotes.

The imon-no-pad-stabilize pseudo-protocol was dropped as a protocol, and
converted to a separate modprobe option (which it probably should have
been in the first place). On the TODO list is to convert this to an as yet
unwritten protocol-specific options framework.

While the mce remotes obviously map to IR_TYPE_RC6, I've yet to look at
what the actual ir signals from the native imon remotes are, so for the
moment, imon native ir is mapped to IR_TYPE_OTHER. Nailing it down more
accurately is also on the TODO list.

Signed-off-by: Jarod Wilson <jarod@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB: event: Export the v4l2_event_init and v4l2_event_dequeue functions
Laurent Pinchart [Sun, 2 May 2010 17:32:43 +0000 (14:32 -0300)]
V4L/DVB: event: Export the v4l2_event_init and v4l2_event_dequeue functions

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Acked-by: Sakari Ailus <sakari.ailus@maxwell.research.nokia.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB: V4L: Events: Replace bad WARN_ON() with assert_spin_locked()
Sakari Ailus [Mon, 3 May 2010 15:42:46 +0000 (12:42 -0300)]
V4L/DVB: V4L: Events: Replace bad WARN_ON() with assert_spin_locked()

spin_is_locked() always returns zero when spinlock debugging is
disabled on a single CPU machine. Replace WARN_ON() with
assert_spin_locked().

Thanks to Laurent Pinchart for spotting this!

Signed-off-by: Sakari Ailus <sakari.ailus@maxwell.research.nokia.com>
Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoFix compilation breakage with tm6000
Mauro Carvalho Chehab [Mon, 3 May 2010 18:17:57 +0000 (15:17 -0300)]
Fix compilation breakage with tm6000

Randy Dunlap <randy.dunlap@oracle.com>  reported a breakage while compiling
drivers/staging/tm6000, due to this change:
    commit 1c1b78bee1a94f98deeb9c24b21c4812e191646c
    Author: Greg Kroah-Hartman <gregkh@suse.de>
    Date:   Thu Apr 29 15:46:07 2010 -0700

    USB: remove unused usb_buffer_alloc and usb_buffer_free macros

    Now that all callers are converted over, remove the compatibility
    functions and all is good.

As the function got renamed, the rename should also be applied at
tm6000.

Acked-by: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB: tm6000: update the todo list
Mauro Carvalho Chehab [Mon, 3 May 2010 07:38:15 +0000 (04:38 -0300)]
V4L/DVB: tm6000: update the todo list

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB: Fix color format with tm6010
Mauro Carvalho Chehab [Mon, 3 May 2010 07:25:59 +0000 (04:25 -0300)]
V4L/DVB: Fix color format with tm6010

The values for the fourcc format were correct, but applied to the
wrong register. With this change, video is now barely working again with
tm6000.

While here, let's remove, for now, the memset. This way, people can
have some image when testing this device.

Yet to be fixed: parts of the image frame are missed. As we don't clean
the buffers anymore, this is "recovered" by repeating the values from a
previous frame. The quality is bad, since the image pixels will contain
data from some previous frames, generating weird delay artifacts.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB: tm6000: fix coding style issues of tm6000-cards.c
Roel Van Nyen [Tue, 27 Apr 2010 21:57:00 +0000 (18:57 -0300)]
V4L/DVB: tm6000: fix coding style issues of tm6000-cards.c

fix coding style issues

[mchehab@redhat.com: Fix conflicts with other patches]
Signed-off-by: Roel Van Nyen <roel.vannyen@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB: tm6000: renaming firmware
Stefan Ringel [Fri, 23 Apr 2010 15:43:42 +0000 (12:43 -0300)]
V4L/DVB: tm6000: renaming firmware

renaming tm6000-xc3028.fw to xc3028-v24.fw

Signed-off-by: Stefan Ringel <stefan.ringel@arcor.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB: tm6000: bugfix analog init for tm6010
Stefan Ringel [Thu, 29 Apr 2010 12:24:47 +0000 (09:24 -0300)]
V4L/DVB: tm6000: bugfix analog init for tm6010

- change values in function tm6000_set_fourcc_format
- disable digital source
- add vbi and audio init

Signed-off-by: Stefan Ringel <stefan.ringel@arcor.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB: tm6000: Don't copy outside the buffer
Mauro Carvalho Chehab [Sun, 2 May 2010 20:14:33 +0000 (17:14 -0300)]
V4L/DVB: tm6000: Don't copy outside the buffer

tm6000 tm6000_irq_callback :urb resubmit failed (error=-1)
BUG: unable to handle kernel paging request at 000000000100f700
IP: [<ffffffffa007ee79>] tm6000_irq_callback+0x51e/0xac7 [tm6000]

(gdb) list * tm6000_irq_callback+0x51e
0x2e79 is in tm6000_irq_callback (drivers/staging/tm6000/tm6000-video.c:363).
358                                             dev->isoc_ctl.tmp_buf_len--;
359                                     }
360                                     if (dev->isoc_ctl.tmp_buf_len) {
361                                             memcpy (&header,p,
362                                                     dev->isoc_ctl.tmp_buf_l$
363                                             memcpy (((u8 *)header)+
364                                                     dev->isoc_ctl.tmp_buf,
365                                                     ptr,
366                                                     4-dev->isoc_ctl.tmp_buf$
367                                             ptr+=4-dev->isoc_ctl.tmp_buf_le$

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB: tm6000: Fix a panic if buffer become NULL
Mauro Carvalho Chehab [Sun, 2 May 2010 14:42:45 +0000 (11:42 -0300)]
V4L/DVB: tm6000: Fix a panic if buffer become NULL

Changing a video standard takes a long time to happen on tm6000, since it
needs to load another firmware, and the i2c implementation on this device
is really slow. When the driver tries to change the video standard, a
kernel panic is produced:

BUG: unable to handle kernel NULL pointer dereference at 0000000000000008
IP: [<ffffffffa0c7b48a>] tm6000_irq_callback+0x57f/0xac2 [tm6000]
...
Kernel panic - not syncing: Fatal exception in interrupt

By inspecting it with gdb:

(gdb) list *tm6000_irq_callback+0x57f
0x348a is in tm6000_irq_callback (drivers/staging/tm6000/tm6000-video.c:202).
197             /* FIXME: move to tm6000-isoc */
198             static int last_line = -2, start_line = -2, last_field = -2;
199
200             /* FIXME: this is the hardcoded window size
201              */
202             unsigned int linewidth = (*buf)->vb.width << 1;
203
204             if (!dev->isoc_ctl.cmd) {
205                     c = (header >> 24) & 0xff;
206

Clearly, it was the trial to access *buf, at line 202 that caused the
Panic.

As ioctl is serialized, While S_STD is handled,QBUF/DQBUF won't be called.
So, the driver will run out of the buffers, and *buf will become NULL.

As, on tm6000, the same URB can contain more than one video buffer, it is
likely to hit a condition where no new buffer is available whily copying
the streams. The fix is to leave the URB copy loop, if there's no more buffers
are available.

The same bug could also be produced by an application that is not fast enough
to request new video buffers.

The same bug were reported by Bee Hock Goh <beehock@gmail.com>.

Thanks-to: Bee Hock Goh <beehock@gmail.com> for reporting the bug
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB: tm6000: Properly set alternate when preparing to stream
Mauro Carvalho Chehab [Mon, 26 Apr 2010 14:24:18 +0000 (11:24 -0300)]
V4L/DVB: tm6000: Properly set alternate when preparing to stream

Although the code is getting the better alternates, it is not really using
it. Get the interface/alternate numbers and use it where needed.

This patch implements also one small fix at the last_line set, as
proposed by Bee Hock Goh <behock@gmail.com>.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB: tm6000: Add additional GPIO for UT821 during frmware loading
Bee Hock Goh [Sun, 25 Apr 2010 06:50:57 +0000 (03:50 -0300)]
V4L/DVB: tm6000: Add additional GPIO for UT821 during frmware loading

Signed-off-by: Bee Hock Goh <beehock@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB: tm6000: fix i2c read
Dmitri Belimov [Wed, 28 Apr 2010 01:32:43 +0000 (22:32 -0300)]
V4L/DVB: tm6000: fix i2c read

Set correct limit for I2C packet.
Use different method for the tm5600/tm6000 and tm6010 to read word.

[mchehab@redhat.com: Fix CodingStyle]
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: gspca - zc3xx: Fix the gamma calculation from the contrast
Jean-François Moine [Sun, 25 Apr 2010 18:25:42 +0000 (15:25 -0300)]
V4L/DVB: gspca - zc3xx: Fix the gamma calculation from the contrast

Signed-off-by: Jean-François Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB: gspca - zc3xx.c: Remove the brightness control
Jean-François Moine [Sun, 25 Apr 2010 18:05:31 +0000 (15:05 -0300)]
V4L/DVB: gspca - zc3xx.c: Remove the brightness control

Brightness is done by the gamma tables and not by single bridge registers.
It will be back as soon as an algorithm will be found.

This change also fixes the autogain problem found by Jose Alberto Reguero
(webcam 046d:08dd).

Signed-off-by: Jean-François Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB: gspca - zc3xx: Fix the light frequency values for pas202b and pb0330
Jean-François Moine [Sun, 25 Apr 2010 17:57:10 +0000 (14:57 -0300)]
V4L/DVB: gspca - zc3xx: Fix the light frequency values for pas202b and pb0330

The error was introduced by "gspca - zc3xx: Rename the USB sequences."
in commit e945e2e44c798f84494260c02478d3c23965bb93.

Signed-off-by: Jean-François Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB: gspca - sonixj: Add sensor soi768
Jean-François Moine [Sun, 25 Apr 2010 17:45:43 +0000 (14:45 -0300)]
V4L/DVB: gspca - sonixj: Add sensor soi768

The webcams 0c45:613e may contain the sensors ov7630 or soi768.
A sensor probe is done at init time when the sensor is declared ov7630.

Signed-off-by: Jean-François Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB: gspca - sonixj: Reset the bridge after sensor probe
Jean-François Moine [Sun, 25 Apr 2010 17:41:51 +0000 (14:41 -0300)]
V4L/DVB: gspca - sonixj: Reset the bridge after sensor probe

Signed-off-by: Jean-François Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB: gspca - sonixj: Adjust minor values of sensor ov7630. - set the color gains...
Jean-François Moine [Sun, 25 Apr 2010 17:33:31 +0000 (14:33 -0300)]
V4L/DVB: gspca - sonixj: Adjust minor values of sensor ov7630.  - set the color gains to null at init time  - change value of register 0x9a

Signed-off-by: Jean-François Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB: gspca - sonixj: Set the colors at startup time
Jean-François Moine [Sun, 25 Apr 2010 17:31:05 +0000 (14:31 -0300)]
V4L/DVB: gspca - sonixj: Set the colors at startup time

Signed-off-by: Jean-François Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB: gspca - sonixj: Adjust debug output. - fix bad function name - add debug...
Jean-François Moine [Sun, 25 Apr 2010 17:27:39 +0000 (14:27 -0300)]
V4L/DVB: gspca - sonixj: Adjust debug output.  - fix bad function name  - add debug info for i2c buffer write

Signed-off-by: Jean-François Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB: gspca - sonixj: Split the init sequence of sensor ov7630
Jean-François Moine [Sun, 25 Apr 2010 17:23:39 +0000 (14:23 -0300)]
V4L/DVB: gspca - sonixj: Split the init sequence of sensor ov7630

Signed-off-by: Jean-François Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB: v4l: videobuf: qbuf now uses relevant v4l2_buffer fields for OUTPUT types
Pawel Osciak [Wed, 21 Apr 2010 09:44:27 +0000 (06:44 -0300)]
V4L/DVB: v4l: videobuf: qbuf now uses relevant v4l2_buffer fields for OUTPUT  types

According to the V4L2 specification, applications set bytesused, field and
timestamp fields of struct v4l2_buffer when the buffer is intended for
output and memory type is MMAP. This adds proper copying of those values
to videobuf_buffer so drivers can use them.

Signed-off-by: Pawel Osciak <p.osciak@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB: omap_vout:V4L2 Display: Changed enum return type to int
Vaibhav Hiremath [Sun, 11 Apr 2010 13:50:23 +0000 (10:50 -0300)]
V4L/DVB: omap_vout:V4L2 Display: Changed enum return type to int

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: V4L2: Add support for OMAP2/3 V4L2 display driver on top of DSS2
Vaibhav Hiremath [Sun, 11 Apr 2010 13:41:49 +0000 (10:41 -0300)]
V4L/DVB: V4L2: Add support for OMAP2/3 V4L2 display driver on top of DSS2

Features Supported -
1. Provides V4L2 user interface for the video pipelines of DSS
2. Basic streaming working on LCD, DVI and TV.
3. Works on latest DSS2 library from Tomi
4. Support for various pixel formats like YUV, UYVY, RGB32, RGB24,
   RGB565
5. Supports Alpha blending.
6. Supports Color keying both source and destination.
7. Supports rotation.
8. Supports cropping.
9. Supports Background color setting.
10. Allocated buffers to only needed size

Signed-off-by: Vaibhav Hiremath <hvaibhav@ti.com>
Reviewed-by: Hans Verkuil <hverkuil@xs4all.nl>
Reviewed-by: Muralidharan Karicheri <mkaricheri@gmail.com>
Signed-off-by: Murailidharan Karicheri <mkaricheri@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB: v4l spec: document new events
Hans Verkuil [Sat, 27 Mar 2010 17:10:57 +0000 (14:10 -0300)]
V4L/DVB: v4l spec: document new events

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB: v4l spec: document what odd and even fields are
Hans Verkuil [Sat, 27 Mar 2010 17:10:37 +0000 (14:10 -0300)]
V4L/DVB: v4l spec: document what odd and even fields are

Document that odd == top and even == bottom. I can never remember this,
so it is probably worth documenting.

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB: ivtv: support the new events API
Hans Verkuil [Sat, 27 Mar 2010 17:10:13 +0000 (14:10 -0300)]
V4L/DVB: ivtv: support the new events API

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB: v4l: add VSYNC and EOS events for use with ivtv
Hans Verkuil [Sat, 27 Mar 2010 17:09:52 +0000 (14:09 -0300)]
V4L/DVB: v4l: add VSYNC and EOS events for use with ivtv

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB: V4L: Events: Add documentation
Sakari Ailus [Sat, 27 Mar 2010 13:58:24 +0000 (10:58 -0300)]
V4L/DVB: V4L: Events: Add documentation

Add documentation on how to use V4L2 events, both for V4L2 drivers and for
V4L2 applications.

Signed-off-by: Sakari Ailus <sakari.ailus@maxwell.research.nokia.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB: V4L: Events: Support event handling in do_ioctl
Sakari Ailus [Sat, 27 Mar 2010 14:02:10 +0000 (11:02 -0300)]
V4L/DVB: V4L: Events: Support event handling in do_ioctl

Add support for event handling to do_ioctl.

Signed-off-by: Sakari Ailus <sakari.ailus@maxwell.research.nokia.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB: V4L: Events: Add backend
Sakari Ailus [Mon, 1 Mar 2010 08:14:18 +0000 (05:14 -0300)]
V4L/DVB: V4L: Events: Add backend

Add event handling backend to V4L2. The backend handles event subscription
and delivery to file handles. Event subscriptions are based on file handle.
Events may be delivered to all subscribed file handles on a device
independent of where they originate from.

Signed-off-by: Sakari Ailus <sakari.ailus@maxwell.research.nokia.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB: V4L: Events: Add new ioctls for events
Sakari Ailus [Wed, 24 Feb 2010 22:19:05 +0000 (19:19 -0300)]
V4L/DVB: V4L: Events: Add new ioctls for events

This patch adds a set of new ioctls to the V4L2 API. The ioctls conform to
V4L2 Events RFC version 2.3:

<URL:http://www.spinics.net/lists/linux-media/msg12033.html>

Signed-off-by: Sakari Ailus <sakari.ailus@maxwell.research.nokia.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB: V4L: File handles: Add documentation
Sakari Ailus [Sat, 20 Mar 2010 21:28:48 +0000 (18:28 -0300)]
V4L/DVB: V4L: File handles: Add documentation

Add documentation on using V4L2 file handles (v4l2_fh) in V4L2 drivers.

Signed-off-by: Sakari Ailus <sakari.ailus@maxwell.research.nokia.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB: V4L: File handles
Sakari Ailus [Tue, 23 Mar 2010 12:25:26 +0000 (09:25 -0300)]
V4L/DVB: V4L: File handles

This patch adds a list of v4l2_fh structures to every video_device.
It allows using file handle related information in V4L2. The event interface
is one example of such use.

The use of v4l2_fh is not mandatory for drivers.

Signed-off-by: Sakari Ailus <sakari.ailus@maxwell.research.nokia.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB: [v5,2/2] v4l: Add a mem-to-mem videobuf framework test device
Pawel Osciak [Fri, 23 Apr 2010 08:38:38 +0000 (05:38 -0300)]
V4L/DVB: [v5,2/2] v4l: Add a mem-to-mem videobuf framework test device

This is a virtual device driver for testing the memory-to-memory framework.

This virtual device uses in-memory buffers for both its source and destination.
It is capable of multi-instance, multi-buffer-per-transaction operation
(via the mem2mem framework).

[mchehab@redhat.com: use videobuf_queue_to_vaddr instead of the removed videobuf_queue_to_vmalloc]
Signed-off-by: Pawel Osciak <p.osciak@samsung.com>
Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Reviewed-by: Vaibhav Hiremath <hvaibhav@ti.com>
Tested-by: Vaibhav Hiremath <hvaibhav@ti.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB: add memory-to-memory device helper framework for videobuf
Pawel Osciak [Fri, 23 Apr 2010 08:38:37 +0000 (05:38 -0300)]
V4L/DVB: add memory-to-memory device helper framework for videobuf

A mem-to-mem device is a device that uses memory buffers passed by
userspace applications for both their source and destination data. This
is different from existing drivers, which utilize memory buffers for either
input or output, but not both.

In terms of V4L2 such a device would be both of OUTPUT and CAPTURE type.

Examples of such devices would be: image 'resizers', 'rotators',
'colorspace converters', etc.

This patch adds a separate Kconfig sub-menu for mem-to-mem devices as well.

Signed-off-by: Pawel Osciak <p.osciak@samsung.com>
Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Reviewed-by: Vaibhav Hiremath <hvaibhav@ti.com>
Tested-by: Vaibhav Hiremath <hvaibhav@ti.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB: core: add support for more color effects
Xiaolin Zhang [Mon, 19 Apr 2010 02:06:50 +0000 (23:06 -0300)]
V4L/DVB: core: add support for more color effects

Add support for more color effects (negative, sketch, emboss, etc) by
extending the  v4l2_colorfx enum items.

Signed-off-by: Xiaolin Zhang <xiaolin.zhang@intel.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB: V4L: v4l2-subdev driver for AK8813 and AK8814 TV-encoders from AKM
Guennadi Liakhovetski [Mon, 29 Mar 2010 07:45:22 +0000 (04:45 -0300)]
V4L/DVB: V4L: v4l2-subdev driver for AK8813 and AK8814 TV-encoders from AKM

AK8814 only differs from AK8813 by included Macrovision Copy Protection
function. This patch adds a driver for AK8813 and AK8814 I2C PAL/NTSC TV
encoders.

Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB: V4L: SuperH Video Output Unit (VOU) driver
Guennadi Liakhovetski [Wed, 17 Mar 2010 14:21:13 +0000 (11:21 -0300)]
V4L/DVB: V4L: SuperH Video Output Unit (VOU) driver

A number of SuperH Mobile SoCs, including sh7724, include a Video Output Unit.
This patch adds a video (V4L2) output driver for it. The driver uses v4l2-subdev
and mediabus APIs to interface to TV encoders.

Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Acked-by: Paul Mundt <lethal@linux-sh.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB: videobuf-dma-contig.c: simplify pointer dereference
Guennadi Liakhovetski [Tue, 23 Mar 2010 14:52:11 +0000 (11:52 -0300)]
V4L/DVB: videobuf-dma-contig.c: simplify pointer dereference

Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB: sh_mobile_ceu_camera.c: update documentation to reflect the new cropping
Guennadi Liakhovetski [Tue, 23 Mar 2010 14:42:32 +0000 (11:42 -0300)]
V4L/DVB: sh_mobile_ceu_camera.c: update documentation to reflect the new cropping

Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB: soc-camera: update comment
Guennadi Liakhovetski [Tue, 23 Mar 2010 14:31:46 +0000 (11:31 -0300)]
V4L/DVB: soc-camera: update comment

soc-camera no longer requires .set_crop() implementations to update their
argument. Update the commentary.

Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB: sh_mobile_ceu_camera.c: preserve output window on VIDIOC_S_CROP
Guennadi Liakhovetski [Tue, 23 Mar 2010 14:23:31 +0000 (11:23 -0300)]
V4L/DVB: sh_mobile_ceu_camera.c: preserve output window on VIDIOC_S_CROP

Current version of sh_mobile_ceu_camera.c interprets the V4L2 API specification
of the VIDIOC_S_CROP ioctl as "change input (for capture devices) area,
preserve scaling factors, therefore change output window," whereas a more
intuitive interpretation of the API is "change input area, preserve output
window." Switch sh_mobile_ceu_camera.c to use this interpretation.

Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB: vivi: clean up and a major overhaul
Hans Verkuil [Sat, 10 Apr 2010 07:13:53 +0000 (04:13 -0300)]
V4L/DVB: vivi: clean up and a major overhaul

- Clean up the code
- Use the kernel's built-in vga8x16 font instead of our own.
- Drop exclusive open: now multiple users can open the device as per the V4L2 spec.
- Move the format description to the vivi device instead of keeping it in the file
  handle. Again as per the spec.
- Streamline and simplify the drawing code. It is now easy to add text on top of
  the colorbar pattern.
- Upgrade the max resolution to 1920x1200.

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB: videobuf-dma-sg: Avoid using a wrong size
Mauro Carvalho Chehab [Sun, 25 Apr 2010 14:23:52 +0000 (11:23 -0300)]
V4L/DVB: videobuf-dma-sg: Avoid using a wrong size

drivers/media/video/videobuf-dma-sg.c: In function ‘__videobuf_mmap_mapper’:
drivers/media/video/videobuf-dma-sg.c:557: warning: ‘size’ may be used uninitialized in this function

The condition where size is floating should never happen, due to the paranoia check,
but a future change at the logic might break it. So, let's just set size to zero and
use it for the paranoia check.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB: gspca - main: Stop the webcam when bandwidth too small
Jean-François Moine [Fri, 9 Apr 2010 09:11:36 +0000 (06:11 -0300)]
V4L/DVB: gspca - main: Stop the webcam when bandwidth too small

Signed-off-by: Jean-François Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB: gspca - main: Restart streaming after reqbuf
Jean-François Moine [Fri, 9 Apr 2010 09:07:58 +0000 (06:07 -0300)]
V4L/DVB: gspca - main: Restart streaming after reqbuf

Signed-off-by: Jean-François Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB: gspca - main: Check the file doing stream on/off
Jean-François Moine [Fri, 9 Apr 2010 09:06:11 +0000 (06:06 -0300)]
V4L/DVB: gspca - main: Check the file doing stream on/off

Signed-off-by: Jean-François Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB: v4l videobuf: add videobuf_buffer *buf as argument to mmap_mapper
Hans Verkuil [Sun, 28 Mar 2010 12:09:05 +0000 (09:09 -0300)]
V4L/DVB: v4l videobuf: add videobuf_buffer *buf as argument to mmap_mapper

mmap_mapper should operate on a buffer, not on a complete queue. So let
the videobuf-core find the correct buffer instead of duplicating that
code in each mmap_mapper implementation.

The dma-sg implementation has backwards compatibility code for handling
the V4L1_COMPAT layer. This code is now under the v4L1_COMPAT config option.

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB: v4l videobuf: move video_copy_to_user and copy_stream to core
Hans Verkuil [Sun, 28 Mar 2010 12:22:53 +0000 (09:22 -0300)]
V4L/DVB: v4l videobuf: move video_copy_to_user and copy_stream to core

The video_copy_to_user and copy_stream ops are almost identical for all
videobuf memtype variants. All that is needed is to use the new vaddr
op and these functions can be moved into the core, ensuring we have just
one single implementation instead of three.

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB: v4l videobuf: rename videobuf_queue_to_vmalloc to videobuf_queue_to_vaddr
Hans Verkuil [Sun, 28 Mar 2010 11:33:23 +0000 (08:33 -0300)]
V4L/DVB: v4l videobuf: rename videobuf_queue_to_vmalloc to videobuf_queue_to_vaddr

Ths function returns the virtual kernel address of the buffer and has
nothing to do with allocation.

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB: v4l videobuf: rename .vmalloc to .vaddr
Hans Verkuil [Sun, 28 Mar 2010 11:18:37 +0000 (08:18 -0300)]
V4L/DVB: v4l videobuf: rename .vmalloc to .vaddr

Rename the .vmalloc op in struct videobuf_qtype_ops to .vaddr. This op returns
the virtual kernel address of a buffer. vaddr is a lot less confusing than
vmalloc since this callback does do any allocations.

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB: v4l videobuf: use struct videobuf_buffer * instead of void * for videobuf_alloc
Hans Verkuil [Sun, 28 Mar 2010 11:09:44 +0000 (08:09 -0300)]
V4L/DVB: v4l videobuf: use struct videobuf_buffer * instead of void * for videobuf_alloc

videobuf_alloc() returned a void *. Change to struct videobuf_buffer *
to get better type checking.

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB: v4l videobuf: remove unused is_mmapped field
Hans Verkuil [Sun, 28 Mar 2010 10:59:11 +0000 (07:59 -0300)]
V4L/DVB: v4l videobuf: remove unused is_mmapped field

Thanks to Pawel Osciak for noticing this.

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB: v4l videobuf: remove mmap_free callback
Hans Verkuil [Sun, 28 Mar 2010 10:54:29 +0000 (07:54 -0300)]
V4L/DVB: v4l videobuf: remove mmap_free callback

Remove the mmap_free callback from struct videobuf_qtype_ops.

All implementations of this callback do the same trivial check: return
-EBUSY if any buffer is mmapped. That can also be tested in the
videobuf core.

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB: v4l videobuf: remove unused mmap callback
Hans Verkuil [Sun, 28 Mar 2010 10:34:18 +0000 (07:34 -0300)]
V4L/DVB: v4l videobuf: remove unused mmap callback

The mmap callback in struct videobuf_qtype_ops is never used.
Remove.

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB: Add firmware v2.4 to xc2028/xc3028 extracting tool
Mauro Carvalho Chehab [Thu, 22 Apr 2010 20:09:18 +0000 (17:09 -0300)]
V4L/DVB: Add firmware v2.4 to xc2028/xc3028 extracting tool

From: Stefan Ringel <stefan.ringel@arcor.de>

The firmware were seen to be needed with some tm6000 devices that don't
work with version 2.7.

Thanks-to: Bee Hock Goh <beehock@gmail.com>
Signed-off-by: Stefan Ringel <stefan.ringel@arcor.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoRevert "V4L/DVB: Add FE_CAN_PSK_8 to allow apps to identify PSK_8 capable DVB devices"
Mauro Carvalho Chehab [Wed, 21 Apr 2010 14:36:57 +0000 (11:36 -0300)]
Revert "V4L/DVB: Add FE_CAN_PSK_8 to allow apps to identify PSK_8 capable DVB devices"

Patch reverted per Andreas Oberritter <obi@linuxtv.org> request. It is basically
not ready yet for upstream merge.

This reverts commit 77b2ad374a82e3d740cb1780ff4caedc3e051b37.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB: s2255drv: firmware reload on timeout
Dean Anderson [Mon, 12 Apr 2010 18:05:37 +0000 (15:05 -0300)]
V4L/DVB: s2255drv: firmware reload on timeout

Signed-off-by: Dean Anderson <linux-dev@sensoray.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB: Add FE_CAN_PSK_8 to allow apps to identify PSK_8 capable DVB devices
Klaus Schmidinger [Sun, 11 Apr 2010 09:12:52 +0000 (06:12 -0300)]
V4L/DVB: Add FE_CAN_PSK_8 to allow apps to identify PSK_8 capable DVB devices

The enum fe_caps provides flags that allow an application to detect
whether a device is capable of handling various modulation types etc.
A flag for detecting PSK_8, however, is missing.
This patch adds the flag FE_CAN_PSK_8 to frontend.h and implements
it for the gp8psk-fe.c and cx24116.c driver (apparently the only ones
with PSK_8). Only the gp8psk-fe.c has been explicitly tested, though.

Signed-off-by: Klaus Schmidinger <Klaus.Schmidinger@tvdr.de>
Tested-by: Derek Kelly <user.vdr@gmail.com>
Acked-by: Manu Abraham <manu@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB: ir-core: fix some confusing comments
David Härdeman [Thu, 15 Apr 2010 21:46:35 +0000 (18:46 -0300)]
V4L/DVB: ir-core: fix some confusing comments

Fix some confusing comments in drivers/media/IR/*

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 table resize during keymap init
Mauro Carvalho Chehab [Tue, 18 May 2010 05:06:06 +0000 (02:06 -0300)]
V4L/DVB: ir-core: fix table resize during keymap init

drivers/media/IR/ir-keytable.c would alloc a suitably sized keymap table
only to have it resized as it is populated with the initial keymap.

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 double spinlock init in drivers/media/IR/rc-map.c
David Härdeman [Thu, 15 Apr 2010 21:46:25 +0000 (18:46 -0300)]
V4L/DVB: ir-core: fix double spinlock init in drivers/media/IR/rc-map.c

Fix a double initialization of the same spinlock in drivers/media/IR/rc-map.c.

Signed-off-by: David Härdeman <david@hardeman.nu>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB: ir-core: remove ir-functions usage from dm1105
David Härdeman [Thu, 15 Apr 2010 21:46:15 +0000 (18:46 -0300)]
V4L/DVB: ir-core: remove ir-functions usage from dm1105

Convert drivers/media/dvb/dm1105/dm1105.c to not rely on
ir-functions.c.

Signed-off-by: David Härdeman <david@hardeman.nu>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB: irmon: Cleanup some warning noise
Mauro Carvalho Chehab [Tue, 20 Apr 2010 22:11:30 +0000 (19:11 -0300)]
V4L/DVB: irmon: Cleanup some warning noise

Driver is not properly initializing u64 constants on 32 bit systems:
drivers/media/IR/imon.c:301: warning: integer constant is too large for ‘long’ type
drivers/media/IR/imon.c:302: warning: integer constant is too large for ‘long’ type
drivers/media/IR/imon.c:304: warning: integer constant is too large for ‘long’ type
drivers/media/IR/imon.c:305: warning: integer constant is too large for ‘long’ type
drivers/media/IR/imon.c:308: warning: integer constant is too large for ‘long’ type
drivers/media/IR/imon.c:309: warning: integer constant is too large for ‘long’ type
drivers/media/IR/imon.c:310: warning: integer constant is too large for ‘long’ type

Fix also a few troubles at error printk handling:
drivers/media/IR/imon.c: In function ‘imon_init_intf0’:
drivers/media/IR/imon.c:1909: warning: ‘ret’ may be used uninitialized in this function
drivers/media/IR/imon.c: In function ‘imon_init_intf1’:
drivers/media/IR/imon.c:1989: warning: ‘ret’ may be used uninitialized in this function

Cc: Jarod Wilson <jarod@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB: ir-core: Add Sony support to ir-core
David Härdeman [Thu, 15 Apr 2010 21:46:10 +0000 (18:46 -0300)]
V4L/DVB: ir-core: Add Sony support to ir-core

This patch adds a Sony12/15/20 decoder 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: ir-core: Add JVC support to ir-core
David Härdeman [Thu, 15 Apr 2010 21:46:05 +0000 (18:46 -0300)]
V4L/DVB: ir-core: Add JVC support to ir-core

This patch adds a JVC decoder 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: ir-core-priv.h: Fix a few CodingStyle errors
Mauro Carvalho Chehab [Tue, 20 Apr 2010 21:50:54 +0000 (18:50 -0300)]
V4L/DVB: ir-core-priv.h: Fix a few CodingStyle errors

As reported by checkpatch.pl:

ERROR: open brace '{' following function declarations go on the next line
+static inline bool geq_margin(unsigned d1, unsigned d2, unsigned margin) {

ERROR: open brace '{' following function declarations go on the next line
+static inline bool eq_margin(unsigned d1, unsigned d2, unsigned margin) {

ERROR: open brace '{' following function declarations go on the next line
+static inline bool is_transition(struct ir_raw_event *x, struct ir_raw_event *y) {

Cc: David Härdeman <david@hardeman.nu>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB: ir-core: change duration to be coded as a u32 integer
David Härdeman [Thu, 15 Apr 2010 21:46:00 +0000 (18:46 -0300)]
V4L/DVB: ir-core: change duration to be coded as a u32 integer

This patch implements the agreed upon 1:31 integer encoded pulse/duration
struct for ir-core raw decoders. All decoders have been tested after the
change. Comments are welcome.

Signed-off-by: David Härdeman <david@hardeman.nu>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB: ir-core: add imon driver
Jarod Wilson [Fri, 16 Apr 2010 21:29:02 +0000 (18:29 -0300)]
V4L/DVB: ir-core: add imon driver

This is a new driver for the SoundGraph iMON and Antec Veris IR/display
devices commonly found in many home theater pc cases and as after-market
case additions.

[mchehab@redhat.com: add KERN_CONT on line 2098 to shutup checkpatc.pl]

Signed-off-by: Jarod Wilson <jarod@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB: ir-core: add imon pad and mce keymaps
Jarod Wilson [Fri, 16 Apr 2010 21:28:35 +0000 (18:28 -0300)]
V4L/DVB: ir-core: add imon pad and mce keymaps

This adds the keymaps for the hardware decode scancodes imon
devices create for their native imon pad (and mini) remotes,
and the hardware scancodes generated by the imon devices when
used with an rc6 windows media center ed. remote.

Signed-off-by: Jarod Wilson <jarod@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB: ir-core: make ir_g_keycode_from_table a public function
Jarod Wilson [Fri, 16 Apr 2010 21:27:58 +0000 (18:27 -0300)]
V4L/DVB: ir-core: make ir_g_keycode_from_table a public function

The imon driver I've previously submitted and have been porting to
use ir-core needs to use ir_g_keycode_from_table, as ir_keydown is
not sufficient, due to these things having really oddball hardware
decoders in them. This just moves the function declaration from
ir-core-priv.h over to ir-core.h.

Signed-off-by: Jarod Wilson <jarod@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB: s2255drv: removes kref tracking and videodev parent
Dean Anderson [Fri, 9 Apr 2010 22:54:26 +0000 (19:54 -0300)]
V4L/DVB: s2255drv: removes kref tracking and videodev parent

kref replaced as suggested in code review
uses atomic variable to track when it is ok to delete device
removes setting of video device parent, which is now
handled in v4l2_device.c

Signed-off-by: Dean Anderson <linux-dev@sensoray.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB: s2255drv: fix: v4l2_dev should be registered once only.
Dean Anderson [Tue, 20 Apr 2010 20:21:32 +0000 (17:21 -0300)]
V4L/DVB: s2255drv: fix: v4l2_dev should be registered once only.

usb_set_intfdata should not be used when using v4l2_device_register
and a non-NULL argument for the device.

Signed-off-by: Dean Anderson <linux-dev@sensoray.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB: pvrusb2-v4l2: Rename dev_info to pdi
Joe Perches [Mon, 5 Apr 2010 19:05:39 +0000 (16:05 -0300)]
V4L/DVB: pvrusb2-v4l2: Rename dev_info to pdi

There is a macro called dev_info that prints struct device specific
information.  Having variables with the same name can be confusing and
prevents conversion of the macro to a function.

Rename the existing dev_info variables to something else in preparation
to converting the dev_info macro to a function.

Signed-off-by: Joe Perches <joe@perches.com>
Acked-by: Mike Isely <isely@pobox.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoir-core: Fix the delete logic
Mauro Carvalho Chehab [Sun, 11 Apr 2010 03:26:23 +0000 (00:26 -0300)]
ir-core: Fix the delete logic

Instead of removing an entry, the logic were doing both a deletion and
a key addition, as shown by the log:

[11517.323314] ir_getkeycode: unknown key for scancode 0x0050
[11517.326529] ir_do_setkeycode: #80: Deleting scan 0x0050
[11517.326529] ir_do_setkeycode: #80: New scan 0x0050 with key 0x0000
[11517.340598] ir_getkeycode: unknown key for scancode 0x0051
[11517.343811] ir_do_setkeycode: #81: Deleting scan 0x0051
[11517.343811] ir_do_setkeycode: #81: New scan 0x0051 with key 0x0000
[11517.357889] ir_getkeycode: unknown key for scancode 0x0052
[11517.361104] ir_do_setkeycode: #82: Deleting scan 0x0052
[11517.361104] ir_do_setkeycode: #82: New scan 0x0052 with key 0x0000
[11517.375453] ir_getkeycode: unknown key for scancode 0x0053
[11517.378474] ir_do_setkeycode: #83: Deleting scan 0x0053
[11517.378474] ir_do_setkeycode: #83: New scan 0x0053 with key 0x0000

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoir-core: Remove the quotation mark from the uevent names
Mauro Carvalho Chehab [Sun, 11 Apr 2010 02:43:39 +0000 (23:43 -0300)]
ir-core: Remove the quotation mark from the uevent names

There's no need to use quotation marks at the uevent names for the
driver and table.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>