pandora-kernel.git
13 years ago[media] mceusb: topseed 0x0011 needs gen3 init for tx to work
Jarod Wilson [Fri, 4 Mar 2011 23:20:47 +0000 (20:20 -0300)]
[media] mceusb: topseed 0x0011 needs gen3 init for tx to work

Signed-off-by: Jarod Wilson <jarod@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
13 years ago[media] lirc_zilog: error out if buffer read bytes != chunk size
Jarod Wilson [Fri, 4 Mar 2011 22:53:05 +0000 (19:53 -0300)]
[media] lirc_zilog: error out if buffer read bytes != chunk size

Give it a few tries, then exit. Prevents a possible endless loop
situation.

Signed-off-by: Jarod Wilson <jarod@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
13 years ago[media] lirc: silence some compile warnings
Jarod Wilson [Fri, 4 Mar 2011 20:57:24 +0000 (17:57 -0300)]
[media] lirc: silence some compile warnings

Both lirc_imon and lirc_sasem were causing gcc to complain about the
possible use of uninitialized variables.

Signed-off-by: Jarod Wilson <jarod@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
13 years ago[media] hdpvr: use same polling interval as other OS
Jarod Wilson [Fri, 4 Mar 2011 20:31:11 +0000 (17:31 -0300)]
[media] hdpvr: use same polling interval as other OS

The hdpvr's IR part, in short, sucks. As observed with a usb traffic
sniffer, the Windows software for it uses a polling interval of 405ms.
Its still not behaving as well as I'd like even with this change, but
this inches us closer and closer to that point...

Signed-off-by: Jarod Wilson <jarod@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
13 years ago[media] ir-kbd-i2c: pass device code w/key in hauppauge case
Jarod Wilson [Fri, 4 Mar 2011 20:30:17 +0000 (17:30 -0300)]
[media] ir-kbd-i2c: pass device code w/key in hauppauge case

The new hauppauge key tables use both device code button code.

Signed-off-by: Jarod Wilson <jarod@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
13 years ago[media] rc/keymaps: Remove the obsolete rc-rc5-tv keymap
Mauro Carvalho Chehab [Tue, 25 Jan 2011 01:23:08 +0000 (22:23 -0300)]
[media] rc/keymaps: Remove the obsolete rc-rc5-tv keymap

This keymap were used for the Hauppauge Black remote controller
only. It also contains some keycodes not found there. As the
Hauppauge Black is now part of the hauppauge keymap, just remove
it.

Also, remove the modprobe hacks to select between the Gray
and the Black versions of the remote controller as:
 - Both are supported by default by the keymap;
 - If the user just wants one keyboard supported,
   it is just a matter of changing the keymap via
   the userspace tool (ir-keytable), removing
   the keys that he doesn't desire. As ir-keytable
   auto-loads the keys via udev, this is better than
   obscure modprobe parameters.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Signed-off-by: Jarod Wilson <jarod@redhat.com>
13 years ago[media] remove the old RC_MAP_HAUPPAUGE_NEW RC map
Mauro Carvalho Chehab [Mon, 24 Jan 2011 15:18:48 +0000 (12:18 -0300)]
[media] remove the old RC_MAP_HAUPPAUGE_NEW RC map

The rc-hauppauge-new map is a messy thing, as it bundles 3

different remote controllers as if they were just one,
discarding the address byte. Also, some key maps are wrong.

With the conversion to the new rc-core, it is likely that
most of the devices won't be working properly, as the i2c
driver and the raw decoders are now providing 16 bits for
the remote, instead of just 8.

 delete mode 100644 drivers/media/rc/keymaps/rc-hauppauge-new.c

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Signed-off-by: Jarod Wilson <jarod@redhat.com>
13 years ago[media] rc/keymaps: Rename Hauppauge table as rc-hauppauge
Mauro Carvalho Chehab [Mon, 24 Jan 2011 15:18:47 +0000 (12:18 -0300)]
[media] rc/keymaps: Rename Hauppauge table as rc-hauppauge

There are two "hauppauge-new" keymaps, one with protocol
unknown, and the other with the protocol marked accordingly.
However, both tables are miss-named.

Also, the old rc-hauppauge-new is broken, as it mixes
three different controllers as if they were just one.

This patch solves half of the problem by renaming the
correct keycode table as just rc-hauppauge. This table
contains the codes for the four different types of
remote controllers found on Hauppauge cards, properly
mapped with their different addresses.

 create mode 100644 drivers/media/rc/keymaps/rc-hauppauge.c
 delete mode 100644 drivers/media/rc/keymaps/rc-rc5-hauppauge-new.c
[Jarod: fix up RC_MAP_HAUPPAUGE defines]

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Signed-off-by: Jarod Wilson <jarod@redhat.com>
13 years ago[media] rc-rc5-hauppauge-new: Fix Hauppauge Grey mapping
Mauro Carvalho Chehab [Mon, 24 Jan 2011 15:18:45 +0000 (12:18 -0300)]
[media] rc-rc5-hauppauge-new: Fix Hauppauge Grey mapping

The keys for the old black were messed with the ones for the
hauppauge grey. Fix it.

Also, fixes some keycodes and order the keys according with
the way they appear inside the remote controller.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Signed-off-by: Jarod Wilson <jarod@redhat.com>
13 years ago[media] rc-rc5-hauppauge-new: Add support for the old Black RC
Mauro Carvalho Chehab [Mon, 24 Jan 2011 15:18:44 +0000 (12:18 -0300)]
[media] rc-rc5-hauppauge-new: Add support for the old Black RC

Hans borrowed me an old Black Hauppauge RC. Thanks to that, we
can fix the RC5 table for Hauppauge.

Thanks-to: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Signed-off-by: Jarod Wilson <jarod@redhat.com>
13 years ago[media] rc-rc5-hauppauge-new: Add the old control to the table
Mauro Carvalho Chehab [Mon, 24 Jan 2011 15:18:43 +0000 (12:18 -0300)]
[media] rc-rc5-hauppauge-new: Add the old control to the table

Adds the old grey remote controller to Hauppauge table.

Hans borrowed me an old gray Hauppauge RC. Thanks to that, we
can fix the RC5 table for Hauppauge.

Thanks-to: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Signed-off-by: Jarod Wilson <jarod@redhat.com>
13 years ago[media] rc-winfast: Fix the keycode tables
Mauro Carvalho Chehab [Mon, 24 Jan 2011 15:18:43 +0000 (12:18 -0300)]
[media] rc-winfast: Fix the keycode tables

One of the remotes has a picture available at:
http://lirc.sourceforge.net/remotes/leadtek/Y04G0004.jpg

As there's one variant with a set direction keys plus vol/chann
keys, and the same table is used for both models, change it to
represent all keys, avoiding the usage of weird function keys.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Signed-off-by: Jarod Wilson <jarod@redhat.com>
13 years ago[media] a800: Fix a few wrong IR key assignments
Mauro Carvalho Chehab [Mon, 24 Jan 2011 15:18:42 +0000 (12:18 -0300)]
[media] a800: Fix a few wrong IR key assignments

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Signed-off-by: Jarod Wilson <jarod@redhat.com>
13 years ago[media] opera1: Use multimedia keys instead of an app-specific mapping
Mauro Carvalho Chehab [Mon, 24 Jan 2011 15:18:41 +0000 (12:18 -0300)]
[media] opera1: Use multimedia keys instead of an app-specific mapping

This driver uses an app-specific keymap for one of the tables. This
is wrong. Instead, use the standard keycodes.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Signed-off-by: Jarod Wilson <jarod@redhat.com>
13 years ago[media] dw2102: Use multimedia keys instead of an app-specific mapping
Mauro Carvalho Chehab [Mon, 24 Jan 2011 15:18:40 +0000 (12:18 -0300)]
[media] dw2102: Use multimedia keys instead of an app-specific mapping

This driver uses an app-specific keymap for one of the tables. This
is wrong. Instead, use the standard keycodes.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Signed-off-by: Jarod Wilson <jarod@redhat.com>
13 years ago[media] rc/keymaps: Use KEY_LEFTMETA were pertinent
Mauro Carvalho Chehab [Mon, 24 Jan 2011 15:18:39 +0000 (12:18 -0300)]
[media] rc/keymaps: Use KEY_LEFTMETA were pertinent

Using xev and testing the "Windows" key on a normal keyboard, it
is mapped as KEY_LEFTMETA. So, as this is the standard code for
it, use it, instead of a generic, meaningless KEY_PROG1.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Signed-off-by: Jarod Wilson <jarod@redhat.com>
13 years ago[media] rc/keymaps: Fix most KEY_PROG[n] keycodes
Mauro Carvalho Chehab [Mon, 24 Jan 2011 15:18:38 +0000 (12:18 -0300)]
[media] rc/keymaps: Fix most KEY_PROG[n] keycodes

Those KEY_PROG[n] keys were used on places where the developer
didn't know for sure what key should be used. On several cases,
using KEY_RED, KEY_GREEN, KEY_YELLOW would be enough. On others,
there are specific keys for that already.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Signed-off-by: Jarod Wilson <jarod@redhat.com>
13 years ago[media] rc/keymaps: Use KEY_VIDEO for Video Source
Mauro Carvalho Chehab [Mon, 24 Jan 2011 15:18:37 +0000 (12:18 -0300)]
[media] rc/keymaps: Use KEY_VIDEO for Video Source

Each keyboard map were using a different definition for
the Source/Video Source key.
Behold Columbus were the only one using KEY_PROPS.

As we want to standardize those keys at X11 and at
userspace applications, we need to use just one code
for it.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Signed-off-by: Jarod Wilson <jarod@redhat.com>
13 years ago[media] rc/keymaps: use KEY_CAMERA for snapshots
Mauro Carvalho Chehab [Mon, 24 Jan 2011 15:18:36 +0000 (12:18 -0300)]
[media] rc/keymaps: use KEY_CAMERA for snapshots

On a few places, KEY_MHP were used for snapshots. However, KEY_CAMERA
is used for it on all the other keyboards that have a snapshot/Picture
button.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Signed-off-by: Jarod Wilson <jarod@redhat.com>
13 years ago[media] lirc_zilog: Update TODO list based on work completed and revised plans
Andy Walls [Fri, 18 Feb 2011 00:32:06 +0000 (21:32 -0300)]
[media] lirc_zilog: Update TODO list based on work completed and revised plans

Update the TODO.lirc_zilog based on what has been completed.  Also revised
the development plan for lirc_zilog to not try and split Tx/Rx for one IR
transceiver unit between lirc_zilog and ir-kbd-i2c, since that would be a
ref-counting nightmare.

Signed-off-by: Andy Walls <awalls@md.metrocast.net>
Signed-off-by: Jarod Wilson <jarod@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
13 years ago[media] lirc_zilog: Fix somewhat confusing information messages in ir_probe()
Andy Walls [Fri, 18 Feb 2011 00:14:13 +0000 (21:14 -0300)]
[media] lirc_zilog: Fix somewhat confusing information messages in ir_probe()

The total sequence of messages emitted by the ir_porbe() calls
for a transceiver's two i2c_clients was confusing.  Clean it up a bit.

Signed-off-by: Andy Walls <awalls@md.metrocast.net>
Signed-off-by: Jarod Wilson <jarod@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
13 years ago[media] lirc_zilog: Add locking of the i2c_clients when in use
Andy Walls [Thu, 17 Feb 2011 23:50:38 +0000 (20:50 -0300)]
[media] lirc_zilog: Add locking of the i2c_clients when in use

Lock the i2c_client pointers and prevent i2c_client removal when
lirc_zilog is perfoming a series of operations that require valid
i2c_client pointers.

Signed-off-by: Andy Walls <awalls@md.metrocast.net>
Signed-off-by: Jarod Wilson <jarod@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
13 years ago[media] lirc_zilog: Add ref counting of struct IR, IR_tx, and IR_rx
Andy Walls [Tue, 8 Feb 2011 01:30:55 +0000 (22:30 -0300)]
[media] lirc_zilog: Add ref counting of struct IR, IR_tx, and IR_rx

This is a major change to add pointer reference counting for
struct IR, struct IR_tx, and struct IR_rx object instances.
This ref counting gets lirc_zilog closer to gracefully handling
bridge drivers and hot-unplugged USB devices disappearing out from
under lirc_zilog when the /dev/lircN node is still open.  (mutexes
to protect the i2c_client pointers in struct IR_tx and struct IR_rx
still need to be added.)

This reference counting also helps lirc_zilog clean up properly
when the i2c_clients disappear.

Signed-off-by: Andy Walls <awalls@md.metrocast.net>
Signed-off-by: Jarod Wilson <jarod@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
13 years ago[media] lirc_zilog: Move constants from ir_probe() into the lirc_driver template
Andy Walls [Fri, 28 Jan 2011 02:02:20 +0000 (23:02 -0300)]
[media] lirc_zilog: Move constants from ir_probe() into the lirc_driver template

ir_probe() makes a number of constant assignments into the lirc_driver
object after copying in a template.  Make better use of the template.

Signed-off-by: Andy Walls <awalls@md.metrocast.net>
Signed-off-by: Jarod Wilson <jarod@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
13 years ago[media] lirc_zilog: Always allocate a Rx lirc_buffer object
Andy Walls [Fri, 28 Jan 2011 01:32:44 +0000 (22:32 -0300)]
[media] lirc_zilog: Always allocate a Rx lirc_buffer object

Always allocate a lirc_buffer object, instead of just upon setup of
the Rx i2c_client.  If we do not allocate a lirc_buffer object, because
we are not handling the Rx i2c_client, lirc_dev will allocate its own
lirc_buffer anyway and not tell us about its location.

Signed-off-by: Andy Walls <awalls@md.metrocast.net>
Signed-off-by: Jarod Wilson <jarod@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
13 years ago[media] lirc_zilog: Remove unneeded rx->buf_lock
Andy Walls [Thu, 27 Jan 2011 05:34:13 +0000 (02:34 -0300)]
[media] lirc_zilog: Remove unneeded rx->buf_lock

Remove the rx->buf_lock that protected the rx->buf lirc_buffer.  The
underlying operations on the objects within the lirc_buffer are already
protected by spinlocks, or the objects are constant (e.g. chunk_size).

Signed-off-by: Andy Walls <awalls@md.metrocast.net>
Signed-off-by: Jarod Wilson <jarod@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
13 years ago[media] lirc_zilog: Don't acquire the rx->buf_lock in the poll() function
Andy Walls [Thu, 27 Jan 2011 05:10:42 +0000 (02:10 -0300)]
[media] lirc_zilog: Don't acquire the rx->buf_lock in the poll() function

There is no need to take the rx->buf_lock in the the poll() function
as all the underling calls made on objects in the rx->buf lirc_buffer object
are protected by spinlocks.

Corrected a bad error return value in poll(): return POLLERR instead
of -ENODEV.

Added some comments to poll() for when, in the future, I forget what
poll() and poll_wait() are supposed to do.

[Jarod: minor debug spew fix]

Signed-off-by: Andy Walls <awalls@md.metrocast.net>
Signed-off-by: Jarod Wilson <jarod@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
13 years ago[media] lirc_zilog: Use kernel standard methods for marking device non-seekable
Andy Walls [Thu, 27 Jan 2011 03:04:15 +0000 (00:04 -0300)]
[media] lirc_zilog: Use kernel standard methods for marking device non-seekable

lirc_zilog had its own llseek stub that returned -ESPIPE.  Get rid of
it and use the kernel's no_llseek() and nonseekable_open() functions
instead.

Signed-off-by: Andy Walls <awalls@md.metrocast.net>
Signed-off-by: Jarod Wilson <jarod@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
13 years ago[media] lirc_zilog: Convert the instance open count to an atomic_t
Andy Walls [Thu, 27 Jan 2011 01:04:24 +0000 (22:04 -0300)]
[media] lirc_zilog: Convert the instance open count to an atomic_t

The open count is simply used for deciding if the Rx polling thread
needs to poll the IR chip for userspace.  Simplify the manipulation
of the open count by using an atomic_t and not requiring a lock
The polling thread errantly didn't try to take the lock anyway.

Signed-off-by: Andy Walls <awalls@md.metrocast.net>
Signed-off-by: Jarod Wilson <jarod@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
13 years ago[media] lirc_zilog: Convert ir_device instance array to a linked list
Andy Walls [Thu, 27 Jan 2011 00:48:32 +0000 (21:48 -0300)]
[media] lirc_zilog: Convert ir_device instance array to a linked list

Signed-off-by: Andy Walls <awalls@md.metrocast.net>
Signed-off-by: Jarod Wilson <jarod@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
13 years ago[media] lirc_zilog: Remove broken, ineffective reference counting
Andy Walls [Thu, 27 Jan 2011 00:25:47 +0000 (21:25 -0300)]
[media] lirc_zilog: Remove broken, ineffective reference counting

The set_use_inc() and set_use_dec() functions tried to lock
the underlying bridge driver device instance in memory by
changing the use count on the device's i2c_clients.  This
worked for PCI devices (ivtv, cx18, bttv).  It doesn't
work for hot-pluggable usb devices (pvrusb2 and hdpvr).
With usb device instances, the driver may get locked into
memory, but the unplugged hardware is gone.

The set_use_inc() set_use_dec() functions also tried to have
lirc_zilog change its own module refernce count, which is
racy and not guaranteed to work.  The lirc_dev module does
actually perform proper module ref count manipulation on the
lirc_zilog module, so there is need for lirc_zilog to
attempt a buggy module get on itself anyway.

lirc_zilog also errantly called these functions on itself
in open() and close(), but lirc_dev did that already too.

So let's just gut the bodies of the set_use_*() functions,
and remove the extra calls to them from within lirc_zilog.

Proper reference counting of the struct IR, IR_rx, and IR_tx
objects -- to handle the case when the underlying
bttv, ivtv, cx18, hdpvr, or pvrusb2 bridge driver module or
device instance goes away -- will be added in subsequent
patches.

Signed-off-by: Andy Walls <awalls@md.metrocast.net>
Signed-off-by: Jarod Wilson <jarod@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
13 years ago[media] lirc_zilog: Restore checks for existence of the IR_tx object
Andy Walls [Thu, 27 Jan 2011 00:06:43 +0000 (21:06 -0300)]
[media] lirc_zilog: Restore checks for existence of the IR_tx object

This reverts commit 8090232a237ab62e22307fc060097da1a283dd66 and
adds an additional check for ir->tx == NULL.

The user may need us to handle an RX only unit.  Apparently
there are TV capture units in existence with Rx only wiring
and/or RX only firmware for the on-board Zilog Z8 IR unit.

Signed-off-by: Andy Walls <awalls@md.metrocast.net>
Signed-off-by: Jarod Wilson <jarod@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
13 years ago[media] hdpvr: i2c master enhancements
Jarod Wilson [Wed, 2 Mar 2011 16:23:52 +0000 (13:23 -0300)]
[media] hdpvr: i2c master enhancements

Make the hdpvr's i2c master implementation more closely mirror that of
the pvrusb2 driver. Currently makes no significant difference in IR
reception behavior with ir-kbd-i2c (i.e., it still sucks).

Signed-off-by: Jarod Wilson <jarod@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
13 years ago[media] imon: add more panel scancode mappings
Jarod Wilson [Tue, 1 Feb 2011 19:27:05 +0000 (16:27 -0300)]
[media] imon: add more panel scancode mappings

Signed-off-by: Jarod Wilson <jarod@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
13 years ago[media] docs: fix typo in lirc_device_interface.xml
Jarod Wilson [Mon, 24 Jan 2011 21:22:12 +0000 (18:22 -0300)]
[media] docs: fix typo in lirc_device_interface.xml

Reported-by: Daniel Burr <dburr@topcon.com>
Signed-off-by: Jarod Wilson <jarod@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
13 years ago[media] tm6000: fix s-video input
Dmitri Belimov [Fri, 18 Mar 2011 00:08:55 +0000 (21:08 -0300)]
[media] tm6000: fix s-video input

Add compatibility for composite and s-video inputs. Some TV cards hasn't
it.

Fix S-Video input, the s-video cable has only video signals no
audio. Call the function of audio configure kill chroma in signal. only
b/w video.

Known bugs:
  - after s-video the audio for radio didn't work, TV crashed hardly
  - after composite TV crashed hardly too.

P.S. After this patch I'll want to rework the procedure of configure
     video. Now it has a lot of junk and dubles.

With my best regards, Dmitry.

Signed-off-by: Beholder Intl. Ltd. Dmitry Belimov <d.belimov@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
13 years ago[media] lirc: remove staging lirc_it87 and lirc_ite8709 drivers
Juan J. Garcia de Soria [Wed, 16 Mar 2011 20:14:53 +0000 (17:14 -0300)]
[media] lirc: remove staging lirc_it87 and lirc_ite8709 drivers

Remove older drivers lirc_it87 and lirc_ite8709 from the LIRC staging area,
since they're now superceded by ite-cir.

Signed-off-by: Juan J. Garcia de Soria <skandalfo@gmail.com>
Tested-by: Stephan Raue <stephan@openelec.tv>
Signed-off-by: Jarod Wilson <jarod@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
13 years ago[media] ite-cir: Fix some CodingStyle issues
Mauro Carvalho Chehab [Tue, 22 Mar 2011 18:12:40 +0000 (15:12 -0300)]
[media] ite-cir: Fix some CodingStyle issues

Cc: Juan J. Garcia de Soria <skandalfo@gmail.com>
Cc: Stephan Raue <stephan@openelec.tv>
Cc: Jarod Wilson <jarod@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
13 years ago[media] rc: New rc-based ite-cir driver for several ITE CIRs
Juan J. Garcia de Soria [Wed, 16 Mar 2011 20:14:52 +0000 (17:14 -0300)]
[media] rc: New rc-based ite-cir driver for several ITE CIRs

This is a second version of an rc-core based driver for the ITE Tech IT8712F
CIR and now for a pair of other variants of the IT8512 CIR too.

This driver should replace the lirc_it87 and lirc_ite8709 currently living in
the LIRC staging directory.

The driver should support the ITE8704, ITE8713, ITE8708 and ITE8709 (this last
one yet untested) PNP ID's.

The code doesn'te reuse code from the pre-existing LIRC drivers, but has been
written from scratch using the nuvoton.cir driver as a skeleton.

This new driver shouldn't exhibit timing problems when running under load (or
with interrupts disabled for relatively long times). It works OOTB with the
RC6 MCE remote bundled with the ASUS EEEBox. TX support is implemented, but
I'm unable to test it since my hardware lacks TX capability.

Signed-off-by: Juan J. Garcia de Soria <skandalfo@gmail.com>
Tested-by: Stephan Raue <stephan@openelec.tv>
Signed-off-by: Jarod Wilson <jarod@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
13 years ago[media] drivers/media/rc/Kconfig: use tabs, instead of spaces
Mauro Carvalho Chehab [Tue, 22 Mar 2011 18:03:09 +0000 (15:03 -0300)]
[media] drivers/media/rc/Kconfig: use tabs, instead of spaces

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
13 years ago[media] saa7134: Fix strange kconfig dependency on RC_CORE
Steven Rostedt [Thu, 10 Mar 2011 22:41:29 +0000 (19:41 -0300)]
[media] saa7134: Fix strange kconfig dependency on RC_CORE

As the code in saa7134-input is not a module, but the config for it is
set as a boolean instead of a tristate, this causes a strange dependency
on RC_CORE.

VIDEO_SAA7134_RC (which determines if saa7134-input.o is built) depends
on RC_CORE and VIDEO_SAA7134. If VIDEO_SAA7134 is compiled as 'y' but
RC_CORE is compiled as 'm' VIDEO_SAA7134_RC can still be set to 'y'
which causes undefined symbols that it needs from RC_CORE.

The simplest solution is to not allow VIDEO_SAA7134_RC be enabled if
RC_CORE compiled as a module (m) and VIDEO_SA7134 is compiled into the
kernel (y).

Suggested-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Cc: Michal Marek <mmarek@suse.cz>
Cc: linux-kbuild <linux-kbuild@vger.kernel.org>
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
13 years ago[media] STV0288 added full frontend status
Malcolm Priestley [Sun, 6 Mar 2011 16:37:00 +0000 (13:37 -0300)]
[media] STV0288 added full frontend status

status now returns
 FE_HAS_CARRIER
 FE_HAS_SIGNAL
 FE_HAS_VITERBI

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
13 years ago[media] gspca - zc3xx: Add exposure control for sensor hv7131r
Jean-François Moine [Tue, 22 Mar 2011 09:47:56 +0000 (06:47 -0300)]
[media] gspca - zc3xx: Add exposure control for sensor hv7131r

Signed-off-by: Jean-François Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
13 years ago[media] gspca - main: Add endpoint direction test in alt_xfer
Patrice Chotard [Mon, 21 Mar 2011 19:58:56 +0000 (16:58 -0300)]
[media] gspca - main: Add endpoint direction test in alt_xfer

This patch fixes a bug in gspca, more precisely in alt_xfer().

This function looks for an input transfer endpoint in an alternate setting.
By default it returns the first endpoint corresponding to the transfer type
indicated in parameter.
But with some USB devices, the first endpoint corresponding to the transfer
type is not always an INPUT endpoint but an OUTPUT one.

This patch adds the endpoint direction test to be sure to return an INPUT endpoint

Signed-off-by: Patrice CHOTARD <patricechotard@free.fr>
Signed-off-by: Jean-François Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
13 years ago[media] gspca - nw80x: Fix exposure for some webcams
Jean-François Moine [Tue, 22 Mar 2011 09:09:49 +0000 (06:09 -0300)]
[media] gspca - nw80x: Fix exposure for some webcams

Signed-off-by: Jean-François Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
13 years ago[media] gspca - nw80x: Get the sensor ID when bridge et31x110
Jean-François Moine [Tue, 22 Mar 2011 09:07:40 +0000 (06:07 -0300)]
[media] gspca - nw80x: Get the sensor ID when bridge et31x110

Signed-off-by: Jean-François Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
13 years ago[media] gspca - nw80x: Fix some image resolutions
Jean-François Moine [Tue, 22 Mar 2011 09:04:09 +0000 (06:04 -0300)]
[media] gspca - nw80x: Fix some image resolutions

No 352x288 for Ds3303 and no 320x240 for Generic802.

Signed-off-by: Jean-François Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
13 years ago[media] gspca - nw80x: Check the bridge from the webcam type
Jean-François Moine [Tue, 22 Mar 2011 08:58:19 +0000 (05:58 -0300)]
[media] gspca - nw80x: Check the bridge from the webcam type

Signed-off-by: Jean-François Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
13 years ago[media] gspca - nw80x: Fix the gain, exposure and autogain
Jean-François Moine [Tue, 22 Mar 2011 08:53:21 +0000 (05:53 -0300)]
[media] gspca - nw80x: Fix the gain, exposure and autogain

The autogain now uses common functions.

Signed-off-by: Jean-François Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
13 years ago[media] gspca - nw80x: Do some initialization at probe time
Jean-François Moine [Tue, 22 Mar 2011 08:46:24 +0000 (05:46 -0300)]
[media] gspca - nw80x: Do some initialization at probe time

Signed-off-by: Jean-François Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
13 years ago[media] gspca - nw80x: The webcam dsb-c110 is the same as the twinkle
Jean-François Moine [Tue, 22 Mar 2011 08:37:18 +0000 (05:37 -0300)]
[media] gspca - nw80x: The webcam dsb-c110 is the same as the twinkle

Signed-off-by: Jean-François Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
13 years ago[media] gspca - nw80x: Cleanup source
Jean-François Moine [Tue, 22 Mar 2011 08:16:11 +0000 (05:16 -0300)]
[media] gspca - nw80x: Cleanup source

Signed-off-by: Jean-François Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
13 years ago[media] v4l2: use new flag to enable core priority handling
Hans Verkuil [Tue, 22 Mar 2011 13:14:07 +0000 (10:14 -0300)]
[media] v4l2: use new flag to enable core priority handling

Rather than guess which driver supports core priority handling, require drivers
that do to explicitly set the V4L2_FL_USE_FH_PRIO flag in video_device.

Updated the core prio handling accordingly and set the flag in the three
drivers that do.

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
13 years ago[media] ivtv: replace ugly casts with a proper container_of
Hans Verkuil [Sat, 12 Mar 2011 09:43:28 +0000 (06:43 -0300)]
[media] ivtv: replace ugly casts with a proper container_of

ivtv-ioctl cast the 'void *fh' directly to 'ivtv_open_id *'. This should be
done properly with a contained_of since the 'void *fh' is really a
'struct v4l2_fh *'.

It worked because the v4l2_fh field is also the first field in the ivtv_open_id
struct, but it is not clean code.

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
13 years ago[media] ivtv: add missing v4l2_fh_exit
Hans Verkuil [Sat, 12 Mar 2011 09:39:44 +0000 (06:39 -0300)]
[media] ivtv: add missing v4l2_fh_exit

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
13 years ago[media] vivi: convert to core priority handling
Hans Verkuil [Fri, 11 Mar 2011 23:01:54 +0000 (20:01 -0300)]
[media] vivi: convert to core priority handling

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
13 years ago[media] dsbr100: ensure correct disconnect sequence
Hans Verkuil [Mon, 17 Jan 2011 23:25:11 +0000 (20:25 -0300)]
[media] dsbr100: ensure correct disconnect sequence

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
13 years ago[media] dsbr100: convert to unlocked_ioctl
Hans Verkuil [Sun, 19 Dec 2010 21:54:08 +0000 (18:54 -0300)]
[media] dsbr100: convert to unlocked_ioctl

Use core-assisted locking so .ioctl can be replaced by .unlocked_ioctl.

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
13 years ago[media] v4l2-framework.txt: document new v4l2_device release() callback
Hans Verkuil [Thu, 24 Feb 2011 09:28:46 +0000 (06:28 -0300)]
[media] v4l2-framework.txt: document new v4l2_device release() callback

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
13 years ago[media] v4l2-device: add kref and a release function
Hans Verkuil [Sat, 12 Mar 2011 09:37:19 +0000 (06:37 -0300)]
[media] v4l2-device: add kref and a release function

The video_device struct has proper ref counting and its release function
will be called when the last user releases it. But no such support was
available for struct v4l2_device. This made it hard to determine when a
USB driver can release the device if it has multiple device nodes.

With one device node it is easy of course, since when the device node is
released, the whole device can be released.

This patch adds refcounting to v4l2_device. When registering device nodes
the v4l2_device refcount will be increased, when releasing device nodes
it will be decreased. The (optional) release function will be called when
the last device node was released.

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
13 years ago[media] cx18: use core priority handling
Hans Verkuil [Sat, 12 Mar 2011 09:36:08 +0000 (06:36 -0300)]
[media] cx18: use core priority handling

VIDIOC_S/G_PRIORITY handling is now done by the v4l2 core framework.

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
13 years ago[media] cx18: use v4l2_fh as preparation for adding core priority support
Hans Verkuil [Sat, 12 Mar 2011 09:35:33 +0000 (06:35 -0300)]
[media] cx18: use v4l2_fh as preparation for adding core priority support

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
13 years ago[media] v4l2-framework.txt: improve v4l2_fh/priority documentation
Hans Verkuil [Thu, 24 Feb 2011 13:58:13 +0000 (10:58 -0300)]
[media] v4l2-framework.txt: improve v4l2_fh/priority documentation

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
13 years ago[media] ivtv: convert to core priority handling
Hans Verkuil [Fri, 11 Mar 2011 22:03:41 +0000 (19:03 -0300)]
[media] ivtv: convert to core priority handling

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
13 years ago[media] v4l2-ioctl: add priority handling support
Hans Verkuil [Fri, 11 Mar 2011 22:00:56 +0000 (19:00 -0300)]
[media] v4l2-ioctl: add priority handling support

Drivers that use v4l2_fh can now use the core framework support of g/s_priority.

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
13 years ago[media] v4l2-fh: add v4l2_fh_is_singular
Hans Verkuil [Sat, 8 Jan 2011 12:38:02 +0000 (09:38 -0300)]
[media] v4l2-fh: add v4l2_fh_is_singular

Several drivers need to do something when the first filehandle is opened
or the last filehandle is closed. Most implement some use count mechanism,
but if they use v4l2_fh, then you can also just check if this is the only
filehandle for the device node. A simple helper function can do this.

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
13 years ago[media] v4l2-fh: add v4l2_fh_open and v4l2_fh_release helper functions
Hans Verkuil [Sat, 8 Jan 2011 12:36:04 +0000 (09:36 -0300)]
[media] v4l2-fh: add v4l2_fh_open and v4l2_fh_release helper functions

Add two new functions: v4l2_fh_open allocates and initializes a struct v4l2_fh
based on a struct file pointer and v4l2_fh_release releases and frees a struct
v4l2_fh.

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
13 years ago[media] v4l2-fh: implement v4l2_priority support
Hans Verkuil [Wed, 29 Dec 2010 16:36:50 +0000 (13:36 -0300)]
[media] v4l2-fh: implement v4l2_priority support

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
13 years ago[media] v4l2: add v4l2_prio_state to v4l2_device and video_device
Hans Verkuil [Thu, 24 Feb 2011 13:42:24 +0000 (10:42 -0300)]
[media] v4l2: add v4l2_prio_state to v4l2_device and video_device

Integrate the v4l2_prio_state into the core, ready for use.

One struct v4l2_prio_state is added to v4l2_device and a pointer
to a prio state is added to video_device.

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
13 years ago[media] v4l2_prio: move from v4l2-common to v4l2-dev
Hans Verkuil [Wed, 29 Dec 2010 13:05:02 +0000 (10:05 -0300)]
[media] v4l2_prio: move from v4l2-common to v4l2-dev

We are going to move priority handling into the v4l2 core. As a consequence
the v4l2_prio helper functions need to be moved into the core videodev
module as well to prevent circular dependencies.

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
13 years ago[media] saa7134-input: key up events not sent after suspend/resume
Vadim Solomin [Sun, 6 Mar 2011 16:00:38 +0000 (13:00 -0300)]
[media] saa7134-input: key up events not sent after suspend/resume

On my AverMedia AverTV Studio 507, key up events are no longer sent after
a suspend-to-disk/resume cycle, resulting in "stuck" keys.

Apparently, for key up events to be generated, a certain GPIO pin must be set.
Currently it's set in saa7134_input_init1(), but that function is not called
on device resume. I suggest that code be moved to __saa7134_ir_start(), which
is called both on init and resume.

Signed-off-by: Vadim Solomin <vadic052@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
13 years ago[media] stv0367: typo in function parameter
Dan Carpenter [Sun, 6 Mar 2011 13:41:23 +0000 (10:41 -0300)]
[media] stv0367: typo in function parameter

The CellsCoeffs arrays are [3][6][5] not [2][6][5].

Signed-off-by: Dan Carpenter <error27@gmail.com>
Cc: Igor M. Liplianin <liplianin@netup.ru>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
13 years ago[media] stv0367: signedness bug in stv0367_get_tuner_freq()
Dan Carpenter [Sun, 6 Mar 2011 13:40:11 +0000 (10:40 -0300)]
[media] stv0367: signedness bug in stv0367_get_tuner_freq()

We use err to store negative error codes so it should be signed.  And
if we return an error from stv0367_get_tuner_freq() that needs to be
handled properly as well.  (param->frequency is a u32).

Signed-off-by: Dan Carpenter <error27@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
13 years ago[media] via-camera: Fix OLPC serial check
Daniel Drake [Thu, 3 Mar 2011 19:03:31 +0000 (16:03 -0300)]
[media] via-camera: Fix OLPC serial check

The code that checks the OLPC serial port is never built at the moment,
because CONFIG_OLPC_XO_1_5 doesn't exist and probably won't be added.

Fix it so that it gets compiled in, only executes on OLPC laptops, and
move the check into the probe routine.

The compiler is smart enough to eliminate this code when CONFIG_OLPC=n
(due to machine_is_olpc() always returning false).

Signed-off-by: Daniel Drake <dsd@laptop.org>
Acked-by: Jonathan Corbet <corbet@lwn.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
13 years ago[media] Change to 32 bit and add other remote controls for lme2510
Malcolm Priestley [Sun, 23 Jan 2011 21:26:03 +0000 (18:26 -0300)]
[media] Change to 32 bit and add other remote controls for lme2510

These bubble button remote controls appear to be generic from China.

These are the three variants known to be supplied with DM04/QQBOX DVB-S

They could well be supplied with other devices from the region.

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
13 years ago[media] DM04/QQBOX Update V1.76 - use 32 bit remote decoding
Malcolm Priestley [Sun, 23 Jan 2011 21:22:45 +0000 (18:22 -0300)]
[media] DM04/QQBOX Update V1.76 - use 32 bit remote decoding

Use 32 bit decoding to add support for more than one variant of remote
control.

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
13 years ago[media] DM04 LME2510(C) Sharp BS2F7HZ0194 Firmware Information
Malcolm Priestley [Sun, 13 Feb 2011 01:38:47 +0000 (22:38 -0300)]
[media] DM04 LME2510(C) Sharp BS2F7HZ0194 Firmware Information

DM04 LME2510(C) Sharp BS2F7HZ0194 Firmware Information

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
13 years ago[media] v180 - DM04/QQBOX added support for BS2F7HZ0194 versions
Malcolm Priestley [Sun, 13 Feb 2011 01:35:08 +0000 (22:35 -0300)]
[media] v180 - DM04/QQBOX added support for BS2F7HZ0194 versions

Old versions of these boxes have the BS2F7HZ0194 tuner module on
both the LME2510 and LME2510C.

Firmware dvb-usb-lme2510-s0194.fw  and/or dvb-usb-lme2510c-s0194.fw
files are required.

See Documentation/dvb/lmedm04.txt

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
13 years ago[media] drivers/media/video/tlg2300/pd-video.c: Remove second mutex_unlock in pd_vidi...
Alexander Strakh [Tue, 25 Jan 2011 21:00:13 +0000 (18:00 -0300)]
[media] drivers/media/video/tlg2300/pd-video.c: Remove second mutex_unlock in pd_vidioc_s_fmt

Error path in file drivers/media/video/tlg2300/pd-video.c:
1. First mutex_unlock on &pd->lock in line 767 (in function that
   called from line 805)
2. Second in line  806

 805        pd_vidioc_s_fmt(pd, &f->fmt.pix);
 806        mutex_unlock(&pd->lock);

Found by Linux Device Drivers Verification Project

Signed-off-by: Alexander Strakh <strakh@ispras.ru>
Acked-by: Huang Shijie <shijie8@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
13 years ago[media] radio-wl1273: remove unused wl1273_device->work
Tejun Heo [Mon, 24 Jan 2011 14:23:15 +0000 (11:23 -0300)]
[media] radio-wl1273: remove unused wl1273_device->work

wl1273_device->work is unused.  Remove it along with the spurious
flush_scheduled_work() call in wl1273_fm_module_exit().

Signed-off-by: Tejun Heo <tj@kernel.org>
Cc: Matti Aaltonen <matti.j.aaltonen@nokia.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
13 years ago[media] Zarlink zl10036 DVB-S: Fix mem leak in zl10036_attach
Jesper Juhl [Thu, 17 Feb 2011 20:33:56 +0000 (17:33 -0300)]
[media] Zarlink zl10036 DVB-S: Fix mem leak in zl10036_attach

On Thu, 17 Feb 2011, Matthias Schwarzott wrote:

> On Sunday 06 February 2011, Jesper Juhl wrote:
> > If the memory allocation to 'state' succeeds but we jump to the 'error'
> > label before 'state' is assigned to fe->tuner_priv, then the call to
> > 'zl10036_release(fe)' at the 'error:' label will not free 'state', but
> > only what was previously assigned to 'tuner_priv', thus leaking the memory
> > allocated to 'state'.
> > There are may ways to fix this, including assigning the allocated memory
> > directly to 'fe->tuner_priv', but I did not go for that since the
> > additional pointer derefs are more expensive than the local variable, so I
> > just added a 'kfree(state)' call. I guess the call to 'zl10036_release'
> > might not even be needed in this case, but I wasn't sure, so I left it in.
> >
> Yeah, that call to zl10036_release can be completely eleminated.
> Another thing is: jumping to the error label only makes sense when memory was
> already allocated. So the jump in line 471 can be replaced by "return NULL",
> as the other error handling before allocation:
>         if (NULL == config) {
>                 printk(KERN_ERR "%s: no config specified", __func__);
>                 goto error;
>         }
>
> I suggest to improve the patch to clean the code up when changing that.
>
> But I am fine with commiting this patch also if you do not want to change it.
>

Thank you for your feedback. It makes a lot of sense.
Changing it is not a problem :)
How about the updated patch below?

If the memory allocation to 'state' succeeds but we jump to the 'error'
label before 'state' is assigned to fe->tuner_priv, then the call to
'zl10036_release(fe)' at the 'error:' label will not free 'state', but
only what was previously assigned to 'tuner_priv', thus leaking the memory
allocated to 'state'.
This patch fixes the leak and also does not jump to 'error:' before mem
has been allocated but instead just returns. Also some small style
cleanups.

Signed-off-by: Jesper Juhl <jj@chaosbits.net>
Signed-off-by: Matthias Schwarzott <zzam@gentoo.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
13 years ago[media] V4L: videobuf, don't use dma addr as physical
Jiri Slaby [Mon, 28 Feb 2011 09:37:02 +0000 (06:37 -0300)]
[media] V4L: videobuf, don't use dma addr as physical

mem->dma_handle is a dma address obtained by dma_alloc_coherent which
needn't be a physical address in presence of IOMMU, as
a hardware IOMMU can (and most likely) will return a bus address where
physical != bus address.

So ensure we are remapping (remap_pfn_range) the right page in
__videobuf_mmap_mapper by using virt_to_phys(mem->vaddr) and not
mem->dma_handle.

While at it, use PFN_DOWN instead of explicit shift.

[mchehab@redhat.com: Fix compilation breakage due to the lack of a comma]
Signed-off-by: Jiri Slaby <jslaby@suse.cz>
Reviewed-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
13 years ago[media] uvcvideo: Fix descriptor parsing for video output devices
Laurent Pinchart [Wed, 23 Feb 2011 14:19:17 +0000 (11:19 -0300)]
[media] uvcvideo: Fix descriptor parsing for video output devices

Commit 4057ac6ca9a77c4275b34b5925ab5c99557913b1

    V4L/DVB (13505): uvcvideo: Refactor chain scan

broke output terminals parsing. Fix it.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Cc: stable@kernel.org
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
13 years ago[media] uvcvideo: Fix uvc_fixup_video_ctrl() format search
Stephan Lachowsky [Fri, 28 Jan 2011 02:04:33 +0000 (23:04 -0300)]
[media] uvcvideo: Fix uvc_fixup_video_ctrl() format search

The scheme used to index format in uvc_fixup_video_ctrl() is not robust:
format index is based on descriptor ordering, which does not necessarily
match bFormatIndex ordering.  Searching for first matching format will
prevent uvc_fixup_video_ctrl() from using the wrong format/frame to make
adjustments.

Signed-off-by: Stephan Lachowsky <stephan.lachowsky@maxim-ic.com>
Cc: stable@kernel.org
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
13 years ago[media] vb2: Handle return value from start_streaming callback
Pawel Osciak [Sun, 20 Mar 2011 22:26:41 +0000 (19:26 -0300)]
[media] vb2: Handle return value from start_streaming callback

Fix vb2 not handling return value from start_streaming() callback.

Signed-off-by: Pawel Osciak <pawel@osciak.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
13 years ago[media] vb2: vb2_poll() fix return values for file I/O mode
Pawel Osciak [Sun, 20 Mar 2011 21:17:34 +0000 (18:17 -0300)]
[media] vb2: vb2_poll() fix return values for file I/O mode

poll() should be returning poll-specific error values, not E* errors.

Signed-off-by: Pawel Osciak <pawel@osciak.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
13 years ago[media] Update Pawel Osciak's e-mail address
Pawel Osciak [Sun, 13 Mar 2011 18:23:32 +0000 (15:23 -0300)]
[media] Update Pawel Osciak's e-mail address

Signed-off-by: Pawel Osciak <pawel@osciak.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
13 years ago[media] Make 2.6.39 not 2.6.38 the version when Multi-planar API was added
Pawel Osciak [Sun, 13 Mar 2011 18:20:22 +0000 (15:20 -0300)]
[media] Make 2.6.39 not 2.6.38 the version when Multi-planar API was added

Multi-planar API was added to 2.6.39 version of Video for Linux 2 API.

Signed-off-by: Pawel Osciak <pawel@osciak.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
13 years ago[media] af9013: reimplement firmware download
Antti Palosaari [Sat, 19 Mar 2011 21:02:22 +0000 (18:02 -0300)]
[media] af9013: reimplement firmware download

Split FW download packages smarter way and bug free. Implementation is
based of Andrea Merello's example he provided for tda18218 driver.
Count remaining FW bytes down in loop instead of division and modulo
combination used earlier.

Thanks to: Andrea Merello <andrea.merello@gmail.com>

Signed-off-by: Antti Palosaari <crope@iki.fi>
Cc: Andrea Merello <andrea.merello@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
13 years ago[media] af9013: download FW earlier in attach()
Antti Palosaari [Sat, 19 Mar 2011 20:18:18 +0000 (17:18 -0300)]
[media] af9013: download FW earlier in attach()

Quick test shows that FW must be running before other checks
so make it happen earlier.

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
13 years ago[media] af9015: reimplement firmware download
Antti Palosaari [Sat, 19 Mar 2011 19:51:43 +0000 (16:51 -0300)]
[media] af9015: reimplement firmware download

Split FW download packages smarter way and bug free. Implementation is
based of Andrea Merello's example he provided for tda18218 driver.
Count remaining FW bytes down in loop instead of division and modulo
combination used earlier.

Thanks-to: Andrea Merello <andrea.merello@gmail.com>
Signed-off-by: Antti Palosaari <crope@iki.fi>
Cc: Andrea Merello <andrea.merello@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
13 years ago[media] af9015: map remote for TerraTec Cinergy T Stick RC
Antti Palosaari [Sat, 19 Mar 2011 17:25:36 +0000 (14:25 -0300)]
[media] af9015: map remote for TerraTec Cinergy T Stick RC

Map rc-terratec-slim-2 for TerraTec Cinergy T Stick RC device.

Signed-off-by: Antti Palosaari <crope@iki.fi>
Cc: Martin Groszhauser <mgroszhauser@gmail.com>
Cc: TerraTux <TerraTux@terratec.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
13 years ago[media] add TerraTec remote
Antti Palosaari [Sat, 19 Mar 2011 17:11:55 +0000 (14:11 -0300)]
[media] add TerraTec remote

Remote used for TerraTec Cinergy T Stick RC.
Keytable from Martin Groszhauser <mgroszhauser@gmail.com>

Signed-off-by: Antti Palosaari <crope@iki.fi>
Cc: Martin Groszhauser <mgroszhauser@gmail.com>
Cc: TerraTux <TerraTux@terratec.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
13 years ago[media] af9015: small RC change
Antti Palosaari [Fri, 18 Mar 2011 22:36:42 +0000 (19:36 -0300)]
[media] af9015: small RC change

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
13 years ago[media] af9015: enhance RC
Ian Armstrong [Fri, 18 Mar 2011 22:23:05 +0000 (19:23 -0300)]
[media] af9015: enhance RC

Patch from Ian Armstrong.

I've encountered a couple of problems with the current af9015 driver as
supplied with the 2.6.37 kernel, that the attached patch appears to fix. (I've
generated this patch against the current v4l-dvb git).

Some key-presses are lost. A key-press is only generated upon 'valid' data
(buf[14] == (u8) ~buf[15]), but the buffer is wiped before this check.
Sometimes the 15th byte has not been set at the time of read, so the data
isn't valid & ignored. On the next poll the 15th byte has been set, but the
rest of the data was wiped previously, so the data is still invalid & the key
is lost.

Weird repeat error, where an old key press is sometimes repeated in error. ie.
button sequence '1 (pause) 2 (pause) 3 (pause) 4' generates output like '1
(pause) 2 (pause) 23 (pause) 4'. The current driver zeroes the data for the
key pushed, but sometimes this data is already zero but with other bytes set
suggesting a repeat code. This results in the last key being incorrectly
repeated.

This patch attempts to reduce the risk of a missed key-press & also stop the
random repeat of an old key-press when a new key is pressed.

Signed-off-by: Ian Armstrong <ian@iarmst.demon.co.uk>
Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
13 years ago[media] gspca - nw80x: New subdriver for Divio based webcams
Jean-François Moine [Mon, 14 Mar 2011 11:49:28 +0000 (08:49 -0300)]
[media] gspca - nw80x: New subdriver for Divio based webcams

[mchehab@redhat.com: Fix a few CodingStyle issues]
Tested-by: Kjell Claesson <kjell.claesson@epost.tidanet.se>
Tested-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Jean-François Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
13 years ago[media] gspca - main: Cleanup source
Jean-François Moine [Mon, 14 Mar 2011 08:33:01 +0000 (05:33 -0300)]
[media] gspca - main: Cleanup source

- change copyright and erroneous comment
- small code optimization
- have constant the device template

Signed-off-by: Jean-François Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
13 years ago[media] gspca - ov519: Add exposure and autogain controls for ov2610/2610ae
Jean-François Moine [Sun, 13 Mar 2011 19:36:49 +0000 (16:36 -0300)]
[media] gspca - ov519: Add exposure and autogain controls for ov2610/2610ae

Signed-off-by: Jean-François Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
13 years ago[media] gspca - jeilinj / stv06xx: Fix some warnings
Jean-François Moine [Sun, 13 Mar 2011 19:17:08 +0000 (16:17 -0300)]
[media] gspca - jeilinj / stv06xx: Fix some warnings

Signed-off-by: Jean-François Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
13 years ago[media] gspca - sonixb: Clenup source
Jean-François Moine [Sun, 13 Mar 2011 19:07:25 +0000 (16:07 -0300)]
[media] gspca - sonixb: Clenup source

- update copyright and module author
- set the sensor table as constant

Signed-off-by: Jean-François Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>