Commit Graph

8644 Commits (1bd22e374b20c2f0ba1d2723c1f585acab2251c5)

Author SHA1 Message Date
Manu Abraham 35afca912f V4L/DVB (13726): [Mantis/Skystar HD2] Add support for the Technisat Skystar HD2
Signed-off-by: Manu Abraham <manu@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-01-17 11:55:32 -02:00
Manu Abraham 0131258ba7 V4L/DVB (13725): [Mantis/VP-1041] Revert to old register initialization parameters, for now.
Thanks to eso46 for pointing it out

Signed-off-by: Manu Abraham <manu@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-01-17 11:55:31 -02:00
Manu Abraham 873c8c25eb V4L/DVB (13724): [Mantis/VP-1041] Initial support for Mantis VP-1041
Signed-off-by: Manu Abraham <manu@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-01-17 11:55:31 -02:00
Manu Abraham b2eb1312fa V4L/DVB (13723): [Mantis/VP-2040, Terratec Cinergy C] Add support for the Cinergy C, VP-2040 clone
Signed-off-by: Manu Abraham <manu@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-01-17 11:55:31 -02:00
Manu Abraham 5e68b0aeda V4L/DVB (13722): [Mantis] Revert 13560
Signed-off-by: Manu Abraham <manu@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-01-17 11:55:31 -02:00
Manu Abraham 99d96e4e92 V4L/DVB (13721): [Mantis] Bug! Before bailing out, Unlock
Thanks to hotwings <user.vdr@gmail.com> for pointing out the bug

Signed-off-by: Manu Abraham <manu@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-01-17 11:55:31 -02:00
Manu Abraham 51d20db8bb V4L/DVB (13720): [Mantis/Terratec Cinergy C] Add support for the Terratec Cinergy C PCI
Signed-off-by: Manu Abraham <manu@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-01-17 11:55:31 -02:00
Manu Abraham 2687d832fe V4L/DVB (13719): [Mantis/VP-2033] Initial test switch to the tda10021, from the cu1216
Signed-off-by: Manu Abraham <manu@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-01-17 11:55:30 -02:00
Marko Ristola f8e26cdec5 V4L/DVB (13718): [Mantis] Use gpio_set_bits to turn OFF the bits as well
Signed-off-by: Marko Ristola <marko.ristola@kolumbus.fi>
Signed-off-by: Manu Abraham <manu@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-01-17 11:55:30 -02:00
Manu Abraham 77557abef0 V4L/DVB (13717): [MB86A16] Statistics Updates
* Demodulator status check made reliable
* Code simplification for Viterbi Sync check, makes
  acquisition more reliable

* Implement a BER monitor
* Implement a Signal strength monitor
* Implement a "simple" UCB monitor, no real UCB monitor

Signed-off-by: Manu Abraham <manu@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-01-17 11:55:30 -02:00
David Woodhouse 4170368448 V4L/DVB (13716): [Mantis] Bug: incorrect byte swap
You know, the worst endianness errors are not the cases where
people forget to byte-swap, but the cases where they either byte-swap
with the wrong size, or byte-swap when they shouldn't have done so at
all. Those ones defeat the casual reader of the code.

Signed-off-by: David Woodhouse <dwmw2@infradead.org>
Signed-off-by: Manu Abraham <manu@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-01-17 11:55:30 -02:00
Manu Abraham 8154bad4c4 V4L/DVB (13715): [Mantis] Kernel I2C changes: use PCI parent device
Signed-off-by: Manu Abraham <manu@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-01-17 11:55:30 -02:00
Manu Abraham 33c79630dd V4L/DVB (13714): [MB86A16] FIX/Code simplification: use hwconfig->ts_size instead of ts_size
thanks to Marko Ristola for pointing it out

Signed-off-by: Manu Abraham <manu@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-01-17 11:55:30 -02:00
Sigmund Augdal 1fa1f10785 V4L/DVB (13713): [MB86A16] Fix: Initialize SNR/STATUS
Signed-off-by: Sigmund Augdal <sigmund@snap.tv>
Signed-off-by: Manu Abraham <manu@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-01-17 11:55:29 -02:00
Manu Abraham e2f67e4fb9 V4L/DVB (13712): [Mantis] Add locking for concurrent access
Signed-off-by: Manu Abraham <manu@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-01-17 11:55:29 -02:00
Marko Ristola e4deee04ff V4L/DVB (13711): [Mantis] FIX: Do nor toggle GPIF status
Signed-off-by: Marko Ristola <marko.ristola@kolumbus.fi>
Signed-off-by: Manu Abraham <manu@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-01-17 11:55:29 -02:00
Manu Abraham 01a8c3eebb V4L/DVB (13710): [Mantis] FIX: Use swfilter (188/204) accordingly
Signed-off-by: Manu Abraham <manu@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-01-17 11:55:29 -02:00
Manu Abraham 715d341c59 V4L/DVB (13709): [Mantis/VP-1034] Switch 13/18v for the VP-1034 properly
Signed-off-by: Manu Abraham <manu@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-01-17 11:55:29 -02:00
Manu Abraham da7365f466 V4L/DVB (13708): [Mantis] Remove some dead code
Signed-off-by: Manu Abraham <manu@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-01-17 11:55:29 -02:00
Manu Abraham 55172773c5 V4L/DVB (13707): [Mantis] Whitespace cleanup
Signed-off-by: Manu Abraham <manu@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-01-17 11:55:28 -02:00
Manu Abraham df0cca174b V4L/DVB (13706): [MB86A16] Overhaul
* better ISR handling
 * I2C fixes
 * better handling of configurations

Signed-off-by: Manu Abraham <manu@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-01-17 11:55:28 -02:00
Manu Abraham bd1fcac014 V4L/DVB (13705): [Mantis] FIX: Do not return IRQ_HANDLED in the unlikely case
Signed-off-by: Manu Abraham <manu@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-01-17 11:55:28 -02:00
Manu Abraham 071e3060a5 V4L/DVB (13704): [MB86A16] FIX: Don't loop again, if we have SYNC
Signed-off-by: Manu Abraham <manu@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-01-17 11:55:28 -02:00
Manu Abraham 776c3ebe96 V4L/DVB (13703): [MB86A16] Fix wrong message printed out
Signed-off-by: Manu Abraham <manu@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-01-17 11:55:28 -02:00
Manu Abraham e15c7ccd31 V4L/DVB (13702): [MB86A16] need to wait a bit more than the computed time for a Factor of safety
Signed-off-by: Manu Abraham <manu@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-01-17 11:55:28 -02:00
Manu Abraham b05c90de08 V4L/DVB (13701): [MB86A16] Reduce Carrier Recovery range to 3Mhz
Signed-off-by: Manu Abraham <manu@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-01-17 11:55:28 -02:00
Manu Abraham a890cce595 V4L/DVB (13700): [MB86A16] Need a bit of settling time
Signed-off-by: Manu Abraham <manu@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-01-17 11:55:27 -02:00
Manu Abraham 41e840b13e V4L/DVB (13699): [Mantis, MB86A16] Initial checkin: Mantis, MB86A16
Signed-off-by: Manu Abraham <manu@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-01-17 11:55:27 -02:00
Dmitri Belimov 08be64be3d V4L/DVB (13966): DVB-T regression fix for saa7134 cards
Some customers has problem with quality of DVB-T
https://bugs.launchpad.net/ubuntu/+source/linux/+bug/446575

After this patch http://patchwork.kernel.org/patch/23345/

This is patch for fix regression with DVB-T. Tested with many people.

Signed-off-by: Alexey Osipov <lion-simba@pridelands.ru>
Signed-off-by: Beholder Intl. Ltd. Dmitry Belimov <d.belimov@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-01-17 11:31:38 -02:00
Márton Németh 21c91d2ee8 V4L/DVB (13941): rj54n1cb0c: remove compiler warning
Remove the following compiler warning: 'dummy' is used uninitialized in this function.
Although the result in the dummy variable is not used the program flow in
soc_camera_limit_side() depends on the value in dummy. The program flow is better
to be deterministic.

Signed-off-by: Márton Németh <nm127@freemail.hu>
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-01-17 11:31:37 -02:00
Uwe Kleine-König b89fc2e5e7 V4L/DVB sh_mobile_ceu: don't check platform_get_irq's return value against zero
platform_get_irq returns -ENXIO on failure, so !irq was probably
always true.  Better use (int)irq <= 0.  Note that a return value of
zero is still handled as error even though this could mean irq0.

This is a followup to 305b3228f9 that
changed the return value of platform_get_irq from 0 to -ENXIO on error.

Cc: David Vrabel <dvrabel@arcom.com>
Cc: Greg Kroah-Hartman <gregkh@suse.de>
Cc: Mauro Carvalho Chehab <mchehab@infradead.org>
Cc: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Cc: Magnus Damm <damm@igel.co.jp>
Cc: Kuninori Morimoto <morimoto.kuninori@renesas.com>
Cc: Paul Mundt <lethal@linux-sh.org>
Cc: linux-media@vger.kernel.org
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-01-17 11:31:37 -02:00
Uwe Kleine-König 30883ea8f2 V4L/DVB mx1_camera: don't check platform_get_irq's return value against zero
platform_get_irq returns -ENXIO on failure, so !irq was probably
always true.  Better use (int)irq <= 0.  Note that a return value of
zero is still handled as error even though this could mean irq0.

This is a followup to 305b3228f9 that
changed the return value of platform_get_irq from 0 to -ENXIO on error.

Cc: David Vrabel <dvrabel@arcom.com>
Cc: Greg Kroah-Hartman <gregkh@suse.de>
Cc: Mauro Carvalho Chehab <mchehab@infradead.org>
Cc: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Cc: Antonio Ospite <ospite@studenti.unina.it>
Cc: Paulius Zaleckas <paulius.zaleckas@teltonika.lt>
Cc: linux-media@vger.kernel.org
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-01-17 11:31:37 -02:00
Michael Krufky 3f76cf8c8e V4L/DVB (13934): tda8290: Fix FM radio easy programming standard selection for TDA8295
Signed-off-by: Michael Krufky <mkrufky@kernellabs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-01-17 11:31:37 -02:00
Jean-Francois Moine 07d1c69b2d V4L/DVB (13900): gspca - sunplus: Fix bridge exchanges.
A previous code optimization inverted bridge registers and values,
doing a regression in kernel  2.6.32.

Signed-off-by: Jean-Francois Moine <moinejf@free.fr>
CC: stable@kernel.org
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-01-17 11:31:36 -02:00
Michael Krufky 19f8a6c37e V4L/DVB (13887): tda8290: add autodetection support for TDA8295c2
Signed-off-by: Michael Krufky <mkrufky@kernellabs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-01-17 11:31:36 -02:00
Erik Andrén bbe8c8363d V4L/DVB (13882): gspca - stv06xx-vv6410: Ensure register STV_SCAN_RATE is zero
The Quickcam Web camera would not produce an image if you removed and inserted the module multiple times without physically power cycling the camera first.
By writing zero to bridge register STV_SCAN_RATE (0x1443) the camera works as intended, regardless of the number of module insertions.

Signed-off-by: Erik Andrén <erik.andren@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-01-17 11:31:36 -02:00
Erik Andren 5cc60d6143 V4L/DVB (13880): gspca - m5602-s5k4aa: Add vflip quirk for the Amilo Xi 2428
Add a vflip quirk for the Fujitsu-Siemens Amilo Xi 2428. Thanks to Myroslav Zapukhlyak for reporting.

Signed-off-by: Erik Andren <erik.andren@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-01-17 11:31:36 -02:00
Jean-Francois Moine 9501843496 V4L/DVB (13875): gspca - vc032x: Fix a possible crash with the vc0321 bridge.
The frame pointer returned by get_i_frame may be NULL when the application
is too slow.

Signed-off-by: Jean-Francois Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-01-17 11:31:36 -02:00
Roel Kluin c60503c1db V4L/DVB (13868): gspca - sn9c20x: Fix test of unsigned.
Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
Signed-off-by: Jean-Francois Moine <moinejf@free.fr>
CC: stable@kernel.org
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-01-17 11:31:36 -02:00
Mauro Carvalho Chehab 882ead325b V4L/DVB (13858): ir-keytable: use the right header
We don't need linux/usb/input.h but, instead, linux/input.h

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-01-17 11:31:36 -02:00
Jean-Francois Moine bc41797a56 V4L/DVB (13622): gspca - ov534: Fix a compilation warning.
This warning prevented the sharpness setting to work with the ov965x sensor.

Reported-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Jean-Francois Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-01-17 11:31:35 -02:00
Mauro Carvalho Chehab 9afc8022b4 V4L/DVB (13834): dib8000: fix compilation if !DVB_DIB8000
As reported by Randy Dunlap <randy.dunlap@oracle.com>:
> drivers/media/dvb/frontends/dib8000.h:104: error: expected expression before '}' token
> drivers/media/dvb/frontends/dib8000.h:104: warning: left-hand operand of comma expression has no effect
>
>     return CT_SHUTDOWN,
>
> s/,/;/ and fix indentation.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-01-17 11:31:35 -02:00
Laurent Pinchart d7c0d43997 V4L/DVB (13831): uvcvideo: Fix oops caused by a race condition in buffer dequeuing
Buffers were marked as done before being removed from the IRQ queue. If
a userspace application dequeued and requeued the buffer fast enough
during that time window, the buffer could end up being deleted twice,
generating an oops in interrupt context.

Add a new state, UVC_BUF_STATE_READY, to mark buffers as ready for reuse
but not yet removed from the queue, and transition to UVC_BUF_STATE_DONE
only when the buffer is removed from the queue.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-01-17 11:31:35 -02:00
Laurent Pinchart 2c4d9de8ab V4L/DVB (13829): uvcvideo: Fix alternate setting selection in isochronous mode
Unlike assumed by the driver, alternate settings are not sorted by
endpoint max packet size. Iterate over all alternate settings to find
the one with the smallest compatible max packet size.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-01-17 11:31:35 -02:00
Laurent Pinchart 385097e08b V4L/DVB (13826): uvcvideo: Fix controls blacklisting
The control blacklisting code erroneously used usb_match_id() by passing
a pointer to a usb_device_id structure instead of an array of such
structures.

Replace the usb_match_id() call by usb_match_id_one().

Thanks to Paulo Assis for diagnosing the bug and providing an initial
fix.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-01-17 11:31:35 -02:00
Nemeth Marton 1faea56087 V4L/DVB (13820): lgdt3305: make one-bit bitfields unsigned
Make one-bit bitfields unsigned which will remove the following
sparse warning messages (see "make C=1"):
 * lgdt3305.h:57:21: error: dubious one-bit signed bitfield
 * lgdt3305.h:60:26: error: dubious one-bit signed bitfield
 * lgdt3305.h:63:19: error: dubious one-bit signed bitfield

Signed-off-by: Nemeth Marton <nm127@freemail.hu>
Signed-off-by: Michael Krufky <mkrufky@kernellabs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-01-17 11:31:34 -02:00
Jean-Francois Moine 8c32aa5945 V4L/DVB (13816): gspca - main: Set the current frame pointer when first qbuf.
When not set, some images could be lost.

Signed-off-by: Jean-Francois Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-01-17 11:31:34 -02:00
Clemens Ladisch db5d247ae8 firewire: fix use of multiple AV/C devices, allow multiple FCP listeners
Control of more than one AV/C device at once --- e.g. camcorders, tape
decks, audio devices, TV tuners --- failed or worked only unreliably,
depending on driver implementation.  This affected kernelspace and
userspace drivers alike and was caused by firewire-core's inability to
accept multiple registrations of FCP listeners.

The fix allows multiple address handlers to be registered for the FCP
command and response registers.  When a request for these registers is
received, all handlers are invoked, and the Firewire response is
generated by the core and not by any handler.

The cdev API does not change, i.e., userspace is still expected to send
a response for FCP requests; this response is silently ignored.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de> (changelog, rebased, whitespace)
2009-12-29 19:58:16 +01:00
Stefani Seibold 7801edb0b8 media video cx23888 driver: ported to new kfifo API
Fix the cx23888 driver to use the new kfifo API.  Using kfifo_reset()
may result in a possible race conditions.  This patch fixes it by using
a spinlock around the kfifo_reset() function.

Signed-off-by: Stefani Seibold <stefani@seibold.net>
Cc: Mauro Carvalho Chehab <mchehab@infradead.org>
Reviewed-by: Andy Walls <awalls@radix.net>
Acked-by: Andy Walls <awalls@radix.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2009-12-22 14:17:57 -08:00
Stefani Seibold 9842c38e91 kfifo: fix warn_unused_result
Fix the "ignoring return value of '...', declared with attribute
warn_unused_result" compiler warning in several users of the new kfifo
API.

It removes the __must_check attribute from kfifo_in() and
kfifo_in_locked() which must not necessary performed.

Fix the allocation bug in the nozomi driver file, by moving out the
kfifo_alloc from the interrupt handler into the probe function.

Fix the kfifo_out() and kfifo_out_locked() users to handle a unexpected
end of fifo.

Signed-off-by: Stefani Seibold <stefani@seibold.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2009-12-22 14:17:56 -08:00
Stefani Seibold 7acd72eb85 kfifo: rename kfifo_put... into kfifo_in... and kfifo_get... into kfifo_out...
rename kfifo_put...  into kfifo_in...  to prevent miss use of old non in
kernel-tree drivers

ditto for kfifo_get...  -> kfifo_out...

Improve the prototypes of kfifo_in and kfifo_out to make the kerneldoc
annotations more readable.

Add mini "howto porting to the new API" in kfifo.h

Signed-off-by: Stefani Seibold <stefani@seibold.net>
Acked-by: Greg Kroah-Hartman <gregkh@suse.de>
Acked-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Acked-by: Andi Kleen <ak@linux.intel.com>
Acked-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2009-12-22 14:17:56 -08:00
Stefani Seibold c1e13f2567 kfifo: move out spinlock
Move the pointer to the spinlock out of struct kfifo.  Most users in
tree do not actually use a spinlock, so the few exceptions now have to
call kfifo_{get,put}_locked, which takes an extra argument to a
spinlock.

Signed-off-by: Stefani Seibold <stefani@seibold.net>
Acked-by: Greg Kroah-Hartman <gregkh@suse.de>
Acked-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Acked-by: Andi Kleen <ak@linux.intel.com>
Acked-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2009-12-22 14:17:56 -08:00
Stefani Seibold 4546548789 kfifo: move struct kfifo in place
This is a new generic kernel FIFO implementation.

The current kernel fifo API is not very widely used, because it has to
many constrains.  Only 17 files in the current 2.6.31-rc5 used it.
FIFO's are like list's a very basic thing and a kfifo API which handles
the most use case would save a lot of development time and memory
resources.

I think this are the reasons why kfifo is not in use:

 - The API is to simple, important functions are missing
 - A fifo can be only allocated dynamically
 - There is a requirement of a spinlock whether you need it or not
 - There is no support for data records inside a fifo

So I decided to extend the kfifo in a more generic way without blowing up
the API to much.  The new API has the following benefits:

 - Generic usage: For kernel internal use and/or device driver.
 - Provide an API for the most use case.
 - Slim API: The whole API provides 25 functions.
 - Linux style habit.
 - DECLARE_KFIFO, DEFINE_KFIFO and INIT_KFIFO Macros
 - Direct copy_to_user from the fifo and copy_from_user into the fifo.
 - The kfifo itself is an in place member of the using data structure, this save an
   indirection access and does not waste the kernel allocator.
 - Lockless access: if only one reader and one writer is active on the fifo,
   which is the common use case, no additional locking is necessary.
 - Remove spinlock - give the user the freedom of choice what kind of locking to use if
   one is required.
 - Ability to handle records. Three type of records are supported:
   - Variable length records between 0-255 bytes, with a record size
     field of 1 bytes.
   - Variable length records between 0-65535 bytes, with a record size
     field of 2 bytes.
   - Fixed size records, which no record size field.
 - Preserve memory resource.
 - Performance!
 - Easy to use!

This patch:

Since most users want to have the kfifo as part of another object,
reorganize the code to allow including struct kfifo in another data
structure.  This requires changing the kfifo_alloc and kfifo_init
prototypes so that we pass an existing kfifo pointer into them.  This
patch changes the implementation and all existing users.

[akpm@linux-foundation.org: fix warning]
Signed-off-by: Stefani Seibold <stefani@seibold.net>
Acked-by: Greg Kroah-Hartman <gregkh@suse.de>
Acked-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Acked-by: Andi Kleen <ak@linux.intel.com>
Acked-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2009-12-22 14:17:55 -08:00
Mauro Carvalho Chehab 262ab9ac0d V4L/DVB (13698): pms: replace asm/uaccess.h to linux/uaccess.h
Fix a checkpatch.pl warning:

WARNING: Use #include <linux/uaccess.h> instead of <asm/uaccess.h>

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-12-16 09:28:01 -02:00
Randy Dunlap 788f6feb13 V4L/DVB (13690): radio/si470x: #include <sched.h>
Driver needs to #include <sched.h>:

drivers/media/radio/si470x/radio-si470x-common.c:452: error: 'TASK_INTERRUPTIBLE' undeclared (first use in this function)
drivers/media/radio/si470x/radio-si470x-common.c:452: error: implicit declaration of function 'signal_pending'
drivers/media/radio/si470x/radio-si470x-common.c:452: error: implicit declaration of function 'schedule'

Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-12-16 09:28:00 -02:00
Márton Németh c86a3c37b1 V4L/DVB (13688): au8522: modify the attributes of local filter coefficients
Make the local filter coefficients static and const. This will eliminate the
following sparse warnings (see "make C=1"):
 * au8522_decoder.c:71:31: warning: symbol 'filter_coef' was not declared. Should it be static?
 * au8522_decoder.c:113:31: warning: symbol 'lpfilter_coef' was not declared. Should it be static?

Signed-off-by: Márton Németh <nm127@freemail.hu>
Acked-by: Devin Heitmueller <dheitmueller@kernellabs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-12-16 09:27:58 -02:00
Márton Németh 7ee0a28829 V4L/DVB (13687): cx231xx: use NULL when pointer is needed
The gpio field in the cx231xx_board.input structure is a pointer. Eliminate the
following sparse warnings (see "make C=1"):
 * cx231xx-cards.c:72:13: warning: Using plain integer as NULL pointer
 * cx231xx-cards.c:77:13: warning: Using plain integer as NULL pointer
 * cx231xx-cards.c:84:13: warning: Using plain integer as NULL pointer
 * cx231xx-cards.c:111:13: warning: Using plain integer as NULL pointer
 * cx231xx-cards.c:116:13: warning: Using plain integer as NULL pointer
 * cx231xx-cards.c:123:13: warning: Using plain integer as NULL pointer
 * cx231xx-cards.c:151:13: warning: Using plain integer as NULL pointer
 * cx231xx-cards.c:156:13: warning: Using plain integer as NULL pointer
 * cx231xx-cards.c:163:13: warning: Using plain integer as NULL pointer

Signed-off-by: Márton Németh <nm127@freemail.hu>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-12-16 09:27:57 -02:00
Huang Weiyi 67055b0fd3 V4L/DVB: Davinci VPFE Capture: remove unused #include <linux/version.h>
Remove unused #include <linux/version.h>('s) in
  drivers/media/video/davinci/vpfe_capture.c

Cc: Muralidharan Karicheri <m-karicheri2@ti.com>
Signed-off-by: Huang Weiyi <weiyi.huang@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-12-16 09:27:57 -02:00
Julia Lawall 9518f17912 V4L/DVB (13685): Correct code taking the size of a pointer
sizeof(print_buf) is just the size of the pointer.  Change it to the size
used in the allocation of print_buf earlier in the same function.

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

// <smpl>
@@
expression *x;
expression f;
type T;
@@

*f(...,(T)x,...)
// </smpl>

Cc: Janne Grunau <j@jannau.net>
Signed-off-by: Julia Lawall <julia@diku.dk>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-12-16 09:27:55 -02:00
Duncan Gibb b4d887cfd7 V4L/DVB (13684): Fix some cut-and-paste noise in dib0090.h
Remove duplicated line on driver

[mchehab@redhat.com: second hunk of the original patch were already applied by another patch - remove it]
Cc: Patrick Boettcher <pboettcher@kernellabs.com>
Signed-off-by: Duncan Gibb <dg@duncangibb.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-12-16 09:27:54 -02:00
Márton Németh 2184dda0d4 V4L/DVB (13683): sanio-ms: clean up init, exit and id_table
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit

Make module_init static and mark it with __init.
Make module_exit static and mark it with __exit.
Mark probe functions with __devinit.
Make id table static and mark with __devinitconst.

This will eliminate the following sparse warnings (see "make C=1"):
 * smsdvb.c:668:5: warning: symbol 'smsdvb_module_init' was not declared. Should it be static?
 * smsdvb.c:682:6: warning: symbol 'smsdvb_module_exit' was not declared. Should it be static?
 * smsusb.c:491:22: warning: symbol 'smsusb_id_table' was not declared. Should it be static?
 * smsusb.c:567:5: warning: symbol 'smsusb_module_init' was not declared. Should it be static?
 * smsusb.c:578:6: warning: symbol 'smsusb_module_exit' was not declared. Should it be static?
 * smssdio.c:341:5: warning: symbol 'smssdio_module_init' was not declared. Should it be static?
 * smssdio.c:353:6: warning: symbol 'smssdio_module_exit' was not declared. Should it be static?

Signed-off-by: Márton Németh <nm127@freemail.hu>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-12-16 09:27:53 -02:00
Márton Németh 3839a0dc1c V4L/DVB (13682): dib8000: make some constant static
Eliminate the following sparse warnings (see "make C=1"):
 * dib8000.c:125:15: warning: symbol 'coeff_2k_sb_1seg_dqpsk' was not declared. Should it be static?
 * dib8000.c:130:15: warning: symbol 'coeff_2k_sb_1seg' was not declared. Should it be static?
 * dib8000.c:134:15: warning: symbol 'coeff_2k_sb_3seg_0dqpsk_1dqpsk' was not declared. Should it be static?
 * dib8000.c:139:15: warning: symbol 'coeff_2k_sb_3seg_0dqpsk' was not declared. Should it be static?
 * dib8000.c:144:15: warning: symbol 'coeff_2k_sb_3seg_1dqpsk' was not declared. Should it be static?
 * dib8000.c:149:15: warning: symbol 'coeff_2k_sb_3seg' was not declared. Should it be static?
 * dib8000.c:154:15: warning: symbol 'coeff_4k_sb_1seg_dqpsk' was not declared. Should it be static?
 * dib8000.c:159:15: warning: symbol 'coeff_4k_sb_1seg' was not declared. Should it be static?
 * dib8000.c:164:15: warning: symbol 'coeff_4k_sb_3seg_0dqpsk_1dqpsk' was not declared. Should it be static?
 * dib8000.c:169:15: warning: symbol 'coeff_4k_sb_3seg_0dqpsk' was not declared. Should it be static?
 * dib8000.c:174:15: warning: symbol 'coeff_4k_sb_3seg_1dqpsk' was not declared. Should it be static?
 * dib8000.c:179:15: warning: symbol 'coeff_4k_sb_3seg' was not declared. Should it be static?
 * dib8000.c:184:15: warning: symbol 'coeff_8k_sb_1seg_dqpsk' was not declared. Should it be static?
 * dib8000.c:189:15: warning: symbol 'coeff_8k_sb_1seg' was not declared. Should it be static?
 * dib8000.c:194:15: warning: symbol 'coeff_8k_sb_3seg_0dqpsk_1dqpsk' was not declared. Should it be static?
 * dib8000.c:199:15: warning: symbol 'coeff_8k_sb_3seg_0dqpsk' was not declared. Should it be static?
 * dib8000.c:204:15: warning: symbol 'coeff_8k_sb_3seg_1dqpsk' was not declared. Should it be static?
 * dib8000.c:209:15: warning: symbol 'coeff_8k_sb_3seg' was not declared. Should it be static?
 * dib8000.c:214:15: warning: symbol 'ana_fe_coeff_3seg' was not declared. Should it be static?
 * dib8000.c:218:15: warning: symbol 'ana_fe_coeff_1seg' was not declared. Should it be static?
 * dib8000.c:222:15: warning: symbol 'ana_fe_coeff_13seg' was not declared. Should it be static?

Cc: Patrick Boettcher <pboettcher@kernellabs.com>
Signed-off-by: Márton Németh <nm127@freemail.hu>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-12-16 09:27:51 -02:00
David Howells 3ab1b9cecd V4L/DVB: lgs8gxx: Use shifts rather than multiply/divide when possible
If val is a u64, then following:

	val *= (u64)1 << 32;
	val /= (u64)1 << 32;

should surely be better represented as:

	val <<= 32;
	val >>= 32;

Especially as, for the division, the compiler might want to actually do a
division:

drivers/built-in.o: In function `lgs8gxx_get_afc_phase':
drivers/media/dvb/frontends/lgs8gxx.c:250: undefined reference to `__udivdi3'

Signed-off-by: David Howells <dhowells@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-12-16 09:27:50 -02:00
Igor M. Liplianin 141cc35e2d V4L/DVB (13678): Add support for yet another DvbWorld, TeVii and Prof USB devices
Patch to support DvbWorld DW2104 device modifications
with STV0903 and DS3000 demods as well as TeVii S660 and Prof 1100
Also replace some magic numbers with meaningfull variables.

Signed-off-by: Igor M. Liplianin <liplianin@me.by>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-12-16 09:27:46 -02:00
Abylay Ospan 21508b9ad4 V4L/DVB (13676): configurable IRQ mode on NetUP Dual DVB-S2 CI; IRQ from CAM processing (CI interface works faster)
Signed-off-by: Abylay Ospan <aospan@netup.ru>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-12-16 09:27:45 -02:00
Oliver Endriss 30e8ca2cb0 V4L/DVB (13674): stv090x: Add DiSEqC envelope mode
Support DiSEqC envelope mode. Feature is enabled by setting
config->diseqc_envelope_mode = true (default: disabled).

Signed-off-by: Oliver Endriss <o.endriss@gmx.de>
Acked-by: Manu Abraham <manu@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-12-16 09:27:44 -02:00
Oliver Endriss 9efc1bdd25 V4L/DVB (13673): lnbp21: Implement 22 kHz tone control
Support 22 kHz tone control for lnbp21 and lnbh24.
(Overrides the 'set_tone' hook of the frontend driver.)

Signed-off-by: Oliver Endriss <o.endriss@gmx.de>
Acked-by: Manu Abraham <manu@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-12-16 09:27:42 -02:00
Magnus Damm e6641c80b0 V4L/DVB (13671): sh_mobile_ceu_camera: Remove frame size page alignment
This patch updates the SuperH Mobile CEU driver to
not page align the frame size. Useful in the case of
USERPTR with non-page aligned frame sizes and offsets.

Signed-off-by: Magnus Damm <damm@opensource.se>
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-12-16 09:27:41 -02:00
Kuninori Morimoto 858424b998 V4L/DVB (13670): soc-camera: Add mt9t112 camera driver
create mode 100644 drivers/media/video/mt9t112.c
 create mode 100644 include/media/mt9t112.h

Signed-off-by: Kuninori Morimoto <morimoto.kuninori@renesas.com>
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-12-16 09:27:41 -02:00
Kuninori Morimoto 70da92e574 V4L/DVB (13669): tw9910: Add sync polarity support
Signed-off-by: Kuninori Morimoto <morimoto.kuninori@renesas.com>
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-12-16 09:27:40 -02:00
Kuninori Morimoto c1d7b06cc3 V4L/DVB (13668): tw9910: remove cropping
Cropping is used for data input, and it is not needed now

Signed-off-by: Kuninori Morimoto <morimoto.kuninori@renesas.com>
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-12-16 09:27:39 -02:00
Kuninori Morimoto 7874b9038d V4L/DVB (13667): tw9910: modify output format
Correct tw9910 output format is Cb - Y - Cr - Y
which is defined in ITU-R BT.656.

Signed-off-by: Kuninori Morimoto <morimoto.kuninori@renesas.com>
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-12-16 09:27:38 -02:00
Kuninori Morimoto 398994c1e1 V4L/DVB (13666): tw9910: modify V/H outpit pin setting to use VALID
Signed-off-by: Kuninori Morimoto <morimoto.kuninori@renesas.com>
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-12-16 09:27:36 -02:00
Kuninori Morimoto 85dc1cff0d V4L/DVB (13665): sh_mobile_ceu_camera: Add support for sync polarity selection
Signed-off-by: Kuninori Morimoto <morimoto.kuninori@renesas.com>
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-12-16 09:27:35 -02:00
Kuninori Morimoto 34cae30b84 V4L/DVB (13664): tw9910: use V4L2_FIELD_INTERLACED_BT
tw9910 output is interlaced and its correct order is Bottom - Top

Signed-off-by: Kuninori Morimoto <morimoto.kuninori@renesas.com>
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-12-16 09:27:34 -02:00
Kuninori Morimoto 1edcc10d7f V4L/DVB (13663): sh_mobile_ceu: Add V4L2_FIELD_INTERLACED_BT/TB support
Signed-off-by: Kuninori Morimoto <morimoto.kuninori@renesas.com>
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-12-16 09:27:32 -02:00
Guennadi Liakhovetski a3a4ac1477 V4L/DVB (13662): mt9t031: make the use of the soc-camera client API optional
Now that we have moved most of the functions over to the v4l2-subdev API, only
quering and setting bus parameters are still performed using the legacy
soc-camera client API. Make the use of this API optional for mt9t031.

Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-12-16 09:27:31 -02:00
Guennadi Liakhovetski a6b5f2008a V4L/DVB (13661): rj54n1cb0c: Add cropping, auto white balance, restrict sizes, add platform data
It has been experimentally found out, that the sensor only supports up to
512x384 video output and also has some restrictions on minimum scale. We
disable non-working size ranges until, maybe, someone finds out how to properly
set them up. Also add cropping support, an auto white balance control, platform
data to specify master clock frequency and polarity of the IOCTL pin.

 create mode 100644 include/media/rj54n1cb0c.h

Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-12-16 09:27:30 -02:00
Guennadi Liakhovetski 760697beca V4L/DVB (13659): soc-camera: convert to the new mediabus API
Convert soc-camera core and all soc-camera drivers to the new mediabus
API. This also takes soc-camera client drivers one step closer to also be
usable with generic v4l2-subdev host drivers.

Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Acked-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-12-16 09:27:29 -02:00
Guennadi Liakhovetski 9a74251d8b V4L/DVB (13658): v4l: add a media-bus API for configuring v4l2 subdev pixel and frame formats
Video subdevices, like cameras, decoders, connect to video bridges over
specialised busses. Data is being transferred over these busses in various
formats, which only loosely correspond to fourcc codes, describing how video
data is stored in RAM. This is not a one-to-one correspondence, therefore we
cannot use fourcc codes to configure subdevice output data formats. This patch
adds codes for several such on-the-bus formats and an API, similar to the
familiar .s_fmt(), .g_fmt(), .try_fmt(), .enum_fmt() API for configuring those
codes. After all users of the old API in struct v4l2_subdev_video_ops are
converted, it will be removed. Also add helper routines to support generic
pass-through mode for the soc-camera framework.

 create mode 100644 drivers/media/video/soc_mediabus.c
 create mode 100644 include/media/soc_mediabus.h
 create mode 100644 include/media/v4l2-mediabus.h

Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Acked-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-12-16 09:27:27 -02:00
Kuninori Morimoto faa582610d V4L/DVB (13657): tw9910: Add revision control to tw9910_set_hsync
Bits 10-3 of hsync control are the same for Rev0 and Rev1, but only Rev1
also has bits 2-0 for hsync. Account for this difference and also fix a
register name.

Signed-off-by: Kuninori Morimoto <morimoto.kuninori@renesas.com>
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-12-16 09:27:26 -02:00
Kuninori Morimoto 2079708381 V4L/DVB (13656): tw9910: tw9910_set_hsync clean up
tw9910_set_hsync should use tw9910_mask_set to set bits 2-0

Signed-off-by: Kuninori Morimoto <morimoto.kuninori@renesas.com>
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-12-16 09:27:25 -02:00
Kuninori Morimoto 607e5ad8d5 V4L/DVB (13655): tw9910: Add power control
Power down internal blocks when not streaming.

Signed-off-by: Kuninori Morimoto <morimoto.kuninori@renesas.com>
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-12-16 09:27:24 -02:00
Kuninori Morimoto 06f292e480 V4L/DVB (13654): tw9910: Tri-state pins when idle
Tri-state all pins when not streaming to save power.

Signed-off-by: Kuninori Morimoto <morimoto.kuninori@renesas.com>
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-12-16 09:27:23 -02:00
Kuninori Morimoto 88a67c51df V4L/DVB (13653): tw9910: simplify chip ID calculation
Signed-off-by: Kuninori Morimoto <morimoto.kuninori@renesas.com>
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-12-16 09:27:22 -02:00
Kuninori Morimoto 6d74e5f361 V4L/DVB (13652): tw9910: Add revision control
Also fix a badly chosen macro name.

Signed-off-by: Kuninori Morimoto <morimoto.kuninori@renesas.com>
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-12-16 09:27:21 -02:00
Guennadi Liakhovetski 0f4482940a V4L/DVB (13650): soc-camera: switch drivers and platforms to use .priv in struct soc_camera_link
After this change drivers can be further extended to not fail, if they don't
get platform data, but to use defaults.

Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-12-16 09:27:19 -02:00
Guennadi Liakhovetski 6ed7c03884 V4L/DVB (13646): sh_mobile_ceu_camera: do not mark host occupied, when adding a client fails
Currently, if resetting the host interface, when adding a new client, fails, a
negative error code is returned, but the host is still marked as occupied. Fix
this bug.

Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-12-16 09:27:15 -02:00
Guennadi Liakhovetski 5d28d52545 V4L/DVB (13645): soc-camera: fix multi-line comment coding style
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-12-16 09:27:15 -02:00
Guennadi Liakhovetski 325361088b V4L/DVB (13644): v4l: add new v4l2-subdev sensor operations, use g_skip_top_lines in soc-camera
Introduce new v4l2-subdev sensor operations, move .enum_framesizes() and
.enum_frameintervals() methods to it, add a new .g_skip_top_lines() method
and switch soc-camera to use it instead of .y_skip_top soc_camera_device
member, which can now be removed.

Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Reviewed-by: Hans Verkuil <hverkuil@xs4all.nl>
Reviewed-by: Sergio Aguirre <saaguirre@ti.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-12-16 09:27:13 -02:00
Kuninori Morimoto 4a4bc5e4f9 V4L/DVB (13642): tw9910: The driver can also handle revision 1 of the chip
Signed-off-by: Kuninori Morimoto <morimoto.kuninori@renesas.com>
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-12-16 09:27:09 -02:00
Abylay Ospan 247cb142a9 V4L/DVB (13630): Print bitrate measured by stv0900 demod in stv0900_read_status
Signed-off-by: Abylay Ospan <aospan@netup.ru>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-12-16 00:18:49 -02:00
Jean-Francois Moine 174c44e4a7 V4L/DVB (13627): gspca - zc3xx: Set the quality for sensor tas5130c.
- setting the quality gives a better brightness

Reported-by: Benoit GIRARD <benoit.girard0@gmail.com>
Signed-off-by: Jean-Francois Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-12-16 00:18:49 -02:00
Jean-Francois Moine 8395555666 V4L/DVB (13626): gspca - many subdrivers: Fix some warnings.
- gl860.c:332:15: warning: cast to restricted __le16
- gl860.c:333:15: warning: cast to restricted __le16
- gl860-mi1320.c:348:5: warning: symbol 'mi1320_camera_settings' was not declared. Should it be static?
- gl860-mi2020.c:772:5: warning: symbol 'mi2020_camera_settings' was not declared. Should it be static?
- m5602_ov9650.c:444:7: warning: symbol 'data' shadows an earlier one
- m5602_core.c:84:5: warning: symbol 'm5602_wait_for_i2c' was not declared. Should it be static?
- m5602_core.c:391:6: warning: symbol 'm5602_disconnect' was not declared. Should it be static?
- m5602_s5k4aa.c:530:23: warning: dubious: x | !y
- m5602_s5k4aa.c:575:23: warning: dubious: x | !y
- gspca.c:1196:13: warning: potentially expensive pointer subtraction
- mr97310a.c:70:5: warning: symbol 'force_sensor_type' was not declared. Should it be static?
- ov519.c:2025:4: warning: do-while statement is not a compound statement
- ov519.c:2063:4: warning: do-while statement is not a compound statement
- ov519.c:2089:4: warning: do-while statement is not a compound statement
- ov519.c:1985:34: warning: incorrect type in assignment (different base types)
- sn9c20x.c:1164:5: warning: symbol 'i2c_r1' was not declared. Should it be static?
- sn9c20x.c:1189:5: warning: symbol 'i2c_r2' was not declared. Should it be static?
- sn9c20x.c:2237:27: warning: right shift by bigger than source value
- sn9c20x.c:2237:27: warning: right shift by bigger than source value

Signed-off-by: Jean-Francois Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-12-16 00:18:49 -02:00
Márton Németh 37b372e5eb V4L/DVB (13621): gspca - some subdrivers: Make device_table[]s constant.
Signed-off-by: Márton Németh <nm127@freemail.hu>
Signed-off-by: Jean-Francois Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-12-16 00:18:48 -02:00
Muralidharan Karicheri 2e535ed5a1 V4L/DVB (13618): v4l2: Adding helper function to get dv preset description
This patch adds a helper function to get description of a digital
video preset added by the video timing API. This will be useful for drivers
implementing the above API.

Signed-off-by: Muralidharan Karicheri <m-karicheri2@ti.com>
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-12-16 00:18:47 -02:00
Mauro Carvalho Chehab 579e7d60ba V4L/DVB (13617): ir: move input_register_device() to happen inside ir_input_register()
We'll need to register a sysfs class for the IR devices. As such, the better
is to have the input_register_device()/input_unregister_device() inside
the ir register/unregister functions.

Also, solves a naming problem with V4L ir_input_init() function, that were,
in fact, registering a device.

While here, do a few cleanups at budget-ci IR logic.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-12-16 00:18:45 -02:00
Mauro Carvalho Chehab 38ef6aa884 V4L/DVB (13616): IR: rename ir_input_free as ir_input_unregister
Now, ir_input_free does more than just freeing the keytab. Better to
rename it as ir_input_unregister.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-12-16 00:18:44 -02:00
Mauro Carvalho Chehab 75543cce0c V4L/DVB (13615): ir-core: create ir_input_register
Move non-V4L specific stuff from ir-functions ir_input_init() into
a new function to register ir devices: ir_input_register().

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-12-16 00:18:44 -02:00
Mauro Carvalho Chehab 865fbf20be V4L/DVB (13614): dib0090: Fix compilation when module is not selected
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-12-16 00:18:43 -02:00
Mauro Carvalho Chehab 446e4a64d2 V4L/DVB (13613): IR: create ir-core module
Split the ir-common into two separate modules:
	- ir-core: it is the IR-independent functions;
	- ir-common: has the common part used by V4L drivers.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-12-16 00:18:42 -02:00
Mauro Carvalho Chehab e27d38112e V4L/DVB (13612): IR: Move common IR code to drivers/media/IR
This is the first step of creating a common code for IR that can be
used by other input devices.

For now, keep IR dir at drivers/media, to easy the movement of the IR files,
but later patches may move it to drivers/IR or drivers/input/IR.

No functional changes is done on this patch.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-12-16 00:18:42 -02:00
Julia Lawall 909d15a70d V4L/DVB (13611): radio-tea5764: Correct size given to memset
Memset should be given the size of the structure, not the size of the pointer.

The semantic patch that makes this change is as follows:
(http://coccinelle.lip6.fr/)

// <smpl>
@@
type T;
T *x;
expression E;
@@

memset(x, E, sizeof(
+ *
 x))
// </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>
2009-12-16 00:18:41 -02:00
Julia Lawall ddb0b34f13 V4L/DVB (13610): uvc: Correct size given to memset
Memset should be given the size of the structure, not the size of the pointer.

The semantic patch that makes this change is as follows:
(http://coccinelle.lip6.fr/)

// <smpl>
@@
type T;
T *x;
expression E;
@@

memset(x, E, sizeof(
+ *
 x))
// </smpl>

Signed-off-by: Julia Lawall <julia@diku.dk>
Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Douglas Schilling Landgraf <dougsland@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-12-16 00:18:41 -02:00
Ondrej Zary 67cabf503c V4L/DVB (13609): radio-sf16fmi: add autoprobing
Add automatic probing of ports 0x284 and 0x384 to radio-sf16fmi if no card is
found using PnP.

Signed-off-by: Ondrej Zary <linux@rainbow-software.org>
Signed-off-by: Douglas Schilling Landgraf <dougsland@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-12-16 00:18:40 -02:00
Ondrej Zary 4b83037474 V4L/DVB (13608): radio-sf16fmi: fix mute, add SF16-FMP to texts
Fix completely broken mute handling radio-sf16fmi.
The sound was muted immediately after tuning in KRadio.
Also fix typos and add SF16-FMP to the texts.

Signed-off-by: Ondrej Zary <linux@rainbow-software.org>
Acked-by: Petr Vandrovec <petr@vandrovec.name>
Signed-off-by: Douglas Schilling Landgraf <dougsland@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-12-16 00:18:39 -02:00
Uwe Kleine-König 0b0a860fec V4L/DVB (13607): vpif: move vpif_remove to .devexit
The function vpif_remove is used only wrapped by __devexit_p so define
it using __devexit.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Douglas Schilling Landgraf <dougsland@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-12-16 00:18:37 -02:00
Uwe Kleine-König 9d8938248c V4L/DVB (13606): vpfe_capture: move vpfe_remove to .devexit
The function vpfe_remove is used only wrapped by __devexit_p so define
it using __devexit.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Douglas Schilling Landgraf <dougsland@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-12-16 00:18:37 -02:00
Uwe Kleine-König 50e55fd13f V4L/DVB (13605): sh_mobile_ceu_camera: don't use __exit_p to wrap sh_mobile_ceu_remove
The function sh_mobile_ceu_remove is defined using __devexit, so don't
use __exit_p but __devexit_p to wrap it.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Douglas Schilling Landgraf <dougsland@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-12-16 00:18:37 -02:00
Uwe Kleine-König f68fdb9a8c V4L/DVB (13604): vpss: move vpss_remove to .devexit
The function vpss_remove is used only wrapped by __devexit_p so define
it using __devexit.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Douglas Schilling Landgraf <dougsland@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-12-16 00:18:36 -02:00
Jarod Wilson 0a25f3b292 V4L/DVB (13602): bttv: fix MODULE_PARM_DESC for i2c_debug and i2c_hw
Currently, i2c_debug shows up w/o a desc in modinfo, and i2c_hw shows
up with i2c_debug's desc. Fix that.

[dougsland@redhat.com: fixed checkpatch.pl warning (space between MODULE_PARM_DESC arguments)]
Signed-off-by: Jarod Wilson <jarod@redhat.com>
Signed-off-by: Douglas Schilling Landgraf <dougsland@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-12-16 00:18:36 -02:00
Joonyoung Shim d1471f02df V4L/DVB (13601): radio-si470x: support PM functions
This patch is to support PM of the si470x i2c driver.

Signed-off-by: Joonyoung Shim <jy0922.shim@samsung.com>
Acked-by: Tobias Lorenz <tobias.lorenz@gmx.net>
Signed-off-by: Douglas Schilling Landgraf <dougsland@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-12-16 00:18:36 -02:00
Joonyoung Shim fe2137dd4e V4L/DVB (13600): radio-si470x: support RDS on si470x i2c driver
This patch is to support RDS on si470x i2c driver. The routine of RDS
operation is almost same with thing of usb driver, but this uses RDS
interrupt.

Signed-off-by: Joonyoung Shim <jy0922.shim@samsung.com>
Acked-by: Tobias Lorenz <tobias.lorenz@gmx.net>
Signed-off-by: Douglas Schilling Landgraf <dougsland@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-12-16 00:18:35 -02:00
Joonyoung Shim 1aa925c957 V4L/DVB (13599): radio-si470x: move some file operations to common file
The read and poll file operations of the si470x usb driver can be used
also equally on the si470x i2c driver, so they go to the common file.

Signed-off-by: Joonyoung Shim <jy0922.shim@samsung.com>
Acked-by: Tobias Lorenz <tobias.lorenz@gmx.net>
Signed-off-by: Douglas Schilling Landgraf <dougsland@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-12-16 00:18:34 -02:00
Muralidharan Karicheri 31bedfa506 V4L/DVB (13598): videobuf_dma_contig_user_get() for non-aligned offsets
If a USERPTR address that is not aligned to page boundary is passed to the
videobuf_dma_contig_user_get() function, it saves a page aligned address to
the dma_handle. This is not correct. This issue is observed when using USERPTR
IO machism for buffer exchange.

Updates from last version:-

Adding offset for size calculation as per comment from Magnus Damm. This
ensures the last page is also included for checking if memory is
contiguous.

Signed-off-by: Muralidharan Karicheri <m-karicheri2@ti.com>
Acked-by: Magnus Damm <damm@opensource.se>
Signed-off-by: Douglas Schilling Landgraf <dougsland@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-12-16 00:18:34 -02:00
Jarod Wilson 0d94e29459 V4L/DVB (13597): bttv: add i2c addr for old WinTV card to IR probe list
There are old bttv-driven Hauppauge WinTV series cards that have
their IR part at i2c addr 0x71, which doesn't get considered in the
new 2.6.31 i2c code.

From a 2.6.29 kernel:

lirc_i2c: chip 0x10005 found @ 0x71 (Hauppauge PVR150)

Minor cosmetic glitch, the card in question isn't actually a PVR-150, its:

03:06.0 Multimedia video controller: Brooktree Corporation Bt878 Video Capture (rev 11)
	Subsystem: Hauppauge computer works Inc. WinTV Series
	Flags: bus master, medium devsel, latency 32, IRQ 19
	Memory at f4ffe000 (32-bit, prefetchable) [size=4K]
	Capabilities: [44] Vital Product Data
	Capabilities: [4c] Power Management version 2
	Kernel driver in use: bttv
	Kernel modules: bttv

Device ID: 0x109e:0x036e, Sub-Device ID: 0x0070:0x13eb

This simply adds 0x71 to the list of addresses i2c_new_probed_device should
consider, which gets IR working on this card again.

Reported-by: Adam Williamson <awilliam@redhat.com>
Tested-by: Adam Williamson <awilliam@redhat.com>
Signed-off-by: Jarod Wilson <jarod@redhat.com>
Signed-off-by: Douglas Schilling Landgraf <dougsland@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-12-16 00:18:33 -02:00
Dan Carpenter 50e9d31183 V4L/DVB (13596): ov511.c typo: lock => unlock
This was found with a static checker and has not been tested, but it seems
pretty clear that the mutex_lock() was supposed to be mutex_unlock()

Signed-off-by: Dan Carpenter <error27@gmail.com>
Signed-off-by: Douglas Schilling Landgraf <dougsland@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-12-16 00:18:33 -02:00
Thiago Farina cb63c2aad2 V4L/DVB (13594): cpia2: use __stringify macro.
Replace MAKE_STRING to __stringify macro

Signed-off-by: Thiago Farina <tfransosi@gmail.com>
Signed-off-by: Douglas Schilling Landgraf <dougsland@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-12-16 00:18:31 -02:00
Andrea Odetti 4315c41447 V4L/DVB (13593): PWC: parameter trace is only available in debug
This patch fixes a small issue where modinfo says the parameter "trace" is always available, while
it only works if CONFIG_USB_PWC_DEBUG is enabled.

Signed-off-by: Andrea Odetti <mariofutire@googlemail.com>
Signed-off-by: Douglas Schilling Landgraf <dougsland@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-12-16 00:18:30 -02:00
Patrick Boettcher 38ffcd10d6 V4L/DVB (13581): DiBUSB: fix I2c access when there is a read-access w/o write sequence
This patch fixes the behaviour of the dibusb-i2c-access which was previously changed to avoid accidental EEprom writes:

Now it allow i2c-reads without prepended i2c-writes, but it is still not doing anything in case the EEprom is addressed.

Thanks to Mario Bachmann for testing.

Tested-by: Mario Bachmann <grafgrimm77@gmx.de>
Cc: Mario Bachmann <grafgrimm77@gmx.de>
Signed-off-by: Patrick Boettcher <pboettcher@kernellabs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-12-16 00:18:27 -02:00
Lukas Karas d995a18733 V4L/DVB (13591): add support for IR on FlyDVB Trio (saa7134)
saa7134: Add support for IR reciever on card LifeView FlyDVB Trio

--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[mchehab@redhat.com: CodingStyle fixes and ported upstream]
Tested-by: Petr Fiala <petr.fiala@gmail.com>
Signed-off-by: Lukas Karas <lukas.karas@centrum.cz>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-12-16 00:18:25 -02:00
Alexey Dobriyan 7eca61eb6a V4L/DVB (13590): cpia: convert it to use proc_fops
X-Patchwork-Id: 62090

Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-12-16 00:18:23 -02:00
Márton Németh 6e8fdbd023 V4L/DVB (13589): dib8000: merge two conditionals
Merge two ifs: the condition is the same. The second if
uses the ncoeff which is initialized in the first if.

Cc: Patrick Boettcher <pboettcher@kernellabs.com>
Signed-off-by: Márton Németh <nm127@freemail.hu>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-12-16 00:18:20 -02:00
Olivier Grenie 89dfc557d1 V4L/DVB (13587): DiB8000: enhance status lock
Enhance status lock behaviour.

Signed-off-by: Olivier Grenie <olivier.grenie@dibcom.fr>
Signed-off-by: Patrick Boettcher <pboettcher@kernellabs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-12-16 00:18:19 -02:00
Olivier Grenie acc5c9ee39 V4L/DVB (13586): DiB0700: Add parameter to change the buffer size
Add parameter to change the buffer size. This buffer size is specified
in number of Ts packet. This parameter is stored inside the state.

For firmware higher than 1.21, the xfer buffer size can be changed
inside the dib0700 usb bridge the firware version is stored inside the
state

Signed-off-by: Patrick Boettcher <pboettcher@kernellabs.com>
Signed-off-by: Olivier Grenie <olivier.grenie@dibcom.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-12-16 00:18:17 -02:00
Olivier Grenie 9542f502cf V4L/DVB (13585): STK807xPVR: correct the enumeration
STK807xPVR: correct the enumeration

Signed-off-by: Olivier Grenie <olivier.grenie@dibcom.fr>
Signed-off-by: Patrick Boettcher <pboettcher@kernellabs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-12-16 00:18:17 -02:00
Olivier Grenie 9c78303681 V4L/DVB (13584): DiBXXX0: fix most of the Codingstyle violations from the previous patch
This patch changes most of the Codingstyle violations which were
introduced by the previous patch. Line length less that 80 chars are
not corrected.

Signed-off-by: Olivier Grenie <Olivier.Grenie@dibcom.fr>
Signed-off-by: Patrick Boettcher <pboettcher@kernellabs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-12-16 00:18:16 -02:00
Olivier Grenie 03245a5ee6 V4L/DVB (13583): DiB8090: Add the DiB0090 tuner driver and STK8096GP-board
This patchs adds support for the DiBcom DiB0090 RF tuner and for
DiBcom's reference design STK8096GP. Small extracts of the DiB0070 and
the DiB8000-driver into a common codebase.

Signed-off-by: Patrick Boettcher <pboettcher@kernellabs.com>
Signed-off-by: Olivier Grenie <Olivier.Grenie@dibcom.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-12-16 00:18:16 -02:00
Patrick Boettcher 20232c4791 V4L/DVB (13582): DiB0700: remove USB IDs of PCTV 74e from the driver
The PCTV 74e is not a design based on the dib0700-USB-device
controller thus we should not have its USB IDs inside.

This reverts partly:
Add support for PCTV 74e (Pinnacle) + fix USB vendor IDs

Signed-off-by: Patrick Boettcher <pboettcher@kernellabs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-12-16 00:18:15 -02:00
Patrick Boettcher e414753c8c V4L/DVB (13580): Add support for PCTV 74e (Pinnacle) + fix USB vendor IDs
This patch adds support for PCTV 74e (Pinnacle) and it fixes the USB vendor IDs for PCTV (f.k.a Pinnacle).
For convenience all new PCTV USB product IDs are also existing with Pinnacle's USB vendor ID.

Signed-off-by: Patrick Boettcher <pboettcher@kernellabs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-12-16 00:18:15 -02:00
Pedro Andres Aranda Gutierrez 4bf2c5c30e V4L/DVB (13579): PATCH: better support for INTUIX DVB stick boot
The device is bootingcorrectly, but no frontend is attached.
This patch corrects this behaviour.

Signed-off-by: Pedro Andres Aranda Gutierrez <paaguti@gmail.com>
Signed-off-by: Patrick Boettcher <pboettcher@kernellabs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-12-16 00:18:14 -02:00
Derek 81afda5182 V4L/DVB (13578): [PATCH] fix genpix driver (no 8psk lock).
Genpix is demodulating DVB-S-like signal with 8PSK modulation used) -
this non-standard behaviour was broken by rejecting 8PSK in a standard
DVB-S tune request. This problem is fixed by simply reverting back to
the drivers original behavior with this patch.

Signed-off-by: Patrick Boettcher <pboettcher@kernellabs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-12-16 00:18:14 -02:00
Akihiro Tsukada 0e2f0d348a V4L/DVB (13577): [PATCH] dvb-usb-friio: accept center-shifted frequency
This patch adds a fix to accept frequency with its center shifted.

The driver used to accept center frequencies of the normal UHF band channels,
but in ISDB-T, center frequency is shifted with 1/7MHz.
It was shifted internally in the driver,
but this patch enables to accept both types of frequency.

Signed-off-by: Akihiro Tsukada <tskd2@yahoo.co.jp>
Signed-off-by: Patrick Boettcher <pboettcher@kernellabs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-12-16 00:18:12 -02:00
Mauro Carvalho Chehab 05395a3d86 V4L/DVB (13576): ir-common: fix an oops caused by the usage of an initialized drvdata
As reported by Sander Eikelenboom <linux@eikelemboon.it>:

> Tried to update my v4l-dvb modules today, but got a bug with my pinnacle
> card, seems to be related to the recent changes in the ir code.
>
> Dec  5 23:30:25 security kernel: [    5.735698] BUG: unable to handle kernel NULL pointer dereference at 0000000000000000
> Dec  5 23:30:25 security kernel: [    5.735716] IP: [<ffffffffa00997be>] :ir_common:ir_input_free+0x26/0x3e

Thanks-to: Sander Eikelenboom <linux@eikelemboon.it> for reporting and testing the fix.
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-12-16 00:18:09 -02:00
Mauro Carvalho Chehab b779974bdf V4L/DVB (13575): em28xx: Use the complete address/command RC5 code for WinTV USB2
This device uses an i2c chip to retrieve the keycode from a RC5 remote.
Instead of just getting 6 bits, improve the routine to get 11 bits.

This means that the complete RC5 table for Hauppauge Grey IR can be used
with this device.

Unfortunately, it seems that this IR receiver is not capable of getting
the full 14 (or 13 bits) from the RC5 protocol.

At lest now, with the new code, it is possible to replace this IR table
by another RC5 table.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-12-16 00:18:07 -02:00
Muralidharan Karicheri b6456c0cfe V4L/DVB (13571): v4l: Adding Digital Video Timings APIs
This adds the above APIs to the v4l2 core. This is based on version v1.2
of the RFC titled "V4L - Support for video timings at the input/output interface"
Following new ioctls are added:-

        - VIDIOC_ENUM_DV_PRESETS
        - VIDIOC_S_DV_PRESET
        - VIDIOC_G_DV_PRESET
        - VIDIOC_QUERY_DV_PRESET
        - VIDIOC_S_DV_TIMINGS
        - VIDIOC_G_DV_TIMINGS

Please refer to the RFC for the details. This code was tested using vpfe
capture driver on TI's DM365. Following is the test configuration used :-

Blu-Ray HD DVD source -> TVP7002 -> DM365 (VPFE) ->DDR

A draft version of the TVP7002 driver (currently being reviewed in the mailing
list) was used that supports V4L2_DV_1080I60 & V4L2_DV_720P60 presets.

A loopback video capture application was used for testing these APIs. This calls
following IOCTLS :-

 -  verify the new v4l2_input capabilities flag added
 -  Enumerate available presets using VIDIOC_ENUM_DV_PRESETS
 -  Set one of the supported preset using VIDIOC_S_DV_PRESET
 -  Get current preset using VIDIOC_G_DV_PRESET
 -  Detect current preset using VIDIOC_QUERY_DV_PRESET
 -  Using stub functions in tvp7002, verify VIDIOC_S_DV_TIMINGS
    and VIDIOC_G_DV_TIMINGS ioctls are received at the sub device.
 -  Tested on 64bit platform by Hans Verkuil

Signed-off-by: Muralidharan Karicheri <m-karicheri2@ti.com>
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Reviewed-by: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-12-16 00:18:03 -02:00
Michael Krufky 20d15a200d V4L/DVB (13569): smsusb: add autodetection support for five additional Hauppauge USB IDs
Add support for five new Hauppauge Device USB IDs:

2040:b980
2040:b990
2040:c010
2040:c080
2040:c090

Signed-off-by: Michael Krufky <mkrufky@kernellabs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-12-16 00:18:02 -02:00
Jean-Francois Moine ecb7768686 V4L/DVB (13567): gspca - sunplus/stk014: Propagate errors to higher level.
Signed-off-by: Jean-Francois Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-12-16 00:18:02 -02:00
Jean-Francois Moine 8c4ebae45f V4L/DVB (13566): gspca - main: New variable usb_err for USB exchanges.
Signed-off-by: Jean-Francois Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-12-16 00:18:01 -02:00
Jean-Francois Moine c4322bfca8 V4L/DVB (13565): gspca - pac7302: One more webcam is upside-down by default.
Signed-off-by: Jean-Francois Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-12-16 00:18:01 -02:00
Antonio Ospite 28ffe77fe2 V4L/DVB (13564): gspca - main: Implement vidioc_enum_frameintervals.
Some drivers support multiple frameintervals (framerates), make gspca able to
enumerate them.

Signed-off-by: Antonio Ospite <ospite@studenti.unina.it>
Signed-off-by: Jean-Francois Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-12-16 00:18:00 -02:00
Jean-Francois Moine 7bd330b44e V4L/DVB (13563): gspca - zc3xx: Bad sensor probe of the webcam 0ac8:305b.
- probe the webcam (probe sequence from ms-win trace)
- update tax5130c init sequences from ms-win newer driver
- update tas5130c sequences from ms-win trace
- add some comments in the probe code

Signed-off-by: Jean-Francois Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-12-16 00:18:00 -02:00
Márton Németh 747c710098 V4L/DVB (13561): gspca - main: Remove unnecessary set to alternate 0.
Calling gspca_set_alt0() in gspca_dev_probe() is not needed as gspca_set_alt0()
will do nothing because gspca_dev->alt is always zero at that time.

Signed-off-by: Márton Németh <nm127@freemail.hu>
Signed-off-by: Jean-Francois Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-12-16 00:17:59 -02:00
Jean-Francois Moine d50e257ee8 V4L/DVB (13560): gspca - main: Cleanup source.
Signed-off-by: Jean-Francois Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-12-16 00:17:58 -02:00
Jean-Francois Moine fe2b603251 V4L/DVB (13559): gspca - pac7302: Some webcams are upside-down by default.
Signed-off-by: Jean-Francois Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-12-16 00:17:58 -02:00
Laurent Pinchart 327ae59757 V4L/DVB (13557): v4l: Remove unneeded video_device::minor usage in drivers
The video_device::minor field is used where it shouldn't, either to

- test for error conditions that can't happen anymore with the current
  v4l-dvb core,
- store the value in a driver private field that isn't used anymore,
- check the video device type where video_device::vfl_type should be
  used, or
- create the name of a kernel thread that should get a stable name.

Remove or fix those use cases.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-12-16 00:17:58 -02:00
Laurent Pinchart 46b21094ce V4L/DVB (13556): v4l: Remove unneeded video_device::minor assignments
Now that the video_device registration is tested using
video_is_registered(), drivers don't need to initialize the
video_device::minor field to -1 anymore.

Remove those unneeded assignments.

[mchehab.redhat.com: removed tm6000 changes as tm6000 is not ready yet for submission even on staging]

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-12-16 00:17:57 -02:00
Laurent Pinchart 50462eb065 V4L/DVB (13555): v4l: Use video_device_node_name() instead of the minor number
Instead of using the minor number in kernel log messages, use the device
node name as returned by the video_device_node_name() function. This
makes debug, informational and error messages easier to understand for
end users.

[mchehab.redhat.com: removed tm6000 changes as tm6000 is not ready yet for submission even on staging]

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-12-16 00:17:57 -02:00
Laurent Pinchart 63b0d5ad20 V4L/DVB (13554a): v4l: Use the video_drvdata function in drivers
Fix all device drivers to use the video_drvdata function instead of
maintaining a local list of minor to private data mappings. Call
video_set_drvdata to register the driver private pointer when not
already done.

Where applicable, the local list of mappings is completely removed when
it becomes unused.

[mchehab.redhat.com: removed tm6000 changes as tm6000 is not ready yet for submission even on staging]

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-12-16 00:17:56 -02:00
Laurent Pinchart f0813b4c9f V4L/DVB (13553): v4l: Use the video_is_registered function in device drivers
Fix all device drivers to use the video_is_registered function instead
of checking video_device::minor.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-12-16 00:17:56 -02:00