]> git.proxmox.com Git - mirror_ubuntu-kernels.git/log
mirror_ubuntu-kernels.git
14 years agoV4L/DVB: Add FE_CAN_TURBO_FEC
Klaus Schmidinger [Thu, 1 Jul 2010 04:37:34 +0000 (01:37 -0300)]
V4L/DVB: Add FE_CAN_TURBO_FEC

Some (North American) providers use a non-standard mode called
"8psk turbo fec". Since there is no flag in the driver that
would allow an application to determine whether a particular
device can handle "turbo fec", the attached patch introduces
FE_CAN_TURBO_FEC.

Since there is no flag in the SI data that would indicate
that a transponder uses "turbo fec", VDR will assume that
all 8psk transponders on DVB-S use "turbo fec".

Tested-by: Derek Kelly <user.vdr@gmail.com>
Signed-off-by: Klaus Schmidinger <Klaus.Schmidinger@tvdr.de>
Signed-off-by: Douglas Schilling Landgraf <dougsland@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB: drivers/media/video/uvc: Use kmemdup
Julia Lawall [Thu, 1 Jul 2010 04:33:15 +0000 (01:33 -0300)]
V4L/DVB: drivers/media/video/uvc: Use kmemdup

Use kmemdup when some other buffer is immediately copied into the
allocated region.

A simplified version of the semantic patch that makes this change is as
follows: (http://coccinelle.lip6.fr/)

// <smpl>
@@
expression from,to,size,flag;
statement S;
@@

-  to = \(kmalloc\|kzalloc\)(size,flag);
+  to = kmemdup(from,size,flag);
   if (to==NULL || ...) S
-  memcpy(to, from, size);
// </smpl>

Signed-off-by: Julia Lawall <julia@diku.dk>
Signed-off-by: Douglas Schilling Landgraf <dougsland@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB: drivers/media/video/gspca: Use kmemdup
Julia Lawall [Thu, 1 Jul 2010 04:30:11 +0000 (01:30 -0300)]
V4L/DVB: drivers/media/video/gspca: Use kmemdup

Use kmemdup when some other buffer is immediately copied into the
allocated region.

A simplified version of the semantic patch that makes this change is as
follows: (http://coccinelle.lip6.fr/)

// <smpl>
@@
expression from,to,size,flag;
statement S;
@@

-  to = \(kmalloc\|kzalloc\)(size,flag);
+  to = kmemdup(from,size,flag);
   if (to==NULL || ...) S
-  memcpy(to, from, size);
// </smpl>

Signed-off-by: Julia Lawall <julia@diku.dk>
Signed-off-by: Douglas Schilling Landgraf <dougsland@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB: drivers/media/dvb/dvb-usb/dib0700: CodingStyle fixes
Daniel Mack [Thu, 1 Jul 2010 04:19:31 +0000 (01:19 -0300)]
V4L/DVB: drivers/media/dvb/dvb-usb/dib0700: CodingStyle fixes

Signed-off-by: Daniel Mack <daniel@caiaq.de>
Signed-off-by: Douglas Schilling Landgraf <dougsland@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB: drivers/media/dvb/dvb-usb/dib0700: fix return values
Daniel Mack [Thu, 1 Jul 2010 04:08:58 +0000 (01:08 -0300)]
V4L/DVB: drivers/media/dvb/dvb-usb/dib0700: fix return values

Propagte correct error values instead of returning -1 which just means
-EPERM ("Permission denied")

Signed-off-by: Daniel Mack <daniel@caiaq.de>
Signed-off-by: Douglas Schilling Landgraf <dougsland@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB: drivers/media/video/pvrusb2: Add missing mutex_unlock
Julia Lawall [Tue, 29 Jun 2010 04:42:53 +0000 (01:42 -0300)]
V4L/DVB: drivers/media/video/pvrusb2: Add missing mutex_unlock

Add a mutex_unlock missing on the error path.  In the other functions in
the same file the locks and unlocks of this mutex appear to be balanced,
so it would seem that the same should hold in this case.

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

// <smpl>
@@
expression E1;
@@

* mutex_lock(E1,...);
  <+... when != E1
  if (...) {
    ... when != E1
*   return ...;
  }
  ...+>
* mutex_unlock(E1,...);
// </smpl>

Signed-off-by: Julia Lawall <julia@diku.dk>
Signed-off-by: Douglas Schilling Landgraf <dougsland@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB: vivi: fix depends again
Randy Dunlap [Tue, 29 Jun 2010 04:31:40 +0000 (01:31 -0300)]
V4L/DVB: vivi: fix depends again

My previous patch to depend on FONTS was not sufficient since
FONTS is boolean.  VIDEO_VIVI needs to depend on a tristate so that
it won't be enabled as =y when framebuffer is built as modular, so
modify it to depend on the same symbols that FONTS depends on, which
are FRAMEBUFFER_CONSOLE || STI_CONSOLE.

Fixes this build error when VIDEO_VIVI=y and FRAMEBUFFER_CONSOLE=m:
vivi.c:(.init.text+0x7205): undefined reference to `find_font'

Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: Douglas Schilling Landgraf <dougsland@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB: smscoreapi/w9968cf: drivers/media: Remove unnecesary kmalloc casts
Joe Perches [Tue, 29 Jun 2010 04:29:29 +0000 (01:29 -0300)]
V4L/DVB: smscoreapi/w9968cf: drivers/media: Remove unnecesary kmalloc casts

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Douglas Schilling Landgraf <dougsland@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB: IR/mceusb: add tx callback functions and wire up
Jarod Wilson [Wed, 16 Jun 2010 20:55:52 +0000 (17:55 -0300)]
V4L/DVB: IR/mceusb: add tx callback functions and wire up

mchehab: merged with IR/mceusb: userspace buffer copy moved out of driver

    Userspace buffer copy moved out of driver and into lirc bridge driver

[mchehab@redhat.com: merged the patch to avoid compilation errors with allyesconfig ]
Signed-off-by: Jarod Wilson <jarod@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB: IR: add tx callbacks to ir-core
Jarod Wilson [Wed, 16 Jun 2010 20:55:25 +0000 (17:55 -0300)]
V4L/DVB: IR: add tx callbacks to ir-core

Signed-off-by: Jarod Wilson <jarod@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB: IR/mceusb: kill pinnacle-device-specific nonsense
Jarod Wilson [Wed, 16 Jun 2010 20:10:46 +0000 (17:10 -0300)]
V4L/DVB: IR/mceusb: kill pinnacle-device-specific nonsense

I have pinnacle hardware now. None of this pinnacle-specific crap is at
all necessary (in fact, some of it needed to be removed to actually make
it work). The only thing unique about this device is that it often
transfers inbound data w/a header of 0x90, meaning 16 bytes of IR data
following it, so I had to make adjustments for that, and now its working
perfectly fine.

Signed-off-by: Jarod Wilson <jarod@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB: IR/mceusb: misc cleanups and init fixes
Jarod Wilson [Wed, 16 Jun 2010 20:10:05 +0000 (17:10 -0300)]
V4L/DVB: IR/mceusb: misc cleanups and init fixes

The first-gen mceusb device init code, while mostly functional, had a few
issues in it. This patch does the following:

1) removes use of magic numbers
2) eliminates mapping of memory from stack
3) makes debug spew translator functional

Additionally, this clean-up revealed that we cannot read the proper default
tx blaster bitmask from the device, we do actually have to initialize it
ourselves, which requires use of a somewhat gross list-based mask inversion
check.

This patch also removes the entirely unnecessary use of struct ir_input_state.

Also supersedes two earlier patches that also touched on first-gen
cleanup, but were partially botched. This one actually compiles, works,
etc., I swear. ;)

Signed-off-by: Jarod Wilson <jarod@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB: IR/mceusb: use the proper ir-core device unregister function
Jarod Wilson [Wed, 16 Jun 2010 20:08:32 +0000 (17:08 -0300)]
V4L/DVB: IR/mceusb: use the proper ir-core device unregister function

Was using input_unregister_device directly, instead of using
ir_input_unregister, which tears down a bunch of other things in
addition to eventually calling input_unregister_device.

Signed-off-by: Jarod Wilson <jarod@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB: IR/imon: use the proper ir-core device unregister function
Jarod Wilson [Wed, 16 Jun 2010 20:07:39 +0000 (17:07 -0300)]
V4L/DVB: IR/imon: use the proper ir-core device unregister function

Was using input_unregister_device directly, instead of using
ir_input_unregister, which tears down a bunch of other things in
addition to eventually calling input_unregister_device.

Signed-off-by: Jarod Wilson <jarod@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB: media/IR: nec-decoder needs to select BITREV
Randy Dunlap [Wed, 26 May 2010 17:08:51 +0000 (14:08 -0300)]
V4L/DVB: media/IR: nec-decoder needs to select BITREV

Fix ir-nec-decoder build: it uses bitrev library code, so
select BITREVERSE in its Kconfig.

ir-nec-decoder.c:(.text+0x1a2517): undefined reference to `byte_rev_table'
ir-nec-decoder.c:(.text+0x1a2526): undefined reference to `byte_rev_table'
ir-nec-decoder.c:(.text+0x1a2530): undefined reference to `byte_rev_table'
ir-nec-decoder.c:(.text+0x1a2539): undefined reference to `byte_rev_table'

Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB: ir-core: move decoding state to ir_raw_event_ctrl
David Härdeman [Sun, 13 Jun 2010 20:29:36 +0000 (17:29 -0300)]
V4L/DVB: ir-core: move decoding state to ir_raw_event_ctrl

This patch moves the state from each raw decoder into the
ir_raw_event_ctrl struct.

This allows the removal of code like this:

        spin_lock(&decoder_lock);
        list_for_each_entry(data, &decoder_list, list) {
                if (data->ir_dev == ir_dev)
                        break;
        }
        spin_unlock(&decoder_lock);
        return data;

which is currently run for each decoder on each event in order
to get the client-specific decoding state data.

In addition, ir decoding modules and ir driver module load
order is now independent. Centralizing the data also allows
for a nice code reduction of about 30% per raw decoder as
client lists and client registration callbacks are no longer
necessary (but still kept around for the benefit of the lirc
decoder).

Out-of-tree modules can still use a similar trick to what
the raw decoders did before this patch until they are merged.

Signed-off-by: David Härdeman <david@hardeman.nu>
Acked-by: Jarod Wilson <jarod@redhat.com>
Tested-by: Jarod Wilson <jarod@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB: ir-core: allow specifying multiple protocols at one open/write
Mauro Carvalho Chehab [Mon, 28 Jun 2010 16:52:07 +0000 (13:52 -0300)]
V4L/DVB: ir-core: allow specifying multiple protocols at one open/write

With this change, it is now possible to do something like:
        su -c 'echo "none +rc-5 +nec" > /sys/class/rc/rc1/protocols'

This prevents the need of multiple opens, one for each protocol change,
and makes userspace application easier.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB: ir-core: Add support for disabling all protocols
Mauro Carvalho Chehab [Mon, 28 Jun 2010 15:58:48 +0000 (12:58 -0300)]
V4L/DVB: ir-core: Add support for disabling all protocols

Writing "none" to /dev/class/rc/rc*/protocols will disable all protocols.
This allows an easier setup, from userspace, as userspace applications don't
need to disable protocol per protocol, before enabling a different set of
protocols.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB: ir-core: Rename sysfs protocols nomenclature to rc-5 and rc-6
Mauro Carvalho Chehab [Mon, 28 Jun 2010 15:43:25 +0000 (12:43 -0300)]
V4L/DVB: ir-core: Rename sysfs protocols nomenclature to rc-5 and rc-6

While rc-5 and rc-6 protocols are generally abreviated as "rc5" and "rc6",
previous sysfs nodes uses rc-5 and rc-6 for the Philips protocols. This is
consistent with the protocol nomenclature given by the original Philips
spec: "Remote control system RC-5" (doc. Nr. 9398 706 23011).
Also, rc5 is the name of a widely known cryptography protocol.

So, the better is to keep referring to those protocols as "rc-5" and "rc-6".

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB: ir-core: Remove magic numbers at the sysfs logic
Mauro Carvalho Chehab [Mon, 28 Jun 2010 15:37:13 +0000 (12:37 -0300)]
V4L/DVB: ir-core: Remove magic numbers at the sysfs logic

Instead of using "magic" sizes for protocol names, replace them by an
array, and use strlen().

No functional changes.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB: ir-core: centralize sysfs raw decoder enabling/disabling
David Härdeman [Sun, 13 Jun 2010 20:29:31 +0000 (17:29 -0300)]
V4L/DVB: ir-core: centralize sysfs raw decoder enabling/disabling

With the current logic, each raw decoder needs to add a copy of the exact
same sysfs code. This is both unnecessary and also means that (re)loading
an IR driver after raw decoder modules have been loaded won't work as
expected.

This patch moves that logic into ir-raw-event and adds a single sysfs
file per device.

Reading that file returns something like:

"rc5 [rc6] nec jvc [sony]"

(with enabled protocols in [] brackets)

Writing either "+protocol" or "-protocol" to that file will
enable or disable the according protocol decoder.

An additional benefit is that the disabling of a decoder will be
remembered across module removal/insertion so a previously
disabled decoder won't suddenly be activated again. The default
setting is to enable all decoders.

This is also necessary for the next patch which moves even more decoder
state into the central raw decoding structs.

Signed-off-by: David Härdeman <david@hardeman.nu>
Acked-by: Jarod Wilson <jarod@redhat.com>
Tested-by: Jarod Wilson <jarod@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB: ir-core: partially convert ir-kbd-i2c.c to not use ir-functions.c
David Härdeman [Mon, 7 Jun 2010 19:32:33 +0000 (16:32 -0300)]
V4L/DVB: ir-core: partially convert ir-kbd-i2c.c to not use ir-functions.c

Partially convert drivers/media/video/ir-kbd-i2c.c to
not use 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: ir-core: partially convert cx88 to not use ir-functions.c
David Härdeman [Mon, 7 Jun 2010 19:32:28 +0000 (16:32 -0300)]
V4L/DVB: ir-core: partially convert cx88 to not use ir-functions.c

Partially convert drivers/media/video/cx88/cx88-input.c to not use
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: em28xx-input: Don't generate one debug message for every get_key read
Mauro Carvalho Chehab [Sun, 27 Jun 2010 11:32:11 +0000 (08:32 -0300)]
V4L/DVB: em28xx-input: Don't generate one debug message for every get_key read

Instead of generating one printk for every IR read, prints it only when
count is different from the last count.

While here, as this code is called on every 100ms during the runtime
lifetime, do some performance optimization, assuming that, under normal
circumstances, it is unlikely that the driver would get a new key/key
repeat on every poll.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB: ir-core: convert em28xx to not use ir-functions.c
David Härdeman [Mon, 7 Jun 2010 19:32:23 +0000 (16:32 -0300)]
V4L/DVB: ir-core: convert em28xx to not use ir-functions.c

Convert drivers/media/video/em28xx/em28xx-input.c to not use 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: ir-core: convert mantis to not use ir-functions.c
David Härdeman [Mon, 7 Jun 2010 19:32:18 +0000 (16:32 -0300)]
V4L/DVB: ir-core: convert mantis to not use ir-functions.c

Convert drivers/media/dvb/mantis/mantis_input.c to not use 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: Fix kernel Oops when number of NetUP Dual DVB-S2-CI cards more than DVB_MAX_...
Abylay Ospan [Fri, 25 Jun 2010 11:01:28 +0000 (08:01 -0300)]
V4L/DVB: Fix kernel Oops when number of NetUP Dual DVB-S2-CI cards more than DVB_MAX_ADAPTERS limit

Signed-off-by: Abylay Ospan <aospan@netup.ru>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB: gspca - main: Remove V4L1 compatibility
Jean-François Moine [Thu, 24 Jun 2010 08:19:58 +0000 (05:19 -0300)]
V4L/DVB: gspca - main: Remove V4L1 compatibility

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: Don't use the PG_Reserved flag for mmapped buffers
Jean-François Moine [Thu, 24 Jun 2010 08:14:22 +0000 (05:14 -0300)]
V4L/DVB: gspca - main: Don't use the PG_Reserved flag for mmapped buffers

Signed-off-by: Jean-François Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB: gspca - sq930x: New sensor mt9v111
Jean-François Moine [Thu, 24 Jun 2010 08:02:57 +0000 (05:02 -0300)]
V4L/DVB: gspca - sq930x: New sensor mt9v111

Signed-off-by: Jean-François Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB: gspca - sq930x: Check the USB read errors
Jean-François Moine [Thu, 24 Jun 2010 07:57:12 +0000 (04:57 -0300)]
V4L/DVB: gspca - sq930x: Check the USB read errors

Signed-off-by: Jean-François Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB: gspca - pac7302/11: Bad request value in USB write
Jean-François Moine [Thu, 24 Jun 2010 07:50:26 +0000 (04:50 -0300)]
V4L/DVB: gspca - pac7302/11: Bad request value in USB 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 - pac7302: add Genius iSlim 310
Márton Németh [Mon, 14 Jun 2010 20:21:37 +0000 (17:21 -0300)]
V4L/DVB: gspca - pac7302: add Genius iSlim 310

Add Genius iSlim 310 webcam to the supported list of the PAC7302 driver.
For more information see http://linuxtv.org/wiki/index.php/PixArt_PAC7301/PAC7302 .

Signed-off-by: Márton Németh <nm127@freemail.hu>
Signed-off-by: Jean-François Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB: gspca - gl860: text alignment
Olivier Lorin [Thu, 24 Jun 2010 07:33:53 +0000 (04:33 -0300)]
V4L/DVB: gspca - gl860: text alignment

- Extra spaces to align some variable names and a defined value

Signed-off-by: Olivier Lorin <o.lorin@laposte.net>
Signed-off-by: Jean-François Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB: gspca - gl860: fix for wrong 0V9655 resolution identifier name
Olivier Lorin [Thu, 24 Jun 2010 07:31:43 +0000 (04:31 -0300)]
V4L/DVB: gspca - gl860: fix for wrong 0V9655 resolution identifier name

Signed-off-by: Olivier Lorin <o.lorin@laposte.net>
Signed-off-by: Jean-François Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB: gspca - gl860: use of real resolutions for MI2020 sensor
Olivier Lorin [Thu, 24 Jun 2010 07:30:05 +0000 (04:30 -0300)]
V4L/DVB: gspca - gl860: use of real resolutions for MI2020 sensor

- Change of rounded image resolutions to the real ones for MI2020 sensor
  in order to discard 2 random lines in the bottom of images

Signed-off-by: Olivier Lorin <o.lorin@laposte.net>
Signed-off-by: Jean-François Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB: gspca - gl860: setting changes applied after an EOI
Olivier Lorin [Thu, 24 Jun 2010 07:28:24 +0000 (04:28 -0300)]
V4L/DVB: gspca - gl860: setting changes applied after an EOI

- Setting changes applied after an end of image marker reception
  This is the way MI2020 sensor works.
  It seems to be logical to wait for a complete image before
  to change a setting.

Signed-off-by: Olivier Lorin <o.lorin@laposte.net>
Signed-off-by: Jean-François Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB: gspca - gl860: USB control message delay unification
Olivier Lorin [Thu, 24 Jun 2010 07:26:20 +0000 (04:26 -0300)]
V4L/DVB: gspca - gl860: USB control message delay unification

- 1 ms "msleep" applied to each sensor after USB control data exchange
  This was done for two sensors because these exchanges were known to
  be too quick depending on laptop model.
  It is fairly logical to apply this delay to each sensor
  in order to prevent from having errors with untested hardwares.

Signed-off-by: Olivier Lorin <o.lorin@laposte.net>
Signed-off-by: Jean-François Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB: gspca - gl860: new driver for MI2020 sensor
Olivier Lorin [Thu, 24 Jun 2010 07:22:37 +0000 (04:22 -0300)]
V4L/DVB: gspca - gl860: new driver for MI2020 sensor

- new MI2020 driver version made from a webcam gift
- all previous flavors of this driver removed

Signed-off-by: Olivier Lorin <o.lorin@laposte.net>
Signed-off-by: Jean-François Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB: gspca: Remove/move useless inclusions of slab.h
Jean-François Moine [Fri, 4 Jun 2010 09:42:32 +0000 (06:42 -0300)]
V4L/DVB: gspca: Remove/move useless inclusions of slab.h

Signed-off-by: Jean-François Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB: Fix case where fields were not at the correct start location
Devin Heitmueller [Sun, 13 Jun 2010 20:00:23 +0000 (17:00 -0300)]
V4L/DVB: Fix case where fields were not at the correct start location

This patch address an arithmetic error for the case where the only remaining
content in the USB packet was the "225Axxxx" start of active video.  In cases
where that happened to be at the end of the frame, we would inject it into the
videobuf (which is incorrect).  This caused fields to be intermittently
rendered off by two pixels.

Thanks to Eugeniy Meshcheryakov for bringing this issue to my attention

Signed-off-by: Devin Heitmueller <dheitmueller@kernellabs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB: Add closed captioning support for the HVR-950q
Devin Heitmueller [Sat, 29 May 2010 20:18:45 +0000 (17:18 -0300)]
V4L/DVB: Add closed captioning support for the HVR-950q

Add NTSC closed captioning support for au0828 based products.  Note that this
also required reworking the locking to support streaming on both the video and
VBI devices (the logic for which I copied from my changes made to the em28xx
several months ago).

This work was sponsored by GetWellNetwork Inc.

Signed-off-by: Devin Heitmueller <dheitmueller@kernellabs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB: tda18271: fix error detection during initialization of first instance
Michael Krufky [Mon, 3 May 2010 05:10:15 +0000 (02:10 -0300)]
V4L/DVB: tda18271: fix error detection during initialization of first instance

Fix error detection of failures during initialization of first instance:
Dont pass a function into the tda_fail macro. Instead, save the function
return value and pass that into the tda_fail macro.

This prevents the function from being called twice in cases of failure,
for example:

[19026.074070] tuner 4-0060: chip found @ 0xc0 (device #0)
[19026.087755] tda18271 4-0060: creating new instance
[19026.089965] Unknown device detected @ 4-0060, device not supported.
[19026.092233] Unknown device detected @ 4-0060, device not supported.
[19026.092241] tda18271_attach: [4-0060|M] error -22 on line 1275
[19026.092327] tda18271 4-0060: destroying instance

Signed-off-by: Michael Krufky <mkrufky@kernellabs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB: ivtv: Increment driver version due to firmware loading changes
Andy Walls [Sat, 12 Jun 2010 16:55:33 +0000 (13:55 -0300)]
V4L/DVB: ivtv: Increment driver version due to firmware loading changes

Signed-off-by: Andy Walls <awalls@md.metrocast.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB: ivtv: Automatic firmware reload
Ian Armstrong [Sat, 12 Jun 2010 16:41:57 +0000 (13:41 -0300)]
V4L/DVB: ivtv: Automatic firmware reload

If the firmware has failed, this patch will automatically reload &
restart the card. The previous card state will be restored on a
successful restart.  Firmware reload will only happen if neither the
encoder or decoder is active.  If the card is busy then behaviour is as
before, returning -EIO on device access until the reload can occur. On
cards that support video output, coloured bars will be displayed during
the reload.

Andy Walls (ivtv maintainer and patch committer) made minor tweaks to
comments and the logged messages, but nothing substantial otherwise.

Signed-off-by: Ian Armstrong <ian@iarmst.demon.co.uk>
Signed-off-by: Andy Walls <awalls@md.metrocast.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB: ivtv: Add firmare monitoring and debug mode to ignore firmware problems
Ian Armstrong [Sat, 12 Jun 2010 16:33:21 +0000 (13:33 -0300)]
V4L/DVB: ivtv: Add firmare monitoring and debug mode to ignore firmware problems

>From Ian's e-mail:
When a device is opened the firmware state will be checked. If it isn't
responding then the open will fail with -EIO.  Due to the nature of the
hardware, a single failed check will block everything since we don't know
exactly what has failed. A side effect of this is the blocking of debug
access, so an additional debug level has been created which allows the block
to be bypassed.

Andy Walls' modifications:
I modified Ian's patch to add a separate fw_debug module parameter to change
the driver's behavior, as opposed to using the normal debug module parameter.
The fw_debug module parameter is only available when CONFIG_VIDEO_ADV_DEBUG
is set.
I also made some minor whitespace adjustments and changed some warning
messages to be a bit more specific.  s/happy/glad/g

Signed-off-by: Ian Armstrong <ian@iarmst.demon.co.uk>
Signed-off-by: Andy Walls <awalls@md.metrocast.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB: lgdt3305: enable FE_HAS_SIGNAL hack for the lgdt3304 in QAM mode
Michael Krufky [Sat, 13 Mar 2010 18:22:32 +0000 (15:22 -0300)]
V4L/DVB: lgdt3305: enable FE_HAS_SIGNAL hack for the lgdt3304 in QAM mode

The signal bit is unreliable on the DT3304 in QAM mode, so
set FE_HAS_SIGNAL based on 'cr_lock'

Signed-off-by: Michael Krufky <mkrufky@kernellabs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB: lgdt3305: update copyright date and MODULE_VERSION
Michael Krufky [Fri, 12 Mar 2010 03:58:12 +0000 (00:58 -0300)]
V4L/DVB: lgdt3305: update copyright date and MODULE_VERSION

Signed-off-by: Michael Krufky <mkrufky@kernellabs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB: lgdt3305: Jarod Wilson gets the credit for LGDT3304 support
Michael Krufky [Fri, 12 Mar 2010 03:56:32 +0000 (00:56 -0300)]
V4L/DVB: lgdt3305: Jarod Wilson gets the credit for LGDT3304 support

Signed-off-by: Michael Krufky <mkrufky@kernellabs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB: lgdt3305: FIXME: verify & document the LGDT3304 registers
Michael Krufky [Fri, 12 Mar 2010 03:54:17 +0000 (00:54 -0300)]
V4L/DVB: lgdt3305: FIXME: verify & document the LGDT3304 registers

Signed-off-by: Michael Krufky <mkrufky@kernellabs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB: lgdt3305: consolidate init functions
Michael Krufky [Fri, 12 Mar 2010 03:32:27 +0000 (00:32 -0300)]
V4L/DVB: lgdt3305: consolidate init functions

Signed-off-by: Michael Krufky <mkrufky@kernellabs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB: lgdt3305: re-write lgdt3304 ifbw hack in lgdt3305_rfagc_loop with FIXME
Michael Krufky [Fri, 12 Mar 2010 03:00:55 +0000 (00:00 -0300)]
V4L/DVB: lgdt3305: re-write lgdt3304 ifbw hack in lgdt3305_rfagc_loop with FIXME

Signed-off-by: Michael Krufky <mkrufky@kernellabs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB: lgdt3305: update lgdt3305.h header to match the header in lgdt3305.c
Michael Krufky [Fri, 12 Mar 2010 02:50:51 +0000 (23:50 -0300)]
V4L/DVB: lgdt3305: update lgdt3305.h header to match the header in lgdt3305.c

Signed-off-by: Michael Krufky <mkrufky@kernellabs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB: lgdt3305: remove pointless function, lgdt3304_sleep
Michael Krufky [Fri, 12 Mar 2010 02:33:20 +0000 (23:33 -0300)]
V4L/DVB: lgdt3305: remove pointless function, lgdt3304_sleep

Signed-off-by: Michael Krufky <mkrufky@kernellabs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB: dvb: add lgdt3304 support to lgdt3305 driver
Jarod Wilson [Sun, 7 Mar 2010 20:20:03 +0000 (17:20 -0300)]
V4L/DVB: dvb: add lgdt3304 support to lgdt3305 driver

There's a currently-unused lgdt3304 demod driver, which leaves a lot to
be desired as far as functionality. The 3304 is unsurprisingly quite
similar to the 3305, and empirical testing yeilds far better results
and more complete functionality by merging 3304 support into the 3305
driver. (For example, the current lgdt3304 driver lacks support for
signal strength, snr, ucblocks, etc., which we get w/the lgdt3305).

For the moment, not dropping the lgdt3304 driver, and its still up to
a given device's config setup to choose which demod driver to use, but
I'd suggest dropping the 3304 driver entirely.

As a follow-up to this patch, I've got another patch that adds support
for the KWorld PlusTV 340U (ATSC) em2870-based tuner stick, driving
its lgdt3304 demod via this lgdt3305 driver, which is what I used to
successfully test this patch with both VSB_8 and QAM_256 signals.

A few pieces are still a touch crude, but I think its a solid start,
as well as much cleaner and more feature-complete than the existing
lgdt3304 driver.

Signed-off-by: Jarod Wilson <jarod@redhat.com>
Signed-off-by: Michael Krufky <mkrufky@kernellabs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB: gspca - spca1528: New subdriver
Jean-François Moine [Sat, 5 Jun 2010 10:57:56 +0000 (07:57 -0300)]
V4L/DVB: gspca - spca1528: New subdriver

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: Function gspca_dev_probe2 added
Jean-François Moine [Sat, 5 Jun 2010 10:47:36 +0000 (07:47 -0300)]
V4L/DVB: gspca - main: Function gspca_dev_probe2 added

This function is used when the USB video interface is checked by
the subdriver.

Signed-off-by: Jean-François Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB: gspca - sq930x: New subdriver
Jean-François Moine [Sat, 5 Jun 2010 10:45:04 +0000 (07:45 -0300)]
V4L/DVB: gspca - sq930x: New subdriver

Signed-off-by: Jean-François Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB: gspca - t613: Change the gain mechanism
Jean-François Moine [Sat, 5 Jun 2010 10:07:56 +0000 (07:07 -0300)]
V4L/DVB: gspca - t613: Change the gain mechanism

- variable / function rename
- set the gains in one exchange
- don't alter the register 80 which contains the AWB flag
  and other sensor specific values
- the global gain is now the average of the R, G and B gains.

Signed-off-by: Jean-François Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB: gspca - t613: Simplify the scan of isoc packets
Jean-François Moine [Sat, 5 Jun 2010 09:56:48 +0000 (06:56 -0300)]
V4L/DVB: gspca - t613: Simplify the scan of isoc packets

Signed-off-by: Jean-François Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB: gspca - t613: Remove the RGB gains setting from sensor_polling
Jean-François Moine [Fri, 4 Jun 2010 10:30:21 +0000 (07:30 -0300)]
V4L/DVB: gspca - t613: Remove the RGB gains setting from sensor_polling

This patch also renames the last polling message from the closer one
of the ms-windows driver.

Signed-off-by: Jean-François Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB: gspca - t613: Change the gamma table
Jean-François Moine [Fri, 4 Jun 2010 10:24:53 +0000 (07:24 -0300)]
V4L/DVB: gspca - t613: Change the gamma table

The new table is sorted and extracted from a clear part of the MS-Windows
driver.

Signed-off-by: Jean-François Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB: gspca - t613: Adjust light frequency values per sensor
Jean-François Moine [Sat, 5 Jun 2010 10:01:46 +0000 (07:01 -0300)]
V4L/DVB: gspca - t613: Adjust light frequency values per sensor

Signed-off-by: Jean-François Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB: gspca - t613: Cleanup and clarify the source
Jean-François Moine [Fri, 4 Jun 2010 10:22:57 +0000 (07:22 -0300)]
V4L/DVB: gspca - t613: Cleanup and clarify the source

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: Add back the brightness control
Jean-François Moine [Fri, 4 Jun 2010 09:21:48 +0000 (06:21 -0300)]
V4L/DVB: gspca - zc3xx: Add back the brightness control

This patch also changes a bit the contrast control.

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: Don't change the registers 7 and 8 for sensor pas202b
Jean-François Moine [Fri, 4 Jun 2010 08:54:41 +0000 (05:54 -0300)]
V4L/DVB: gspca - zc3xx: Don't change the registers 7 and 8 for sensor pas202b

These registers seem to act on the JPEG compression whose control
is not implemented in the current driver.

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: Change the max and default JPEG qualities
Jean-François Moine [Fri, 4 Jun 2010 08:48:52 +0000 (05:48 -0300)]
V4L/DVB: gspca - zc3xx: Change the max and default JPEG qualities

Signed-off-by: Jean-François Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB: gspca - stk014: Change the min and default values of the JPEG quality
Jean-François Moine [Fri, 4 Jun 2010 08:46:38 +0000 (05:46 -0300)]
V4L/DVB: gspca - stk014: Change the min and default values of the JPEG quality

Signed-off-by: Jean-François Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB: gspca - JPEG subdrivers: Don't allocate the JPEG header
Jean-François Moine [Fri, 4 Jun 2010 08:26:42 +0000 (05:26 -0300)]
V4L/DVB: gspca - JPEG subdrivers: Don't allocate the JPEG header

The JPEG header is now included in the subdriver structure instead
of being allocated and freed at capture start and stop.

Signed-off-by: Jean-François Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB: gspca_ov519: Don't report a saturation control for 7670 sensors
Hans de Goede [Tue, 1 Jun 2010 09:39:14 +0000 (06:39 -0300)]
V4L/DVB: gspca_ov519: Don't report a saturation control for 7670 sensors

setcolors(0 is a no-op for 7670 sensors, so we should not report a
saturation control for 7670 sensors.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB: gspca_tv8532: rename brightness control to exposure
Hans de Goede [Wed, 12 May 2010 10:01:53 +0000 (07:01 -0300)]
V4L/DVB: gspca_tv8532: rename brightness control to exposure

What we've called brightness so far actually is an exposure control,
rename it and fixup the maximum and default values.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB: gspca_tv8532: add gain control
Hans de Goede [Wed, 12 May 2010 09:58:00 +0000 (06:58 -0300)]
V4L/DVB: gspca_tv8532: add gain control

gspca_tv8532: add gain control

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB: gspca_tv8532: remove a whole bunch of unnecessary register writes
Hans de Goede [Wed, 12 May 2010 09:26:01 +0000 (06:26 -0300)]
V4L/DVB: gspca_tv8532: remove a whole bunch of unnecessary register writes

There is a problem with certain tv8532 cams, where sometimes there
hsync/vsync locks one pixel of where it normally locks. While trying to
fix this (which I failed to do). I noticed there are lots if duplicate
register writes and unnecessary register reads in the tv8532 driver. This
patch cleanes these ups (which has no negative effects, but unfortunately
also does not help).

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB: gspca_ovfx2: drop first frames in stream if not synced
Hans de Goede [Sat, 8 May 2010 11:55:42 +0000 (08:55 -0300)]
V4L/DVB: gspca_ovfx2: drop first frames in stream if not synced

With the ovfx2 bridge sometimes the first few frames in a stream
would be no good, as the bridge and sensor are not in complete hsync /
vsync yet. This can easily be detected by checking the framesize. So if the
framesize is short and it is one of the 1ste 3 frames after an sd_start,
drop it.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB: tm6000: Partially revert some copybuf logic
Mauro Carvalho Chehab [Wed, 30 Jun 2010 20:24:28 +0000 (17:24 -0300)]
V4L/DVB: tm6000: Partially revert some copybuf logic

Partially revert changeset 0208bef609242a2d50b95edc713a41566cae500b:

As pointed by Stefan Ringel <stefan.ringel@arcor.de>, many packets become
damaged by this change. That means that the "size" field of Video/VBI is not
presenting 180 bytes, as it should be expected.

Thanks-to: Stefan Ringel <stefan.ringel@arcor.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB: tm6000: Be sure that the new buffer is empty
Mauro Carvalho Chehab [Mon, 7 Jun 2010 15:32:27 +0000 (12:32 -0300)]
V4L/DVB: tm6000: Be sure that the new buffer is empty

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB: tm6000: Fix copybuf continue logic
Mauro Carvalho Chehab [Mon, 7 Jun 2010 15:10:14 +0000 (12:10 -0300)]
V4L/DVB: tm6000: Fix copybuf continue logic

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB: tm6000: audio packet has always 180 bytes
Mauro Carvalho Chehab [Mon, 7 Jun 2010 14:57:28 +0000 (11:57 -0300)]
V4L/DVB: tm6000: audio packet has always 180 bytes

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB: tm6000: Improve set bitrate routines used by alsa
Mauro Carvalho Chehab [Mon, 7 Jun 2010 14:57:01 +0000 (11:57 -0300)]
V4L/DVB: tm6000: Improve set bitrate routines used by alsa

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB: tm6000-alsa: Implement a routine to store data received from URB
Mauro Carvalho Chehab [Sat, 5 Jun 2010 22:21:34 +0000 (19:21 -0300)]
V4L/DVB: tm6000-alsa: Implement a routine to store data received from URB

Implements the fillbuf callback to store data received via URB
data transfers.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB: tm6000-alsa: Fix several bugs at the driver initialization code
Mauro Carvalho Chehab [Sat, 5 Jun 2010 18:10:36 +0000 (15:10 -0300)]
V4L/DVB: tm6000-alsa: Fix several bugs at the driver initialization code

There are several missing things at the driver, preventing, for example,
the code to start/stop DMA to actually work. Fix them before implementing
a routine to store data at the audio buffers.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB: tm6000: avoid unknown symbol tm6000_debug
Mauro Carvalho Chehab [Sat, 5 Jun 2010 00:08:25 +0000 (21:08 -0300)]
V4L/DVB: tm6000: avoid unknown symbol tm6000_debug

Reported by Stefan Ringel.

Thanks-to: Stefan Ringel <stefan.ringel@arcor.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB: tm6000: Add a callback code for buffer fill
Mauro Carvalho Chehab [Thu, 3 Jun 2010 20:16:28 +0000 (17:16 -0300)]
V4L/DVB: tm6000: Add a callback code for buffer fill

Implements a callback to be used by tm6000-alsa, in order to allow filling
audio data packets.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB: tm6000: Use an enum for extension type
Mauro Carvalho Chehab [Thu, 3 Jun 2010 19:31:20 +0000 (16:31 -0300)]
V4L/DVB: tm6000: Use an enum for extension type

In order to better document and be sure that the values are used
at the proper places, convert extension type into an enum and
name it as "type", instead of "id".

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB: tm6000-alsa: rework audio buffer allocation/deallocation
Mauro Carvalho Chehab [Thu, 3 Jun 2010 19:24:19 +0000 (16:24 -0300)]
V4L/DVB: tm6000-alsa: rework audio buffer allocation/deallocation

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB: tm6000: Avoid OOPS when loading tm6000-alsa module
Mauro Carvalho Chehab [Thu, 3 Jun 2010 16:45:41 +0000 (13:45 -0300)]
V4L/DVB: tm6000: Avoid OOPS when loading tm6000-alsa module

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB: IR: add mceusb IR receiver driver
Jarod Wilson [Tue, 1 Jun 2010 20:32:08 +0000 (17:32 -0300)]
V4L/DVB: IR: add mceusb IR receiver driver

This is a new driver for the Windows Media Center Edition/eHome
Infrared Remote transceiver devices. Its a port of the current
lirc_mceusb driver to ir-core, and currently lacks transmit support,
but will grow it back soon enough... This driver also differs from
lirc_mceusb in that it borrows heavily from a simplified IR buffer
decode routine found in Jon Smirl's earlier ir-mceusb port.

This driver has been tested on the original first-generation MCE IR
device with the MS vendor ID, as well as a current-generation device
with a Topseed vendor ID. Every receiver supported by lirc_mceusb
should work equally well. Testing was done primarily with RC6 MCE
remotes, but also briefly with a Hauppauge RC5 remote, and all works
as expected.

v2: fix call to ir_raw_event_handle so repeats work as they should.

Signed-off-by: Jarod Wilson <jarod@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB: IR: add RC6 keymap for Windows Media Center Ed. remotes
Jarod Wilson [Tue, 1 Jun 2010 20:30:35 +0000 (17:30 -0300)]
V4L/DVB: IR: add RC6 keymap for Windows Media Center Ed. remotes

This is the RC6 keymap for the Windows Media Center Edition remotes
that come bundled with MCE/eHome Infrared Remote transceivers. Tested
with 3 different variants of the remote, but its possible there are
still some additional keys missing, but its simple enough to add them
in later...

This patch also adds an IR_TYPE_ALL convenience macro to make life
easier for receivers that support all IR protocols.

v2: fix an erroneous comment that referred to imon devices

Signed-off-by: Jarod Wilson <jarod@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB: IR: only initially registers protocol that matches loaded keymap
Jarod Wilson [Tue, 1 Jun 2010 20:27:07 +0000 (17:27 -0300)]
V4L/DVB: IR: only initially registers protocol that matches loaded keymap

Rather than registering all IR protocol decoders as enabled when bringing
up a new device, only enable the IR protocol decoder that matches the
keymap being loaded. Additional decoders can be enabled on the fly by
those that need to, either by twiddling sysfs bits or by using the
ir-keytable util from v4l-utils.

Functional testing done with the mceusb driver, and it behaves as expected,
only the rc6 decoder is enabled, keys are all handled properly, etc.

Signed-off-by: Jarod Wilson <jarod@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB: IR: let all protocol decoders have a go at raw data
Jarod Wilson [Sat, 29 May 2010 17:17:27 +0000 (14:17 -0300)]
V4L/DVB: IR: let all protocol decoders have a go at raw data

On Fri, May 28, 2010 at 3:59 PM, Jarod Wilson <jarod@redhat.com> wrote:
> The mceusb driver I'm about to submit handles just about any raw IR you
> can throw at it. The ir-core loads up all protocol decoders, starting
> with NEC, then RC5, then RC6. RUN_DECODER() was trying them in the same
> order, and exiting if any of the decoders didn't like the data. The
> default mceusb remote talks RC6(6A). Well, the RC6 decoder never gets a
> chance to run unless you move the RC6 decoder to the front of the list.
>
> What I believe to be correct is to have RUN_DECODER keep trying all of
> the decoders, even when one triggers an error. I don't think the errors
> matter so much as it matters that at least one was successful -- i.e.,
> that _sumrc is > 0. The following works for me w/my mceusb driver and
> the default decoder ordering -- NEC and RC5 still fail, but RC6 still
> gets a crack at it, and successfully does its job.
>
> Signed-off-by: Jarod Wilson <jarod@redhat.com>
>
> ---
>  drivers/media/IR/ir-raw-event.c |    7 ++++---
>
> diff --git a/drivers/media/IR/ir-raw-event.c b/drivers/media/IR/ir-raw-event.c
> index ea68a3f..44162db 100644
> --- a/drivers/media/IR/ir-raw-event.c
> +++ b/drivers/media/IR/ir-raw-event.c
> @@ -36,14 +36,15 @@ static DEFINE_SPINLOCK(ir_raw_handler_lock);
>  */
>  #define RUN_DECODER(ops, ...) ({                                           \
>        struct ir_raw_handler           *_ir_raw_handler;                   \
> -       int _sumrc = 0, _rc;                                                \
> +       int _sumrc = 0, _rc, _fail;                                         \
>        spin_lock(&ir_raw_handler_lock);                                    \
>        list_for_each_entry(_ir_raw_handler, &ir_raw_handler_list, list) {  \
>                if (_ir_raw_handler->ops) {                                 \
>                        _rc = _ir_raw_handler->ops(__VA_ARGS__);            \
>                        if (_rc < 0)                                        \
> -                               break;                                      \
> -                       _sumrc += _rc;                                      \
> +                               _fail++;                                    \
> +                       else                                                \
> +                               _sumrc += _rc;                              \

Self-NAK. The only place we actually *care* about the retval from a
RUN_DECODER() call is in __ir_input_register(), and currently, its
looking for retval < 0, which is currently never possible. When we're
running the decoders, either they fail and return -EINVAL or they
succeed and return 0, and in the register case, we get either a
negative error (ex: -ENOMEM from rc6) or 0, so with the above, _sumrc
will *always* be 0 in the two cases I'm looking at. The third place
where RUN_DECODER gets called (decoder unregister) doesn't care about
the retval either. New patch below, including updated comments about
the macro.

Signed-off-by: Jarod Wilson <jarod@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB: Staging: tm6000: Fix coding style issues
Timofey Trofimov [Sat, 29 May 2010 16:52:46 +0000 (13:52 -0300)]
V4L/DVB: Staging: tm6000: Fix coding style issues

Fixed coding style issues founded by checkpatch.pl in files:
tm6000-alsa.c,tm6000-cards, tm6000-core.c, tm6000-dvb.c, tm6000-i2c.c,
tm6000-stds.c, tm6000-usb-isoc.h, tm6000.h

[mchehab@redhat.com: Fix some compilation breakages]
Signed-off-by: Timofey Trofimov <tumoxep@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB: tm6000: move dvb into a separate kern module
Stefan Ringel [Sun, 30 May 2010 12:19:04 +0000 (09:19 -0300)]
V4L/DVB: tm6000: move dvb into a separate kern module

move dvb into a separate kern module

[mchehab@redhat.com: Fix several compilation breakages]

Signed-off-by: Stefan Ringel <stefan.ringel@arcor.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB: tm6000: rewrite init and fini
Stefan Ringel [Sun, 30 May 2010 12:19:02 +0000 (09:19 -0300)]
V4L/DVB: tm6000: rewrite init and fini

rewrite tm6000_audio_init and tm6000_audio_fini

Signed-off-by: Stefan Ringel <stefan.ringel@arcor.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB: tm6000: Fix Video decoder initialization
Dmitri Belimov [Wed, 2 Jun 2010 01:07:39 +0000 (22:07 -0300)]
V4L/DVB: tm6000: Fix Video decoder initialization

Fix video decoder overflow and avoid junk audio packets
when TV signal is lost.

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: tm6000: rewrite copy_streams
Stefan Ringel [Tue, 1 Jun 2010 15:47:42 +0000 (12:47 -0300)]
V4L/DVB: tm6000: rewrite copy_streams

Merge function copy streams() and copy_packets() into a new function
copy_streams(), fixing the bugs.

Signed-off-by: Stefan Ringel <stefan.ringel@arcor.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB: V4L2: fix sh_vou.c compile breakage: #include <slab.h>
Guennadi Liakhovetski [Thu, 8 Jul 2010 08:12:11 +0000 (05:12 -0300)]
V4L/DVB: V4L2: fix sh_vou.c compile breakage: #include <slab.h>

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: fix debugging message
Guennadi Liakhovetski [Fri, 18 Jun 2010 07:20:56 +0000 (04:20 -0300)]
V4L/DVB: sh_mobile_ceu_camera: fix debugging message

With enabled debugging sh_mobile_ceu_camera.c dereferences an invalid or a NULL
pointer. Thanks to James Wang for reporting.

Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB: soc_camera_platform: Add necessary v4l2_subdev_video_ops method
Kuninori Morimoto [Tue, 11 May 2010 09:14:18 +0000 (06:14 -0300)]
V4L/DVB: soc_camera_platform: Add necessary v4l2_subdev_video_ops method

These function are needed to use camera.
This patch was tested with sh_mobile_ceu_camera

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoLinux 2.6.35
Linus Torvalds [Sun, 1 Aug 2010 22:11:14 +0000 (15:11 -0700)]
Linux 2.6.35

14 years agoNFS: Fix a typo in include/linux/nfs_fs.h
Trond Myklebust [Sun, 1 Aug 2010 17:40:40 +0000 (13:40 -0400)]
NFS: Fix a typo in include/linux/nfs_fs.h

nfs_commit_inode() needs to be defined irrespectively of whether or not
we are supporting NFSv3 and NFSv4.

Allow the compiler to optimise away code in the NFSv2-only case by
converting it into an inlined stub function.

Reported-and-tested-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>