Commit Graph

9010 Commits (57e148b6a975980944f4466ccb669b1d02dfc6a1)

Author SHA1 Message Date
Andreas Regel ec2d3a62ef V4L/DVB (13981): [STV6110x] Add a local register map for each instance of the driver.
Before there was used a static register map that could lead to issues
when there are are multiple adapters with the STV6110(A).

Signed-off-by: Andreas Regel <andreas.regel@gmx.de>
Signed-off-by: Manu Abraham <manu@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-02-26 15:10:36 -03:00
Andreas Regel 0c3f9fd807 V4L/DVB (13980): [STV6110x] Added function stv6110x_write_regs
The function stv6110x_write_regs is used to write several registers at once.

Signed-off-by: Andreas Regel <andreas.regel@gmx.de>
Signed-off-by: Manu Abraham <manu@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-02-26 15:10:36 -03:00
Andreas Regel f91e59cb5e V4L/DVB (13979): [STV090x] Added possibility to set a fixed TS output clock.
This could be useful for p.e. Common Interface applications where data rate is limited.

Signed-off-by: Andreas Regel <andreas.regel@gmx.de>
Signed-off-by: Manu Abraham <manu@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-02-26 15:10:36 -03:00
Andreas Regel c369b7c282 V4L/DVB (13978): [STV090x] set FE_HAS_SIGNAL flag in stv090x_read_status when locked.
Signed-off-by: Andreas Regel <andreas.regel@gmx.de>
Signed-off-by: Manu Abraham <manu@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-02-26 15:10:36 -03:00
Andreas Regel 729cbafaca V4L/DVB (13977): [STV090x] Test for valid frequency before starting to tune
Signed-off-by: Andreas Regel <andreas.regel@gmx.de>
Signed-off-by: Manu Abraham <manu@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-02-26 15:10:36 -03:00
Andreas Regel 96506a5086 V4L/DVB (13976): [STV090x] Added mutex protection around tuner I2C access.
With this change it is possible to have the same I2C address for both tuners.

Signed-off-by: Andreas Regel <andreas.regel@gmx.de>
Signed-off-by: Manu Abraham <manu@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-02-26 15:10:36 -03:00
Andreas Regel 97f7a2ae1a V4L/DVB (13975): [STV090x] Added internal structure with shared settings and data.
As the STV0900 features two demodulation paths in one chip there is
some information used by both instances of the driver when used in
dual mode. This information is now shared in an internal structure
referenced by I2C adapter and address.

Do initialisation of the demodulator only once when used in dual mode.
Moved global mutex demod_lock to internal structure.
Moved dev_ver and mclk to internal structure.
Removed unused tuner_refclk from stv090x_state.

Signed-off-by: Andreas Regel <andreas.regel@gmx.de>
Signed-off-by: Manu Abraham <manu@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-02-26 15:10:36 -03:00
Andreas Regel b79c6df705 V4L/DVB (13974): [STV090x] Fix locking reliabilty issues in automatic mode.
In automatic S/S2 detection mode, locking of a DVB-S transponder could
fail when coming from a DVB-S2 transponder. This change fixes the issue
by first disabling DVB-S and DVB-S2 mode before enabling it again.

Signed-off-by: Andreas Regel <andreas.regel@gmx.de>
Signed-off-by: Manu Abraham <manu@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-02-26 15:10:36 -03:00
Abylay Ospan ceb59cf068 V4L/DVB (13936): 22-kHz set_tone fix for NetUP Dual DVB-S2-CI card
22-kHz tone can be driven in two ways:
1. LNBH24 can produce 22kHz continuous tone when TEN=1 ( 22 KHz tone output is
always activated ).
2. LNBH24 can reproduce 22kHz tone timings from DSQIN or EXTM pin's when TEN=0.
From LNBH24 datasheet:
"In order to improve design flexibility an external tone input pin is
available (EXTM). The EXTM is a Logic input pin which activates the 22 kHz
tone output, on the VoTX pin, by using the LNBH24 integrated tone generator
(similar to the DSQIN pin function). In fact, the output tone waveform
characteristics will always be internally controlled by the LNBH24 tone
generator and the EXTM signal will be used as a timing control for DiSEqC tone
data encoding on the VoTX output."

In NetUP Dual DVB-S2-CI card 22kHz tone timings on EXTM pin produced by
STV0900 demod:
.set_tone  = stv0900_set_tone

redefine to "set_tone = lnbp21_set_tone" is not correct for "NetUP Dual
DVB-S2-CI card".

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-02-26 15:10:35 -03:00
Jean-Francois Moine c52af79916 V4L/DVB (13916): gspca - ov534/ov534_9: Split the ov534 subdriver.
The two sensors ov772x and ov965x have too much differences.

Signed-off-by: Jean-Francois Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-02-26 15:10:35 -03:00
Jean-Francois Moine de2d1549c2 V4L/DVB (13869): gspca - sn9c20x: Cleanup code.
Signed-off-by: Jean-Francois Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-02-26 15:10:35 -03:00
Peter Huewe 310b26286e V4L/DVB (13947): add __init/__exit macros to drivers/media/dvb/bt8xx/bt878.c
Trivial patch which adds the __init/__exit macros to the module_init/
module_exit functions of

drivers/media/dvb/bt8xx/bt878.c

Please have a look at the small patch and either pull it through
your tree, or please ack' it so Jiri can pull it through the trivial
tree.

Patch against linux-next-tree, 22. Dez 08:38:18 CET 2009
but also present in linus tree.

Signed-off-by: Peter Huewe <peterhuewe@gmx.de>
Acked-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-02-26 15:10:35 -03:00
Joe Perches 42a39e0592 V4L/DVB (13969): frontends/si21xx.c: Remove #define TRUE/FALSE, use bool
And a little code refactoring/neatening around the removals

Reduces object size a little bit:

new:
$ size drivers/media/dvb/frontends/si21xx.o
   text	   data	    bss	    dec	    hex	filename
   8984	     56	   1816	  10856	   2a68	drivers/media/dvb/frontends/si21xx.o
old:
$ size drivers/media/dvb/frontends/si21xx.o
   text	   data	    bss	    dec	    hex	filename
   9084	     56	   1792	  10932	   2ab4	drivers/media/dvb/frontends/si21xx.o

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-02-26 15:10:35 -03:00
Jiri Slaby e34d375aa6 V4L/DVB (13968): cx18, fix potential null dereference
Stanse found a potential null dereference in cx18_dvb_start_feed
and cx18_dvb_stop_feed. There is a check for stream being NULL,
but it is dereferenced earlier. Move the dereference after the
check.

Signed-off-by: Jiri Slaby <jslaby@suse.cz>
Reviewed-by: Andy Walls <awalls@radix.net>
Acked-by: Andy Walls <awalls@radix.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-02-26 15:10:35 -03:00
Alexander Beregalov 8231152f74 V4L/DVB: ir: fix memory leak
Free ir_dev before exit.
Found by cppcheck.

Signed-off-by: Alexander Beregalov <a.beregalov@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-02-26 15:10:35 -03:00
Jiri Slaby 78b06e0201 V4L/DVB (13965): zl10039, jump to error on error
Stanse found an unreachable statement in zl10039_attach. There is
a `break' followed by `goto error'. Remove that break, so that it
can handle the error.

Cc: Igor M. Liplianin <liplianin@me.by>
Signed-off-by: Jiri Slaby <jslaby@suse.cz>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-02-26 15:10:35 -03:00
Jiri Slaby a570fb6eec V4L/DVB (13964): tuner-core, fix memory leak
Stanse found a memory leak in tuner_probe. It is not freed/assigned
on all paths. Fix that.

Signed-off-by: Jiri Slaby <jslaby@suse.cz>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-02-26 15:10:34 -03:00
Jiri Slaby b46d37e61f V4L/DVB (13963): siano, fix memory leak
Stanse found a memory leak in smscore_gpio_configure. buffer is not
freed/assigned on all paths. Fix that.

Signed-off-by: Jiri Slaby <jslaby@suse.cz>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-02-26 15:10:34 -03:00
Roel Kluin ad695510bf V4L/DVB (12930): Wrong variable tested
The return of saa7164_i2caddr_to_reglen() was not tested.

Cc: Steven Toth <stoth@kernellabs.com>
Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-02-26 15:10:34 -03:00
Francesco Lavra 19f48cb105 V4L/DVB (13961): em28xx-dvb: fix memleak in dvb_fini()
this patch fixes a memory leak which occurs when an em28xx card with DVB
extension is unplugged or its DVB extension driver is unloaded. In
dvb_fini(), dev->dvb must be freed before being set to NULL, as is done
in dvb_init() in case of error.
Note that this bug is also present in the latest stable kernel release.

Signed-off-by: Francesco Lavra <francescolavra@interfree.it>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-02-26 15:10:34 -03:00
hartleys be39515758 V4L/DVB (13959): cx23885/cx23885-dvb.c: use %pM to show MAC address
Use the %pM kernel extension to display the MAC address.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-02-26 15:10:34 -03:00
hartleys 2714b3b9be V4L/DVB (13958): tveeprom.c: use %pM to show MAC address
Use the %pM kernel extension to display the MAC address.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-02-26 15:10:34 -03:00
Francesco Lavra 9714d587f1 V4L/DVB (13957): IR: Fix sysfs attributes declaration
This patch fixes the declaration of the sysfs attributes for IR's, which
must be a NULL-terminated array of struct attribute *.
Without this patch, my machine crashes when inserting a DVB card.

Signed-off-by: Francesco Lavra <francescolavra@interfree.it>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-02-26 15:10:34 -03:00
Dan Carpenter 211635654c V4L/DVB (13956): fix weird array index in zl10036.c
I was initially concerned about the weird array index (the 2 bumps
into the next row of the array).  Matthias Schwarzott look at the
datasheet and it turns out it should be zl10036_init_tab[1][0] |= 0x01;

Signed-off-by: Dan Carpenter <error27@gmail.com>
Signed-off-by: Matthias Schwarzott <zzam@gentoo.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-02-26 15:10:34 -03:00
Julia Lawall 3557aa4f7d V4L/DVB (13954): Correct NULL test
Test the just-allocated value for NULL rather than some other value.

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

// <smpl>
@r@
identifier f;
@@

f(...) { <+... return NULL; ...+> }

@@
expression *x;
expression y;
identifier r.f;
statement S;
@@

x = f(...);
(
if ((x) == NULL) S
|
if (
-   y
+   x
       == NULL)
 S
)
// </smpl>

Signed-off-by: Julia Lawall <julia@diku.dk>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-02-26 15:10:33 -03:00
Stefan Richter b2ad41f9ef V4L/DVB (13953): firedtv: add missing NULL pointer check
If there is ever going to be a FireDTV or FloppyDTV firmware which does
not provide a minimal ASCII textual descriptor for Model_Id --- or if
the descriptor is provided indirectly in a descriptor directory ---
the ieee1394 variant of the device probe of firedtv would dereference a
NULL pointer.  The firewire variant of firedtv's device probe is not
affected.

The fix makes sure that such an unexpected firmware is safely recognized
by fdtv_alloc as an unknown firmware.

Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-02-26 15:10:33 -03:00
Tobias Klauser f0ecba96e7 V4L/DVB (13952): gspca: Storage class should be before const qualifier
The C99 specification states in section 6.11.5:

The placement of a storage-class specifier other than at the beginning
of the declaration specifiers in a declaration is an obsolescent
feature.

Cc: Jean-Francois Moine <moinejf@free.fr>
Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-02-26 15:10:33 -03:00
Tobias Klauser 9d68e8de9f V4L/DVB (13951): rj54n1cb0: Storage class should be before const qualifier
The C99 specification states in section 6.11.5:

The placement of a storage-class specifier other than at the beginning
of the declaration specifiers in a declaration is an obsolescent
feature.

Cc: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-02-26 15:10:33 -03:00
Tobias Klauser 7b2d3983f2 V4L/DVB (13950): usb-friio: Storage class should be before const qualifier
The C99 specification states in section 6.11.5:

The placement of a storage-class specifier other than at the beginning
of the declaration specifiers in a declaration is an obsolescent
feature.

Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-02-26 15:10:33 -03:00
Julia Lawall 21ead03bdd V4L/DVB (13949): Move a dereference below a NULL test
If the NULL test is necessary, then the dereference should be moved below
the NULL test.

The semantic patch that makes this change is as follows:
(http://www.emn.fr/x-info/coccinelle/)

// <smpl>
@@
type T;
expression E;
identifier i,fld;
statement S;
@@

- T i = E->fld;
+ T i;
  ... when != E
      when != i
  if (E == NULL) S
+ i = E->fld;
// </smpl>

Signed-off-by: Julia Lawall <julia@diku.dk>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-02-26 15:10:33 -03:00
Julia Lawall ed0ee8e1fb V4L/DVB (13948): radio: Correct use after free
It is not clear how to share the unlock in the case where the structure
containing the lock has to be freed.  So the unlock is now duplicated, with
one copy moved before the free.  The unlock label furthermore is no longer
useful and is thus deleted.

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

// <smpl>
@@
expression x,e;
identifier f;
iterator I;
statement S;
@@

*kfree(x);
... when != &x
    when != x = e
    when != I(x,...) S
*x->f
// </smpl>

Signed-off-by: Julia Lawall <julia@diku.dk>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-02-26 15:10:33 -03:00
Alexey Dobriyan e0572325d2 V4L/DVB (13946): proc_fops: convert av7110
Drop S_IRUGO, proc entry doesn't contain read hooks.
Drop S_IFREG, simply unnecessary.

Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-02-26 15:10:33 -03:00
Dmitri Belimov 9c6f97a023 V4L/DVB (13945): Add lost config and PCI ID for card of Beholder
Add lost configuration for our TV card.

Signed-off-by: Beholder Intl. Ltd. Dmitry Belimov <d.belimov@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-02-26 15:10:32 -03:00
Roel Kluin 7de0b8739f V4L/DVB (13944): vivi: Fix test of unsigned in vivi_create_instance()
video_nr is unsigned so the test did not work.

Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-02-26 15:10:32 -03:00
Roel Kluin f2e6c6ad02 V4L/DVB: use correct size in put_v4l2_window32()
Although these sizes may be the same it is better to calculate the size of
the source, than the destiny.

Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-02-26 15:10:32 -03:00
Devin Heitmueller 66d9cbad53 V4L/DVB (13932): em28xx: add PAL support for VBI
Make the VBI support work for PAL standards in addition to NTSC.

This work was sponsored by EyeMagnet Limited.

Thanks go out to Andy Walls for providing a CD containing test PAL/VBI captures
and to Steven Toth for providing a PVR-350 to do signal generation with.

Signed-off-by: Devin Heitmueller <dheitmueller@kernellabs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-02-26 15:10:32 -03:00
Devin Heitmueller 6a2071006b V4L/DVB (13930): dib0700: rework IR logic for firmware 1.20
When firmware 1.20 was introduced, the dib0700 switched from a polling model
using a USB control message, to the messages being delivered on a USB bulk
pipe.  The code I originally added would do a blocking read on the pipe with a
50ms timeout.  Because the dvb-usb-remote code makes use of the global
workqueue, this resulted in the global workqueue being blocked 50% of the
time.  Also, the synchronous urb_bulk_msg() call would burn excess CPU time
(reflected as an abnormal increase in the system's load average when devices
were connected).

Rework the logic so that we now setup an asynchronous callback on the bulk
pipe, so that we now only handle RC data when it arrives on the pipe.  Note
that we provide a stub function for the RC polling callback so that we can
continue to leverage the shared code in dvb-usb-rc for the setting up of the
input device.

Signed-off-by: Devin Heitmueller <dheitmueller@kernellabs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-02-26 15:10:32 -03:00
Jean-Francois Moine eac8f5fa5f V4L/DVB (13927): gspca - sonixj: Fix bad video mode for all webcams.
The bug was introduced when adding the sensor adcm1700.

Signed-off-by: Jean-Francois Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-02-26 15:10:32 -03:00
Jean-Francois Moine cdf955cd8e V4L/DVB (13926): gspca - pac7302: Fix a random USB error.
When loading the register 0x49 of the page 3, the usb_control_msg() sometimes
fails with error -71 or -62.
This change skips loading the register 0x48.

Tested-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>
2010-02-26 15:10:32 -03:00
Jean-Francois Moine b7a597d110 V4L/DVB (13925): gspca - main: Change the check of the USB video interface.
Some webcams have many interfaces with the same interface class, so the
previous interface check did not work.
The new code checks if the interface number is zero or the only one.

Signed-off-by: Jean-Francois Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-02-26 15:10:32 -03:00
Jean-Francois Moine 6f081264f8 V4L/DVB (13924): gspca - sunplus: Optimize and remove unused sequences.
Signed-off-by: Jean-Francois Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-02-26 15:10:31 -03:00
Jean-Francois Moine 509245171a V4L/DVB (13923): gspca - zc3xx: Simplify code.
Signed-off-by: Jean-Francois Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-02-26 15:10:31 -03:00
Jean-Francois Moine 77880ba333 V4L/DVB (13922): gspca - zc3xx: Switch off the LED on resume.
Signed-off-by: Jean-Francois Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-02-26 15:10:31 -03:00
Jean-Francois Moine a20622f0f5 V4L/DVB (13921): gspca - zc3xx: Remove unuseful register write.
Signed-off-by: Jean-Francois Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-02-26 15:10:31 -03:00
Jean-Francois Moine 56af5efca5 V4L/DVB (13920): gspca - zc3xx: Let default sharpness for sensor pas202b.
Signed-off-by: Jean-Francois Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-02-26 15:10:31 -03:00
Jean-Francois Moine 1eed40aeb4 V4L/DVB (13919): gspca - zc3xx: Fix hdcs2020 probe.
Signed-off-by: Jean-Francois Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-02-26 15:10:31 -03:00
Jean-Francois Moine 1cb6d7b156 V4L/DVB (13918): gspca - zc3xx: Rename the USB sequences.
The new names tell the image resolution: 'Scale' is the smaller image.

Signed-off-by: Jean-Francois Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-02-26 15:10:31 -03:00
Jean-Francois Moine 47c8339237 V4L/DVB (13917): gspca - zc3xx: Cleanup code.
- update copyright and module author
- change __u8/16 to u8/16
- set unsigned the sd sensor
- initialize the controls by macros

Signed-off-by: Jean-Francois Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-02-26 15:10:31 -03:00
Mauro Carvalho Chehab 5599678c70 V4L/DVB (13915): em28xx: fix a typo on RC6 modes
Thanks to: Devin Heitmueller <dheitmueller@kernellabs.com> for double
checking it.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-02-26 15:10:30 -03:00
Andy Walls f05b7f5ee1 V4L/DVB (13913): saa7127: Add support for generating SECAM output for the SAA712[89] chips
This change fixes up saa7127_s_std() generate SECAM out, if the user has
requested a 50 Hz video standard set that only contains a request for SECAM
standards and not PAL.  Only the SAA712[89] chips can generate SECAM, the
SAA712[67] chips cannot.

I was unclear on the burst start and end values - I couldn't figure out
the units - so I left them the same as for the PAL systems.

A the video decoders on both a PVR-350 (SAA7115) and an HVR-1600 (CX23418)
identify the SECAM signal generated by a SAA7129 with this patch as SECAM.

Signed-off-by: Andy Walls <awalls@radix.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-02-26 15:10:30 -03:00
Sergey Bolshakov a8073119d6 V4L/DVB (13912): cx18: Fix tuner reset pin in card entry for the Leadtek PVR2100
Fix the "xceive_pin" setting from "15" to "1" for the PVR2100 -- the same as
the PVR3100H.  This properly resets the XC2028 tuner on the PVR2100.

Sergey's original email report:

Hi.
Seems cx18 module has incorrect .xceive_pin value for card,
as i see lots of i2c errors in dmesg from xc2028.
i'm using 2.6.32.2, my hardware is:

00:09.0 Multimedia video controller [0400]: Conexant Systems, Inc. CX23418
Single-Chip MPEG-2 Encoder with Integrated Analog Video/Broadcast Audio Decoder
[14f1:5b7a]
        Subsystem: LeadTek Research Inc. Device [107d:6f27]
        Flags: bus master, medium devsel, latency 64, IRQ 17
        Memory at f0000000 (32-bit, non-prefetchable) [size=64M]
        Capabilities: [44] Vital Product Data
        Capabilities: [4c] Power Management version 2
        Kernel driver in use: cx18
        Kernel modules: cx18

Following fixes this problem for me, the rest seems working:

Reported-by: Sergey Bolshakov <sbolshakov@altlinux.ru>
Tested-by: Sergey Bolshakov <sbolshakov@altlinux.ru>
Signed-off-by: Andy Walls <awalls@radix.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-02-26 15:10:30 -03:00
Andy Walls 5ada57732a V4L/DVB (13910): cx18: Fix set indextable command to properly select I/P/B index entries
The CX18_CPU_SET_INDEXTABLE command was being called with the wrong number
of arguments causing the index table frame type selection mask to be set wrong.
Now the IDX stream properly sends entries for I, P, and B frames.

Signed-off-by: Andy Walls <awalls@radix.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-02-26 15:10:30 -03:00
Andy Walls 9bff2d6171 V4L/DVB (13909): cx18: Clean up dead code from ivtv once used for IDX processing
Signed-off-by: Andy Walls <awalls@radix.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-02-26 15:10:30 -03:00
Andy Walls 82acdc84cc V4L/DVB (13908): cx18: Add initial working VIDIOC_G_ENC_INDEX ioctl() support
VIDIOC_G_ENC_INDEX support see the light of day.
Some notes:
1. With default capture parameters, the CX23418 seems to transfer 192 index
entries (4.5 kB worth) at 10 second intervals.

2. Index streams don't seem to be supported for MPEG 2 TS streams

3. The index entries seem to claim every frame is a B-Frame.  Possible
firmware bug.

4. The cx18 driver does not try to capture an index stream when inserting
sliced VBI into the MPEg stream as the offsets would need fixup.

Signed-off-by: Andy Walls <awalls@radix.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-02-26 15:10:30 -03:00
Andy Walls ef99179710 V4L/DVB (13907): cx18: Perform automatic rotation of very old, unread IDX buffers
According to the v4l2 spec, very old MPEG index entries needs to be discarded
in favor of newer index entries.  This change ensures the firmware always has
buffers for index entries at the expense of the oldest unread buffers.

Signed-off-by: Andy Walls <awalls@radix.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-02-26 15:10:30 -03:00
Andy Walls 79f3e96018 V4L/DVB (13906): cx18: Start IDX streams automatically as an internal associated stream
This change starts the IDX stream along with the MPG stream as an internal
use (only) stream much like the VBI stream can be started as an internal use
stream for inserting sliced VBI packets.

The IDX stream is not started automatically with an MPEG strem if the IDX
stream is disabled (no buffers allocated) or if sliced VBI insertion is being
performed by the cx18 driver.  The cx18 driver doing sliced VBI insertion
makes the offsets in the IDX stream inaccurate for the final MPEG stream
presented to user space.  Since fixing the IDX offsets ourselves is not easy
and we cannot easily do what ivtv does to fix the offsets, we'll make sliced
VBI insertion and MPEG Index capture mutually exclusive for now.

Signed-off-by: Andy Walls <awalls@radix.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-02-26 15:10:30 -03:00
Andy Walls e46c54a87e V4L/DVB (13905): cx18: Allow MPEG index streams to be started and stopped internally
This change allows the IDX stream to be started and stopped as any other
stream even though it has no associated device node.  This is needed for
cx18 driver internal use.

Also always tell the CX23418 to generate index entries when an analog capture
starts and the IDX stream has had buffers allocated (i.e. is enabled).

Signed-off-by: Andy Walls <awalls@radix.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-02-26 15:10:29 -03:00
Andy Walls 7b1dde0331 V4L/DVB (13904): cx18: Fix TS and IDX stream buffer memory leak on module unload
Fix a long standing memory leak of stream buffers for streams that did not
have a struct video_device allocated: namely the TS and IDX streams.

Signed-off-by: Andy Walls <awalls@radix.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-02-26 15:10:29 -03:00
Andy Walls 540bab93b7 V4L/DVB (13903): cx18: Encapsulate check for a stream being enabled into an inline function
Signed-off-by: Andy Walls <awalls@radix.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-02-26 15:10:29 -03:00
Andy Walls efc0b127b2 V4L/DVB (13902): cx18: Update MPEG Index stream buffers module option processing
Update the module options related to INDEX stream buffer allocation.  A single
CX2341[5678] index entry is only 24 bytes.  Large buffers for the IDX stream
will prevent the CX23418 from transferring index data over at all.  Buffers
of around 1.5 kB or 64 index entries seem to be just fine.  We'll default to
63 buffers/MDLs as that is the firmware limit per stream and IDX stream buffers
are not high rate.  There is no reason on earth to allocate the previous 1 MB
default of buffer space for the IDX stream.

This is in anticipation of implementing the G_ENC_INDEX ioctl() in the cx18
driver.

Signed-off-by: Andy Walls <awalls@radix.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-02-26 15:10:29 -03:00
Marton Nemeth 7e64dc4c4d V4L/DVB (13899): gspca - all subdrivers: Make control descriptors constant.
The ctrls field of struct sd_desc is declared as const
in gspca.h. It is worth to initialize the content also with
constant values.

Signed-off-by: Marton Nemeth <nm127@freemail.hu>
Signed-off-by: Jean-Francois Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-02-26 15:10:29 -03:00
Márton Németh aabcdfb65b V4L/DVB (13898): gspca - some subdrivers: Make sd_desc const.
The function callbacks in sd_desc are defined at compile time and
they do not change at runtime. Make the sd_desc initializations const.

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>
2010-02-26 15:10:29 -03:00
Jean-Francois Moine 52a9d3ef00 V4L/DVB (13897): gspca - main: Check the interface class at probe time.
The USB video interface was checked as having the number zero, but
some webcams have other values. The test is now done on the interface
class which may be either 255 (vendor spec) or 0 (class per interface).

Signed-off-by: Jean-Francois Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-02-26 15:10:29 -03:00
Jean-Francois Moine 38719d45f9 V4L/DVB (13896): gspca - zc3xx: Adjust the pas202b exchanges.
- adapt the start sequences from the info file of the ms-win driver
  of the webcams 046d:08a2/046d:08aa (lvWIMv.inf)
- disable the brightness for this sensor

Signed-off-by: Jean-Francois Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-02-26 15:10:28 -03:00
Jean-Francois Moine fd18046fff V4L/DVB (13895): gspca - zc3xx: Fix the contrast control.
The previous calculation gave bad gamma tables.

Signed-off-by: Jean-Francois Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-02-26 15:10:28 -03:00
Jean-Francois Moine 878b35aedb V4L/DVB (13894): gspca - sonixj: Add more controls.
- sharpness
- brightness for adcm1700
- adjust brightness/exposure for adcm1700
- add some comments

Signed-off-by: Jean-Francois Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-02-26 15:10:28 -03:00
Jean-Francois Moine 83c94a1863 V4L/DVB (13893): gspca - vc032x: Change the sensor of 046d:0892 and 046d:0896.
- new sensor POxxxx (unknown ID)
- no probe
- new controls
- table for the disabled controls

Signed-off-by: Jean-Francois Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-02-26 15:10:28 -03:00
Jean-Francois Moine 219f3027a8 V4L/DVB (13892): gspca - vc032x: Add the H and V flip controls for sensor mi1320.
Signed-off-by: Jean-Francois Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-02-26 15:10:28 -03:00
Jean-Francois Moine ff1cf40812 V4L/DVB (13891): gspca - vc032x: Fix bad probe of the sensor mi1320.
- have 2 tables for sensor probe
- with the same ID, the sensor mi1320 is found with the bridge vc0321,
        the sensor mi1320_soc with the bridge vc0323
- add some comments

Signed-off-by: Jean-Francois Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-02-26 15:10:28 -03:00
Antoine Jacquet 08135ba238 V4L/DVB (13885): zr364xx: fix support for Aiptek DV T300
Added a new initialization method for Aiptek DV T300.
Addresses http://bugzilla.kernel.org/show_bug.cgi?id=13708

Tested-by: Hámorszky Balázs <balihb@gmail.com>
Signed-off-by: Antoine Jacquet <royale@zerezo.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-02-26 15:10:28 -03:00
Erik Andrén 969cc9264b V4L/DVB (13883): gspca - m5602: Be less verbose during sensor probe
Currently all probed sensor types are emitted in the kernel log, generating unnecessary noise. Be less verbose and only report what sensor is found (if any)

Signed-off-by: Erik Andrén <erik.andren@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-02-26 15:10:28 -03:00
Erik Andrén 6a1b262fac V4L/DVB (13881): gspca - stv06xx: Clean up the dump bridge function
Signed-off-by: Erik Andrén <erik.andren@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-02-26 15:10:27 -03:00
Mauro Carvalho Chehab fb8253baa0 V4L/DVB (13879): dvb_frontend: report what ioctl were called on debug mode
When printing that an iocl were called, report the ioctl number.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-02-26 15:10:27 -03:00
Mauro Carvalho Chehab 639544d78c V4L/DVB (13878): dvb_frontend: Print dump on get after filling the data
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-02-26 15:10:27 -03:00
Jean-Francois Moine 64677573a2 V4L/DVB (13872): gspca - sonixj: Add sensor adcm1700 and webcam 0c45:614a.
Signed-off-by: Jean-Francois Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-02-26 15:10:27 -03:00
Jean-Francois Moine 0a71d9cec2 V4L/DVB (13871): gspca - benq: New subdriver for camera 04a5:3035.
Tested-by: Francesco Lavra <francescolavra@interfree.it>
Signed-off-by: Jean-Francois Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-02-26 15:10:27 -03:00
Jean-Francois Moine d754a6ca9a V4L/DVB (13870): gspca - zc3xx: Bad detection of sensor HV7131R(c).
The webcam 0ac8:303b may have the sensors HV7131B or HV7131R(c).
This changeset checks the HV7131 type.

Signed-off-by: Jean-Francois Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-02-26 15:10:27 -03:00
Luis Maia 658604ec9c V4L/DVB (13867): gspca - zc3xx: Add one more chipset ID of tas5130K.
This ID was found in a webcam 0ac8:301b.

Signed-off-by: Luis Maia <lmaia@royalhat.org>
Signed-off-by: Jean-Francois Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-02-26 15:10:27 -03:00
Jean-Francois Moine 47aaca961f V4L/DVB (13866): gspca - main: Add the cam flag 'no_urb_create'.
This flag permits subdrivers to create specific transfer URBs.

Signed-off-by: Jean-Francois Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-02-26 15:10:27 -03:00
Jean-Francois Moine db870875c0 V4L/DVB (13865): gspca - main: Optimize code.
Signed-off-by: Jean-Francois Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-02-26 15:10:26 -03:00
Mauro Carvalho Chehab 3205e4fe0d V4L/DVB (13856): ir-keytable: simplify and avoid a warning
/home/v4l/buildtest/v4l-dvb-master/v4l/ir-keytable.c: In function 'ir_setkeycode':
/home/v4l/buildtest/v4l-dvb-master/v4l/ir-keytable.c:190: warning: 'newkeymap' may be used uninitialized in this function

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-02-26 15:10:26 -03:00
Mauro Carvalho Chehab b4622c14a1 V4L/DVB (13848): smsdvb: Add the proper status for IsRfLocked
Now, if RF is locked but demod is not locked, it will report:
>>> tuning status == 0x03

This happens, for example, if the device is on DVB-T, and the video
standard is ISDB-T.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-02-26 15:10:26 -03:00
Mauro Carvalho Chehab 25f9461a03 V4L/DVB (13847): smsdvb: Remove a wrong debug message
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-02-26 15:10:26 -03:00
Mauro Carvalho Chehab 5eb23975b4 V4L/DVB (13846): smsdvb: Properly implement stats for both DVB and ISDB-T
After taking a look at the driver's history and doing some tests with
DVB and ISDB-T, it was noticed that the stats were incomplete, for
ISDB-T, and weren't working for DVB.

Fixed the code and added a debug code to print the complete stats at
dmesg. This debug is useful to improve the stats of this driver.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-02-26 15:10:26 -03:00
Mauro Carvalho Chehab 643e15a0f4 V4L/DVB (13845): smsdvb: Fix the frequency switch that broke with v5 API conversion
Bandwidth is in Hz, not in kHz.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-02-26 15:10:26 -03:00
Mauro Carvalho Chehab e85c97a050 V4L/DVB (13844): smsdvb: Properly report the Delivery System
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-02-26 15:10:26 -03:00
Mauro Carvalho Chehab 910ef763c1 V4L/DVB (13843): dib8000: Properly report Delivery System as SYS_ISDBT
Cc: Patrick Boettcher <pboettcher@kernellabs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-02-26 15:10:26 -03:00
Mauro Carvalho Chehab cf4fab720c V4L/DVB (13842): smsdvb: Convert it to use DVB API v5 (S2API)
Based on a patch originally written by Michael Krufky <mkrufky@linuxtv.org>
for a preliminar S2API spec.

The patch were ported to the S2API and had the ISDB-T API additions to
honor the auto mode, while keep allowing manual tuning.

Tested with both the original dvb-apps and the new dvb-apps-isdbt scan,
that uses a different channel.conf and uses S2API with ISDB-T extensions.

Thanks-to: Michael Krufky <mkrufky@linuxtv.org> for his first version
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-02-26 15:10:25 -03:00
Mauro Carvalho Chehab 67ae1d26bd V4L/DVB (13841): smsdvb: Make stats to work
Siano series of patches seemed to cause a regression on reporting DTV
statistics. Due to that, signal indication weren't received, preventing
applications like scan to work.

Tested with ISDB-T signals and got the same scan result as with a
dib0700/dib8000 device.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-02-26 15:10:25 -03:00
Michael Krufky dcb0c53331 V4L/DVB (13840): smsusb: Add ISDB-T firmware for Hauppauge WinTV-Nova-T-MiniStick
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-02-26 15:10:25 -03:00
Michael Krufky 6b26fcea51 V4L/DVB (13839): smsdvb: add ISDB-T as DVB-T tuning support hack
Activate ISDB-T mode using module option default_mode=6.

hack: use 4 lower bits in frequency for segment number

[mchehab@redhat.com: fix merge conflicts and CodingStyle]
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-02-26 15:10:25 -03:00
David Wong c245c75c41 V4L/DVB (13838): atbm8830: use AGC setting from config
Improves ATBM8830 reception by using per card AGC configuration rather
than register default.

Signed-off-by: David T. L. Wong <davidtlwong@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-02-26 15:10:25 -03:00
Mauro Carvalho Chehab 8719cfdb4a V4L/DVB (13833): ir-core: some functions can be static
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-02-26 15:10:25 -03:00
Daniel Ritz 68f194e027 V4L/DVB (13830): uvcvideo: add another YUYV format GUID for iSight cameras
For some unknown reason, on a MacBookPro5,3 the iSight sometimes report
a different video format GUID. This patch add the other (wrong) GUID to
the format table, making the iSight work always w/o other problems.

What it should report: 32595559-0000-0010-8000-00aa00389b71
What it often reports: 32595559-0000-0010-8000-000000389b71

Signed-off-by: Daniel Ritz <daniel.ritz@gmx.ch>
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-02-26 15:10:25 -03:00
Laurent Pinchart 73de3592c0 V4L/DVB (13828): uvcvideo: Make the quirks module parameter override the built-in quirks
The quirks module parameter is or'ed with the built-in quirks for the
device being probed. This make it impossible to disable a built-in quirk
without recompiling the driver.

Replace the built-in quirks with the quirks module parameter instead of
or'ing the values.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-02-26 15:10:25 -03:00
Laurent Pinchart 310fe52461 V4L/DVB (13827): uvcvideo: Switch to a monotonic clock for V4L2 buffers timestamps
The realtime clock provided by do_gettimeofday() is affected by time
jumps caused by NTP or DST. Furthermore, preliminary investigation
showed that SMP systems the realtime clock is based on the CPU TSC,
and those could get slightly out of sync, resulting in jitter in the
timestamps depending on which processor handles the USB interrupts.

Instead of the realtime clock, use a monotonic high resolution clock to
timestamp the buffer. As this could in theory introduce a regression
with some userspace applications expecting a realtime clock timestamp,
add a module parameter to switch back to the realtime clock.

Thanks to Paulo Assis for pointing out and investigating the issue.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-02-26 15:10:24 -03:00
Mauro Carvalho Chehab 0f7ff39532 V4L/DVB (13825): ir-core: Don't OOPS if IR device props is not defined
As currently most drivers don't define ir_dev->props, we shouldn't assume
that this field is defined.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-02-26 15:10:24 -03:00
Igor M. Liplianin cd79d33e16 V4L/DVB (13818): Add Prof 7500 DVB-S2 USB card
The card based on stv0903 demod, stb6100 tuner.

Signed-off-by: Igor M. Liplianin <liplianin@me.by>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-02-26 15:10:24 -03:00
Jean-Francois Moine d41592a2a2 V4L/DVB (13815): gspca - sunplus: Add webcam 052b:1507.
Signed-off-by: Jean-Francois Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-02-26 15:10:24 -03:00
Mauro Carvalho Chehab 971e8298de V4L/DVB (13680): ir: use unsigned long instead of enum
When preparing the linux-next patches, I got those errors:

include/media/ir-core.h:29: warning: left shift count >= width of type
In file included from include/media/ir-common.h:29,
                 from drivers/media/video/ir-kbd-i2c.c:50:
drivers/media/video/ir-kbd-i2c.c: In function ‘ir_probe’:
drivers/media/video/ir-kbd-i2c.c:324: warning: left shift count >= width of type

Unfortunately, enum is 32 bits on i386. As we define IR_TYPE_OTHER as 1<<63,
it won't work on non 64 bits arch.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-02-26 15:10:24 -03:00
Mauro Carvalho Chehab 3f831107ed V4L/DVB (13641): Properly update the driver representation for the protocol
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-02-26 15:10:24 -03:00
Mauro Carvalho Chehab eecee32ac2 V4L/DVB (13639): ir-sysfs: Properly protect rc_tab changes with a lock
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-02-26 15:10:24 -03:00
Mauro Carvalho Chehab d4b778d368 V4L/DVB (13638): ir-core: documment missed functions
While here, change ir_core_dev_number to be static

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-02-26 15:10:24 -03:00
Mauro Carvalho Chehab 950b0f5a0b V4L/DVB (13637): em28xx: allow changing keycode table protocol
Experimental patch to allow changing the IR protocol. Currently, it support
changing between RC-5 and NEC protocols.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-02-26 15:10:23 -03:00
Mauro Carvalho Chehab 09b01b90eb V4L/DVB (13636): ir-core: add method to change IR protocol
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-02-26 15:10:23 -03:00
Mauro Carvalho Chehab 53f870228d V4L/DVB (13635): ir-core: Implement protocol table type reading
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-02-26 15:10:23 -03:00
Mauro Carvalho Chehab e93854da88 V4L/DVB (13634): ir-core: allow passing IR device parameters to ir-core
Adds an structure to ir_input_register to contain IR device characteristics,
like supported protocols and a callback to handle protocol event changes.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-02-26 15:10:23 -03:00
Mauro Carvalho Chehab 4714eda877 V4L/DVB (13633): ir-core: create a new class for remote controllers
Add sysfs skeleton to export remote controller information via
/sys/class/irrcv.

For now, the code doesn't do much. It just exports an attribute that
is meant to  report and control the IR protocol used by the keytable.
However, the callbacks for this new attribute weren't set yet.

Also, it lacks symlinks to the used event interface.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-02-26 15:10:23 -03:00
Stefan Richter 109d28152b Merge tag 'v2.6.33' for its firewire changes since last branch point
Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
2010-02-24 20:33:45 +01:00
Jean Delvare 2434466432 V4L/DVB: bttv: Move I2C IR initialization
Move I2C IR initialization from just after I2C bus setup to right
before non-I2C IR initialization. This avoids the case where an I2C IR
device is blocking audio support (at least the PV951 suffers from
this). It is also more logical to group IR support together,
regardless of the connectivity.

This fixes bug #15184:
http://bugzilla.kernel.org/show_bug.cgi?id=15184

Signed-off-by: Jean Delvare <khali@linux-fr.org>
CC: stable@kernel.org
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-02-19 03:19:02 -02:00
Martin Fuzzey 53f68607ca V4L/DVB: Video : pwc : Fix regression in pwc_set_shutter_speed caused by bad constant => sizeof conversion.
Regression was caused by my commit 6b35ca0d3d
which determined message size using sizeof rather than hardcoded constants.

Unfortunately pwc_set_shutter_speed reuses a 2 byte buffer for a one byte
message too so the sizeof was bogus in this case.

All other uses of sizeof checked and are ok.

Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Cc: stable@kernel.org
Signed-off-by: Martin Fuzzey <mfuzzey@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-02-19 03:19:02 -02:00
Kuninori Morimoto 2b59125b1b soc-camera: mt9t112: modify exiting conditions from standby mode
This polling is needed if camera is in standby mode, but current exiting
condition is inverted.

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>
2010-02-19 03:19:01 -02:00
Ben Hutchings fc4a7f9308 V4L/DVB: cxusb: Select all required frontend and tuner modules
cxusb uses the atbm8830 and lgs8gxx (not lgs8gl5) frontends and the
max2165 tuner, so it needs to select them.

Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
Cc: stable@kernel.org
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-02-19 03:19:01 -02:00
Richard Guenther c1db53b366 V4L/DVB: dvb: l64781.ko broken with gcc 4.5
I'm trying to fix it on the GCC side (PR43007), but the module is
quite stupid in using ULL constants to operate on u32 values:

static int apply_frontend_param (struct dvb_frontend* fe, struct
dvb_frontend_parameters *param)
{
...
 static const u32 ppm = 8000;
 u32 spi_bias;
...

 spi_bias *= 1000ULL;
 spi_bias /= 1000ULL + ppm/1000;

which causes current GCC 4.5 to emit calls to __udivdi3 for i?86 again.

This patch fixes this issue.

Signed-off-by: Richard Guenther <rguenther@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
CC: stable@kernel.org
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-02-19 03:19:01 -02:00
David S. Miller 2bb4646fce Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6 2010-02-16 22:09:29 -08:00
Jiri Pirko 4cd24eaf0c net: use netdev_mc_count and netdev_mc_empty when appropriate
This patch replaces dev->mc_count in all drivers (hopefully I didn't miss
anything). Used spatch and did small tweaks and conding style changes when
it was suitable.

Jirka

Signed-off-by: Jiri Pirko <jpirko@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2010-02-12 11:38:58 -08:00
Daniel Mack 3ad2f3fbb9 tree-wide: Assorted spelling fixes
In particular, several occurances of funny versions of 'success',
'unknown', 'therefore', 'acknowledge', 'argument', 'achieve', 'address',
'beginning', 'desirable', 'separate' and 'necessary' are fixed.

Signed-off-by: Daniel Mack <daniel@caiaq.de>
Cc: Joe Perches <joe@perches.com>
Cc: Junio C Hamano <gitster@pobox.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2010-02-09 11:13:56 +01:00
Francesco Lavra 691c9ae099 V4L/DVB: dvb-core: fix initialization of feeds list in demux filter
A DVB demultiplexer device can be used to set up either a PES filter or
a section filter. In the former case, the ts field of the feed union of
struct dmxdev_filter is used, in the latter case the sec field of the
same union is used.
The ts field is a struct list_head, and is currently initialized in the
open() method of the demux device. When for a given demuxer a section
filter is set up, the sec field is played with, thus if a PES filter
needs to be set up after that the ts field will be corrupted, causing a
kernel oops.
This fix moves the list head initialization to
dvb_dmxdev_pes_filter_set(), so that the ts field is properly
initialized every time a PES filter is set up.

Signed-off-by: Francesco Lavra <francescolavra@interfree.it>
Cc: stable <stable@kernel.org>
Reviewed-by: Andy Walls <awalls@radix.net>
Tested-by: hermann pitton <hermann-pitton@arcor.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-02-08 10:47:17 -02:00
Mauro Carvalho Chehab bc081cc869 V4L/DVB: dvb_demux: Don't use vmalloc at dvb_dmx_swfilter_packet
As dvb_dmx_swfilter_packet() is protected by a spinlock, it shouldn't sleep.
However, vmalloc() may call sleep. So, move the initialization of
dvb_demux::cnt_storage field to a better place.

Reviewed-by: Andy Walls <awalls@radix.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-02-08 10:46:58 -02:00
Mauro Carvalho Chehab adefdceef4 V4L/DVB: Fix the risk of an oops at dvb_dmx_release
dvb_dmx_init tries to allocate virtual memory for 2 pointers: filter and feed.

If the second vmalloc fails, filter is freed, but the pointer keeps pointing
to the old place. Later, when dvb_dmx_release() is called, it will try to
free an already freed memory, causing an OOPS.

Reviewed-by: Andy Walls <awalls@radix.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-02-08 10:45:24 -02:00
Peter Huewe 60c14a1507 media/dvb: add __init/__exit macros to bt878.c
Trivial patch which adds the __init/__exit macros to the module_init/
module_exit functions of

drivers/media/dvb/bt8xx/bt878.c

Signed-off-by: Peter Huewe <peterhuewe@gmx.de>
Acked-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2010-02-05 12:22:33 +01:00
Mauro Carvalho Chehab ba9e9f3c08 saa7146: stop DMA before de-allocating DMA scatter/gather page buffers
Thanks-to: Hartmut <e9hack@googlemail.com> for pointing me the problem
and testing the fix.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-02-01 22:02:03 -02:00
Hans Verkuil 7415c7602d V4L/DVB: saa7134: remove stray unlock_kernel
An earlier commit removed the lock_kernel/unlock_kernel pair but forgot
to remove the unlock_kernel call in the cleanup path at the end of the
function.

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-01-29 18:34:06 -02:00
David S. Miller 51c24aaaca Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6 2010-01-23 00:31:06 -08:00
Linus Torvalds 2faae42233 Merge branch 'mantis' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-2.6
* 'mantis' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-2.6: (117 commits)
  V4L/DVB (13851): Fix Input dependency for Mantis
  V4L/DVB(13824a): mantis: Fix __devexit bad annotations
  V4L/DVB (13808b): mantis: replace DMA_nnBIT_MASK to DMA_BIT_MASK(32)
  V4L/DVB (13808): [Mantis/Hopper] Build update for Mantis/Hopper based cards
  V4L/DVB(13808a): mantis: convert it to the new ir-core register/unregister functions
  V4L/DVB (13812): [Mantis/Hopper] Update Copyright header
  V4L/DVB (13811): [MB86A16] Update Copyright header
  V4L/DVB (13810): [MB86A16] Use DVB_* macros
  V4L/DVB (13809): Fix Checkpatch violations
  V4L/DVB (13807): Fix: Free device in the device registration failure case
  V4L/DVB (13806): Register and Initialize Remote control
  V4L/DVB (13805): Fix: Unregister the frontend before detaching
  V4L/DVB (13804): Remove unused I2C Adapter ID
  V4L/DVB (13803): Remove unused dependency on CU1216
  V4L/DVB (13802): [Mantis/Hopper] Fix all build related warnings
  V4L/DVB (13801): [MB86A16] Use the search callback
  V4L/DVB (13800): [Mantis] I2C optimization. Required delay is much lesser than 1mS.
  V4L/DVB (13799): [Mantis] Unregister frontend
  V4L/DVB (13798): [Mantis] Enable power for all cards, use byte mode only on relevant devices
  V4L/DVB (13797): [Mantis/Hopper/TDA665x] Large overhaul,
  ...
2010-01-18 14:07:07 -08:00
Manu Abraham fcd89de3bd V4L/DVB (13851): Fix Input dependency for Mantis
>
>
>
> CONFIG_INPUT=n

As reported by Randy Dunlap <randy.dunlap@oracle.com>:
> ERROR: "ir_input_register" [drivers/media/dvb/mantis/mantis_core.ko] undefined!
> ERROR: "ir_input_unregister" [drivers/media/dvb/mantis/mantis_core.ko] undefined!
> ERROR: "ir_input_init" [drivers/media/dvb/mantis/mantis_core.ko] undefined!
> ERROR: "input_free_device" [drivers/media/dvb/mantis/mantis_core.ko] undefined!
> ERROR: "input_allocate_device" [drivers/media/dvb/mantis/mantis_core.ko] undefined!

Signed-off-by: Manu Abraham <manu@linuxtv.org>
Acked-by: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-01-17 12:01:45 -02:00
Mauro Carvalho Chehab 4cf0b3f130 V4L/DVB(13824a): mantis: Fix __devexit bad annotations
WARNING: drivers/media/dvb/mantis/built-in.o(.devinit.text+0x13d7): Section mismatch in reference from the function mantis_pci_probe() to the function .devexit.text:mantis_i2c_exit()
The function __devinit mantis_pci_probe() references
a function __devexit mantis_i2c_exit().
This is often seen when error handling in the init function
uses functionality in the exit path.
The fix is often to remove the __devexit annotation of
mantis_i2c_exit() so it may be used outside an exit section.

WARNING: drivers/media/dvb/mantis/built-in.o(.devinit.text+0x1433): Section mismatch in reference from the function mantis_pci_probe() to the function .devexit.text:mantis_pci_exit()
The function __devinit mantis_pci_probe() references
a function __devexit mantis_pci_exit().
This is often seen when error handling in the init function
uses functionality in the exit path.
The fix is often to remove the __devexit annotation of
mantis_pci_exit() so it may be used outside an exit section.

WARNING: drivers/media/dvb/mantis/built-in.o(.devinit.text+0x185e): Section mismatch in reference from the function hopper_pci_probe() to the function
.devexit.text:mantis_i2c_exit()
The function __devinit hopper_pci_probe() references
a function __devexit mantis_i2c_exit().
This is often seen when error handling in the init function
uses functionality in the exit path.
The fix is often to remove the __devexit annotation of
mantis_i2c_exit() so it may be used outside an exit section.

WARNING: drivers/media/dvb/mantis/built-in.o(.devinit.text+0x18ba): Section mismatch in reference from the function hopper_pci_probe() to the function .devexit.text:mantis_pci_exit()
The function __devinit hopper_pci_probe() references
a function __devexit mantis_pci_exit().
This is often seen when error handling in the init function
uses functionality in the exit path.
The fix is often to remove the __devexit annotation of
mantis_pci_exit() so it may be used outside an exit section.

WARNING: drivers/media/dvb/built-in.o(.devinit.text+0x68b8): Section mismatch in reference from the function mantis_pci_probe() to the function .devexit.text:mantis_i2c_exit()
The function __devinit mantis_pci_probe() references
a function __devexit mantis_i2c_exit().
This is often seen when error handling in the init function
uses functionality in the exit path.
The fix is often to remove the __devexit annotation of
mantis_i2c_exit() so it may be used outside an exit section.

WARNING: drivers/media/dvb/built-in.o(.devinit.text+0x6914): Section mismatch in reference from the function mantis_pci_probe() to the function .devexit.text:mantis_pci_exit()
The function __devinit mantis_pci_probe() references
a function __devexit mantis_pci_exit().
This is often seen when error handling in the init function
uses functionality in the exit path.
The fix is often to remove the __devexit annotation of
mantis_pci_exit() so it may be used outside an exit section.

WARNING: drivers/media/dvb/built-in.o(.devinit.text+0x6d3f): Section mismatch in reference from the function hopper_pci_probe() to the function .devexit.text:mantis_i2c_exit()
The function __devinit hopper_pci_probe() references
a function __devexit mantis_i2c_exit().
This is often seen when error handling in the init function
uses functionality in the exit path.
The fix is often to remove the __devexit annotation of
mantis_i2c_exit() so it may be used outside an exit section.

WARNING: drivers/media/dvb/built-in.o(.devinit.text+0x6d9b): Section mismatch in reference from the function hopper_pci_probe() to the function .devexit.text:mantis_pci_exit()
The function __devinit hopper_pci_probe() references
a function __devexit mantis_pci_exit().
This is often seen when error handling in the init function
uses functionality in the exit path.
The fix is often to remove the __devexit annotation of
mantis_pci_exit() so it may be used outside an exit section.

WARNING: drivers/media/built-in.o(.devinit.text+0x14634): Section mismatch in reference from the function mantis_pci_probe() to the function .devexit.text:mantis_i2c_exit()
The function __devinit mantis_pci_probe() references
a function __devexit mantis_i2c_exit().
This is often seen when error handling in the init function
uses functionality in the exit path.
The fix is often to remove the __devexit annotation of
mantis_i2c_exit() so it may be used outside an exit section.

WARNING: drivers/media/built-in.o(.devinit.text+0x14690): Section mismatch in reference from the function mantis_pci_probe() to the function .devexit.text:mantis_pci_exit()
The function __devinit mantis_pci_probe() references
a function __devexit mantis_pci_exit().
This is often seen when error handling in the init function
uses functionality in the exit path.
The fix is often to remove the __devexit annotation of
mantis_pci_exit() so it may be used outside an exit section.

WARNING: drivers/media/built-in.o(.devinit.text+0x14abb): Section mismatch in reference from the function hopper_pci_probe() to the function .devexit.text:mantis_i2c_exit()
The function __devinit hopper_pci_probe() references
a function __devexit mantis_i2c_exit().
This is often seen when error handling in the init function
uses functionality in the exit path.
The fix is often to remove the __devexit annotation of
mantis_i2c_exit() so it may be used outside an exit section.

WARNING: drivers/media/built-in.o(.devinit.text+0x14b17): Section mismatch in reference from the function hopper_pci_probe() to the function .devexit.text:mantis_pci_exit()
The function __devinit hopper_pci_probe() references
a function __devexit mantis_pci_exit().
This is often seen when error handling in the init function
uses functionality in the exit path.
The fix is often to remove the __devexit annotation of
mantis_pci_exit() so it may be used outside an exit section.

Acked-by: Manu Abraham <manu@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-01-17 12:01:44 -02:00
Mauro Carvalho Chehab 184ac7535e V4L/DVB (13808b): mantis: replace DMA_nnBIT_MASK to DMA_BIT_MASK(32)
drivers/media/dvb/mantis/mantis_pci.c: In function ‘mantis_pci_init’:
drivers/media/dvb/mantis/mantis_pci.c:76: warning: ‘DMA_nnBIT_MASK’ is deprecated

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-01-17 11:55:45 -02:00
Manu Abraham 8873c61f1f V4L/DVB (13808): [Mantis/Hopper] Build update for Mantis/Hopper based cards
Signed-off-by: Manu Abraham <manu@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-01-17 11:55:45 -02:00
Mauro Carvalho Chehab 9c0832e399 V4L/DVB(13808a): mantis: convert it to the new ir-core register/unregister functions
Fix a merge conflict between mantis and IR cleanups

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-01-17 11:55:45 -02:00
Manu Abraham 8825a0970c V4L/DVB (13812): [Mantis/Hopper] Update Copyright header
Signed-off-by: Manu Abraham <manu@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-01-17 11:55:45 -02:00
Manu Abraham 4cd191fba4 V4L/DVB (13811): [MB86A16] Update Copyright header
Signed-off-by: Manu Abraham <manu@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-01-17 11:55:45 -02:00
Manu Abraham 28fddb7cd5 V4L/DVB (13810): [MB86A16] Use DVB_* macros
Signed-off-by: Manu Abraham <manu@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-01-17 11:55:44 -02:00
Manu Abraham f5ae4f6f48 V4L/DVB (13809): Fix Checkpatch violations
Signed-off-by: Manu Abraham <manu@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-01-17 11:55:44 -02:00
Manu Abraham 1e42dc7890 V4L/DVB (13807): Fix: Free device in the device registration failure case
Signed-off-by: Manu Abraham <manu@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-01-17 11:55:44 -02:00
Manu Abraham a1497357dc V4L/DVB (13806): Register and Initialize Remote control
Signed-off-by: Manu Abraham <manu@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-01-17 11:55:44 -02:00
Manu Abraham c5e598a6f8 V4L/DVB (13805): Fix: Unregister the frontend before detaching
Signed-off-by: Manu Abraham <manu@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-01-17 11:55:44 -02:00
Manu Abraham 0ac6e141eb V4L/DVB (13804): Remove unused I2C Adapter ID
Signed-off-by: <manu@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-01-17 11:55:44 -02:00
Manu Abraham 83dbe82bd7 V4L/DVB (13803): Remove unused dependency on CU1216
Thanks to Matthias Wachter <mathias@waechter.wiz.at>
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:44 -02:00
Manu Abraham 0bdc799b8b V4L/DVB (13802): [Mantis/Hopper] Fix all build related warnings
Signed-off-by: Manu Abraham <manu@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-01-17 11:55:43 -02:00
Manu Abraham 5dd83a35be V4L/DVB (13801): [MB86A16] Use the search callback
Signed-off-by: Manu Abraham <manu@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-01-17 11:55:43 -02:00
Manu Abraham 281859179f V4L/DVB (13800): [Mantis] I2C optimization. Required delay is much lesser than 1mS.
Do not wait, keep looping instead.

Signed-off-by: Manu Abraham <manu@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-01-17 11:55:43 -02:00
Manu Abraham 68fe255cd1 V4L/DVB (13799): [Mantis] Unregister frontend
Signed-off-by: Manu Abraham <manu@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-01-17 11:55:43 -02:00
Manu Abraham bc832fa2c0 V4L/DVB (13798): [Mantis] Enable power for all cards, use byte mode only on relevant devices
Signed-off-by: Manu Abraham <manu@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-01-17 11:55:43 -02:00
Manu Abraham 3e978a8284 V4L/DVB (13797): [Mantis/Hopper/TDA665x] Large overhaul,
* Initial go at VP-3028, VP-3030 devices.
* I2C communication improvements,
* Add TDA665x support

Signed-off-by: Manu Abraham <manu@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-01-17 11:55:43 -02:00
Manu Abraham ad0ac434cb V4L/DVB (13796): [Mantis] Add missing file in previous commit
Signed-off-by: Manu Abraham <manu@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-01-17 11:55:42 -02:00
Manu Abraham b3b961448f V4L/DVB (13795): [Mantis/Hopper] Code overhaul, add Hopper devices into the PCI ID list
Signed-off-by: Manu Abraham <manu@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-01-17 11:55:42 -02:00
Manu Abraham add2063684 V4L/DVB (13794): [Mantis/VP-3028] Initial go at Serial interface implementation, add support for VP-3028
Signed-off-by: Manu Abraham <manu@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-01-17 11:55:42 -02:00
Niklas Edmundsson ec1b6ff1cc V4L/DVB (13792): [Mantis/VP-2033] Do not claim TDA10023
Do not rely on the PCI ID alone

Signed-off-by: Niklas Edmundsson <nikke@acc.umu.se>
Signed-off-by: Manu Abraham <manu@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-01-17 11:55:42 -02:00
Niklas Edmundsson 4af699c13a V4L/DVB (13791): [TDA10021] Do not claim TDA10023
Signed-off-by: Niklas Edmundsson <nikke@acc.umu.se>
Signed-off-by: Manu Abraham <manu@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-01-17 11:55:42 -02:00
Manu Abraham 42f541bfd1 V4L/DVB (13790): [Mantis] Relocate queue initialization
Signed-off-by: Manu Abraham <manu@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-01-17 11:55:42 -02:00
Manu Abraham 99b55b2c44 V4L/DVB (13789): [Mantis CA] Initialize the mutex
Signed-off-by: Manu Abraham <manu@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-01-17 11:55:42 -02:00
Manu Abraham f684336bba V4L/DVB (13788): [Mantis CA] use a lock for the relevant CI Read/Write operations
Signed-off-by: Manu Abraham <manu@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-01-17 11:55:41 -02:00
Manu Abraham 616f75e197 V4L/DVB (13787): [Mantis] Fix build
Signed-off-by: Manu Abraham <manu@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-01-17 11:55:41 -02:00
Manu Abraham 263645de70 V4L/DVB (13786): [Mantis] Bug: HIF bits already shifted ..
Signed-off-by: Manu Abraham <manu@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-01-17 11:55:41 -02:00
Manu Abraham 13d5036ea0 V4L/DVB (13785): [Mantis] Do not disable IRQ's while being invoked
Signed-off-by: Manu Abraham <manu@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-01-17 11:55:41 -02:00
Manu Abraham ff63ac5670 V4L/DVB (13784): [Mantis] Use PCI API instead of hardcoded length
Signed-off-by: Manu Abraham <manu@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-01-17 11:55:41 -02:00
Marko Viitamaki f5701b6776 V4L/DVB (13783): [Mantis/Technisat Cablestar HD2] Add support for the Technisat Cablestar HD2
Signed-off-by: Marko Viitamaki <mau2@suomi24.fi>
Signed-off-by: Manu Abraham <manu@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-01-17 11:55:41 -02:00
Manu Abraham e26c2b4620 V4L/DVB (13782): [Mantis] Temporarily disable FRDA irq
Signed-off-by: Manu Abraham <manu@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-01-17 11:55:40 -02:00
Manu Abraham b29f6ac248 V4L/DVB (13781): [Mantis CA] Bug: Fix wrong usage of HIFRDWRN
Signed-off-by: Manu Abraham <manu@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-01-17 11:55:40 -02:00
Sigmund Augdal c63e507346 V4L/DVB (13780): [Mantis] HIF I/O: Enable Interrupts for Read
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:40 -02:00
Manu Abraham 25e9eba42c V4L/DVB (13779): [Mantis] Missing wakeup for write queue
Thanks to Sigmund 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:40 -02:00
Manu Abraham 4d019faf48 V4L/DVB (13778): [Mantis] Wr ACK is already handled in the fast path,
do not use the event manager to handle the fast events

Signed-off-by: Manu Abraham <manu@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-01-17 11:55:40 -02:00
Manu Abraham e0e099a708 V4L/DVB (13777): [Mantis] Use a Write wait queue for Write events
Signed-off-by: Manu Abraham <manu@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-01-17 11:55:40 -02:00
Manu Abraham ac8f04d272 V4L/DVB (13776): [Mantis] Use a simple timeout instead, interruptible
timeouts sleep unnecessarily too long

Signed-off-by: Manu Abraham <manu@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-01-17 11:55:39 -02:00
Manu Abraham b9fd587746 V4L/DVB (13775): [Mantis] Remove unnecessary job queues
Signed-off-by: Manu Abraham <manu@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-01-17 11:55:39 -02:00
Sigmund Augdal c02e15150c V4L/DVB (13774): [Mantis] Remove redundant wait for Burst Reads, wakeup the HIF event
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:39 -02:00
Manu Abraham c90d345fd7 V4L/DVB (13773): [Mantis] Enable all interrupts
Signed-off-by: Manu Abraham <manu@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-01-17 11:55:39 -02:00
Manu Abraham 578413228a V4L/DVB (13772): [Mantis] Do not enable Common Memory Access
Signed-off-by: Manu Abraham <manu@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-01-17 11:55:39 -02:00
Manu Abraham 17b77fc2d4 V4L/DVB (13771): [Mantis] Reset Flags at the earliest possible
Signed-off-by: Manu Abraham <manu@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-01-17 11:55:39 -02:00
Manu Abraham f668c7292b V4L/DVB (13770): [Mantis] Bug Do not trigger FR/DA IRQ from SBUF OPDONE
Signed-off-by: Manu Abraham <manu@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-01-17 11:55:38 -02:00
Manu Abraham 9e49e8d913 V4L/DVB (13769): [Mantis] Smart Buffer Burst Read Ready cannot flag FR/DA Irq
Signed-off-by: Manu Abraham <manu@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-01-17 11:55:38 -02:00
Manu Abraham adcc9dd57e V4L/DVB (13768): [Mantis] Enable WRACK
Signed-off-by: Manu Abraham <manu@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-01-17 11:55:38 -02:00
Manu Abraham 18b6de42d7 V4L/DVB (13767): [Mantis/VP-1041] Bug: Add in missing Master clock settings
Thanks to Ershov and Igor 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:38 -02:00
Sigmund Augdal b29453aca0 V4L/DVB (13766): [Mantis] Bug: Fix wrong exit condition
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:38 -02:00
Manu Abraham 8b9c385f76 V4L/DVB (13765): [Mantis] HIF I/O: Add some debug statements
Signed-off-by: Manu Abraham <manu@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-01-17 11:55:38 -02:00
Manu Abraham 5e2a0c9901 V4L/DVB (13764): [Mantis CA] SLOT: Add some debug status
Signed-off-by: Manu Abraham <manu@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-01-17 11:55:38 -02:00
Manu Abraham 8e0d58ecee V4L/DVB (13763): [Mantis] HIF I/O: trim delays a bit appropriately
Signed-off-by: Manu Abraham <manu@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-01-17 11:55:37 -02:00
Manu Abraham 88a6fa9dfe V4L/DVB (13762): [Mantis CA] CA_MODULE: Look for the module status on driver unload as well
Signed-off-by: Manu Abraham <manu@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-01-17 11:55:37 -02:00
Manu Abraham cc0e4aacaf V4L/DVB (13761): [Mantis] HIF I/O: Temporary workaround, use SBUF_OPDONE flag instead
Dnumgis got hit with this bug, using a temporary workaround
for the time being rather than digging deep at this point.

Signed-off-by: Manu Abraham <manu@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-01-17 11:55:37 -02:00
Sigmund Augdal 86c75c5c2b V4L/DVB (13760): [Mantis CA] CA_MODULE: Look for module status on driver load
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:37 -02:00
Manu Abraham 9c8679554d V4L/DVB (13759): [Mantis] HIF I/O: Use the LSB octet only
Thanks to Abylai Ospan for pointing this out.

Signed-off-by: Manu Abraham <manu@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-01-17 11:55:37 -02:00
Manu Abraham 2ec9b00bd0 V4L/DVB (13758): [Mantis CA] CAM_CONTROL: Use CAMREADY_IRQ event
Signed-off-by: Manu Abraham <manu@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-01-17 11:55:37 -02:00
Manu Abraham bb928a7a21 V4L/DVB (13757): [Mantis CA] CAM_CONTROL: Use FRDA_IRQ Events
Signed-off-by: Manu Abraham <manu@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-01-17 11:55:37 -02:00
Manu Abraham 05691cdbf4 V4L/DVB (13756): [Mantis CA] CAM_CONTROL: Use CAMCHANGE_IRQ events
Signed-off-by: Manu Abraham <manu@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-01-17 11:55:36 -02:00
Manu Abraham f9ce1c3f32 V4L/DVB (13755): [Mantis CA] CAM_CONTROL: Use appropriate flags
Signed-off-by: Manu Abraham <manu@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-01-17 11:55:36 -02:00
Manu Abraham 990f8d1e16 V4L/DVB (13754): [Mantis] CAM_CONTROL: Implement TS control
Signed-off-by: Manu Abraham <manu@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-01-17 11:55:36 -02:00
Manu Abraham fb6de9c5fe V4L/DVB (13753): [Mantis CA] SLOT_CONTROL: Implement Slot RESET
Signed-off-by: Manu Abraham <manu@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-01-17 11:55:36 -02:00
Manu Abraham b619f9f8a1 V4L/DVB (13752): [Mantis CA] CAM_CONTROL: All CAM control operations now handled by the worker thread
Signed-off-by: Manu Abraham <manu@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-01-17 11:55:36 -02:00
Manu Abraham b2d8f5eafd V4L/DVB (13751): [Mantis] GPIO_CONTROL: Do not toggle GPIO CW's on HIF operations
Signed-off-by: Manu Abraham <manu@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-01-17 11:55:36 -02:00
Manu Abraham 4d5a28efda V4L/DVB (13750): [Mantis] GPIO_CONTROL: Cache a given GPIO Bit Setup for a given event
Signed-off-by: Manu Abraham <manu@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-01-17 11:55:35 -02:00
Manu Abraham ac23f4c86c V4L/DVB (13749): [Mantis CA] CA_SLAVE: Do not change Slave Configuration setup
(Need to sanitize this cleanly for different Slaves)

Signed-off-by: Manu Abraham <manu@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-01-17 11:55:35 -02:00
Magnus Horlin ea30d81a96 V4L/DVB (13748): [Mantis/VP-2040] Add support for VP-2040 (TDA10023 frontend based)
Signed-off-by: Magnus Horlin <magnus@alefors.se>
Signed-off-by: Manu Abraham <manu@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-01-17 11:55:35 -02:00
Sigmund Augdal a0c59063a7 V4L/DVB (13747): [Mantis] Bug Fix!: Use Register Address rather than register field
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:35 -02:00
Manu Abraham fbe1e43abc V4L/DVB (13746): [Mantis CA] Bug: Remove duplicated symbol
Signed-off-by: Manu Abraham <manu@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-01-17 11:55:35 -02:00
Manu Abraham 2133ffbf08 V4L/DVB (13745): [Mantis CA] Add some debug statements
Signed-off-by: Manu Abraham <manu@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-01-17 11:55:35 -02:00
Manu Abraham 4e9fbeeedc V4L/DVB (13744): [Mantis CA] Use Module status to signal Slot events
Signed-off-by: Manu Abraham <manu@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-01-17 11:55:34 -02:00
Manu Abraham 6053240f5c V4L/DVB (13743): [Mantis CA] Use DVB_CA Tuple parser
Signed-off-by: Manu Abraham <manu@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-01-17 11:55:34 -02:00
Manu Abraham c9a750c909 V4L/DVB (13742): [Mantis] Implement PCMCIA I/O Rd/Wr operations
Signed-off-by: Manu Abraham <manu@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-01-17 11:55:34 -02:00
Manu Abraham d8b14f8a76 V4L/DVB (13741): [Mantis] Implement HIF Mem Read/Write operations
Signed-off-by: Manu Abraham <manu@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-01-17 11:55:34 -02:00
Manu Abraham 12855cac87 V4L/DVB (13740): [Mantis] Schedule the work instead of handling the task directly
Signed-off-by: Manu Abraham <manu@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-01-17 11:55:34 -02:00
Manu Abraham 3062b1571a V4L/DVB (13739): [Mantis] Event Manager: Handle Masked events only
Signed-off-by: Manu Abraham <manu@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-01-17 11:55:34 -02:00
Manu Abraham d9dd5f7168 V4L/DVB (13738): [Mantis] Enable IRQ0 events
Signed-off-by: Manu Abraham <manu@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-01-17 11:55:33 -02:00
Manu Abraham 50d8260276 V4L/DVB (13737): [Mantis] Register the CA device, dummy functions for now
Signed-off-by: Manu Abraham <manu@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-01-17 11:55:33 -02:00
Manu Abraham 8ce571f5e7 V4L/DVB (13736): [Mantis] Implement CAM Plug IN and Unplug events
Sigh! how i wish things were simpler ...

Signed-off-by: Manu Abraham <manu@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-01-17 11:55:33 -02:00
Manu Abraham fadfa070d3 V4L/DVB (13735): [Mantis] Implement the Event Manager tasklet
Signed-off-by: Manu Abraham <manu@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-01-17 11:55:33 -02:00
Manu Abraham d575571e8e V4L/DVB (13734): [Mantis] Initial go at an Event Manager
Signed-off-by: Manu Abraham <manu@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-01-17 11:55:33 -02:00
Manu Abraham bc4ed42fdf V4L/DVB (13733): [Mantis] Start with the PCMCIA interface
Signed-off-by: Manu Abraham <manu@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-01-17 11:55:33 -02:00
Manu Abraham dd827da1e7 V4L/DVB (13732): [Mantis] Add in some Link Layer definitions
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 d4f4ae046d V4L/DVB (13731): [Mantis] Add in a license header
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 cb428c3fe9 V4L/DVB (13730): [Mantis] Add in some UART definitions
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 23fc1b2b00 V4L/DVB (13729): [Mantis] Add in a license header
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 9ce3946083 V4L/DVB (13728): [Mantis] Add in some Host Interface definitions
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 1159531a93 V4L/DVB (13727): [Mantis/VP-1041] Bugfix: Sigh! Don't look for the STOP bit
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 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
hartleys 0e05a613f4 drivers/media/dvb/dvb-core/dvb_net.c: use %pM to show MAC address
Use the %pM kernel extension to display the MAC address and mask.

The only difference in the output is that the output is shown in
the usual colon-separated hex notation.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: David S. Miller <davem@davemloft.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
2010-01-07 01:13:58 -08:00
Clemens Ladisch 1f8fef7b33 firewire: add fw_csr_string() helper function
The core (sysfs attributes), the firedtv driver, and possible future
drivers all read strings from some configuration ROM directory.  Factor
out the generic code from show_text_leaf() into a new helper function,
modified slightly to handle arbitrary buffer sizes.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
2009-12-29 19:58:17 +01: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