Commit Graph

8639 Commits (83905c134571642d7e8a1e51ae9f26bd3a3ad82a)

Author SHA1 Message Date
Stefan Richter 56411f49f6 V4L/DVB (13397): firedtv: move remote control workqueue handling into rc source file
Preparation for the port of firedtv to the firewire-core kernel API:
Canceling of the remote control workqueue job is factored into
firedtv-rc.c.  Plus trivial whitespace change.

Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-12-05 18:41:41 -02:00
Julia Lawall b921d929f4 V4L/DVB (13396): correct initialization of audio_mode
This initialization of the value of audio_mode is the one used if nothing
matches in the subsequent switch.  The variable audio_mode is subsequently
assigned to constants such as TUNER_AUDIO_MONO and TUNER_AUDIO_STEREO.
TUNER_AUDIO_STEREO has the same value as V4L2_TUNER_MODE_STEREO, so it
would seem better to use that value here.

Signed-off-by: Julia Lawall <julia@diku.dk>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-12-05 18:41:40 -02:00
hiranotaka@zng.jp c4c1e295d2 V4L/DVB (13394): pt1: Support FE_READ_SNR
Signed-off-by: HIRANO Takahito <hiranotaka@zng.info>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-12-05 18:41:40 -02:00
Marton Nemeth 012880be6e V4L/DVB (13389): gspca - pac7302: Handle return values in sd_start().
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>
2009-12-05 18:41:39 -02:00
Marton Nemeth 23fbee6f88 V4L/DVB (13388): gspca - pac7302: Add white balance control.
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>
2009-12-05 18:41:39 -02:00
Jean-Francois Moine b760812ed7 V4L/DVB (13387): gspca - main: Fix a compilation warning.
Signed-off-by: Jean-Francois Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-12-05 18:41:39 -02:00
Jean-Francois Moine 77ee33184f V4L/DVB (13386): gspca - main: Change version to 2.8.0.
Signed-off-by: Jean-Francois Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-12-05 18:41:38 -02:00
Márton Németh 265a8098e7 V4L/DVB (13385): gspca - pac7302: Add red and blue balance control.
The valid values for these controls are 0..3 (lower two bits) which was
identified by trial and error on Labtec Webcam 2200 (USB ID 093a:2626).
The upper 6 bits are ignored on page 0, registers 0xc5 and 0xc7 by the camera.

Signed-off-by: Márton Németh <nm127@freemail.hu>
Signed-off-by: Jean-Francois Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-12-05 18:41:38 -02:00
Jean-Francois Moine d5aa3856fd V4L/DVB (13384): gspca - sonixj: Optimize code and add some comments.
- the i2c base address is now taken from the sn9c1xx register table

Signed-off-by: Jean-Francois Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-12-05 18:41:37 -02:00
Márton Németh b1784b3377 V4L/DVB (13383): gspca - pac7311/pac7302: Propagate error to higher level software.
The usb_control_msg() can fail any time. Only continue writing
sequence if there was no error with the previous write. If there
was any problem stop sending URBs and propagate the error to the
gspca_main.

Signed-off-by: Márton Németh <nm127@freemail.hu>
Signed-off-by: Jean-Francois Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-12-05 18:41:37 -02:00
Márton Németh 67c98f72e1 V4L/DVB (13382): gspca - pac7302: Remove redundant stream off command.
The stream off command is sent to the device twice, one is enough.

Signed-off-by: Márton Németh <nm127@freemail.hu>
Signed-off-by: Jean-Francois Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-12-05 18:41:37 -02:00
Roel Kluin 3a054627cc V4L/DVB (13380): sms-cards: make id unsigned in sms_get_board()
Make id signed so we can't get an invalid pointer when we pass a negative
id.

Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-12-05 18:41:36 -02:00
Alexander Strakh 2b588db82d V4L/DVB (13379): quickcam_messenger: possible buffer overflow while use strncat
In driver ./drivers/media/video/usbvideo/quickcam_messenger.c in line 91:

  91         usb_make_path(dev, cam->input_physname, sizeof(cam->input_physname));

After this line we use strncat:

  92         strncat(cam->input_physname, "/input0", sizeof(cam->input_physname));

where sizeof(cam->input_physname) returns length of cam->input_phisname
without length for null-symbol.  But this parameter must be - "maximum
numbers of bytes to copy", i.e.:
sizeof(cam->input_physname)-strlen(cam->input_physname)-1.

In this case, after call to usb_make_path the similar drivers use strlcat.

Like in: drivers/hid/usbhid/hid-core.c:
1152         usb_make_path(dev, hid->phys, sizeof(hid->phys));
1153         strlcat(hid->phys, "/input", sizeof(hid->phys));

Found by Linux Driver Verification Project.

Use strlcat instead of strncat.

Signed-off-by: Alexander Strakh <strakh@ispras.ru>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-12-05 18:41:36 -02:00
Alexander Strakh caac970f91 V4L/DVB (13378): konicawc.c: possible buffer overflow while use strncat
In driver ./drivers/media/video/usbvideo/konicawc.c in line 227:

227         usb_make_path(dev, cam->input_physname, sizeof(cam->input_physname));

After this line we use strncat:

228         strncat(cam->input_physname, "/input0", sizeof(cam->input_physname));

where sizeof(cam->input_physname) returns length of cam->input_phisname
without length for null-symbol.  But this parameter must be - "maximum
numbers of bytes to copy", i.e.:
sizeof(cam->input_physname)-strlen(cam->input_physname)-1.

In this case, after call to usb_make_path the similar drivers use strlcat.

Like in drivers/hid/usbhid/hid-core.c:
1152         usb_make_path(dev, hid->phys, sizeof(hid->phys));
1153         strlcat(hid->phys, "/input", sizeof(hid->phys));

Found by Linux Driver Verification Project.

Use strlcat instead of strncat.

Signed-off-by: Alexander Strakh <strakh@ispras.ru>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-12-05 18:41:35 -02:00
Jonathan Corbet 38a54f35a0 V4L/DVB (13377): make struct videobuf_queue_ops constant
The videobuf_queue_ops function vector is not declared constant, but
there's no need for the videobuf layer to ever change it.  Make it const
so that videobuf users can make their operations const without warnings.

Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-12-05 18:41:35 -02:00
David Wong b18bd1d880 V4L/DVB (13376): cx-usb: add Mygica D689 DMB-TH USB support
X-Patchwork-Id: 55873

Add support for cxusb card Mygica D689 DBM-TH USB

Signed-off-by: David T. L. Wong <davidtlwong@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-12-05 18:41:35 -02:00
David T. L. Wong ea5697fe9e V4L/DVB (13375): cx23885: Add support for Mygica X8558Pro DMB-TH
Adds support for cx23885 card Mygica X8558 Pro DMB-TH

Signed-off-by: David T. L. Wong <davidtlwong@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-12-05 18:41:34 -02:00
David T.L. Wong ec27b6aafb V4L/DVB (13374): AltoBeam ATBM8830 GB20600-2006(DMB-TH) demodulator
Adds support for Maxim MAX2165 silicon tuner.

It was tested on Mygica X8558Pro, which has MAX2165, ATBM8830 and CX23885.

Signed-off-by: David T. L. Wong <davidtlwong@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-12-05 18:41:34 -02:00
David T.L. Wong 95963cbcd0 V4L/DVB (13373): Maxium MAX2165 silicon tuner
Adds support for Maxim MAX2165 silicon tuner.

It is tested on Mygica X8558Pro, which has MAX2165, ATBM8830 and CX23885

Signed-off-by: David T. L. Wong <davidtlwong@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-12-05 18:41:33 -02:00
Ignacio de Miguel Diaz 5232263a7d V4L/DVB (13368): af9015: support for Sveon STV20 Tuner USB DVB-T HDTV
Add USB ID 1b80:e39d for Sveon STV20 Tuner USB DVB-T HDTV.

Signed-off-by: Ignacio de Miguel Diaz <imigueldiaz@gmail.com>
Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-12-05 18:41:33 -02:00
Antti Palosaari 2bf290be4f V4L/DVB (13364): ec168: add new driver for E3C EC168 DVB USB
E3C EC168 DVB USB driver

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-12-05 18:41:33 -02:00
Antti Palosaari a15c7b42b2 V4L/DVB (13363): ec100: add new driver for E3C EC100 DVB-T demodulator
E3C EC100 DVB-T demodulator driver

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-12-05 18:41:32 -02:00
Manu Abraham c1426df678 V4L/DVB (13361): stv090x: fix TS corruption with High Symbol Rate streams
With a lower bandwidth setup, the Transport Stream gets corrupted due to
TSFIFO overrun. The patch fixes the issue.

The issue is seen with Transport Streams having a Symbol Rate of 22MSPS
and/or greater.

Signed-off-by: Manu Abraham <manu@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-12-05 18:41:32 -02:00
Andreas Regel 7c236e37dd V4L/DVB (13360): stv090x: fix the calculation of the r divider in stv6110x_set_frequency
It had always the value 3 no matter what frequency was given.

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>
2009-12-05 18:41:31 -02:00
Andreas Regel 7b035da93e V4L/DVB (13359): stv090x: adds corrections of some register values
While here, also do some blind scan related fixes.

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>
2009-12-05 18:41:31 -02:00
Andreas Regel 1d4361718a V4L/DVB (13358): stv090x: add an additional check for packet delineator lock in stv090x_read_status in case of a tuned DVB-S2 signal
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>
2009-12-05 18:41:31 -02:00
Andreas Regel c4fa649a3b V4L/DVB (13357): stv090x: adds an additional check for signal presence based on AGC1
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>
2009-12-05 18:41:30 -02:00
Andreas Regel a4978a83e5 V4L/DVB (13356): stv090x: fixes signal lock logic
This patch contains several fixes for the stv090x driver:
- added missing else
- use calculated timeout instead of fixed one
- use correct frequency when doing zigzag scan
- added missing read of GENCFG register

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>
2009-12-05 18:41:30 -02:00
Andreas Regel b4a4248d56 V4L/DVB (13355): stv090x: fixes calculation of AGC2 and uses a different AGC2 threshold for cut 3 chips
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>
2009-12-05 18:41:29 -02:00
Andreas Regel b671a8d4b6 V4L/DVB (13354): stv090x: fixes some typos like wrong register or variable names
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>
2009-12-05 18:41:29 -02:00
Andreas Regel dbeb7dbf86 V4L/DVB (13353): stv090x: fixes STR and SNR calculation and normalizes the value into the 0..0xFFFF range
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>
2009-12-05 18:41:29 -02:00
Andreas Regel 45433d3f8d V4L/DVB (13352): stv090x: fixes errors and typos in register definitions
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>
2009-12-05 18:41:28 -02:00
Andreas Regel c879d8cef4 V4L/DVB (13351): stv090x: increases search range based on symbol rate
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>
2009-12-05 18:41:28 -02:00
Michael Krufky 7fec6fee56 V4L/DVB (13349): cx23885: Enable IR input keypress handling for the Hauppauge WinTV HVR-1290
The IR on the HVR-1290 is identical to that of the HVR-1850

Signed-off-by: Michael Krufky <mkrufky@kernellabs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-12-05 18:41:27 -02:00
Michael Krufky 73a5f4196d V4L/DVB (13348): cx23885: update model matrix for models 85021 and 85721
Signed-off-by: Michael Krufky <mkrufky@kernellabs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-12-05 18:41:27 -02:00
Michael Krufky aee0b24c05 V4L/DVB (13347): cx23885: add digital television support for Hauppauge WinTV-HVR1290
Signed-off-by: Michael Krufky <mkrufky@kernellabs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-12-05 18:41:27 -02:00
Igor M. Liplianin a3a4f7e167 V4L/DVB (13341): stv0900: big rework to support cut 3.0.
Patch 4 of 4.
Also patch changes logic to prevent code repetitions and big indents.
It makes checkpatch silent :)

Signed-off-by: Igor M. Liplianin <liplianin@netup.ru>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-12-05 18:41:26 -02:00
Igor M. Liplianin 1e0c397d5e V4L/DVB (13340): stv0900: big rework to support cut 3.0.
Patch 3 of 4.
Also patch changes logic to prevent code repetitions and big indents.
It makes checkpatch silent :)

Signed-off-by: Igor M. Liplianin <liplianin@netup.ru>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-12-05 18:41:26 -02:00
Igor M. Liplianin ab7134f1bd V4L/DVB (13339): stv0900: big rework to support cut 3.0.
Patch 2 of 4.
Also patch changes logic to prevent code repetitions and big indents.
It makes checkpatch silent :)

Signed-off-by: Igor M. Liplianin <liplianin@netup.ru>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-12-05 18:41:25 -02:00
Igor M. Liplianin 46960eea9c V4L/DVB (13338): stv0900: big rework to support cut 3.0.
Patch 1 of 4.
Also patch changes logic to prevent code repetitions and big indents.
It makes checkpatch silent :)

Signed-off-by: Igor M. Liplianin <liplianin@netup.ru>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-12-05 18:41:25 -02:00
Igor M. Liplianin 502cd96d5b V4L/DVB (13337): Change str snr scale for stv0900/903 and Netup Dual DVB-S2 card.
Signed-off-by: Igor M. Liplianin <liplianin@netup.ru>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-12-05 18:41:25 -02:00
Igor M. Liplianin 29372a8dae V4L/DVB (13336): stv0900: config definition for single/dual mode
Signed-off-by: Igor M. Liplianin <liplianin@netup.ru>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-12-05 18:41:24 -02:00
Abylay Ospan 9329fb5b73 V4L/DVB (13335): stv0900: fix diseqc support for NetUP card
Signed-off-by: Abylay Ospan <aospan@netup.ru>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-12-05 18:41:24 -02:00
Abylay Ospan 873688cd30 V4L/DVB (13334): stv6110: add configurable gain
It has positive effect for NetUP Dual DVB-S2 CI card.

Signed-off-by: Abylay Ospan <aospan@netup.ru>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-12-05 18:41:23 -02:00
Devin Heitmueller adcd8de6de V4L/DVB (13332): s5h1409: remove a set register that would cause lock to be lost.
On particularly weak signals, changing register 0xab after setting the
interleave mode will cause the FEC lock to get lost (while still holding the
EQ lock).  So remove the write entirely, which seems to have had no adverse
effect in either of my ClearQAM environments (and in particular resolves the
customer's reported issue).

Also flip around the order of the amhum optimization and the interleave setup
to be consistent with the windows driver, which has the side-benefit of doing
them both in the same call (since the amhum optimization can only be done once
the interleave setup).

This work was sponsored by ONELAN Limited.

Signed-off-by: Devin Heitmueller <dheitmueller@kernellabs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-12-05 18:41:23 -02:00
Devin Heitmueller 48c511ed67 V4L/DVB (13331): mxl5005s: provide ability to override QAM gain for HVR-1600
The HVR-1600 doesn't use the standard mechanism for computing the gain when
in QAM mode, instead always forcing it to be 0x02.  Provide the ability to
override the algorithm on a per-board basis.

This change results in an improvement of 0.4-0.6 dB for QAM tuning.

This work was sponsored by ONELAN Limited.

Cc: Steven Toth <stoth@kernellabs.com>
Signed-off-by: Devin Heitmueller <dheitmueller@kernellabs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-12-05 18:41:23 -02:00
Devin Heitmueller f0cd44b4a1 V4L/DVB (13330): s5h1409: properly handle QAM optimization after lock achieved
The sh51409 driver was only doing the QAM optimization a single time, and it
would only occur if you received a lock instantaneously after the tuning
request.  Restructure the code so that the optimization occurs once you reach
a signal lock.

Note that this depends on the caller polling for status, but we don't have
much choice at this point without an independent thread monitoring the lock
status.  Also, at this point pretty much every application polls for status
lock after doing the tune, so the likelihood of the optimization not occurring
in the real world is pretty low.

The state machine has also been reworked such that setting the interleave mode
is now a dependency of doing the QAM optimization.  Before both were mutually
exclusive, which was not consistent with the Windows driver.  We now have a
single state machine that controls both.

The changes as-is are only enabled for the HVR-1600.  Once the changes are
tested with some of the other boards, this change should be made generic and
the "_legacy" functions should be removed.

This work was sponsored by ONELAN Limited.

Signed-off-by: Devin Heitmueller <dheitmueller@kernellabs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-12-05 18:41:22 -02:00
Devin Heitmueller af5c8e1523 V4L/DVB (13329): s5h1409: provide HVR-1600 specific optimizations
Perform some optimization of the register configuration based on a trace
of the HVR-1600 Windows i2c traffic (and consultation with Steven Toth).
Note that some of these values may be able to be moved into the common driver,
but I am holding off on that until they can be tested with other boards.

This work was sponsored by ONELAN Limited.

Cc: Steven Toth <stoth@kernellabs.com>
Signed-off-by: Devin Heitmueller <dheitmueller@kernellabs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-12-05 18:41:22 -02:00
Mauro Carvalho Chehab f57b17c395 V4L/DVB (13328): em28xx: Add chip ID for em2800
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-12-05 18:41:21 -02:00
Mauro Carvalho Chehab fc099f0e0e V4L/DVB (13327): em28xx: fix alt modprobe parameter
It seems that some patch broke alt modprobe parameter. Fix it to allow
changing alternate interfaces during module load and at runtime.

If changed during runtime, you'll need to stop a and restart stream for
the parameter to be used.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-12-05 18:41:21 -02:00
Marton Nemeth 8337fc3053 V4L/DVB (13325): gspca - pac7302/pac7311: Fix buffer overrun.
The reg_w_seq() function expects the sequence length in entries
and not in bytes. One entry in init_7302 and init_7311 is two
bytes and not one.

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>
2009-12-05 18:41:21 -02:00
Marton Nemeth 4f7309e278 V4L/DVB (13324): gspca - pac7302/pac7311: Handle return value of usb_control_msg().
The function usb_control_msg() can return error any time so at least
warn the user if an error happens. No message is printed in case of
normal operation.

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>
2009-12-05 18:41:20 -02:00
Jean-Francois Moine 56205cc0dd V4L/DVB (13323): gspca - zc3xx: Adjust the exchanges of sensors mi0360soc and pb0330.
- the pb03303x exchanges were the mi0360soc ones
- add the new sensor mi0360soc
- the new exchanges are taken from the info file of the ms-win driver
  of the webcams 0ac8:301b and 0ac8:303b (vm30x.inf)

Signed-off-by: Jean-Francois Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-12-05 18:41:20 -02:00
Laurent Pinchart 350d6407f8 V4L/DVB (13310): uvcvideo: Return -EINVAL instead of -ENODEV in read()
-EINVAL is required by the V4L2 specification. -ENODEV is simply wrong
as the device exists.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-12-05 18:41:19 -02:00
Laurent Pinchart 3bc766ad37 V4L/DVB (13308): uvcvideo: Add support for MSI StarCam 370i webcams
The MSI StarCam 370i (1b3b:2951) requires the MINMAX quirk. Add a
corresponding entry in the device IDs list.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-12-05 18:41:19 -02:00
Jean-Francois Moine 5b34e3e4eb V4L/DVB (13306): gspca - sonixj: Change the copyright.
Signed-off-by: Jean-Francois Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-12-05 18:41:19 -02:00
Jean-Francois Moine 0939e26669 V4L/DVB (13305): gspca - sonixj: The V flip control does not exist for all sensors.
Signed-off-by: Jean-Francois Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-12-05 18:41:18 -02:00
Jean-Francois Moine 98941e4dad V4L/DVB (13304): gspca - sonixj: Don't access the sensor when setting the bridge.
Signed-off-by: Jean-Francois Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-12-05 18:41:18 -02:00
Jean-Francois Moine 3fccb774ef V4L/DVB (13303): gspca - sonixj: Change sensor and om6802 exchanges.
- the sensors are now initialized sooner
- om6802:
  . set some parameters in factory mode
  . lack of some parameters
  . gpio adjustments

Signed-off-by: Jean-Francois Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-12-05 18:41:17 -02:00
Jean-Francois Moine a782636c26 V4L/DVB (13302): gspca - sonixj: Fix some bad values of sensor om6802.
- sensor address is 0x34
- sensor i2c is 100 kHz

Signed-off-by: Jean-Francois Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-12-05 18:41:17 -02:00
Jean-Francois Moine 23a98274cc V4L/DVB (13301): gspca - sonixj: Simplify the sensor init exchanges.
Signed-off-by: Jean-Francois Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-12-05 18:41:16 -02:00
Marton Nemeth 1408b84729 V4L/DVB (13300): gspca - pac7302/pac7311: Separate the two subdrivers.
All PAC7311 specific functions remain in pac7311.c. All PAC7302 specific
functions are moved to pac7302.c. The USB device table is also divided into
two parts. This makes it possible to remove the sensor specific decisions
from different functions and also remove sensor infromation from the USB
device table.

The common functions are just copied to both subdrivers. These common
functions can be separated later to a common file or helper module.

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>
2009-12-05 18:41:16 -02:00
Marton Nemeth cc409c0efb V4L/DVB (13299): gspca - pac7311: Extract pac_start_frame.
Creating the start of the frame is done in the same way for pac7302
and for pac7311. Extract this common part to the pac_start_frame()
function.

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>
2009-12-05 18:41:16 -02:00
Marton Nemeth a6b69e409a V4L/DVB (13298): gspca - pac207/pac7311/mr97310a: Simplify pac_find_sof.
Remove struct sd dependency from pac_find_sof() function implementation.
This step prepares separation of pac7302 and pac7311 specific parts of
struct sd.

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>
2009-12-05 18:41:15 -02:00
Sergio C Fortier c86c82b74f V4L/DVB (13297): dib0700_devices: EvolutePC TvWay+ USB ISDB-Tb remote control support
Patch for EvolutePC TvWay+ USB ISDB-Tb remote control support.

[dougsland@redhat.com: fixed malformed patch]
Cc: Patrick Boettcher <pboettcher@dibcom.fr>
Signed-off-by: Sergio C Fortier <sergiofortier@yahoo.com.br>
Signed-off-by: Douglas Schilling Landgraf <dougsland@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-12-05 18:41:15 -02:00
Éric Piel 7dee9d1c05 V4L/DVB (13295): sms1xxx: load smsdvb also for the hauppauge tiger cards
load smsdvb also for the hauppauge tiger cards

[dougsland@redhat.com: fixed rejects due changes in sms-cards.c]
Signed-off-by: Éric Piel <eric.piel@tremplin-utc.net>
Acked-by: Michael Krufky <mkrufky@kernellabs.com>
Signed-off-by: Douglas Schilling Landgraf <dougsland@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-12-05 18:41:14 -02:00
Akihiro Tsukada 9ebef973b4 V4L/DVB (13294): dvb-usb-friio: cleaning up unnecessary functions
This patch removes some fe->ops.X() functions which do nothing more useful than the default.

Signed-off-by: Akihiro Tsukada <tskd2@yahoo.co.jp>
Signed-off-by: Douglas Schilling Landgraf <dougsland@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-12-05 18:41:14 -02:00
Akihiro Tsukada ad12f07bf2 V4L/DVB (13293): dvb-usb-friio: return the correct DTV_DELIVERY_SYSTEM
This patch makes the driver return the correct DTV_DELIVERY_SYSTEM.

The driver previously returned SYS_UNDEFINED for DTV_DELIVERY_SYSTEM property,
as it lacked any driver specific S2API support.

Signed-off-by: Akihiro Tsukada <tskd2@yahoo.co.jp>
Signed-off-by: Douglas Schilling Landgraf <dougsland@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-12-05 18:41:14 -02:00
Sebastian Andrzej Siewior 6f901a9919 V4L/DVB (13292): tvp514x: recognize the error case in tvp514x_read_reg()
i2c_smbus_read_byte_data() returns a negative value on error. It is very
likely to be != -1 (-EPERM).

Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Acked-by: Vaibhav Hiremath <hvaibhav@ti.com>
Signed-off-by: Douglas Schilling Landgraf <dougsland@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-12-05 18:41:13 -02:00
Filipe Rosset 480be1851a V4L/DVB (13290): em28xx-dvb: Convert printks to em28xx_err and em28xx_info
Convert printks to em28xx_err and em28xx_info

Signed-off-by: Filipe Rosset <rosset.filipe@gmail.com>
Signed-off-by: Douglas Schilling Landgraf <dougsland@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-12-05 18:41:13 -02:00
Filipe Rosset 0bc23083cf V4L/DVB (13289): em28xx-audio: Convert printks to em28xx_err
Convert printks to em28xx_err.

Signed-off-by: Filipe Rosset <rosset.filipe@gmail.com>
Signed-off-by: Douglas Schilling Landgraf <dougsland@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-12-05 18:41:13 -02:00
Peter Huewe 9710e7a77a V4L/DVB (13288): adding __init/__exit macros to various drivers
Trivial patch which adds the __init/__exit macros to the module_init/
module_exit functions of the following drivers in media video:
    drivers/media/video/ivtv/ivtv-driver.c
    drivers/media/video/cx18/cx18-driver.c
    drivers/media/video/davinci/dm355_ccdc.c
    drivers/media/video/davinci/dm644x_ccdc.c
    drivers/media/video/saa7164/saa7164-core.c
    drivers/media/video/saa7134/saa7134-core.c
    drivers/media/video/cx23885/cx23885-core.c

Cc: Hermann Pitton <hermann-pitton@arcor.de>
Acked-by: Steven Toth <stoth@kernellabs.com>
Signed-off-by: Peter Huewe <peterhuewe@gmx.de>
Acked-by: Andy Walls <awalls@radix.net>
Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Acked-by: Muralidharan Karicheri <m-karicheri2@ti.com>
Signed-off-by: Douglas Schilling Landgraf <dougsland@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-12-05 18:41:12 -02:00
Roel Kluin 0b66cf9037 V4L/DVB (13285): vpfe_capture: keep index within bound in vpfe_cropcap()
If vpfe_dev->std_index equals ARRAY_SIZE(vpfe_standards), that is
one too large.

Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
Acked-by: Muralidharan Karicheri <m-karicheri2@ti.com>
Signed-off-by: Douglas Schilling Landgraf <dougsland@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-12-05 18:41:12 -02:00
Mauro Carvalho Chehab 648732fcef V4L/DVB (13271a): Fix a badly solved merge conflict
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-12-05 18:41:11 -02:00
Abylay Ospan 26b9d6c0b0 V4L/DVB (13271): TS speed check. Logging transport stream speed in Kbits per second
[mchehab@redhat.com: add asm/div64.h and allocate vars only if dvb_demux_speedcheck specified]
Signed-off-by: Abylay Ospan <aospan@netup.ru>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-12-05 18:41:11 -02:00
Michael Krufky 117e1348f8 V4L/DVB (13269): saa7134: codingstyle: use /* style comments */ instead of //
Signed-off-by: Michael Krufky <mkrufky@kernellabs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-12-05 18:41:11 -02:00
Theodore Kilgore 542821d8d0 V4L/DVB (13267): gspca_mr97310a: Change brightness for VGA type 1 cameras downward
gspca_mr97310a: Change brightness for VGA type 1 cameras downward

Signed-off-by: Theodore Kilgore <kilgota@banach.math.auburn.edu>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-12-05 18:41:10 -02:00
Theodore Kilgore b4b84deede V4L/DVB (13266): gspca_mr97310a: Fix / update some comments
gspca_mr97310a: Fix / update some comments

Signed-off-by: Theodore Kilgore <kilgota@banach.math.auburn.edu>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-12-05 18:41:10 -02:00
Theodore Kilgore b31210d737 V4L/DVB (13265): gspca_mr97310a: Partly back off red gain change for Sakar Digital VGA camera
gspca_mr97310a: Partly back off red gain change for Sakar Digital VGA camera

Signed-off-by: Theodore Kilgore <kilgota@banach.math.auburn.edu>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-12-05 18:41:09 -02:00
Michael Krufky 972aacc298 V4L/DVB (13262): tda18271: fix regression preventing std map override from taking effect
In the changeset entitled, "tda18271: add support for the set_config method",
the initialization order was changed such that the standard map overrides
were being applied before loading the default standard map, based on the
stepping of the silicon.  This changeset restores the proper order by
processing the standard map overrides both within the tda18271_set_config()
and the tda18271_attach() functions, after we read the id register of the
tuner.

Thanks to Michael Obst for his testing, helping me to identify the regression.

Signed-off-by: Michael Krufky <mkrufky@kernellabs.com>
Signed-off-by: Michael Obst <mike.obst@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-12-05 18:41:09 -02:00
Michael Obst 0700adec9e V4L/DVB (13260): saa7134: add support for Leadtek Winfast DTV-1000S remote control
Signed-off-by: Michael Obst <mike.obst@gmail.com>
Signed-off-by: Michael Krufky <mkrufky@kernellabs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-12-05 18:41:08 -02:00
Michael Krufky 53c8ec5e0e V4L/DVB (13259): saa7134: fix badly merged DTV1000S patch
As pointed out by Hermann Pitton, it turns out that the DTV1000S card's
analog entry made it into the #if 0 flyvideo tweaks in saa7134-cards.c
and is not valid there.

This patch fixes the problem.

Cc: hermann pitton <hermann-pitton@arcor.de>
Signed-off-by: Michael Krufky <mkrufky@kernellabs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-12-05 18:41:08 -02:00
Andy Walls 928213aad7 V4L/DVB (13253): cx23885: CodingStyle fix
Add whitespace around binary operators in cx23888-ir.c

Signed-off-by: Andy Walls <awalls@radix.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-12-05 18:41:08 -02:00
Jean-Francois Moine 7fb101ae25 V4L/DVB (13251): gspca - sonixj: Cleanup code and change some comments.
Signed-off-by: Jean-Francois Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-12-05 18:41:07 -02:00
Jean-Francois Moine 721ecbcbea V4L/DVB (13250): gspca - zc3xx: Add some delays and warn on i2c errors.
This patch fixes the kernel bug 14195 (random errors - bad images -
with the webcam 10fd:8050 - sensor tas5130cxx).

Signed-off-by: Jean-Francois Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-12-05 18:41:07 -02:00
Jean-Francois Moine 56e93ed9cf V4L/DVB (13249): gspca - pac7311: Webcam 093a:2628 added.
Signed-off-by: Jean-Francois Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-12-05 18:41:06 -02:00
Michael Krufky d6eef49478 V4L/DVB (13247): tuner-core: dont force every tuner to set frequency at startup
Setting the tuner frequency at the same time as initializing the other devices
on the i2c bus can cause problems on devices that require firmware download or
extensive calibration proceduces during initialization.

This change allows us to prevent the tune at startup for devices that perform
better without it.

Signed-off-by: Michael Krufky <mkrufky@kernellabs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-12-05 18:41:06 -02:00
Theodore Kilgore 64f4d9a367 V4L/DVB (13245): gspca_mr97310a: Change blue gain setting for Sakar Digital VGA camera
gspca_mr97310a: Change blue gain setting for Sakar Digital VGA camera

Signed-off-by: Theodore Kilgore <kilgota@banach.math.auburn.edu>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-12-05 18:41:06 -02:00
Theodore Kilgore 1160a3818e V4L/DVB (13244): gspca_mr97310a: Fix / update some comments
gspca_mr97310a: Fix / update some comments

Signed-off-by: Theodore Kilgore <kilgota@banach.math.auburn.edu>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-12-05 18:41:05 -02:00
Aurelien Jacobs 8ac246cb8f V4L/DVB (13243): gscpa_mr97310a: Add Trust Spyc@m 100 USB ID
gscpa_mr97310a: Add Trust Spyc@m 100 USB ID

Signed-off-by: Aurelien Jacobs <aurel@gnuage.org>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-12-05 18:41:05 -02:00
Hans de Goede 065b6f7a34 V4L/DVB (13242): gspca_mr97310a: Add minimum clock divider control
When "shooting" certain (quite rare) scenes, the mr97310's compression is not
effective and it cannot keep up with the data stream. This patch adds a
minimum clock divider control, which influences the maximum framerate,
libv4l will automatically increase this minimum clockdiv control when it
detect the cam cannot keep up.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-12-05 18:41:04 -02:00
Roel Kluin f14a2972e4 V4L/DVB (13241): Cleanup redundant tests on unsigned
The variables are unsigned so the test `>= 0' is always true,
the `< 0' test always fails. In these cases the other part of
the test catches wrapped values.

Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-12-05 18:41:04 -02:00
Johann Friedrichs 311c70e1f9 V4L/DVB (13239): saa7146: fix memory leakage in pagetable-handling
In buffer_release() the previously allocated pagetables are not
freed,  which might result in a memory leak in certain application
use-cases, where the frame format is changed from planar format to
non-planar format. The fix explicitely frees the page tables when a
format change is done and when buffer_release() is called.

Signed-off-by: Johann Friedrichs <johann.friedrichs@web.de>
Signed-off-by: Michael Hunold <hunold@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-12-05 18:41:04 -02:00
Laurent Pinchart 622b828ab7 V4L/DVB (13238): v4l2_subdev: rename tuner s_standby operation to core s_power
Upcoming I2C v4l2_subdev drivers need a way to control the subdevice
power state from the core. This use case is already partially covered by
the tuner s_standby operation, but no way to explicitly come back from
the standby state is available.

Rename the tuner s_standby operation to core s_power, and fix tuner
drivers accordingly. The tuner core will call s_power(0) instead of
s_standby(). No explicit call to s_power(1) is required for tuners as
they are supposed to wake up from standby automatically.

[mchehab@redhat.com: CodingStyle fix]
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-12-05 18:41:03 -02:00
Jean Delvare 7ef68e60d9 V4L/DVB (13236): ir-kbd-i2c: Don't reject unknown I2C addresses
I do not think it makes sense any longer for ir-kbd-i2c to reject
devices at unknown I2C addresses. The caller can provide all the
details about how the device should be handled. Having to add new
addresses to ir-kbd-i2c so that they aren't rejected is a pain we
don't need. Unsupported devices will be spotted a few lines later
anyway.

This already lets us unlist 2 addresses (0x7a and 0x2d) for which
handling details are always provided by the caller (saa7134-input).
Hopefully we can remove more in the future.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-12-05 18:41:03 -02:00
Jean Delvare 30093e8bf9 V4L/DVB (13235): saa7134: Complete the IR address list
Google is pretty clear that the HVR 1110 IR chip is always at address
0x71 and the BeholdTV IR chip is always at address 0x2d. This
completes the list of IR device addresses for the SAA7134-based
adapters, and we no longer need to probe any of them.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-12-05 18:41:02 -02:00
Jean Delvare aef02aa1e2 V4L/DVB (13234): IR device at I2C address 0x7a
The i2c core prevents us from probing I2C address 0x7a because it's
not a valid 7-bit address (reserved for 10-bit addressing.) So we must
stop probing this address, and explicitly list all adapters which use
it. Under the assumption that only the Upmost Purple TV adapter uses
this invalid address, this fix should do the trick.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Acked-by: hermann pitton <hermann-pitton@arcor.de>
Acked-by: Jarod Wilson <jarod@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-12-05 18:41:02 -02:00
Jean Delvare 43e16ea241 V4L/DVB (13233): i2c_board_info can be local
Recent fixes to the em28xx and saa7134 drivers have been overzealous.
While the ir-kbd-i2c platform data indeed needs to be persistent, the
struct i2c_board_info doesn't, as it is only used by i2c_new_device().

So revert a part of the original fixes, to save some memory.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Acked-by: Jarod Wilson <jarod@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-12-05 18:41:01 -02:00
Aleksandr V. Piskunov 3c3099d5ed V4L/DVB (13232): cx25840 6.5MHz carrier detection fixes
cx25840:
Disable 6.5MHz carrier autodetection for PAL, always assume its DK.
Only try to autodetect 6.5MHz carrier for SECAM if user accepts both
system DK and L.

Signed-off-by: Aleksandr V. Piskunov <alexandr.v.piskunov@gmail.com>
Reviewed-by: Andy Walls <awalls@radix.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-12-05 18:41:01 -02:00
Andy Shevchenko 2d8d7762d7 V4L/DVB (13231): pwc: Use kernel's simple_strtol()
Change own implementation of pwc_atoi() by simple_strtol(x, NULL, 10).

Signed-off-by: Andy Shevchenko <ext-andriy.shevchenko@nokia.com>
Acked-by: Pekka Enberg <penberg@cs.helsinki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-12-05 18:41:01 -02:00
Mike Isely e67e376b1e V4L/DVB (13228): pvrusb2: Cosmetic kernel log tweak
Signed-off-by: Mike Isely <isely@pobox.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-12-05 18:41:00 -02:00
Mike Isely 515ebf79e5 V4L/DVB (13227): pvrusb2: Fix redundant message on driver initialization failure (missing break)
After detecting failure due to module initialization error, get out.
Don't report jammed hardware.  Problem due to a missing break statement.

Signed-off-by: Mike Isely <isely@pobox.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-12-05 18:41:00 -02:00
Mike Isely aa976ca1df V4L/DVB (13226): pvrusb2: Add hardware description to debuginfo output
Signed-off-by: Mike Isely <isely@pobox.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-12-05 18:40:59 -02:00
Mike Isely 00970beb9b V4L/DVB (13225): pvrusb2: Report hardware description to kernel log upon initialization
The driver also contains a piece of configuration data that produces a
one line description of the specific hardware being driver
(e.g. "Hauppauge 24xxx", "OnAir", etc).  This change generates an
informational message to the kernel log reporting the hardware type
being driven.  This is a very useful thing to know when diagnosing
problems.

Signed-off-by: Mike Isely <isely@pobox.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-12-05 18:40:59 -02:00
Mike Isely 2710814754 V4L/DVB (13224): pvrusb2: Improve diagnostic info on driver initialization failure
It used to be that the only real detectable reason for the driver to
fail during initialization would be that if the hardware is simply
jammed.  However with the advent of the sub-device mechanism in V4L it
is possible now to detect if a sub-device module fails to load
successfully.  The pvrusb2 driver does in fact react to this by also
(correctly) failing, however the original diagnostic message "hardware
is jammed" was still being reported.  This misleads the user because
in fact it might not actually be a hardware failure.  This change adds
logic to tell the difference and then report a more appropriate
message to the kernel log.

Signed-off-by: Mike Isely <isely@pobox.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-12-05 18:40:59 -02:00
Mike Isely 1b33185f5d V4L/DVB (13223): pvrusb2: Soften encoder warning message
pvrusb2: Encoder failures are mostly recoverable by the driver.  While
it would sure be nice not to have the failure happen in the first
place, this has been going on for years and I doubt that a real
solution will ever present itself.  I think that part's firmware is
just slightly flakey and we have to deal with it.  The driver does
deal with it just fine, but the warning message going into the kernel
log is probably a little more alarming than it should be.  So try to
soften up the warning somewhat.

Signed-off-by: Mike Isely <isely@pobox.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-12-05 18:40:58 -02:00
Mike Isely 4a89baa2e1 V4L/DVB (13222): pvrusb2: Make more info available to udev
pvrusb2: Associate V4L device node in sysfs with the underlying USB
device.  This opens the door to device information tracking in udev

Signed-off-by: Mike Isely <isely@pobox.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-12-05 18:40:58 -02:00
Michael Krufky 5abaa530bf V4L/DVB (13220): tda18271: increment module version minor
Signed-off-by: Michael Krufky <mkrufky@kernellabs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-12-05 18:40:57 -02:00
Michael Krufky 712bc0b30f V4L/DVB (13219): tda18271: remove unneeded braces in switch..case block
Signed-off-by: Michael Krufky <mkrufky@kernellabs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-12-05 18:40:57 -02:00
Michael Krufky 5881ecfca0 V4L/DVB (13218): tda18271: consolidate common code for calibration on startup determination
consolidate common code used to determine if calibration on startup is needed

Signed-off-by: Michael Krufky <mkrufky@kernellabs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-12-05 18:40:57 -02:00
Michael Krufky 188ea058ff V4L/DVB (13217): tda18271: handle rf_cal_on_startup properly during attach
If rf_cal_on_startup is enabled in the structure passed into
tda18271_attach, and the cal module option isn't disabled, then we
should run the initialization and calibration procedures during the
tda18271_attach function call, regardless of how many instances of the
driver have been attached.  If the device is already calibrated, the
driver will detect that and will only calibrate again if necessary.

Signed-off-by: Michael Krufky <mkrufky@kernellabs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-12-05 18:40:56 -02:00
Michael Krufky c54e1dde58 V4L/DVB (13216): tda18271: initialize tuner during set_config if rf_cal_on_startup is set
If rf_cal_on_startup is enabled in the structure passed into
tda18271_set_config, and the cal module option isn't disabled,
then we should run the initialization and calibration procedures
during the tda18271_set_config function call.

Signed-off-by: Michael Krufky <mkrufky@kernellabs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-12-05 18:40:56 -02:00
Michael Krufky 42f9a03ed3 V4L/DVB (13215): tda18271: add support for the set_config method
Add the set_config method to allow drivers to configure the
tda18271 driver options after attach.

Signed-off-by: Michael Krufky <mkrufky@kernellabs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-12-05 18:40:55 -02:00
Michael Krufky 1724c8fa7e V4L/DVB (13214): tda18271: allow for i2c buses that cant send 16 bytes at once
There is already an option for sending 16 byte chunks rather that writing
39 bytes all at once during the tuner's initialization.  Some i2c buses
can't send 16 bytes at once, so create an option for sending 8 byte chunks.

Signed-off-by: Michael Krufky <mkrufky@kernellabs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-12-05 18:40:55 -02:00
David T.L. Wong e29cd96715 V4L/DVB (13212): fix gcc-4.3.3 compilation error at dib7000p_pid_filter(): missing parameter name
Signed-off-by: David T.L. Wong <davidtlwong@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-12-05 18:40:55 -02:00
David T.L. Wong 6f0d8c020e V4L/DVB (13211): cx23885: card Mygica X8506 analog TV support
Signed-off-by: David T.L. Wong <davidtlwong@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-12-05 18:40:54 -02:00
David T.L. Wong 8e069bb9ae V4L/DVB (13210): cx23885: card Mygica X8506 better GPIO setup
Signed-off-by: David T.L. Wong <davidtlwong@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-12-05 18:40:54 -02:00
David T.L. Wong bc1548adbe V4L/DVB (13209): cx23885: card mygica x8506 add analog video input support
Signed-off-by: David T. L. Wong <davidtlwong@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-12-05 18:40:53 -02:00
David T.L. Wong fd705e7cd8 V4L/DVB (13208): cx23885: fix uninitialized member bug
Signed-off-by: David T. L. Wong <davidtlwong@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-12-05 18:40:53 -02:00
David T.L. Wong dac65fa169 V4L/DVB (13207): cx23885: add component input type
Signed-off-by: David T. L. Wong <davidtlwong@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-12-05 18:40:53 -02:00
David T.L. Wong fb29ab9698 V4L/DVB (13206): cx25840: add component support
Signed-off-by: David T.L. Wong <davidtlwong@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-12-05 18:40:52 -02:00
Michael Krufky 184e769f93 V4L/DVB (13204): saa7134: add support for the Leadtek DTV1000S
Thanks to Terry Wu for finding the GPIOs required for svideo / composite input

Cc: Terry Wu <terrywu2009@gmail.com>
Signed-off-by: Michael Krufky <mkrufky@kernellabs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-12-05 18:40:52 -02:00
Michael Krufky bc809ab37e V4L/DVB (13201): saa7164: disable tda18271 slave tuner output on slave in standby mode
Enable the standby mode optimization to disable the tda18271
slave tuner output / loop thru options when in low power mode
on the slave tuner, only.  The master tuner must always leave
slave tuner output / loop thru enabled.

Signed-off-by: Michael Krufky <mkrufky@kernellabs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-12-05 18:40:51 -02:00
Jean-Francois Moine 5f78a9f96b V4L/DVB (13198): gspca - ov519: Bad frame pointer in ovfx2 packet scan.
Signed-off-by: Jean-Francois Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-12-05 18:40:51 -02:00
Amauri Magagna 46b4f2ab58 V4L/DVB (13197): gspca - sonixj: Adjust colors and autogain for sensor om6802.
- set correct colors at startup time
- autogain was too slow (4-5 mn - now 15-30 s))

Signed-off-by: Amauri Magagna <amaurimagagna@gmail.com>
Signed-off-by: Jean-Francois Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-12-05 18:40:51 -02:00
Olivier Lorin fdd1dd1d24 V4L/DVB (13196): gspca - gl860: add flip/mirror for OV2640
- add flip/mirror support for OV2640
- fix for backlight value range
- fix for red-blue inversion hue mode with V4L1 applications

Signed-off-by: Olivier Lorin <o.lorin@laposte.net>
Signed-off-by: Jean-Francois Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-12-05 18:40:50 -02:00
Olivier Lorin be9904bdde V4L/DVB (13195): gspca - gl860: comment changes and naming scheme egalization
- small changes in comments
- unified naming scheme for subdriver variables

Signed-off-by: Olivier Lorin <o.lorin@laposte.net>
Signed-off-by: Jean-Francois Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-12-05 18:40:50 -02:00
Olivier Lorin 216f05aa2a V4L/DVB (13194): gspca - gl860: improvement of the main driver part
- fix for warning compilation about sd_ctrls
- trace improvement while probing the sensor

Signed-off-by: Olivier Lorin <o.lorin@laposte.net>
Signed-off-by: Jean-Francois Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-12-05 18:40:49 -02:00
Jean-Francois Moine 013db7575b V4L/DVB (13193): gspca - zc3xx.c: Change init sequences of sensor tas5130c.
Signed-off-by: Jean-Francois Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-12-05 18:40:49 -02:00
Marton Nemeth e0d49e2d3a V4L/DVB (13192): gspca - pac_common: redesign function for finding Start Of Frame
The original implementation of pac_find_sof() does not always find
the Start Of Frame (SOF) marker. Replace it with a state machine
based design.

Acked-by: Hans de Goede <hdegoede@redhat.com>
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>
2009-12-05 18:40:49 -02:00
Devin Heitmueller 760c466c66 V4L/DVB (13188): xc5000: return an error on tuning attempts if firmware not loaded
Xc5000 tuning attempts shouldn't return zero in the case where the firmware
did not load successfully.

Thanks to Michael Krufky for pointing out this issue.

Cc: Michael Krufky <mkrufky@kernellabs.com>
Signed-off-by: Devin Heitmueller <dheitmueller@kernellabs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-12-05 18:40:48 -02:00
Devin Heitmueller 36a91879d8 V4L/DVB (13187): au8522: add support for saturation and hue controls
Add support for saturation/hue controls, prompted by errors showing up in
the mythbackend log.

Signed-off-by: Devin Heitmueller <dheitmueller@kernellabs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-12-05 18:40:48 -02:00
Hans de Goede 6a540bdf01 V4L/DVB (13185): gspca: Don't resubmit error status URB's when suspending
gspca: Don't resubmit error status URB's when suspending

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-12-05 18:40:47 -02:00
Hans de Goede bf926adfbb V4L/DVB (13184): gspca: Don't forget to resubmit URB's in case of an error
The gscpa core was not resubmitting URB's when the URB status was an error,
this means we will loose URB's (potentially all stopping the stream) in
case of sporadic USB issues. I've seen this with an Aiptek stv0680 based
PenCam connected through an USB 2.0 hub.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-12-05 18:40:47 -02:00
Hans de Goede 21f1b932db V4L/DVB (13183): gspca: add stv0680 subdriver
This patch adds a new subdriver to gspca supporting cams with the stv0680
bridge (replacing the old in kernel v4l1 driver).

Many thanks to Hans Verkuil for providing me with one of the 2 cams used in
testing this new sub driver.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-12-05 18:40:47 -02:00
Hans de Goede 73997870c6 V4L/DVB (13182): gspca w9968cf: slight tweak to vstart and hstart
gspca w9968cf: slight tweak to vstart and hstart to get rid of black borders
in 640x480 mode.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-12-05 18:40:46 -02:00
Hans de Goede 79b359025d V4L/DVB (13181): gspca w9968cf: Add support for JPEG compression
gspca w9968cf: Add support for JPEG compression, this enables much higher
framerates at 320x240 / 352x288 and also allows for 640x480 mode for
cams which can do this. The w9968cf uses planar JPEG, which libv4l until
now did not support, so this requires atleast version 0.6.3 of libv4l.

And something important I forgot to mention in my earlier w9968cf commits:
Many thanks to Hans Verkuil for giving me a w9968cf based cam, which has
allowed me to develop the gspca w9968cf support.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-12-05 18:40:46 -02:00
Hans de Goede 8394bcf3fc V4L/DVB (13180): gspca-w9968cf: Don't add an extra packet to the buffer after the EOF
gspca-w9968cf: Don't add an extra packet to the buffer after the EOF,
this makes the frame data size bigger then it should be which makes
gstreamer discard it.

This patch also fixes an unrelated compiler warning.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-12-05 18:40:45 -02:00
Hans de Goede fb1f902060 V4L/DVB (13179): gspca_ov519: cache sensor regs to avoid unnecessary slow i2c reads / writes
Cache sensor regs to avoid unnecessary slow i2c reads / writes, this speeds
up sd_start a bit with most bridges and a lot (from 5 seconds down to 0.3
seconds) with W996xCF cams, as this avoids very slow bit bang IO over
USB i2c reads.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-12-05 18:40:45 -02:00
Hans de Goede a511ba9476 V4L/DVB (13178): gspca: Add support for Winbond W9967CF and W9968CF camera's
This patch adds support to gspca for the Winbond W9967CF and W9968CF
camera's. This is mostly a port of the existing v4l1 driver to gspca
(making it v4l2). But this also features fixes to the bitbanging i2c code
(send a nack not an ack after reading the last byte of a transfer), which
gets rid of the weird errors which were being seen there, and of
the smbus_refresh() hack to get around these errors.

Also the vstart settings have been tweaked to work with different
frequency filter settings.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-12-05 18:40:44 -02:00
Richard Röjfors eea85b0a62 V4L/DVB (13177): radio: Add support for TEF6862 tuner
This patch adds support for TEF6862 Car Radio Enhanced Selectivity Tuner.

It's implemented as a subdev, supporting checking signal strength
and setting and getting frequency.

Signed-off-by: Richard Röjfors <richard.rojfors@mocean-labs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-12-05 18:40:43 -02:00
Richard Röjfors 42752f7a3f V4L/DVB (13176): adv7180: Support checking standard via interrupts
If the I2C device provides an interrupt it is registered and the
standard
is updated via interrupts rather than polling.

Since I2C communication is needed, the interrupt handler fires off a
work which will check the new standard, and store it in the internal
structure.

To handle mutual exclusion a mutex is introduced.

Signed-off-by: Richard Röjfors <richard.rojfors@mocean-labs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-12-05 18:40:43 -02:00
Richard Röjfors 527aebf29c V4L/DVB (13175): adv7180: Use __devinit and __devexit macros
This patch defines the probe and remove function as __devinit and __devexit.

Signed-off-by: Richard Röjfors <richard.rojfors@mocean-labs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-12-05 18:40:42 -02:00
Richard Röjfors c277b60a08 V4L/DVB (13174): adv7180: Support for setting input status
Support for settings the input standard of the ADV7180.

When the input standard is set there is no use to ask the
chip for standard, therefore it is cached in the driver.

Signed-off-by: Richard Röjfors <richard.rojfors@mocean-labs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-12-05 18:40:42 -02:00
Richard Röjfors d31242943a V4L/DVB (13173): adv7180: Support for getting input status
This patch adds support to the ADV7180 driver to check the input
status.

Since the status is held in the same register as the input standard
a small restructuring of the code is done to reuse the code for
reading the register

Signed-off-by: Richard Röjfors <richard.rojfors@mocean-labs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-12-05 18:40:41 -02:00
Danny Wood e3c6e1aaa5 V4L/DVB (13168): Add support for Asus Europa Hybrid DVB-T card (SAA7134 SubVendor ID: 0x1043 Device ID: 0x4847)
Adds the device IDs and driver linking to allow the Asus Europa DVB-T
card to operate with these drivers.
The device has a SAA7134 chipset with a TD1316 Hybrid Tuner.
All inputs work on the card including switching between DVB-T and
Analogue TV, there is also no IR with this card.

[mchehab@redhat.com: CodingStyle fixes]

Signed-off-by: Danny Wood <danwood76@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-12-05 18:40:41 -02:00
Julia Lawall e6a1a08f00 V4L/DVB (13166): remove duplicate structure field initialization
The definition of tvaudio_tuner_ops initializes the s_tuner field twice.
It appears that the second case should initialize the g_tuner field.

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

// <smpl>
@r@
identifier I, s, fld;
position p0,p;
expression E;
@@

struct I s =@p0 { ... .fld@p = E, ...};

@s@
identifier I, s, r.fld;
position r.p0,p;
expression E;
@@

struct I s =@p0 { ... .fld@p = E, ...};

@script:python@
p0 << r.p0;
fld << r.fld;
ps << s.p;
pr << r.p;
@@

if int(ps[0].line)!=int(pr[0].line) or int(ps[0].column)!=int(pr[0].column):
  cocci.print_main(fld,p0)
// </smpl>

Signed-off-by: Julia Lawall <julia@diku.dk>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-12-05 18:40:40 -02:00
Tuukka Toivonen 7cbefad085 V4L/DVB (13165): videobuf do not force buffer size to be multiple of PAGE_SIZE
When the image size (bytesperline*height) is not multiple
of PAGE_SIZE, v4l2 rounded the required buffer size to
be multiple of PAGE_SIZE. This prevented user space
to store images directly into userptr buffers which were
not multiple of PAGE_SIZE. This constraint is removed.

The start address is still assumed to be required
page-aligned, ie., when v4l2 allocates mmap buffers,
the offset between different buffers is page-aligned.

Signed-off-by: Tuukka Toivonen <tuukka.o.toivonen@nokia.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-12-05 18:40:40 -02:00
Mauro Carvalho Chehab 06d3a396b2 V4L/DVB (13157): dvb_frontend: represent all DVBS2API commands via macro
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-12-05 18:40:37 -02:00
Laurent Pinchart b232a012ad V4L/DVB (13155): uvcvideo: Add a module parameter to set the streaming control timeout
The default streaming control timeout was found by Ondrej Zary to be too low
for some Logitech webcams. With kernel 2.6.22 and newer they would timeout
during initialization unles the audio function was initialized before the
video function.

Add a module parameter to set the streaming control timeout and increase the
default value from 1000ms to 3000ms to fix the above problem.

Thanks to Ondrej Zary for investigating the issue and providing an initial
patch.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-12-05 18:40:37 -02:00
Laurent Pinchart c4ed8c66d7 V4L/DVB (13154): uvcvideo: Handle garbage at the end of streaming interface descriptors
At least one 5986:0241 webcam model includes vendor-specific descriptors
at the end of its streaming interface descriptors. Print an information
UVC_TRACE_DESCR message and try to continue parsing the descriptors
rather than bailing out with an error.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-12-05 18:40:36 -02:00
Ming Lei fd1b6bbb4a V4L/DVB (13153): uvcvideo: Fix uvc_alloc_urb_buffers()
This patch sets stream->urb_size as psize*npackets
before calling uvc_alloc_urb_buffers, which may fix
a possible failure of usb_buffer_free in case usb_buffer_alloc
returns NULL. The patch is based on the ideas below:

1,If usb_buffer_alloc can't allocate a buffer sucessfully,
uvc_free_urb_buffers will be called to free the allocated
buffers, and stream->urb_size is required to be passed to
usb_buffer_free;

2,uvc_free_urb_buffers can reset stream->urb_size.

This patch is against linux-v2.6.31-next-20090926.

Signed-off-by: Ming Lei <tom.leiming@gmail.com>
Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-12-05 18:40:36 -02:00
Laurent Pinchart 716fdee110 V4L/DVB (13152): uvcvideo: Rely on videodev to reference-count the device
The uvcvideo driver has a driver-wide lock and a reference count to protect
against a disconnect/open race. Now that videodev handles the race itself,
reference-counting in the driver can be removed.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-12-05 18:40:36 -02:00
Laurent Pinchart 1a969d9863 V4L/DVB (13151): uvcvideo: Dismiss privileges when freeing video buffers
Dismiss privileges on the file handle when calling VIDIOC_REQBUFS with a
buffer count of 0. This allows applications to release the streaming
permissions on the file handle without closing it.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-12-05 18:40:35 -02:00
Laurent Pinchart 4e7387858f V4L/DVB (13150): uvcvideo: Don't acquire privileges in VIDIOC_TRY_FMT
The VIDIOC_TRY_FMT ioctl doesn't interfere with video streaming and thus
should succeed on an unprivileged file handle.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-12-05 18:40:35 -02:00
Laurent Pinchart 663a419203 V4L/DVB (13149): uvcvideo: Add a new UVC_TRACE_VIDEO trace level
Use the trace level for messages related to video URB buffers allocation and
alternate setting selection.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-12-05 18:40:34 -02:00
Laurent Pinchart f4eabafeb3 V4L/DVB (13148): uvcvideo: Handle V4L2_CTRL_TYPE_BUTTON control type in VIDIOC_QUERYCTRL
Return minimum, maximum and step set to 0 without querying the hardware.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-12-05 18:40:34 -02:00
Hans de Goede ebbb5c3e0e V4L/DVB (13146): gspca_ov519: cleanup sensor handling
There were various "if (sensor == foo)" pieces of code inside ov519.c,
move these bits to the sensor specific init functions, where they
belong.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-12-05 18:40:34 -02:00
Hans de Goede b46aaa0264 V4L/DVB (13145): gscpa_ov519: add support for the ovfx2 bridge
gscpa_ov519: add support for the ovfx2 bridge

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-12-05 18:40:33 -02:00
Hans de Goede 635118d5b1 V4L/DVB (13144): gspca_ov519: Add support for OV2610 and OV3610 sensors
This patch adds support for the OV2610 and OV3610 sensors to the gspca
ov519 subdriver. This is a preparation patch for adding ovfx2 bridge
support.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-12-05 18:40:32 -02:00
Hans de Goede 229bb7dc51 V4L/DVB (13143): gspca_ov519 cleanup sensor detection
gspca_ov519 cleanup sensor detection

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-12-05 18:40:32 -02:00
Hans de Goede d76f975c57 V4L/DVB (13142): gspca_mr97310a: small tweak to CIF sensor type 1 exposure setting
The CIF sensor type 1 exposure setting got clamped at 300, as settings below
300 do not work well (and do work for the other sensors). This patch
scales the 0-4095 range to 300-4095 instead of ignoring changes between
300, avoiding have a part of the control range where nothing happens.

This is esp. important for software autogain as done by libv4l.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-12-05 18:40:32 -02:00
Hans de Goede 205260102c V4L/DVB (13141): gspca_sq905c: once one frame is discarded it keeps discarding all frames
While checking all gspca sub drivers pkt_scan functions for a bug I found in
1 of them (and after checking also in another), I noticed a bug in the
gspca_sq905c work queue function, once it has decided to start discarding a
frame because the application is not reading fast enough (and thus returning
buffers to fill fast enough), it never stops discarding.

This patch fixes this by simply completely removing the "discarding"
variable, if we need to discard the current frame because there is no buffer
to store it, the "frame" pointer will be NULL, so that is all we need to
check.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-12-05 18:40:31 -02:00
Hans de Goede 6ca3f255f7 V4L/DVB (13140): gspca_jeilinj: once one frame is discarded it keeps discarding all frames
While checking all gspca sub drivers pkt_scan functions for a bug I found in
1 of them (and after checking also in another), I noticed a bug in the
gspca_jeilinj work queue function, once it has decided to start discard a
frame because the application is not reading fast enough (and thus returning
buffers to fill fast enough), it never stops discarding.

This patch fixes this by simply completely removing the "discarding"
variable, if we need to discard the current frame because there is no buffer
to store it, the "frame" pointer will be NULL, so that is all we need to
check.

I've also moved the gspca_get_i_frame() call and the writing of the jpg
header to the buffer to after the first usb_bulk_msg() call, as we don't
need it before that, and that will give the app slightly more time to
queue a buffer for us to fill.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-12-05 18:40:31 -02:00
Theodore Kilgore b3e440eef8 V4L/DVB (13139): gspca_mr97310a: Improve VGA sensor type detection
Improve (and also simplify :) gspca_mr97310a: VGA sensor type detection.
As it was still failing on some machines (not with some cams, but on
some machines interesting enough).

Signed-off-by: Theodore Kilgore <kilgota@banach.math.auburn.edu>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-12-05 18:40:30 -02:00
Hans de Goede 8519110040 V4L/DVB (13138): gspca_sq905: cleanup sq905_dostream
-Remove use of unneeded discarding variable
-Cleanup locking to only take usb_lock around access to the control
 endpoint, by no longer taking the lock around the bulk transfer
 (which takes most of the time) we can remove the msleep(1) which was
 needed to give the gspca core a chance to grab the usb_lock to signal
 us to stop.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-12-05 18:40:30 -02:00
Theodore Kilgore 930bf78c20 V4L/DVB (13137): gspca_mr97310a: Add controls for vga cams with sensor type 0
This patch adds controls for vga cams with sensor type 0, in order to
correctly report the present controls, the probing of the sensor type
has been moved from sd_start to sd_config, since this made the sensor
type probing unreliable the detection method was changed.

Note this requires the camera to enter streaming mode, so sd_config now
briefly makes the camera stream.

Signed-off-by: Theodore Kilgore <kilgota@banach.math.auburn.edu>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-12-05 18:40:30 -02:00
Igor M. Liplianin 9d2ba7ad80 V4L/DVB (13135): Add support for TeVii remotes
The patch brings infrared remote support for some cx88 based cards.
Such as TeVii S460,S420.

Signed-off-by: Igor M. Liplianin <liplianin@me.by>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-12-05 18:40:29 -02:00
Igor M. Liplianin d8d8622552 V4L/DVB (13134): Add support for TBS-likes remotes
The patch brings infrared remote support for some cx88 based cards.
Such as:
TeVii S460,S420; Omicom SS4; SatTrade ST4200;
TBS 8920,8910; Prof 7300,6200.

Signed-off-by: Igor M. Liplianin <liplianin@me.by>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-12-05 18:40:29 -02:00
Guennadi Liakhovetski 8f37cf25ba V4L/DVB (13130): soc-camera: add a new driver for the RJ54N1CB0C camera sensor from Sharp
This adds an soc-camera / v4l2-subdev driver for the RJ54N1CB0C CMOS camera
sensor from Sharp. The sensor is very picky about initialisation and
configuration sequences. The driver limits artificially maximum window size by
800x600, although the sensor supports 1600x1200. Sizes above 800x600 don't seem
to work correctly, besides, examples from the system integrator use sizes above
640x480 only for still photography. Unfortunately, I had to use "magic"
register-value pairs for undocumented and "reserved" registers. This version of
the driver also omits some functionality, like cropping, which hasn't been
sufficiently tested yet and will be added later.

 create mode 100644 drivers/media/video/rj54n1cb0c.c

Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-12-05 18:40:28 -02:00
Kuninori Morimoto 5cf93f1dca V4L/DVB (13128): sh_mobile_ceu_camera: add VBP error support
If CEU driver can not receive data from camera,
CETCR has VBP error state.
Then, CEU is stopped and cure operation is needed.
This patch add VBP error cure operation.

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-05 18:40:28 -02:00
Kuninori Morimoto b1de7aeba1 V4L/DVB (13127): sh_mobile_ceu: add soft reset function
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-05 18:40:27 -02:00
Marton Nemeth 56f6f5582f V4L/DVB (13121): gspca - pac7311: add comment about JPEG header
Add comment about the meaning of the fixed JPEG header bytes used to
create each image.

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>
2009-12-05 18:40:27 -02:00
Marton Nemeth 4fc8b64823 V4L/DVB (13120): gspca - pac7311: remove redundant register page switching
Remove redundant register page switching to page 0 when changing the
color control.

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>
2009-12-05 18:40:27 -02:00
Marton Nemeth 24067bb552 V4L/DVB (13119): gspca - pac7311: remove magic value for USB_BUF_SZ
The length check in reg_w_var() function is because the buffer contents
is copied to gspca_dev->usb_buf which has the size of USB_BUF_SZ bytes as
defined in drivers/media/video/gspca/gspca.h. Replace the number with
symbol for better readability and maintainability.

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>
2009-12-05 18:40:26 -02:00
Marton Nemeth 5a2e8d9fc1 V4L/DVB (13118): gspca - pac7311: remove magic values for END_OF_SEQUENCE and LOAD_PAGE.
Change the magic values 0, 254 and 255 to END_OF_SEQUENCE, LOAD_PAGE4 and
LOAD_PAGE3 respectively for better source code readability.

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>
2009-12-05 18:40:26 -02:00
Marton Nemeth ff75e99c62 V4L/DVB (13117): gspca - pac7311: remove magic value for SKIP.
Change the magic value 0xaa to SKIP for better understandability.

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>
2009-12-05 18:40:25 -02:00
Rafal Milecki 518c8df77c V4L/DVB (13116): gspca - ov519: Webcam 041e:4067 added.
Signed-off-by: Rafal Milecki <zajec5@gmail.com>
Signed-off-by: Jean-Francois Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-12-05 18:40:25 -02:00
Jean-Francois Moine 0d07e240c5 V4L/DVB (13115): gspca - main: More information messages.
Signed-off-by: Jean-Francois Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-12-05 18:40:25 -02:00
Jean-Francois Moine 1d76331ddb V4L/DVB (13114): gspca - zc3xx.c: Bad init sequences of sensor cs2102.
Signed-off-by: Jean-Francois Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-12-05 18:40:24 -02:00
Michael Krufky c0faeee5a3 V4L/DVB (13112): tda18271: display some state information in debug output
Display i2c adapter id, address and master / slave role in debug output.

Signed-off-by: Michael Krufky <mkrufky@kernellabs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-12-05 18:40:24 -02:00
Michael Krufky 3a6b49fef6 V4L/DVB (13111): tda18271: more signedness fixes
Convert tda18271_rf_tracking_filter_cal.rf_[ab][12] from int to s32.
Convert tda18271_priv.tm_rfcal from unsigned int to u8.
Cast subtractions between u32 values as s32.

Signed-off-by: Michael Krufky <mkrufky@kernellabs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-12-05 18:40:23 -02:00
Michael Krufky 3986bd116f V4L/DVB (13110): tda18271: use temporary variables in tda18271_rf_tracking_filters_init
Use temporary variables for signed calulations between unsigned values

Signed-off-by: Michael Krufky <mkrufky@kernellabs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-12-05 18:40:23 -02:00
Henk Vergonet b450b92e16 V4L/DVB (13108): tda8290: enable deemphasis_50 module parameter
This adds a forgotten module_param macro needed to set a deemphasis of 50us.
It is the standard setting for commercial FM radio broadcasts outside the US.

Signed-off-by: Henk Vergonet <Henk.Vergonet@gmail.com>
Signed-off-by: Michael Krufky <mkrufky@kernellabs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-12-05 18:40:23 -02:00
Michael Krufky 94d983143e V4L/DVB (13105): dvb-usb: add fe_ioctl_override callback to dvb_usb_adapter_properties
Allow dvb-usb adapter drivers to specify a fe_ioctl_override callback
to enable device-specific handling of DVB frontend operations.

Signed-off-by: Michael Krufky <mkrufky@kernellabs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-12-05 18:40:22 -02:00
Michael Krufky 5bdd39621e V4L/DVB (13104): cx23885: define a dvb frontend ioctl override function
override set_frontend to allow rf input path switching on the HVR1275

Signed-off-by: Michael Krufky <mkrufky@kernellabs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-12-05 18:40:22 -02:00
Michael Krufky 9133aee09e V4L/DVB (13103): create a standard method for dvb adapter drivers to override frontend ioctls
Signed-off-by: Michael Krufky <mkrufky@kernellabs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-12-05 18:40:21 -02:00
Andy Walls dbda8f701a V4L/DVB (13100): cx23885: Add IR input keypress handling and enable for the HVR-1850
This changes adds IR Rx keypress input event handling to the CX23885 module.
This change specifically only adds input handling for IR devices implemented as
v4l2_subdevices, using only the pulse width mode (for now), and only with
RC-5 remotes.  The V4L-DVB infrastructure is missing too much to support RC-6
mode 6A as used in many media center remotes.   The grey Hauppauge RC-5 remote
and HVR-1850 IR receiver work now.

Signed-off-by: Andy Walls <awalls@radix.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-12-05 18:40:21 -02:00
Andy Walls 1d23a00243 V4L/DVB (13099): ir-functions: Export ir_rc5_decode() for use by the cx23885 module
Signed-off-by: Andy Walls <awalls@radix.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-12-05 18:40:21 -02:00
Andy Walls f59ad611ac V4L/DVB (13098): cx23885: Add integrated IR subdevice interrupt and notification handling
Add integrated IR subdevice interrupt and notification handling.  This is in
preparation of input keypress handling changes for the cx23885 module.

Signed-off-by: Andy Walls <awalls@radix.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-12-05 18:40:20 -02:00
Andy Walls 1a0b9d89c6 V4L/DVB (13097): cx23885: Complete CX23888 IR subdev implementation for Rx & almost for Tx
This change completes the v4l2_subdev implementation for IR receive for the
IR controller built into the CX23888.

This changes almost completes the IR transmit side also, but doesn't.  Instead
notes in the comments describe what needs to be done for IR Tx to work in the
subdevice implementation.

The current Tx behavior is skeletal and benign.  If left alone, it does nothing.
It will only ever generate a Tx interrupt on Tx init by a caller or when the
tx_write() method is called.  The ISR, when called, will then disable the Tx
FIFO service interrupt.

Signed-off-by: Andy Walls <awalls@radix.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-12-05 18:40:20 -02:00
Steven Toth 8c2d7821d4 V4L/DVB (13092): cx25840: Improvements to the cx23885/7/8 chip detection mechanism.
The prior mechanism wasn't reliable with the cx23887. This new mechanism
tests correctly against cx23885, 7 and 8 based products.

Signed-off-by: Steven Toth <stoth@kernellabs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-12-05 18:40:19 -02:00
Andy Walls c6b7053bbc V4L/DVB (13091): cx23885: Enable HVR-1850 CX23888 A/V core to get VID_CLK running for IR
For the IR controller on the CX23888 to work for the HVR-1850 and in
general, the A/V core must be initialized to get the VID_CLK going.
The VID_CLK is the timing reference for the CX23888's integrated
IR controller.

Signed-off-by: Andy Walls <awalls@radix.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-12-05 18:40:18 -02:00
Andy Walls e283d78083 V4L/DVB (13090): cx25840: Init PLLs properly for CX2388[578] A/V cores
The SYS and AUX PLLs need to be initialized to different values based on
the chip: CX23885, CX23887, CX23888, as each uses a different crystal
frequency: 28.6363 MHz, 25.0 MHz, 50.0 MHz.

Signed-off-by: Andy Walls <awalls@radix.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-12-05 18:40:18 -02:00
Andy Walls 9eef550a9a V4L/DVB (13089): cx25840: Separate set_audclk_freq functionality for the different chips
Separate out the set_audclk_freq() function into separate functions for the
four families of cores.  These cores all use slightly different sample clock
schemes and may be assuming slightly (+/- 3 Hz) different reference frequencies.
The code resuse was not worth the maintenance and testing headache of have all
chips use the same function peppered with conditional logic.

Added comments on how PLL and SRC parameters values are computed.  Fixed a few
bugs related to the shared code having a large number of conditional statements.
Noted inconsistencies with FIXME in the comments.

This is done in preparation for getting the CX2388[578] PLL/clock setting logic
cleaned up for CX23888 analog video and IR (which need the VID PLL set right).

Signed-off-by: Andy Walls <awalls@radix.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-12-05 18:40:18 -02:00
Andy Walls 2a03f03471 V4L/DVB (13088): cx25840: Convert chip/core family checks to static inline functions
Change logic to check for various chip or core families to inline functions.
Checks for specific chips should be made against the state->id field now.  This
is in preparation for chip/core specific code for setting up PLLs for the
CX2388[578] family of cores, that all run with different crystal frequencies.

Signed-off-by: Andy Walls <awalls@radix.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-12-05 18:40:17 -02:00
Andy Walls c7dd1ecdc0 V4L/DVB (13087): cx25840: Improve detection of CX2388[578] A/V cores
Add improved logic to detect the exact CX2388[578] A/V core that is being
probed.  Also cleaned up detection and logging for CX2310[12], CX2583[67],
and CX2584[0123] cores and chips.

Also added code to identify a CX2388[578] A/V decoder core that is not
responding properly.  Typical symptoms include registers 0x00-0xff
responding properly but all other registers returning the same value
(0x13 and 0x5 have been observed).  This state will cause proper detection of
'885 vs. '887 vs. '888 to fail and the chip won't respond to get configured
properly anyway.  I have no method of reseting the core to a working state at
this time; but I didn't try too hard to work one out either.  The problem
likely only occurs in development.  I suspect configuring the SYS PLL VCO to
oscillate too slowly (286.3 MHz?) before post divide may be the root cause,
when encountered.

Signed-off-by: Andy Walls <awalls@radix.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-12-05 18:40:17 -02:00
Andy Walls 29f8a0a50a V4L/DVB (13086): cx23885: Add skeleton v4l2_subdev for the CX23888 integrated IR controller
This change adds a skeletal implementation of a v4l2_subdevice to provide
encapsulation and abstraction of the CX23888's integrated consumer infrared
controller.  This change also instantiates the cx23888_ir subdev for the
HVR-1850 which has IR hardware physically wired up to a CX23888.

The cx23888_ir subdev code is being written with long-term objectives to:
1. port it to the cx25840 module for the CX2584x, CX2583x, CX23885, & CX231xx
   IR controllers
2. possibly port it to the cx18 module for the CX23418 IR controller
3. have the IR subdevice accessed abstractly in the cx23885 module, so the
   driver can ignore the difference between the CX23885 and CX23888.

Signed-off-by: Andy Walls <awalls@radix.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-12-05 18:40:16 -02:00
Andy Walls 7461824400 V4L/DVB (13085): cx23885: Fix support for v4l2-dbg access to CX2388[578] and CX23417 regs
This changes corrects the ioctl() operations for both the CX2388[578] analog
video and MPEG video device nodes to properly and consistently support
VIDIOC_G_CHIP_IDENT, VIDIOC_DBG_G_REGISTER and VIDIOC_DBG_S_REGISTER ioctl()s.

This caused some ioctl() support routines to be broken out into a separate
source file.

Now v4l2-dbg can be used to manipulate CX2388[578] and CX23417 registers
including the CX2388[57] functions handled by the cx25840 module.

This was done in anticipation of developing a new v4l2_subdev for the
integrated IR controller of the CX23888.

Signed-off-by: Andy Walls <awalls@radix.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-12-05 18:40:16 -02:00
Devin Heitmueller 2e3c4723d5 V4L/DVB (13082): em28xx: remove "not validated" status from Terratec Cinergy T XS (005e)
The board support has been validated by the user, so get rid of the warning
that shows up on board load.

Signed-off-by: Devin Heitmueller <dheitmueller@kernellabs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-12-05 18:40:15 -02:00
Devin Heitmueller 2a0d056015 V4L/DVB (13081): saa7134: use the #define for the xc5000 radio_input field
Dmitri's patch for the Behold X7 didn't use the #define I had setup for
XC5000_RADIO_FM1, so cut over to using that instead of "1".

Signed-off-by: Devin Heitmueller <dheitmueller@kernellabs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-12-05 18:40:15 -02:00
Beholder Intl. Ltd. Dmitry Belimov 2930992c40 V4L/DVB (13080): saa7134: add support for the digital side of the Behold X7
Add support for the digital side of the Behold X7

Signed-off-by: Beholder Intl. Ltd. Dmitry Belimov <d.belimov@gmail.com>
Signed-off-by: Devin Heitmueller <dheitmueller@kernellabs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-12-05 18:40:14 -02:00
Uroš Vampl ec994d0505 V4L/DVB (13078): em28xx: fix support for Terratec Cinergy T XS (005e)
Make analog audio, dvb and the remote work on a Terratec Cinergy Hybrid
XS (em2882).

Note by djh: Thanks go out fo Andrej Suligoi for his contribution in providing
and testing pretty much the exact same patch as provided by Uros.  Between
the two of them, they got all the core functionality working for the device.

Cc: Andrej Suligoi <suligoi@gmail.com>
Signed-off-by: Uroš Vampl <mobile.leecher@gmail.com>
Signed-off-by: Devin Heitmueller <dheitmueller@kernellabs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-12-05 18:40:14 -02:00
Devin Heitmueller f91cb65b94 V4L/DVB (13077): em28xx: Add support for new variant of KWorld 2800d
Seems that the reference design used for the KWorld 2800d switched from the
em2860 to em2862, so we need to add the new USB id (and the i2c hash remains
so all we need is the default em2862 id.

Thanks to Ian Young for reporting the issue and testing the fix.

Cc: Ian Young <ian@duffrecords.com>
Signed-off-by: Devin Heitmueller <dheitmueller@kernellabs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-12-05 18:40:14 -02:00
Devin Heitmueller 496e9057ad V4L/DVB (13076): xc5000: make the definition of the FM input part of the xc5000 config struct
Remove hard-coded definition of the xc5000 FM radio input, making it a
parameter passed in when doing the attach call.

Signed-off-by: Devin Heitmueller <dheitmueller@kernellabs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-12-05 18:40:13 -02:00
Beholder Intl. Ltd. Dmitry Belimov d7009cdc28 V4L/DVB (13075): xc5000: add FM radio support
Add FM radio for the xc5000 silicon tuner chip.

Signed-off-by: Beholder Intl. Ltd. Dmitry Belimov <d.belimov@gmail.com>
Signed-off-by: Devin Heitmueller <dheitmueller@kernellabs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-12-05 18:40:13 -02:00
David Ellingsworth 798166dbec V4L/DVB (13073): radio-mr800: set radio frequency only upon success
Set radio frequency only upon success.

Signed-off-by: David Ellingsworth <david@identd.dyndns.org>
Acked-by: Alexey Klimov <klimov.linux@gmail.com>
Signed-off-by: Douglas Schilling Landgraf <dougsland@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-12-05 18:40:12 -02:00
David Ellingsworth 16a72f41bb V4L/DVB (13072): radio-mr800: simplify device warnings
Simplify device warnings.

Signed-off-by: David Ellingsworth <david@identd.dyndns.org>
Acked-by: Alexey Klimov <klimov.linux@gmail.com>
Signed-off-by: Douglas Schilling Landgraf <dougsland@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-12-05 18:40:12 -02:00
David Ellingsworth d8970e5fd9 V4L/DVB (13071): radio-mr800: preserve radio state during suspend/resume
Preserve radio state during suspend/resume.

Signed-off-by: David Ellingsworth <david@identd.dyndns.org>
Acked-by: Alexey Klimov <klimov.linux@gmail.com>
Signed-off-by: Douglas Schilling Landgraf <dougsland@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-12-05 18:40:11 -02:00
David Ellingsworth 30dd4508b9 V4L/DVB (13070): radio-mr800: fix behavior of set_stereo function
Fix behavior of set_stereo function.

Signed-off-by: David Ellingsworth <david@identd.dyndns.org>
Acked-by: Alexey Klimov <klimov.linux@gmail.com>
Signed-off-by: Douglas Schilling Landgraf <dougsland@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-12-05 18:40:11 -02:00
David Ellingsworth 502d50166c V4L/DVB (13069): radio-mr800: ensure the radio is initialized to a consistent state
Ensure the radio is initialized to a consistent state.

Signed-off-by: David Ellingsworth <david@identd.dyndns.org>
Acked-by: Alexey Klimov <klimov.linux@gmail.com>
Signed-off-by: Douglas Schilling Landgraf <dougsland@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-12-05 18:40:11 -02:00
David Ellingsworth 8a7cd16f1f V4L/DVB (13068): radio-mr800: remove device initialization from open/close
Remove device initialization from open/close.

Signed-off-by: David Ellingsworth <david@identd.dyndns.org>
Acked-by: Alexey Klimov <klimov.linux@gmail.com>
Signed-off-by: Douglas Schilling Landgraf <dougsland@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-12-05 18:40:10 -02:00
David Ellingsworth 4e3616576e V4L/DVB (13067): radio-mr800: fix potential use after free
Fix portential use after free.

Signed-off-by: David Ellingsworth <david@identd.dyndns.org>
Acked-by: Alexey Klimov <klimov.linux@gmail.com>
Signed-off-by: Douglas Schilling Landgraf <dougsland@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-12-05 18:40:10 -02:00
David Ellingsworth 26452bfef4 V4L/DVB (13066): radio-mr800: remove device removed indicator
Remove device removed indicator

Signed-off-by: David Ellingsworth <david@identd.dyndns.org>
Acked-by: Alexey Klimov <klimov.linux@gmail.com>
Signed-off-by: Douglas Schilling Landgraf <dougsland@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-12-05 18:40:09 -02:00
David Ellingsworth eac000a90e V4L/DVB (13065): radio-mr800: simplify locking in ioctl callbacks
Simplify locking in ioctl callbacks.

Signed-off-by: David Ellingsworth <david@identd.dyndns.org>
Acked-by: Alexey Klimov <klimov.linux@gmail.com>
Signed-off-by: Douglas Schilling Landgraf <dougsland@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-12-05 18:40:09 -02:00
David Ellingsworth ceb99e1b5a V4L/DVB (13064): radio-mr800: simplify access to amradio_device
Simplify access to amradio_device.

Signed-off-by: David Ellingsworth <david@identd.dyndns.org>
Acked-by: Alexey Klimov <klimov.linux@gmail.com>
Signed-off-by: Douglas Schilling Landgraf <dougsland@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-12-05 18:40:09 -02:00
David Ellingsworth d1939e4c5f V4L/DVB (13063): radio-mr800: remove unnecessary local variable
Remove unnecessary local variable.

Signed-off-by: David Ellingsworth <david@identd.dyndns.org>
Acked-by: Alexey Klimov <klimov.linux@gmail.com>
Signed-off-by: Douglas Schilling Landgraf <dougsland@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-12-05 18:40:08 -02:00
David Ellingsworth 1b8bbb3c0a V4L/DVB (13062): radio-mr800: simplify error paths in usb probe callback
Simplify error paths in usb probe callback.

Signed-off-by: David Ellingsworth <david@identd.dyndns.org>
Acked-by: Alexey Klimov <klimov.linux@gmail.com>
Signed-off-by: Douglas Schilling Landgraf <dougsland@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-12-05 18:40:08 -02:00
David Ellingsworth 7a7d92e061 V4L/DVB (13061): radio-mr800: simplify video_device allocation
simplify video_device allocation

Signed-off-by: David Ellingsworth <david@identd.dyndns.org>
Acked-by: Alexey Klimov <klimov.linux@gmail.com>
Signed-off-by: Douglas Schilling Landgraf <dougsland@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-12-05 18:40:07 -02:00
David Ellingsworth 4aebc2893e V4L/DVB (13060): radio-mr800: implement proper locking
Implement proper locking

Signed-off-by: David Ellingsworth <david@identd.dyndns.org>
Acked-by: Alexey Klimov <klimov.linux@gmail.com>
Signed-off-by: Douglas Schilling Landgraf <dougsland@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-12-05 18:40:07 -02:00
Antti Palosaari 0f01721256 V4L/DVB (13058): af9015: enable remote polling when eeprom contains 0x04
Looks like eeprom IR mode byte value 0x04 means there is remote
which should be polled. Patch enables polling also in case of 0x04.

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-12-05 18:40:06 -02:00
Antti Palosaari e1a7ff84a4 V4L/DVB (13057): af9015: add MSI DIGIVOX mini III remote
Support for MSI DIGIVOX mini III remote.
Thanks to Aleksandr V. Piskunov <aleksandr.v.piskunov@gmail.com>
Thanks to Roman <lists@hasnoname.de>

Cc: Aleksandr V. Piskunov <aleksandr.v.piskunov@gmail.com>
Cc: Roman <lists@hasnoname.de>
Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-12-05 18:40:06 -02:00
Antti Palosaari 641342dde7 V4L/DVB (13056): af9015: add LeadTek Y04G0051 remote buttons
Add missing LeadTek Y04G0051 remote buttons.
Thanks to Matthew Skinner <matt@pcmus.com>

Cc: Matthew Skinner <matt@pcmus.com>
Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-12-05 18:40:06 -02:00
Antti Palosaari 0254294f37 V4L/DVB (13055): af9015: fix few typos
Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-12-05 18:40:05 -02:00
Antti Palosaari 486ba12b7a V4L/DVB (13054): af9015: add USB ID for KWorld PlusTV DVB-T PCI Pro Card (DVB-T PC160-T)
Add USB ID 1b80:c161 for KWorld PlusTV DVB-T PCI Pro Card (DVB-T PC160-T).
Thanks to Andrew Cruickshank <atcrank@gmail.com> for reporting this.

Cc: Andrew Cruickshank <atcrank@gmail.com>
Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-12-05 18:40:05 -02:00
S?rgio Fortier 8a378e8543 V4L/DVB (13052): DiB0700: EvolutePC TvWay+ USB ISDB-Tb fullseg device support
Patch for EvolutePC TvWay+ USB ISDB-Tb fullseg device support.

Signed-off-by: S?rgio C Fortier <sergiofortier@yahoo.com.br>
Signed-off-by: Patrick Boettcher <pboettcher@kernellabs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-12-05 18:40:04 -02:00
Olivier Grenie eac1fe1050 V4L/DVB (13051): DiB7000P: improve rebostness of HAS_LOCK indicator
Update the dib7000p:
The status is HAS_LOCK only if the demod is able to decode the TPS. Sometimes, there is a TPS data lock, even if the demod is not able to decode it (ex: no RF signal).
For the STK7770P: correct value for the charge pump

Signed-off-by: Olivier Grenie <olivier.grenie@dibcom.fr>
Signed-off-by: Patrick Boettcher <pboettcher@kernellabs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-12-05 18:40:04 -02:00
Olivier Grenie f8731f4dde V4L/DVB (13049): dib8000: SNR in 10th of dB
dib7000p/dib8000: added pid filtering

dib8000: the SNR is in 10th of dB (not in dB)
dib7000p and dib8000: added the pid filtering. This feature is enabled by module option (dvb-usb module).

Signed-off-by: Olivier Grenie <olivier.grenie@dibcom.fr>
Signed-off-by: Patrick Boettcher <pboettcher@kernellabs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-12-05 18:40:03 -02:00
Igor M. Liplianin 8171c2059c V4L/DVB (13045): Fix debug messaging for stv0900 demod.
Signed-off-by: Igor M. Liplianin <liplianin@netup.ru>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-12-05 18:40:03 -02:00
Mauro Carvalho Chehab 61b1e58f0e V4L/DVB (13044): dib0700: Be less verbose when an IR key is pressed
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-12-05 18:40:03 -02:00
Mauro Carvalho Chehab 4c5128b30d V4L/DVB (13043): Add support for Pixelview SBTVD IR
This IR uses NEC protocol. In order to use, dvb_usb_dib0700_ir_proto=0
should be used.

Cc: Patrick Boettcher <pb@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-12-05 18:40:02 -02:00
Mauro Carvalho Chehab aa15c0a347 V4L/DVB (13042): Add NEC protocol to firmware v1.2 handler
Currently, dvb_usb_dib0700_ir_proto is supported only with firmwares
older than 1.2. Adds support for it also with the newer firmware.

This is needed in order to support PixelView SBTVD IR.

Cc: Patrick Boettcher <pb@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-12-05 18:40:02 -02:00
Marek Vasut 8d64827172 V4L/DVB (13040): V4L2: Add a v4l2-subdev (soc-camera) driver for OmniVision OV9640 sensor
Signed-off-by: Marek Vasut <marek.vasut@gmail.com>
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-12-05 18:40:01 -02:00
Adam Buchbinder 6070d81eb5 tree-wide: fix misspelling of "definition" in comments
"Definition" is misspelled "defintion" in several comments; this
patch fixes them. No code changes.

Signed-off-by: Adam Buchbinder <adam.buchbinder@gmail.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2009-12-04 23:41:47 +01:00
Takashi Iwai 57648cd52b Merge branch 'topic/misc' into for-linus 2009-12-04 16:22:37 +01:00
André Goddard Rosa af901ca181 tree-wide: fix assorted typos all over the place
That is "success", "unknown", "through", "performance", "[re|un]mapping"
, "access", "default", "reasonable", "[con]currently", "temperature"
, "channel", "[un]used", "application", "example","hierarchy", "therefore"
, "[over|under]flow", "contiguous", "threshold", "enough" and others.

Signed-off-by: André Goddard Rosa <andre.goddard@gmail.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2009-12-04 15:39:55 +01:00
Andrew Morton 4c4cb1b160 drivers/media/dvb/dvb-core/dvb_frontend.c: needs semaphore.h
Fixes:

  v4l/dvb_frontend.c: In function 'dvb_frontend_stop':
  v4l/dvb_frontend.c:707: error: implicit declaration of function 'init_MUTEX'

Addresses http://bugzilla.kernel.org/show_bug.cgi?id=14609

Reported-by: <tstrelar@gmail.com>
Cc: Mauro Carvalho Chehab <mchehab@infradead.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2009-12-01 16:32:19 -08:00
Alan Cox 361c95119a V4L/DVB (13530): Fix wrong parameter order in memset
Edwin Török found the following:

In function ‘memset’,
inlined from ‘ir_input_init’ at drivers/media/common/ir-functions.c:67:
/home/edwin/builds/linux-2.6/arch/x86/include/asm/string_64.h:61:
warning: call to ‘__warn_memset_zero_len’ declared with attribute
warning: memset used with constant zero length parameter; this could be
due to transposed parameters
memset(ir->ir_codes, sizeof(ir->ir_codes), 0);

In actual practice the only caller I can find happens to already have cleared
the buffer before calling ir_input_init.

Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-11-27 18:50:43 -02:00
Hans Verkuil 9807362e47 V4L/DVB (13481): sh_mobile_ceu_camera: fix compile warning
Trivial fix for this compile warning:

v4l/sh_mobile_ceu_camera.c:1789: warning: label 'exit_free_irq' defined but not used

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-11-27 18:27:49 -02:00
Robert Lowery 0bc3518019 V4L/DVB (13436): cxusb: Fix hang on DViCO FusionHDTV DVB-T Dual Digital 4 (rev 1)
Address yet another regression introduced by the introduction of the zl10353
disable_i2c_gate field.

djh - I unmangled the patch which apparently got screwed up in the user's
email client.

Signed-off-by: Robert Lowery <rglowery@exemail.com.au>
Signed-off-by: Devin Heitmueller <dheitmueller@kernellabs.com>
CC: stable@kernel.org
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-11-27 18:27:48 -02:00
Geert Uytterhoeven d02b217a71 V4L/DVB (13412): SMS_SIANO_MDTV should depend on HAS_DMA
When building for Sun 3:

drivers/built-in.o: In function `smscore_unregister_device':
drivers/media/dvb/siano/smscoreapi.c:723: undefined reference to `dma_free_coherent'
drivers/built-in.o: In function `smscore_register_device':
drivers/media/dvb/siano/smscoreapi.c:365: undefined reference to `dma_alloc_coherent'

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-11-27 18:27:46 -02:00
Krzysztof Helt 8366fc3908 media/radio: New driver for the radio FM module on Miro PCM20 sound card
This is recreated driver for the FM module found on Miro
PCM20 sound cards. This driver was removed around the 2.6.2x
kernels because it relied on the removed OSS module. Now, it
uses a current ALSA module (snd-miro) and is adapted to v4l2
layer.

It provides only basic functionality: frequency changing and
FM module muting.

Signed-off-by: Krzysztof Helt <krzysztof.h1@wp.pl>
Reviewed-by: Hans Verkuil <hverkuil@xs4all.nl>
Acked-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-11-27 13:26:23 +01:00
Hans Verkuil 934949d816 V4L/DVB (13371): davinci: remove stray duplicate config pointer
The vpif_config struct was renamed to vpif_display_config, but there
is still a stray vpif_config *config pointer in vpif_display.c, preventing
it from compiling.

Remove this old duplicate pointer.

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-11-26 19:38:04 -02:00
Antti Palosaari 28f4ddd1e8 V4L/DVB (13366): em28xx: fix Reddo DVB-C USB TV Box GPIO
Set device GPIOs only once. There is no need for .dvb_gpio to select
between analog and digital because device is digital only.

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-11-26 19:38:03 -02:00
Kuninori Morimoto 055e05a08b V4L/DVB (13345): soc-camera: sh_mobile_ceu_camera: call pm_runtime_disable
pm_runtime_disable is needed if it failed or removed

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-11-26 19:38:03 -02:00
Guennadi Liakhovetski 64ff9ba5f1 V4L/DVB (13344): soc-camera: properly initialise the device object when reusing
Commit ef373189f62413803b7b816c972fc154c488cdc0 "fix use-after-free Oops,
resulting from a driver-core API change" fixed the Oops, but didn't correct
missing device object initialisation. This patch makes unloading and reloading
of soc-camera host- and client-drivers possible again.

Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-11-26 19:38:02 -02:00
Guennadi Liakhovetski f39c1ab3c3 V4L/DVB (13343): v4l: add more missing linux/sched.h includes
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-11-26 19:38:02 -02:00
Hans Verkuil 3addbb8075 V4L/DVB (13321): radio-gemtek-pci: fix double mutex_lock
Double mutexlock found by the Linux Driver Verification project and
reported by Alexander Strakh.

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
CC: stable@kernel.org
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-11-26 19:38:01 -02:00
Peter Huewe 9d440a087b media/video: add __init/__exit macros to various drivers
Trivial patch which adds the __init/__exit macros to the module_init/
module_exit functions of the following drivers in media video:
    drivers/media/video/ivtv/ivtv-driver.c
    drivers/media/video/cx18/cx18-driver.c
    drivers/media/video/davinci/dm355_ccdc.c
    drivers/media/video/davinci/dm644x_ccdc.c
    drivers/media/video/saa7164/saa7164-core.c
    drivers/media/video/saa7134/saa7134-core.c
    drivers/media/video/cx23885/cx23885-core.c

Signed-off-by: Peter Huewe <peterhuewe@gmx.de>
Acked-by: Andy Walls <awalls@radix.net>
Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Acked-by: Muralidharan Karicheri <m-karicheri2@ti.com>
Acked-By: Steven Toth <stoth@kernellabs.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2009-11-09 09:40:58 +01:00
Uwe Kleine-König 21ae2956ce tree-wide: fix typos "aquire" -> "acquire", "cumsumed" -> "consumed"
This patch was generated by

	git grep -E -i -l '[Aa]quire' | xargs -r perl -p -i -e 's/([Aa])quire/$1cquire/'

and the cumsumed was found by checking the diff for aquire.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2009-11-09 09:40:57 +01:00
Uwe Kleine-König b71a8eb0fa tree-wide: fix typos "selct" + "slect" -> "select"
This patch was generated by

	git grep -E -i -l 's(le|el)ct' | xargs -r perl -p -i -e 's/([Ss])(le|el)ct/$1elect/

with only skipping net/netfilter/xt_SECMARK.c and
include/linux/netfilter/xt_SECMARK.h which have a struct member called
selctx.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2009-11-09 09:40:56 +01:00
Dirk Hohndel 06fe9fb418 tree-wide: fix a very frequent spelling mistake
something-bility is spelled as something-blity
so a grep for 'blit' would find these lines

this is so trivial that I didn't split it by subsystem / copy
additional maintainers - all changes are to comments
The only purpose is to get fewer false positives when grepping
around the kernel sources.

Signed-off-by: Dirk Hohndel <hohndel@infradead.org>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2009-11-09 09:40:54 +01:00
Michael Krufky 22370ef503 V4L/DVB (13314): saa7134: set ts_force_val for the Hauppauge WinTV HVR-1150
The Hauppauge WinTV HVR-1150 retail boards require the FORCE_TS_VALID bit
to be set in order to function properly. This change will work on the early
revisions on the board as well, but the final revision will not function
without this change.

Signed-off-by: Michael Krufky <mkrufky@kernellabs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-11-07 12:55:15 -02:00
Michael Krufky 4007a672ab V4L/DVB (13313): saa7134: add support for FORCE_TS_VALID mode for mpeg ts input
When FORCE_TS_VALID mode is enabled, the saa713x will accept MPEG TS input
without requiring TS_VALID set high.  This is required for some new boards
to function properly, due to the hardware design implementation.

The configuration is toggled within the board setup configuration.  Boards
that do not have this bit set will function as before with no change.

Signed-off-by: Michael Krufky <mkrufky@kernellabs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-11-07 12:55:15 -02:00
Laurent Pinchart 2e8961330e V4L/DVB (13311): uvcvideo: Fix compilation warning with 2.6.32 due to type mismatch with abs()
The abs() macro has changed in 2.6.32 and returns a long instead of an
int. Fix the driver to avoid compilation warnings.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-11-07 12:55:14 -02:00
Laurent Pinchart a2e35af6c7 V4L/DVB (13309): uvcvideo: Ignore the FIX_BANDWIDTH for compressed video
The FIX_BANDWIDTH quirk tries to work around cameras requesting the
maximum bandwidth regardless of the image size by computing a bandwidth
estimate. This works only for uncompressed frames.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-11-07 12:55:14 -02:00
Jean Delvare 7157fbd0ed V4L/DVB (13287): ce6230 - saa7164-cmd: Fix wrong sizeof
Which is why I have always preferred sizeof(struct foo) over
sizeof(var).

Cc: Antti Palosaari <crope@iki.fi>
Acked-by: Steven Toth <stoth@kernellabs.com>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Douglas Schilling Landgraf <dougsland@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-11-07 12:55:13 -02:00
Jonathan Cameron d514edac5d V4L/DVB (13286): pxa-camera: Fix missing sched.h
Required for wakeup call.

Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk>
Acked-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Douglas Schilling Landgraf <dougsland@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-11-07 12:55:13 -02:00
Theodore Kilgore 32345b0596 V4L/DVB (13264): gspca_mr97310a: Change vstart for CIF sensor type 1 cams
gspca_mr97310a: Change vstart for CIF sensor type 1 cams

This fixes the distortion at the end of the frame, and avoids the bad frame
dropping done because of this distortion, trippling the framerate!

Signed-off-by: Theodore Kilgore <kilgota@banach.math.auburn.edu>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-11-07 12:55:12 -02:00
Erik Andrén 81191f694c V4L/DVB (13257): gspca - m5602-s5k4aa: Add vflip for Fujitsu Amilo Xi 2528
Adds a vflip quirk for the Fujitsu Amilo Xi 2528. Thanks to Evgeny for the report.

Signed-off-by: Erik Andrén <erik.andren@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-11-07 12:55:12 -02:00
Erik Andrén 2339a1887d V4L/DVB (13256): gspca - m5602-s5k4aa: Add another MSI GX700 vflip quirk
Adds another vflip quirk for the MSI GX700.
Thanks to John Katzmaier for reporting.

Signed-off-by: Erik Andrén <erik.andren@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-11-07 12:55:11 -02:00
Erik Andrén b6ef8836c1 V4L/DVB (13255): gspca - m5602-s5k4aa: Add vflip quirk for the Bruneinit laptop
Adds a vflip quirk for the Bruneinit laptop. Thanks to Jörg for the report

Signed-off-by: Erik Andrén <erik.andren@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-11-07 12:55:11 -02:00
Stefan Richter dcff9cfe43 V4L/DVB (13240): firedtv: fix regression: tuning fails due to bogus error return
Since 2.6.32(-rc1), DVB core checks the return value of
dvb_frontend_ops.set_frontend.  Now it becomes apparent that firedtv
always returned a bogus value from its set_frontend method.

CC: stable@kernel.org
Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-11-07 12:55:11 -02:00
Henrik Kurelid c94115ffc4 V4L/DVB (13237): firedtv: length field corrupt in ca2host if length>127
This solves a problem in firedtv that has become major for Swedish DVB-T
users the last month or so.  It will most likely solve issues seen by
other users as well.

If the length of an AVC message is greater than 127, the length field
should be encoded in LV mode instead of V mode. V mode can only be used
if the length is 127 or less. This patch ensures that the CA_PMT
message is always encoded in LV mode so PMT message of greater lengths
can be supported.

Signed-off-by: Henrik Kurelid <henrik@kurelid.se>
Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-11-07 12:55:10 -02:00
Mike Isely 1f95725755 V4L/DVB (13230): s2255drv: Don't conditionalize video buffer completion on waiting processes
The s2255 driver had logic which aborted processing of a video frame
if there was no process waiting on the video buffer in question.  That
simply doesn't work when the application is doing things in an
asynchronous manner.  If the application went to the trouble to queue
the buffer in the first place, then the driver should always attempt
to complete it - even if the application at that moment has its
attention turned elsewhere.  Applications which always blocked waiting
for I/O on the capture device would not have been affected by this.
Applications which *mostly* blocked waiting for I/O on the capture
device probably only would have been somewhat affected (frame lossage,
at a rate which goes up as the application blocks less).  Applications
which never blocked on the capture device (e.g. polling only) however
would never have been able to receive any video frames, since in that
case this "is anyone waiting on this?" check on the buffer never would
have evalutated true.  This patch just deletes that harmful check
against the buffer's wait queue.

Signed-off-by: Mike Isely <isely@pobox.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
CC: stable@kernel.org
2009-11-07 12:55:10 -02:00
Michael Krufky 78c948ab0c V4L/DVB (13202): smsusb: add autodetection support for three additional Hauppauge USB IDs
Add support for three new Hauppauge Device USB IDs:

2040:b900
2040:b910
2040:c000

Signed-off-by: Michael Krufky <mkrufky@kernellabs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-11-07 12:55:09 -02:00
Devin Heitmueller 96fbf771d8 V4L/DVB (13190): em28xx: fix panic that can occur when starting audio streaming
Because the counters were not reset when starting up streaming, they would
be reused from the previous run.  This can result in cases such that when the
second instance of streaming starts up, the "cnt" variable in
em28xx_audio_isocirq() can end up being negative, resulting in attempting to
write to memory before the start of runtime->dma_area (as well as having a
negative number of bytes to copy).

Signed-off-by: Devin Heitmueller <dheitmueller@kernellabs.com>
CC: stable@kernel.org
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-11-07 12:55:08 -02:00
Mike Isely 2de26c0a4a V4L/DVB (13170): bttv: Fix reversed polarity error when switching video standard
The bttv driver function which handles switching of the video standard
(set_tvnorm() in bttv-driver.c) includes a check which can optionally
also reset the cropping configuration to a default value.  It is
"optional" based on a comparison of the cropcap parameters of the
previous vs the newly requested video standard.  The comparison is
being done with a memcmp(), a function which only returns a true value
if the comparison actually fails.

This if-statement appears to have been written to assume wrong
memcmp() semantics.  That is, it was re-initializing the cropping
configuration only if the new video standard did NOT have different
cropcap values.  That doesn't make any sense.  One definitely should
reset things if the cropcap parameters are different - if there's any
comparison to made at all.

The effect of this problem was that a transition from, say, PAL to
NTSC would leave in place old cropping setup that made sense for the
PAL geometry but not for NTSC.  If the application doesn't care about
cropping it also won't try to reset the cropping configuration,
resulting in an improperly cropped video frame.  In the case I was
testing this actually caused black video frames to be displayed.

Another interesting effect of this bug is that if one does something
which does NOT change the video standard and this function is run,
then the cropping setup gets reset anyway - again because of the
backwards comparison.  It turns out that just running anything which
merely opens and closes the video device node (e.g. v4l-info) will
cause this to happen.  One can argue that simply opening the device
node and not doing anything to it should not mess with any of its
state - but because of this behavior, any TV app which does such
things (e.g. xawtv) probably therefore doesn't see the problem.

The solution is to fix the sense of the if-statement.  It's easy to
see how this mistake could have been made given how memcmp() works.
The patch is therefore removal of a single "!" character from the
if-statement in set_tvnorm in bttv-driver.c.

Signed-off-by: Mike Isely <isely@pobox.com>
CC: stable@kernel.org
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-11-07 12:55:08 -02:00
Mike Isely 66349b4e7a V4L/DVB (13169): bttv: Fix potential out-of-order field processing
There is a subtle interaction in the bttv driver which can result in
fields being repeatedly processed out of order.  This is a problem
specifically when running in V4L2_FIELD_ALTERNATE mode (probably the
most common case).

1. The determination of which fields are associated with which buffers
happens in videobuf, before the bttv driver gets a chance to queue the
corresponding DMA.  Thus by the point when the DMA is queued for a
given buffer, the algorithm has to do the queuing based on the
buffer's already assigned field type - not based on which field is
"next" in the video stream.

2. The driver normally tries to queue both the top and bottom fields
at the same time (see bttv_irq_next_video()).  It tries to sort out
top vs bottom by looking at the field type for the next 2 available
buffers and assigning them appropriately.

3. However the bttv driver *always* actually processes the top field
first.  There's even an interrupt set aside for specifically
recognizing when the top field has been processed so that it can be
marked done even while the bottom field is still being DMAed.

Given all of the above, if one gets into a situation where
bttv_irq_next_video() gets entered when the first available buffer has
been pre-associated as a bottom field, then the function is going to
process the buffers out of order.  That first available buffer will be
put into the bottom field slot and the buffer after that will be put
into the top field slot.  Problem is, since the top field is always
processed first by the driver, then that second buffer (the one after
the first available buffer) will be the first one to be finished.
Because of the strict fifo handling of all video buffers, then that
top field won't be seen by the app until after the bottom field is
also processed.  Worse still, the app will get back the
chronologically later bottom field first, *before* the top field is
received.  The buffer's timestamps will even be backwards.

While not fatal to most TV apps, this behavior can subtlely degrade
userspace deinterlacing (probably will cause jitter).  That's probably
why it has gone unnoticed.  But it will also cause serious problems if
the app in question discards all but the latest received buffer (a
latency minimizing tactic) - causing one field to only ever be
displayed since the other is now always late.  Unfortunately once you
get into this state, you're stuck this way - because having consumed
two buffers, now the next time around the "first" available buffer
will again be a bottom field and the same thing happens.

How can we get into this state?  In a perfect world, where there's
always a few free buffers queued to the driver, it should be
impossible.  However if something disrupts streaming, e.g. if the
userspace app can't queue free buffers fast enough for a moment due
perhaps to a CPU scheduling glitch, then the driver can get
momentarily starved and some number of fields will be dropped.  That's
OK.  But if an odd number of fields get dropped, then that "first"
available buffer might be the bottom field and now we're stuck...

This patch fixes that problem by deliberately only setting up a single
field for one frame if we don't get a top field as the first available
buffer.  By purposely skipping the other field, then we only handle a
single buffer thus bringing things back into proper sync (i.e. top
field first) for the next frame.  To do this we just drop the few
lines in bttv_irq_next_video() that attempt to set up the second
buffer when that second buffer isn't for the bottom field.

This is definitely a problem in when in V4L2_FIELD_ALTERNATE mode.  In
the other modes this change either has no effect or doesn't harm
things any further anyway.

Signed-off-by: Mike Isely <isely@pobox.com>
CC: stable@kernel.org
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-11-07 12:55:07 -02:00
HIRANO Takahito e0a7e8a621 V4L/DVB (13167): pt1: Fix a compile error on arm
The lack of #include <linux/vmalloc.h> caused a compile error on some
architectures.

Signed-off-by: HIRANO Takahito <hiranotaka@zng.info>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-11-07 12:55:07 -02:00
Guennadi Liakhovetski 76823b791d V4L/DVB (13132): fix use-after-free Oops, resulting from a driver-core API change
Commit b402843787 has broken again re-use of
device objects across device_register() / device_unregister() cycles. Fix
soc-camera by nullifying the struct after device_unregister().

Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-11-07 12:55:07 -02:00
Guennadi Liakhovetski 07bc46e667 V4L/DVB (13131): pxa_camera: fix camera pixel format configuration
A missed conversion prevents correct pixel format negotiation with client
drivers.

Reported-by: Antonio Ospite <ospite@studenti.unina.it>
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-11-07 12:55:06 -02:00
Guennadi Liakhovetski 8cf1fec877 V4L/DVB (13129): sh_mobile_ceu_camera: fix cropping for scaling clients
Fix a bug in cropping calculation, when the client is also scaling the image.

Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-11-07 12:55:06 -02:00
Hans de Goede 1381dfd515 V4L/DVB (13122): gscpa - stv06xx + ov518: dont discard every other frame
When we call gspca_frame_add, it returns a pointer to the frame passed in,
unless we call it with LAST_PACKET, when it will return a pointer to a
new frame in which to store the frame data for the next frame.

The frame pointer was not updated in stv06xx and ov518.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Jean-Francois Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-11-07 12:55:05 -02:00
Seth Barry a57c1dcb93 V4L/DVB (13109): tda18271: fix signedness issue in tda18271_rf_tracking_filters_init
While having tda18271 module set with debug=17 (cal & info prints) and
cal=0 (delay calibration process until first use) - I discovered that
during the calibration process, if the frequency test for 69750000
returned a bcal of 0 (see tda18721-fe.c in tda18271_powerscan func) that
the tuner wouldn't be able to pickup any of the frequencies in the range
(all the other frequencies bands returned bcal=1).  I spent some time
going over the code and the NXP's tda18271 spec (ver.4 of it i think) and
adding a lot of debug prints and walking/stepping through the calibration
process.  I found that when the powerscan fails to find a frequency, the
rf calibration is not run and the default value is supposed to be used in
its place (pulled from the RF_CAL_map table) - but something was getting
goofed up there.

Now, my c coding skills are very rusty, but i think root of the problem is
a signedness issue with the math operation for calculating the rf_a1 and
rf_a2 values in tda18271_rf_tracking_filters_init func, which results in
values like 20648 for rf_a1 (when it should probably have a value like 0,
or so slightly negative that it should be zero - this bad value for rf_a1
would in turn makes the approx calc within
tda18271c2_rf_tracking_filters_correction go out of whack).  The simplest
solution i found was to explicitly convert the signedness of the
denominator to avoid the implicit conversion.  The values placed into the
u32 rf_freq array should never exceed about 900mhz, so i think the s32 max
value shouldn't be an issue in this case.

I've tested it out a little, and even when i get a bcal=0 with the
modified code, the default calibration value gets used, rf_a1 is zero, and
the tuner seems to lock on the stream and mythtv seems to play it fine.

Signed-off-by: Seth Barry <seth@cyberseth.com>
Signed-off-by: Michael Krufky <mkrufky@kernellabs.com>
CC: stable@kernel.org
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-11-07 12:55:04 -02:00
Michael Krufky 4d8317876d V4L/DVB (13107): tda18271: fix overflow in FM radio frequency calculation
Multiplication by 62500 causes an overflow in the 32 bit freq variable,
which is later divided by 1000 when using FM radio.

This patch prevents the overflow by scaling the frequency value correctly
upfront.  Thanks to Henk Vergonet for spotting the problem and providing
a preliminary patch, which this changeset was based upon.

Cc: Henk Vergonet <Henk.Vergonet@gmail.com>
Signed-off-by: Michael Krufky <mkrufky@kernellabs.com>
CC: stable@kernel.org
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-11-07 12:55:04 -02:00
Martin Samek 7646b9de26 V4L/DVB (13079): dib0700: fixed xc2028 firmware loading kernel oops
Fixing kernel oops when driver attemps to load xc2028 firmware.

Note by djh: the patch contribute by Martin is a port of a fix I made during
the PCTV 340e development.  It's a temporary workaround that fixes a regression
(an OOPS condition) and the real fix should be in the code that manages the
i2c master on the dib7000p.  But this fix does address the immmediate
regression and should be merged upstream until we do a cleaner fix.

Signed-off-by: Martin Samek <martin@marsark.sytes.net>
Signed-off-by: Devin Heitmueller <dheitmueller@kernellabs.com>
CC: stable@kernel.org
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-11-07 12:55:03 -02:00
Patrick Boettcher 1e13c8f0c9 V4L/DVB (13050): DIB0700: fix-up USB device ID for Terratec/Leadtek
git commit db48138f6b changed by accident the
assignment of certain USB IDs to their device-specific-handlers.

Thanks to Edward Sheldrake for finding this regression

Signed-off-by: Patrick Boettcher <pboettcher@kernellabs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-11-07 12:55:03 -02:00
Michael Krufky 2b5d9946bc V4L/DVB (13048): dib0070: fix build dependency when driver is disabled
Fix build dependency on function, dib0070_ctrl_agc_filter

[mchehab@redhat.com: reverted the quick workaround 3f48258e50]

Signed-off-by: Michael Krufky <mkrufky@kernellabs.com>
Signed-off-by: Patrick Boettcher <pboettcher@kernellabs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-11-07 12:55:02 -02:00
Alexey Dobriyan d43c36dc6b headers: remove sched.h from interrupt.h
After m68k's task_thread_info() doesn't refer to current,
it's possible to remove sched.h from interrupt.h and not break m68k!
Many thanks to Heiko Carstens for allowing this.

Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
2009-10-11 11:20:58 -07:00
Alexey Dobriyan a99bbaf5ee headers: remove sched.h from poll.h
Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2009-10-04 15:05:10 -07:00
Alexey Dobriyan 828c09509b const: constify remaining file_operations
[akpm@linux-foundation.org: fix KVM]
Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
Acked-by: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2009-10-01 16:11:11 -07:00
Alexey Dobriyan f0f37e2f77 const: mark struct vm_struct_operations
* mark struct vm_area_struct::vm_ops as const
* mark vm_ops in AGP code

But leave TTM code alone, something is fishy there with global vm_ops
being used.

Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2009-09-27 11:39:25 -07:00
Guennadi Liakhovetski a79aebfca1 sh_mobile_ceu_camera: fix compile breakage, caused by a bad merge
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Acked-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2009-09-25 13:36:51 +09:00
Linus Torvalds 9f6ac7850a Merge branch 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-2.6
* 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-2.6:
  V4L/DVB (13039): dib0700: not building CONFIG_DVB_TUNER_DIB0070 breaks compilation
  V4L/DVB (13038): dvbdev: Remove an anoying/uneeded warning
  V4L/DVB (13037): go7007: Revert compatibility code added at the wrong place
  media: video: Fix build in saa7164
2009-09-24 07:54:16 -07:00
Alexey Dobriyan 2bcd57ab61 headers: utsname.h redux
* remove asm/atomic.h inclusion from linux/utsname.h --
   not needed after kref conversion
 * remove linux/utsname.h inclusion from files which do not need it

NOTE: it looks like fs/binfmt_elf.c do not need utsname.h, however
due to some personality stuff it _is_ needed -- cowardly leave ELF-related
headers and files alone.

Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2009-09-23 18:13:10 -07:00
Mauro Carvalho Chehab 3f48258e50 V4L/DVB (13039): dib0700: not building CONFIG_DVB_TUNER_DIB0070 breaks compilation
As reported by Ingo Molnar:
 Here's another new build breakage that triggers in -tip testing:

 drivers/built-in.o:(.data+0xb1f40): undefined reference to `dib0070_ctrl_agc_filter'
 drivers/built-in.o:(.data+0xb1f80): undefined reference to `dib0070_ctrl_agc_filter'

triggers due to:

CONFIG_DVB_USB_DIB0700=y
CONFIG_DVB_TUNER_DIB0070 is not set

While working on a better approach, for now, let's just select tuner
dib0070 anytime we compile dib0700.

Cc: Patrick Boettcher <pboettcher@kernellabs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-09-22 21:54:06 -03:00
Mauro Carvalho Chehab d4c02ef91b V4L/DVB (13038): dvbdev: Remove an anoying/uneeded warning
As pointed by Marcin Slusarz <marcin.slusarz@gmail.com>, the warns happens
because CONFIG_DVB_MAX_ADAPTERS depends on CONFIG_DVB_CORE, and there are
valid configs where DVB_CORE is not selected.

This causes such warnings, for every V4L and common drivers that may or
may not be compiled with DVB support:

drivers/media/dvb/dvb-core/dvbdev.h:36:2: warning: #warning invalid CONFIG_DVB_MAX_ADAPTERS value

We can safely remove the warning.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-09-22 21:54:00 -03:00
Ingo Molnar b1912a85b5 media: video: Fix build in saa7164
-tip testing found that the x86 build (64-bit allyesconfig) fails due to:

  LD      vmlinux.o
  drivers/built-in.o:(.bss+0x4b648): multiple definition of `debug'
  arch/x86/built-in.o:(.kprobes.text+0x88): first defined here
  ld: Warning: size of symbol `debug' changed from 90 in
arch/x86/built-in.o to 4 in drivers/built-in.o
 make: *** [vmlinux.o] Error 1

This is because recent saa7164 changes introduced a global symbol
named 'debug'. The x86 platform code already defines a 'debug'
symbol. (which is named in a too generic way as well - but it
can be used nicely to weed out too generic symbols in drivers ;-)

Rename it to saa_debug.

[mchehab@redhat.com: use module_param_named to preserve old name]

Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-09-22 18:58:17 -03:00
Linus Torvalds 342ff1a1b5 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial: (34 commits)
  trivial: fix typo in aic7xxx comment
  trivial: fix comment typo in drivers/ata/pata_hpt37x.c
  trivial: typo in kernel-parameters.txt
  trivial: fix typo in tracing documentation
  trivial: add __init/__exit macros in drivers/gpio/bt8xxgpio.c
  trivial: add __init macro/ fix of __exit macro location in ipmi_poweroff.c
  trivial: remove unnecessary semicolons
  trivial: Fix duplicated word "options" in comment
  trivial: kbuild: remove extraneous blank line after declaration of usage()
  trivial: improve help text for mm debug config options
  trivial: doc: hpfall: accept disk device to unload as argument
  trivial: doc: hpfall: reduce risk that hpfall can do harm
  trivial: SubmittingPatches: Fix reference to renumbered step
  trivial: fix typos "man[ae]g?ment" -> "management"
  trivial: media/video/cx88: add __init/__exit macros to cx88 drivers
  trivial: fix typo in CONFIG_DEBUG_FS in gcov doc
  trivial: fix missing printk space in amd_k7_smp_check
  trivial: fix typo s/ketymap/keymap/ in comment
  trivial: fix typo "to to" in multiple files
  trivial: fix typos in comments s/DGBU/DBGU/
  ...
2009-09-22 07:51:45 -07:00
Andrew Morton 2a20b05f81 drivers/media/dvb/pt1/pt1.c needs vmalloc.h
alpha:

drivers/media/dvb/pt1/pt1.c: In function 'pt1_cleanup_tables':
drivers/media/dvb/pt1/pt1.c:422: error: implicit declaration of function 'vfree'
drivers/media/dvb/pt1/pt1.c: In function 'pt1_init_tables':
drivers/media/dvb/pt1/pt1.c:431: error: implicit declaration of function 'vmalloc'
drivers/media/dvb/pt1/pt1.c:431: warning: assignment makes pointer from integer without a cast

Acked-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2009-09-22 07:17:23 -07:00
Linus Torvalds c720f5655d Merge branch 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-2.6
* 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-2.6: (222 commits)
  V4L/DVB (13033): pt1: Don't use a deprecated DMA_BIT_MASK macro
  V4L/DVB (13029): radio-si4713: remove #include <linux/version.h>
  V4L/DVB (13027): go7007: convert printks to v4l2_info
  V4L/DVB (13026): s2250-board: Implement brightness and contrast controls
  V4L/DVB (13025): s2250-board: Fix memory leaks
  V4L/DVB (13024): go7007: Implement vidioc_g_std and vidioc_querystd
  V4L/DVB (13023): go7007: Merge struct gofh and go declarations
  V4L/DVB (13022): go7007: Fix mpeg controls
  V4L/DVB (13021): go7007: Fix whitespace and line lengths
  V4L/DVB (13020): go7007: Updates to Kconfig and Makefile
  V4L/DVB (13019): video: initial support for ADV7180
  V4L/DVB (13018): kzalloc failure ignored in au8522_probe()
  V4L/DVB (13017): gspca: kmalloc failure ignored in sd_start()
  V4L/DVB (13016): kmalloc failure ignored in lgdt3304_attach() and s921_attach()
  V4L/DVB (13015): kmalloc failure ignored in m920x_firmware_download()
  V4L/DVB (13014): Add support for Compro VideoMate E800 (DVB-T part only)
  V4L/DVB (13013): FM TX: si4713: Kconfig: Fixed two typos.
  V4L/DVB (13012): uvc: introduce missing kfree
  V4L/DVB (13011): Change tuner type of BeholdTV cards
  V4L/DVB (13009): gspca - stv06xx-hdcs: Reduce exposure range
  ...
2009-09-21 09:03:10 -07:00
Ingo Molnar 388dba3047 Driver-Core: fix devnode callbacks for dabusb and industrialio
The build of the dabusb driver broke:

  drivers/media/video/dabusb.c:758: error: unknown field 'nodename' specified in initializer
  drivers/media/video/dabusb.c:758: warning: initialization from incompatible pointer type
  make[3]: *** wait: No child processes.  Stop.

Due to this commit:

  e454cea: Driver-Core: extend devnode callbacks to provide permissions

Missing the dabusb driver's dabusb_nodename() callback.

Similar issues with the iio/industrialio driver in staging, pointed out
and patched by Jean Delvare.

Signed-off-by: Ingo Molnar <mingo@elte.hu>
Industrialio-parts-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2009-09-21 07:36:33 -07:00
Uwe Kleine-Koenig 3dbda77e6f trivial: fix typos "man[ae]g?ment" -> "management"
Signed-off-by: Uwe Kleine-Koenig <u.kleine-koenig@pengutronix.de>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2009-09-21 15:14:56 +02:00
Peter Huewe 31d0f84591 trivial: media/video/cx88: add __init/__exit macros to cx88 drivers
Trivial patch which adds the __init and __exit macros to the module_init /
module_exit functions to several files in drivers/media/video/cx88/

Signed-off-by: Peter Huewe <peterhuewe@gmx.de>
Acked-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2009-09-21 15:14:56 +02:00
Anand Gadiyar fd589a8f0a trivial: fix typo "to to" in multiple files
Signed-off-by: Anand Gadiyar <gadiyar@ti.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2009-09-21 15:14:55 +02:00
Kay Sievers e454cea20b Driver-Core: extend devnode callbacks to provide permissions
This allows subsytems to provide devtmpfs with non-default permissions
for the device node. Instead of the default mode of 0600, null, zero,
random, urandom, full, tty, ptmx now have a mode of 0666, which allows
non-privileged processes to access standard device nodes in case no
other userspace process applies the expected permissions.

This also fixes a wrong assignment in pktcdvd and a checkpatch.pl complain.

Signed-off-by: Kay Sievers <kay.sievers@vrfy.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-09-19 12:50:38 -07:00
Mauro Carvalho Chehab 84d6ae431f V4L/DVB (13033): pt1: Don't use a deprecated DMA_BIT_MASK macro
drivers/media/dvb/pt1/pt1.c: In function ‘pt1_probe’:
drivers/media/dvb/pt1/pt1.c:915: warning: ‘DMA_nnBIT_MASK’ is deprecated

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-09-19 01:08:20 -03:00
Huang Weiyi 2ff88bc343 V4L/DVB (13029): radio-si4713: remove #include <linux/version.h>
Remove #include <linux/version.h>

Cc: Eduardo Valentin <eduardo.valentin@nokia.com>
Signed-off-by: Huang Weiyi <weiyi.huang@gmail.com>
Signed-off-by: Douglas Schilling Landgraf <dougsland@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-09-19 00:54:15 -03:00
Richard Röjfors 6789cb5230 V4L/DVB (13019): video: initial support for ADV7180
This is an initial driver for Analog Devices ADV7180 Video Decoder.
So far it only supports query standard.

[akpm@linux-foundation.org: remove unneeded cast]
Cc: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Richard Röjfors <richard.rojfors.ext@mocean-labs.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Douglas Schilling Landgraf <dougsland@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-09-19 00:53:39 -03:00
Roel Kluin 40d2951758 V4L/DVB (13018): kzalloc failure ignored in au8522_probe()
Prevent NULL dereference if kzalloc() fails.

Cc: Devin Heitmueller <dheitmueller@linuxtv.org>
Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
Signed-off-by: Douglas Schilling Landgraf <dougsland@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-09-19 00:53:35 -03:00
Roel Kluin d8370f7eff V4L/DVB (13017): gspca: kmalloc failure ignored in sd_start()
Prevent NULL dereference if kmalloc() fails.

Cc: Jean-Francois Moine <moinejf@free.fr>
Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
Signed-off-by: Douglas Schilling Landgraf <dougsland@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-09-19 00:53:30 -03:00
Roel Kluin 8d04df4997 V4L/DVB (13016): kmalloc failure ignored in lgdt3304_attach() and s921_attach()
Prevent NULL dereference if kmalloc() fails.

Cc: Markus Rechberger <mrechberger@sundtek.de>
Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
Signed-off-by: Douglas Schilling Landgraf <dougsland@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-09-19 00:53:16 -03:00
Roel Kluin 1601fb1498 V4L/DVB (13015): kmalloc failure ignored in m920x_firmware_download()
Prevent NULL dereference if kmalloc() fails.

Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
Signed-off-by: Douglas Schilling Landgraf <dougsland@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-09-19 00:53:10 -03:00
Vladimir Geroy 34e383dd13 V4L/DVB (13014): Add support for Compro VideoMate E800 (DVB-T part only)
Adding Compro VideoMate E800 (DVB-T part only)

Cc: Steven Toth <stoth@linuxtv.org>
Signed-off-by: Vladimir Geroy <geroin22@yandex.ru>
Signed-off-by: Douglas Schilling Landgraf <dougsland@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-09-19 00:53:06 -03:00
Matti J. Aaltonen 7a254f468f V4L/DVB (13013): FM TX: si4713: Kconfig: Fixed two typos.
Fixed two typos.

Signed-off-by: Matti J. Aaltonen <matti.j.aaltonen@nokia.com>
Acked-by: Eduardo Valentin <eduardo.valentin@nokia.com>
Signed-off-by: Douglas Schilling Landgraf <dougsland@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-09-19 00:53:01 -03:00
Julia Lawall d2be76437c V4L/DVB (13012): uvc: introduce missing kfree
Move the kzalloc and associated test after the stream/query test, to avoid
the need to free the allocated if the stream/query test fails.

The semantic match that finds the problem is as follows:
(http://www.emn.fr/x-info/coccinelle/)

// <smpl>
@r exists@
local idexpression x;
statement S;
expression E;
identifier f,f1,l;
position p1,p2;
expression *ptr != NULL;
@@

x@p1 = \(kmalloc\|kzalloc\|kcalloc\)(...);
...
if (x == NULL) S
<... when != x
     when != if (...) { <+...x...+> }
(
x->f1 = E
|
 (x->f1 == NULL || ...)
|
 f(...,x->f1,...)
)
...>
(
 return \(0\|<+...x...+>\|ptr\);
|
 return@p2 ...;
)

@script:python@
p1 << r.p1;
p2 << r.p2;
@@

print "* file: %s kmalloc %s return %s" % (p1[0].file,p1[0].line,p2[0].line)
// </smpl>

Signed-off-by: Julia Lawall <julia@diku.dk>
Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Douglas Schilling Landgraf <dougsland@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-09-19 00:52:54 -03:00
Dmitry Belimov c6e56cd344 V4L/DVB (13011): Change tuner type of BeholdTV cards
Change tuner type to correct for BeholdTV cards with FM1216MK5.

Cc: Hermann Pitton <hermann-pitton@arcor.de>
Signed-off-by: Beholder Intl. Ltd. Dmitry Belimov <d.belimov@gmail.com>
Signed-off-by: Douglas Schilling Landgraf <dougsland@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-09-19 00:52:50 -03:00
James Blanford 35ccf8f8ea V4L/DVB (13009): gspca - stv06xx-hdcs: Reduce exposure range
Due to rounding and clipping, exposure and gain settings do not map to
unique register values.  Rather than read the registers and report gain
and exposure that may be different than the values that were set, just
cache the latest values that were set and report them.  Reduce exposure
range from 0-65535 to 0-255 so libv4l's autogain doesn't take forever.
Remove vestiges of driver signal processing that is now handled by
libv4l.

Signed-off-by: James Blanford <jhblanford@gmail.com>
Signed-off-by: Erik Andrén <erik.andren@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-09-19 00:52:46 -03:00
James Blanford 4711ca823b V4L/DVB (13008): gspca - stv06xx-hdcs: Fixup exposure
Initialize image size before it's used to initialize exposure.
Work around lack of exposure set hardware latch with a sequence of
register writes in a single I2C command packet.

Signed-off-by: James Blanford <jhblanford@gmail.com>
Signed-off-by: Erik Andrén <erik.andren@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-09-19 00:52:43 -03:00
Erik Andrén 4fac17b4e7 V4L/DVB (13007): gspca - stv06xx-hdcs: Add exposure and gain ctrls to hdcs_1020
Signed-off-by: Erik Andrén <erik.andren@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-09-19 00:52:39 -03:00
Erik Andrén a8ca20b209 V4L/DVB (13006): gspca - stv06xx: Fix a misindentation
Signed-off-by: Erik Andrén <erik.andren@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-09-19 00:52:35 -03:00
Erik Andrén bf5c562a3e V4L/DVB (13005): gspca - stv06xx: Translate swedish comments to english
Signed-off-by: Erik Andrén <erik.andren@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-09-19 00:52:28 -03:00
Erik Andrén be3bdfb6e0 V4L/DVB (13004): gspca - stv06xx: Harmonize the debug macros when tracing writes and reads
Signed-off-by: Erik Andrén <erik.andren@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-09-19 00:52:22 -03:00
Andreas Mohr 607cfab6e7 V4L/DVB (13003): Correct dangerous and inefficient msecs_to_jiffies() calculation in some V4L2 drivers
Signed-off-by: Andreas Mohr <andi@lisas.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-09-19 00:52:18 -03:00
Henk Vergonet 6c119ff493 V4L/DVB (13002): Adds support for Zolid Hybrid PCI card:
http://linuxtv.org/wiki/index.php/Zolid_Hybrid_TV_Tuner

test status analog (PAL-B):
- Sometimes picture is noisy, but it becomes crystal clear after
  switching between channels. (happens for example at 687.25 Mhz)
- On a lower frequency (511.25 Mhz) the picture is always sharp, but
  lacks colour.
- No sound problems.
- radio untested.

Digital:
- DVB-T/H stream reception works.
- Would expect to see some more channels in the higher frequency region.

Overall is the impression that sensitivity still needs improvement
both in analog and digital modes.

Signed-off-by: Henk Vergonet <Henk.Vergonet@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-09-19 00:52:12 -03:00
Dmitri Belimov 2d21ffe05a V4L/DVB (13001): Key filter for BeholdTV cards.
When fast push-pull button of remote control we can received incorrect
key code 0x00. Key information from IR decoder has ID of remote control 2 bytes,
byte of key code and byte of mirror key code.
Correct data
0x86 0x6B 0x00 0xFF

Wrong data
0x86 0x6B 0x00 0x00

This patch added additional test of mirror byte for filtering.

Signed-off-by: Beholder Intl. Ltd. Dmitry Belimov <d.belimov@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-09-19 00:52:05 -03:00
Akihiro Tsukada 5eca4823ea V4L/DVB (13000): add driver for 774 Friio White USB ISDB-T receiver
This patch adds driver for 774 Friio White, ISDB-T USB receiver

Friio White is an USB 2.0 ISDB-T receiver. (http://www.friio.com/)
The device has a GL861 chip and a Comtech JDVBT90502 canned tuner module.
This driver ignores all the frontend_parameters except frequency,
as ISDB-T shares the same parameter configuration across the country
and thus the device can work like an intelligent one.

As this device does not include a CAM nor hardware descrambling feature,
the driver passes through scrambled TS streams.

There is Friio Black, a variant for ISDB-S, which shares the same USB
Vendor/Product ID with White, but it is not supported in this driver.
They should be identified in the initialization sequence,
but this feature is not tested.

Signed-off-by: Akihiro Tsukada <tskd2@yahoo.co.jp>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-09-19 00:51:48 -03:00
Mauro Carvalho Chehab 3d17fb1be9 V4L/DVB (12999): Add a driver for Earthsoft PT1
Add a driver for Earthsoft PT1

Eearthsoft PT1 is a PCI card for Japanese broadcasting with two ISDB-S
and ISDB-T demodulators.

This card has neither MPEG decoder nor conditional access module
onboard. It transmits only compressed and possibly encrypted MPEG data
over the PCI bus, so you need an external software decoder and a
decrypter to watch TV on your computer.

This driver is originally developed by Tomoaki Ishikawa
<tomy@users.sourceforge.jp> by reverse engineering.

[mchehab@redhat.com: renamed isdb_ts to isdbs_ts to use the current standard]
Signed-off-by: HIRANO Takahito <hiranotaka@zng.info>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-09-19 00:51:41 -03:00
HIRANO Takahito 98293ef3e5 V4L/DVB (12997): Add the DTV_ISDB_TS_ID property for ISDB_S
In ISDB-S, time-devision duplex is used to multiplexing several waves
in the same frequency. Each wave is identified by its own transport
stream ID, or TS ID. We need to provide some way to specify this ID
from user applications to handle ISDB-S frontends.

This code has been tested with the Earthsoft PT1 driver.

[mchehab@infradead.org: Fix merge conflicts with isdbt and rename the new parameter to DTV_ISDBS_TS_ID]
Signed-off-by: HIRANO Takahito <hiranotaka@zng.info>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-09-19 00:51:34 -03:00
Mauro Carvalho Chehab 0030ec38ce V4L/DVB(12993b): gl860: Prevent a potential risk of zeroing a floating pointer
drivers/media/video/gspca/gl860/gl860.c: In function ‘gl860_build_control_table’:
drivers/media/video/gspca/gl860/gl860.c:119: warning: ‘sd_ctrls’ may be used uninitialized in this function

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-09-19 00:49:11 -03:00
Mauro Carvalho Chehab ab2058571d V4L/DVB (12993a): saa7164: Fix compilation warning on i386
drivers/media/video/saa7164/saa7164-buffer.c: In function ‘saa7164_buffer_alloc’:
drivers/media/video/saa7164/saa7164-buffer.c:110: warning: cast to pointer from integer of different size
drivers/media/video/saa7164/saa7164-buffer.c:112: warning: cast to pointer from integer of different size

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-09-19 00:44:31 -03:00
Muralidharan Karicheri d28a6df608 V4L/DVB (12906d): V4L : vpif updates for DM6467 vpif capture driver
Following changes done for vpif driver to support vpif capture:-
	1) Current version of display driver defined vpif register
	   space as part for vpif display platform driver resource
	   This is not correct since vpif is common across capture
	   and display drivers. So the resource iomap function is
	   moved to this module
	2) Since there are common registers, a spinlock is added for
	   mutual exclusion.

This has incorporated comments against version v0 of the patch series

Resending to merge to V4L linux-next

Reviewed-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Muralidharan Karicheri <m-karicheri2@ti.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-09-19 00:19:40 -03:00
Muralidharan Karicheri 6ffefff5a9 V4L/DVB (12906c): V4L : vpif capture driver for DM6467
This is the vpif capture bridge driver for DM6467.  This video
supports two video channels each having a tvp5147 device at
the input. This allows simultaneous capture of NTSC/PAL video
in each of this channel. Both MMAP and USERPTR io mechanism
are supported. Currently buffer allocation happens at REQBUF
ioctl request. Since USERPTR IO is supported, this is not an
issue since user applications can allocate buffers and pass
the user space address to the driver. Following are TODOs :-
	1) Adding support for allocation of buffers at init
	2) VBI/HBI data service

This has incorporated comments received against version v0
of the patch series.

Resending to merge V4l linux-next
 create mode 100644 drivers/media/video/davinci/vpif_capture.c
 create mode 100644 drivers/media/video/davinci/vpif_capture.h

Reviewed-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Muralidharan Karicheri <m-karicheri2@ti.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-09-19 00:19:39 -03:00
Muralidharan Karicheri 89803d83b6 V4L/DVB (12906b): V4L : vpif capture - Kconfig and Makefile changes
Adds Kconfig and Makefile changes required for vpif capture driver

Resending to merge to V4L linux-next

Reviewed-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Muralidharan Karicheri <m-karicheri2@ti.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-09-19 00:19:37 -03:00
Muralidharan Karicheri 317b2e2f4b V4L/DVB (12906a): V4L : vpif display updates to support vpif capture
The structure name for vpif display driver changed since it was not unique. So this
update is done to reflect the same. Also removed the code related to register
address space iomap. Uses v4l2_i2c_new_subdev_board() instead of
v4l2_i2c_new_probed_subdev() so that platform data can be added for subdevice
configuration for polarities.

This has incorporated comments against version v0 of the patch series.

Resending the original patch for merge to V4L linux-next

Reviewed-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Muralidharan Karicheri <m-karicheri2@ti.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-09-19 00:19:36 -03:00
Hans Verkuil 6b5270d212 V4L/DVB (12725): v4l: warn when desired devnodenr is in use & add _no_warn function
Warn when the desired device node number is already in use, except when
the new video_register_device_no_warn function is called since in some
use-cases that warning is not relevant.

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-09-19 00:19:34 -03:00
Hans Verkuil 5062cb70c8 V4L/DVB (12724): v4l2-dev: add simple wrapper functions around the devnode numbers
There are some subtle differences in the way the devnode numbers are
handled depending on whether the FIXED_MINOR_RANGES config option is
set. Add some simple wrapper functions to handle that correctly.

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-09-19 00:19:31 -03:00
Hans Verkuil 581644d9c9 V4L/DVB (12723): ivtv/cx18: replace 'kernel number' with 'device node number'.
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-09-19 00:19:29 -03:00
Hans Verkuil 22e221258b V4L/DVB (12722): v4l2-dev: replace 'kernel number' by 'device node number'.
The term 'kernel number' is very vague, so replace it with the somewhat more
descriptive term 'device node number'.

In one place the local variable 'nr' was used to create the device node number
of the new device name. This has been replaced with the vdev->num field to
more clearly mark this as being the device node number and not the minor
number.

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-09-19 00:19:27 -03:00
Hans Verkuil 7ae0cd9bc7 V4L/DVB (12541): v4l: remove video_register_device_index
video_register_device_index is never actually called, instead the
stream index number is always calculated automatically.

This patch removes this function and simplifies the internal get_index
function since that can now always just return the first free index.

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-09-19 00:19:26 -03:00
Hans Verkuil 53dacb1570 V4L/DVB (12540): v4l: simplify v4l2_i2c_new_subdev and friends
Rewrite v4l2_i2c_new_subdev as a simplified version of v4l2_i2c_new_subdev_cfg
and remove v4l2_i2c_new_probed_subdev and v4l2_i2c_new_probed_subdev_addr.

This simplifies this API substantially.

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-09-19 00:19:24 -03:00
Guennadi Liakhovetski 0da2808ca2 V4L/DVB (12580): soc-camera: remove now unneeded subdevice group ID assignments
Since we are not using v4l2_device_call_* calls any more, we don't need to
initialise subdevice .grp_id any more. This also fixes compiler warnings on
64-bit platforms.

Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-09-19 00:19:22 -03:00
Guennadi Liakhovetski 96c7539954 V4L/DVB (12536): soc-camera: remove .gain and .exposure struct soc_camera_device members
This makes the soc-camera interface for V4L2 subdevices thinner yet. Handle
gain and exposure internally in each driver just like all other controls.

Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-09-19 00:19:20 -03:00
Guennadi Liakhovetski a4c56fd889 V4L/DVB (12535): soc-camera: remove .init() and .release() methods from struct soc_camera_ops
Remove unneeded soc-camera operations, this also makes the soc-camera API to
v4l2 subdevices thinner.

Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-09-19 00:19:18 -03:00
Guennadi Liakhovetski 6a6c878672 V4L/DVB (12534): soc-camera: V4L2 API compliant scaling (S_FMT) and cropping (S_CROP)
The initial soc-camera scaling and cropping implementation turned out to be
incompliant with the V4L2 API, e.g., it expected the user to specify cropping
in output window pixels, instead of input window pixels. This patch converts
the soc-camera core and all drivers to comply with the standard.

Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-09-19 00:19:17 -03:00
Guennadi Liakhovetski 0166b74374 V4L/DVB (12533): soc-camera: Use video device object for output in host drivers
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-09-19 00:19:15 -03:00
Guennadi Liakhovetski 2aa58db47f V4L/DVB (12532): soc-camera: Use camera device object for core output
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-09-19 00:19:13 -03:00
Guennadi Liakhovetski 85f8be6812 V4L/DVB (12531): soc-camera: Use I2C device for dev_{dbg,info,...} output in all clients
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-09-19 00:19:09 -03:00
Guennadi Liakhovetski c9c1f1c0db V4L/DVB (12530): soc-camera: switch to using v4l2_subdev_call()
Use v4l2_subdev_call() instead of v4l2_device_call_until_err() in all host
drivers and in soc-camera core.

Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-09-19 00:19:07 -03:00
Guennadi Liakhovetski 08590b9613 V4L/DVB (12529): soc-camera: switch to s_crop v4l2-subdev video operation
Remove set_crop soc-camera device method and switch to s_crop from v4l2-subdev
video operations. Also extend non-i2c drivers to also hold a pointer to their
v4l2-subdev instance in control device driver-data, i.e., in
dev_get_drvdata((struct device *)to_soc_camera_control(icd))

Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-09-19 00:19:06 -03:00
Guennadi Liakhovetski 961801bbb3 V4L/DVB (12528): sh_mobile_ceu_camera: implement host-side image scaling
Use host-side image scaling when the client fails to set the requested format.
We also have to take scaling into account when performing host-side cropping.
Similar to cropping we try to use client-side scaling as much as possible to
preserve bus bandwidth and optimise the frame-rate.

Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-09-19 00:19:04 -03:00
Guennadi Liakhovetski 4a5a5b2d62 V4L/DVB (12527): tw9910: do not lie about cropping abilities
The current tw9910 driver does not implement cropping correctly. Therefore, and
also because various rectangles in struct soc_camera_device are in user scale,
we cannot and shall not use rect_current as window location.

Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-09-19 00:19:02 -03:00
Guennadi Liakhovetski 94896298be V4L/DVB (12526): ov772x: do not use scaling for cropping
OV772x sensors cannot crop, they only support two fixed formats: VGA and QVGA.
We should not change the format when requested to crop, only S_FMT can do this.

Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-09-19 00:19:01 -03:00
Guennadi Liakhovetski b897a91afb V4L/DVB (12525): soc-camera: prohibit geometry change with initialised buffers
Prohibit S_FMT and S_CROP with a different window width or height after video
buffer initialisation. This simplifies the work to be done in specific host and
client drivers, and it doesn't seem to make much sense to allow these changes.
We do however allow S_CROP with equal width and height to just move the window,
this doesn't affect video buffer management and is usually easy enough to
implement.

Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-09-19 00:18:59 -03:00
Guennadi Liakhovetski 68a54f0e53 V4L/DVB (12524): soc-camera: S_CROP V4L2 API compliance fix
V4L2 API mandates, that drivers do not update the argument of the S_CROP
ioctl() with the actual geometry. Comply.

Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-09-19 00:18:58 -03:00
Guennadi Liakhovetski 123ab622c0 V4L/DVB (12523): tw9910: return updated geometry on successful S_FMT and S_CROP
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-09-19 00:18:56 -03:00
Guennadi Liakhovetski 904078f16f V4L/DVB (12522): sh-mobile-ceu-camera: implement host-side cropping
Not all video capture devices can configure arbitrary cropping, whereas the
CEU module on SuperH CPUs can crop with pixel precision. However, we want to
use camera cropping if possible to save bandwidth and increase the frame-rate.
This patch verifies whether the camera managed to crop exactly the requested
rectangle, and if not, uses host-side cropping. To be able to crop on CEU we
have to preserve camera rectangle too, for which the host_priv member in
struct soc_camera_device is used. We now allocate memory dynamically, thus we
have to use the .put_formats() method from struct soc_camera_host_ops to free
it.

Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-09-19 00:18:55 -03:00
Guennadi Liakhovetski a12222a73e V4L/DVB (12521): soc-camera: use .s_std() from struct v4l2_subdev_core_ops
Remove .set_std() method from struct soc_camera_ops, use .s_std() from
struct v4l2_subdev_core_ops instead.

Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-09-19 00:18:53 -03:00
Guennadi Liakhovetski cca0e54905 V4L/DVB (12520): sh-mobile-ceu-camera: do not wait for interrupt when releasing buffers
Patch

[PATCH] video: use videobuf_waiton() in sh_mobile_ceu free_buffer()

was not quite correct. It closed a race, but introduced a potential
lock-up, if for some reason an interrupt does not come. This has been
observed in tests with tw9910. This patch safely dequeues buffers without
waiting for their completion. It also moves a buffer state assignment
under a spinlock to make it atomic with queuing of the buffer.

Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-09-19 00:18:51 -03:00
Guennadi Liakhovetski fa48984e36 V4L/DVB (12519): soc-camera: put pixel format initialisation back in probe, add .put_formats()
The move of format translation initialisation into soc_camera_open() was
temporary for the soc-camera as platform driver intermediate step, put it back
into soc_camera_probe(). Also add a .put_formats() method to
soc_camera_host_ops to free any resources host driver might have allocated in
.get_formats().

Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-09-19 00:18:49 -03:00
Guennadi Liakhovetski 0d205b6a09 V4L/DVB (12518): ov772x: S_CROP must return actually configured geometry
V4L2 drivers are allowed to configure a geometry different than what has been
requested by the user with S_CROP, but then they have to adjust the input
rectangle accordingly. Fix ov772x to comply with this requirement.

Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-09-19 00:18:48 -03:00
Guennadi Liakhovetski e330919a21 V4L/DVB (12517): mt9t031: improve rectangle placement in invalid S_CROP
1. soc-camera always requests a valid rectangle, when calling .s_fmt(), no need
to check and adjust
2. in .s_crop(), if the rectangle exceeds sensor limits, push it to the
respective border instead of centering
3. take into account left and top borders when checking

Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-09-19 00:18:46 -03:00
Guennadi Liakhovetski bf62e1da6a V4L/DVB (12516): ov772x: successful S_FMT and S_CROP must update user-provided rectangle
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-09-19 00:18:44 -03:00
Guennadi Liakhovetski a0705b07f1 V4L/DVB (12515): soc-camera: use struct v4l2_rect in struct soc_camera_device
Switch to using struct v4l2_rect in struct soc_camera_device for uniformity and
simplicity.

Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-09-19 00:18:43 -03:00
Guennadi Liakhovetski 4a6110bc50 V4L/DVB (12514): sh_mobile_ceu_camera: add a control for the camera low-pass filter
Use the V4L2_CID_SHARPNESS control to switch SH-mobile camera low-pass filter.

Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-09-19 00:18:41 -03:00
Guennadi Liakhovetski 2840d2497b V4L/DVB (12513): soc-camera: add support for camera-host controls
Until now soc-camera only supported client (sensor) controls. This patch
enables camera-host drivers to implement their own controls too.

Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-09-19 00:18:39 -03:00
Guennadi Liakhovetski a813d01f82 V4L/DVB (12512): ov772x: implement a band-stop filter support
The V4L2_CID_BAND_STOP_FILTER control is used to switch the "Banding Filter" on
OV772x cameras on and off and to set the minimum AEC value in BDBASE register.

Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-09-19 00:18:38 -03:00
Guennadi Liakhovetski 979ea1ddf8 V4L/DVB (12510): soc-camera: (partially) convert to v4l2-(sub)dev API
Convert the soc-camera framework to use the v4l2-(sub)dev API. Start using
v4l2-subdev operations. Only a part of the interface between the
soc_camera core, soc_camera host drivers on one side and soc_camera device
drivers on the other side is replaced so far. The rest of the interface
will be replaced in incremental steps, and will require extensions and,
possibly, modifications to the v4l2-subdev code.

Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-09-19 00:18:35 -03:00
Guennadi Liakhovetski 40e2e09270 V4L/DVB (12506): soc-camera: convert to platform device
Convert soc-camera core and all drivers to platform device API. We already
converted platforms to register a platform device for each soc-camera client,
now we remove the compatibility code and switch completely to the new scheme.
This is a preparatory step for the v4l2-subdev conversion.

Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-09-19 00:18:27 -03:00
Guennadi Liakhovetski c41debafc6 V4L/DVB (12504): soc-camera: prepare soc_camera_platform.c and its users for conversion
soc_camera_platform.c is only used by y SuperH ap325rxa board. This patch
converts soc_camera_platform.c and its users for the soc-camera platform-
device conversion and also extends soc-camera core to handle non-I2C cameras.

Cc: Paul Mundt <lethal@linux-sh.org>
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Acked-by: Paul Mundt <lethal@linux-sh.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-09-19 00:18:24 -03:00
Muralidharan Karicheri 2639ead140 V4L/DVB (12254): v4l: Makefile and config files for vpfe capture driver
This adds Makefile and Kconfig changes to build vpfe capture driver.

Reviewed by: Laurent Pinchart <laurent.pinchart@skynet.be>

Signed-off-by: Muralidharan Karicheri <m-karicheri2@ti.com>
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-09-19 00:18:22 -03:00
Chaithrika U S 210fa70d3a V4L/DVB (12453a): DaVinci: DM646x: Update the structure name as per header file changes
In the platform header file, the subdev_info structure name has been changed
to vpif_subdev_info. Update this change in the driver too.

Applies to v4l-dvb repository.

Signed-off-by: Chaithrika U S <chaithrika@ti.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-09-19 00:18:21 -03:00
Muralidharan Karicheri 7b140b8930 V4L/DVB (12253): v4l: common vpss module for video drivers
This is a new module added for vpss library functions that are
used for configuring vpss system module. All video drivers will
include vpss.h header file and call functions defined in this
module to configure vpss system module.

Reviewed by: Hans Verkuil <hverkuil@xs4all.nl>
Reviewed by: Laurent Pinchart <laurent.pinchart@skynet.be>
Reviewed by: Alexey Klimov <klimov.linux@gmail.com>
Signed-off-by: Muralidharan Karicheri <m-karicheri2@ti.com>
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-09-19 00:18:19 -03:00
Muralidharan Karicheri 5f15fbb68f V4L/DVB (12251): v4l: dm644x ccdc module for vpfe capture driver
This is the hw module for DM644x CCDC. This registers with the
vpfe capture driver and provides a set of hw_ops to configure
CCDC for a specific decoder device connected to the VPFE.

Reviewed by: Hans Verkuil <hverkuil@xs4all.nl>
Reviewed by: Laurent Pinchart <laurent.pinchart@skynet.be>

Signed-off-by: Muralidharan Karicheri <m-karicheri2@ti.com>
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-09-19 00:18:16 -03:00
Muralidharan Karicheri dd2ceb1a40 V4L/DVB (12250): v4l: dm355 ccdc module for vpfe capture driver
Adds ccdc hw module for DM355 CCDC. This registers with the bridge
driver a set of hw_ops for configuring the CCDC for a specific
decoder device connected to vpfe.

Reviewed by: Hans Verkuil <hverkuil@xs4all.nl>
Reviewed by: Laurent Pinchart <laurent.pinchart@skynet.be>
Reviewed by: Mauro Carvalho Chehab <mchehab@infradead.org>

Signed-off-by: Muralidharan Karicheri <m-karicheri2@ti.com>
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-09-19 00:18:15 -03:00
Muralidharan Karicheri 638c974008 V4L/DVB (12249): v4l: ccdc hw device header file for vpfe capture
Adds ccdc hw device header for vpfe capture driver

Reviewed by: Hans Verkuil <hverkuil@xs4all.nl>
Reviewed by: Laurent Pinchart <laurent.pinchart@skynet.be>

Signed-off-by: Muralidharan Karicheri <m-karicheri2@ti.com>
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-09-19 00:18:13 -03:00
Muralidharan Karicheri 7da8a6cb3e V4L/DVB (12248): v4l: vpfe capture bridge driver for DM355 and DM6446
This the vpfe capture bridge driver for doing video
capture on DM355 and DM6446 evms. The ccdc hw modules register with the
driver and are used for configuring the CCD Controller for a specific
decoder interface. The driver also registers the sub devices required
for a specific evm. More than one sub devices can be registered.
This allows driver to switch dynamically to capture video from
any sub device that is registered. Currently only one sub device
(tvp5146) is supported. But in future this driver is expected
to do capture from sensor devices such as Micron's MT9T001, MT9T031
and MT9P031 etc. The driver currently supports MMAP based IO.

Reviewed by: Laurent Pinchart <laurent.pinchart@skynet.be>
Reviewed by: Alexey Klimov <klimov.linux@gmail.com>

Signed-off-by: Muralidharan Karicheri <m-karicheri2@ti.com>
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-09-19 00:18:12 -03:00
Muralidharan Karicheri c1c9d09cd3 V4L/DVB (12247): tvp514x: formatting comments as per kernel documentation
Fix documentation style based on comments from Mauro.

Reviewed by: Hans Verkuil <hverkuil@xs4all.nl>

Signed-off-by: Muralidharan Karicheri <m-karicheri2@ti.com>
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-09-19 00:18:11 -03:00
Muralidharan Karicheri 62ef80a1f3 V4L/DVB (12246): tvp514x: Migration to sub-device framework
This patch converts TVP514x driver to sub-device framework
from V4L2-int framework.

[hverkuil@xs4all.nl: remove inline from the dump_reg function]
Signed-off-by: Brijesh Jadav <brijesh.j@ti.com>
Signed-off-by: Hardik Shah <hardik.shah@ti.com>
Signed-off-by: Vaibhav Hiremath <hvaibhav@ti.com>
Signed-off-by: Murali Karicheri <m-karicheri2@ti.com>
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-09-19 00:18:09 -03:00
Huang Weiyi 6bcbc08faa V4L/DVB (12201): adv7343: remove unused #include <linux/version.h>
Remove unused #include <linux/version.h>'s in drivers/media/video/adv7343.c.

Cc: Chaithrika U S <chaithrika@ti.com>
Signed-off-by: Huang Weiyi <weiyi.huang@gmail.com>
Signed-off-by: Douglas Schilling Landgraf <dougsland@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-09-19 00:18:07 -03:00
Chaithrika U S 13df4f6a36 V4L/DVB (12178): vpif_display: Fix compile time warnings for mutex locking
mutex_lock_interruptible return value has to be handled properly to indicate
the status to the higher layers of the kernel.

Signed-off-by: Chaithrika U S <chaithrika@ti.com>
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-09-19 00:18:06 -03:00
Chaithrika U S e9f4bb559c V4L/DVB (12177): dm646x: Add an entry for dm646x EVM card at building system
Makefile and Kconfig changes for DM646x Video Display device, using
davinci/vpif, adv7343 and ths7303 drivers.

Signed-off-by: Manjunath Hadli <mrh@ti.com>
Signed-off-by: Brijesh Jadav <brijesh.j@ti.com>
Signed-off-by: Chaithrika U S <chaithrika@ti.com>
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-09-19 00:18:05 -03:00
Chaithrika U S e7332e3a55 V4L/DVB (12176): davinci/vpif_display: Add VPIF display driver
Adds the VPIF display driver and the associated header file.

Signed-off-by: Manjunath Hadli <mrh@ti.com>
Signed-off-by: Brijesh Jadav <brijesh.j@ti.com>
Signed-off-by: Chaithrika U S <chaithrika@ti.com>
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-09-19 00:18:03 -03:00
Chaithrika U S 63a8e71c44 V4L/DVB (12175): davinci/vpif: Add Video Port Interface (VPIF) driver
This code be used by the display and capture drivers.

Signed-off-by: Manjunath Hadli <mrh@ti.com>
Signed-off-by: Brijesh Jadav <brijesh.j@ti.com>
Signed-off-by: Chaithrika U S <chaithrika@ti.com>
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-09-19 00:18:01 -03:00
Erik Andrén bb3baf89d1 V4L/DVB (12992): gspca - m5602-ov7660: Disable red and blue gain for now
Red and blue gain isn't handled in conformance with the v4l2 specification. Disable them for now.

Signed-off-by: Erik Andrén <erik.andren@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-09-19 00:18:00 -03:00
Erik Andrén e1e7e677a4 V4L/DVB (12991): gspca - m5602-ov7660: Remove redundant init writes
Signed-off-by: Erik Andrén <erik.andren@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-09-19 00:17:58 -03:00
Erik Andrén 87fad38e6e V4L/DVB (12990): gspca - m5602-ov7660: Don't set blue and red gain during init
Don't set blue and red gain during init as we manuall set it later

Signed-off-by: Erik Andrén <erik.andren@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-09-19 00:17:55 -03:00
Erik Andrén b5b93844ac V4L/DVB (12989): gspca - m5602-ov7660: Don't set gain during init
We manually set the gain later, no need to do it during init

Signed-off-by: Erik Andrén <erik.andren@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-09-19 00:17:47 -03:00
Erik Andrén eb3678fbe5 V4L/DVB (12988): gspca - m5602-ov7660: Remove old init
Signed-off-by: Erik Andrén <erik.andren@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-09-19 00:17:46 -03:00
Erik Andrén 2ec92c28d7 V4L/DVB (12987): gspca - m5602-ov7660: Set the hsync correctly
Signed-off-by: Erik Andrén <erik.andren@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-09-19 00:17:44 -03:00
Erik Andrén a66887d2ba V4L/DVB (12986): gspca - m5602-ov7660: Add hflip, vflip controls
Signed-off-by: Erik Andrén <erik.andren@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-09-19 00:17:42 -03:00
Erik Andrén 41532b91da V4L/DVB (12985): gspca - m5602-ov7660: Replace magic constants with defines
Signed-off-by: Erik Andrén <erik.andren@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-09-19 00:17:41 -03:00
Erik Andrén bf40b382f6 V4L/DVB (12984): gspca - m5602-ov7660: Use a new raw init
Signed-off-by: Erik Andrén <erik.andren@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-09-19 00:17:40 -03:00
Erik Andrén 7c7ddf1638 V4L/DVB (12983): gspca - m5602-ov7660: Add auto exposure ctrl
Signed-off-by: Erik Andrén <erik.andren@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-09-19 00:17:38 -03:00
Erik Andrén 456ebe4e92 V4L/DVB (12982): gspca - m5602-ov7660: Add auto gain ctrl
Signed-off-by: Erik Andrén <erik.andren@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-09-19 00:17:28 -03:00
Erik Andrén 36e64d5cec V4L/DVB (12981): gspca - m5602-ov7660: Set blue and red gain at init
Signed-off-by: Erik Andrén <erik.andren@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-09-19 00:16:58 -03:00
Erik Andrén f1f59fe60e V4L/DVB (12980): gspca - m5602-ov7660: Create auto white balance ctrl
Signed-off-by: Erik Andrén <erik.andren@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-09-19 00:16:53 -03:00
Erik Andrén a94e2f2cb9 V4L/DVB (12979): gspca - m5602-ov7660: Ensure that the default exposure is set
Ensure that the default exposure value is set at startup

Signed-off-by: Erik Andrén <erik.andren@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-09-19 00:16:47 -03:00
Erik Andrén 68fdb7a5b5 V4L/DVB (12978): gspca - m5602-ov7660: Add red gain control
Hook up the red gain controller

Signed-off-by: Erik Andrén <erik.andren@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-09-19 00:16:29 -03:00
Erik Andrén cbd1f7fb70 V4L/DVB (12977): gspca - m5602-ov7660: Create blue gain control
Hook up a blue gain v4l2 controller

Signed-off-by: Erik Andrén <erik.andren@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-09-19 00:16:21 -03:00
Steven Toth b8298e7e58 V4L/DVB (12976): SAA7164: Removed bus registration messages from driver startup
SAA7164: Removed bus registration messages from driver startup

Signed-off-by: Steven Toth <stoth@kernellabs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-09-19 00:16:17 -03:00
Steven Toth efac8aaa8e V4L/DVB (12975): SAA7164: Remove the i2c client_attach/detach support, no longer required.
SAA7164: Remove the i2c client_attach/detach support, no longer required.

Signed-off-by: Steven Toth <stoth@kernellabs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-09-19 00:16:16 -03:00
Steven Toth c9230457a9 V4L/DVB (12974): SAA7164: Remove the SAA7164 bus id, no longer required.
SAA7164: Remove the SAA7164 bus id, no longer required.

Signed-off-by: Steven Toth <stoth@kernellabs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-09-19 00:16:14 -03:00
Michael Krufky 6df84ea86e V4L/DVB (12970): saa7164: fix 64bit build warning
Fix the following build warning:

  CC [M]  saa7164-core.o
saa7164-core.c: In function 'saa7164_buffer_deliver':
saa7164-core.c:113: warning: passing argument 2 of 'dvb_dmx_swfilter_packets'
		    from incompatible pointer type

Signed-off-by: Michael Krufky <mkrufky@kernellabs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-09-19 00:16:10 -03:00
Michael Krufky 66cb930e95 V4L/DVB (12968): saa7164: fix Kconfig: remove HOTPLUG dependency
Signed-off-by: Michael Krufky <mkrufky@kernellabs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-09-19 00:16:09 -03:00
Michael Krufky 6d052dda59 V4L/DVB (12967): saa7164: fix Kconfig: rename DVB_FE_CUSTOMIZE to MEDIA_TUNER_CUSTOMISE
Signed-off-by: Michael Krufky <mkrufky@kernellabs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-09-19 00:16:05 -03:00
Michael Krufky 93463895ae V4L/DVB (12964): tuner-core: add support for NXP TDA18271 without TDA829X demod
Add support for NXP TDA18271 as a standalone tuner, allowing the use of
analog demodulators other than the Philips/NXP TDA829x.

Signed-off-by: Michael Krufky <mkrufky@kernellabs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-09-19 00:16:01 -03:00
Antti Palosaari eb3b2d89bc V4L/DVB (12962): ce6230: increase BULK transfer size from 512 to 8192
Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-09-19 00:15:54 -03:00
Antti Palosaari ae3745f63a V4L/DVB (12960): anysee: coding style fix
Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-09-19 00:15:52 -03:00