GitHub/MotorolaMobilityLLC/kernel-slsi.git
14 years ago[media] af9015: remove needless variable set
Antti Palosaari [Fri, 8 Oct 2010 00:46:41 +0000 (21:46 -0300)]
[media] af9015: remove needless variable set

Variable is don't care in that case. No need to set value.

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years ago[media] af9015: make checkpatch.pl happy
Antti Palosaari [Fri, 8 Oct 2010 00:37:06 +0000 (21:37 -0300)]
[media] af9015: make checkpatch.pl happy

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years ago[media] v4l/dvb: add support for AVerMedia AVerTV Red HD+ (A850T)
Yann E. MORIN [Fri, 1 Oct 2010 19:55:43 +0000 (16:55 -0300)]
[media] v4l/dvb: add support for AVerMedia AVerTV Red HD+ (A850T)

The AVerTV Red HD+ (A850T) is basically the same as the existing
AVerTV Volar Black HD (A850), but is specific to the french market.
The A850T identifies itself as a A850, but has its own PID. It even
suffers from the same EEPROM deficiencies.

This is based off a collection of information gathered from the
french support forums for Ubuntu, which I tried to properly format
into this patch:
  http://forum.ubuntu-fr.org/viewtopic.php?pid=3322825

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years ago[media] af9013: cache some reg values to reduce reg reads
Antti Palosaari [Thu, 7 Oct 2010 19:34:55 +0000 (16:34 -0300)]
[media] af9013: cache some reg values to reduce reg reads

Demod + tuner specific RF AGC and IF AGC limit values are read from demod
memory in every signal strength query. Cache those to reduce I2C traffic.

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years ago[media] af9013: optimize code size
Antti Palosaari [Thu, 7 Oct 2010 00:35:20 +0000 (21:35 -0300)]
[media] af9013: optimize code size

Precalculate coefficients register values. This reduces text size around 300 bytes.

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years ago[media] V4L-DVB: tm6000: Move VBI init to a separate function
Mauro Carvalho Chehab [Tue, 12 Oct 2010 15:11:55 +0000 (12:11 -0300)]
[media] V4L-DVB: tm6000: Move VBI init to a separate function

While here, documment that VBI may need changes, based on video STD, and
do some cleanup at device init, to be sure that VBI init will happen
all the times, and to remove a duplicated video standard call.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years ago[media] tm6000: Improve audio standards handling and add SECAM-DK
Dmitry Belimov [Tue, 12 Oct 2010 14:39:37 +0000 (11:39 -0300)]
[media] tm6000: Improve audio standards handling and add SECAM-DK

Rework audio. Add SECAM-DK, move SECAM to SECAM-B | SECAM-G.

Add some new audio standards and tricks for future, see
tm6000_set_audio_std.

For SECAM-DK it works.

Signed-off-by: Beholder Intl. Ltd. Dmitry Belimov <d.belimov@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years ago[media] tm6000: add audio standards table
Mauro Carvalho Chehab [Thu, 7 Oct 2010 05:28:24 +0000 (02:28 -0300)]
[media] tm6000: add audio standards table

The better is to remove the audio init from tm6000-core and add a
separate per-standard set of tables.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years ago[media] em28xx-audio: fix some locking issues
Mauro Carvalho Chehab [Sat, 9 Oct 2010 18:53:58 +0000 (15:53 -0300)]
[media] em28xx-audio: fix some locking issues

Those locking issues affect tvtime, causing a kernel oops/panic, due to
a race condition.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years ago[media] cx231xx: use core-assisted lock
Mauro Carvalho Chehab [Sat, 9 Oct 2010 16:13:35 +0000 (13:13 -0300)]
[media] cx231xx: use core-assisted lock

Instead of doing its own lock, use core-assisted one. As a bonus, it
will do the proper unlock during queue wait events. This fixes a
long-standing bug where softwares like tvtime would hang if you try to
use cx231xx-alsa.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years ago[media] cx231xx: Colibri carrier offset was wrong for PAL/M
Mauro Carvalho Chehab [Sat, 9 Oct 2010 15:04:25 +0000 (12:04 -0300)]
[media] cx231xx: Colibri carrier offset was wrong for PAL/M

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years ago[media] cx231xx: remove some unused functions
Mauro Carvalho Chehab [Fri, 8 Oct 2010 00:05:52 +0000 (21:05 -0300)]
[media] cx231xx: remove some unused functions

This file came originally from cx23885 driver. Some functions aren't
used. Now that they are declared as static, we have those errors:

drivers/media/video/cx231xx/cx231xx-417.c:615: warning: ‘mc417_gpio_set’ defined but not used
drivers/media/video/cx231xx/cx231xx-417.c:625: warning: ‘mc417_gpio_clear’ defined but not used
drivers/media/video/cx231xx/cx231xx-417.c:635: warning: ‘mc417_gpio_enable’ defined but not used

As they're not used, just remove them. If needed, they can be restored from
the git logs or from the cx23885 driver.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years ago[media] cx231xx: declare static functions as such
Mauro Carvalho Chehab [Fri, 8 Oct 2010 00:01:31 +0000 (21:01 -0300)]
[media] cx231xx: declare static functions as such

drivers/media/video/cx23885/built-in.o: In function `mc417_memory_write':
/home/v4l/v4l/patchwork/drivers/media/video/cx23885/cx23885-417.c:482: multiple definition of `mc417_memory_write'
drivers/media/video/cx231xx/built-in.o:/home/v4l/v4l/patchwork/drivers/media/video/cx231xx/cx231xx-417.c:477: first defined here
drivers/media/video/cx23885/built-in.o: In function `mc417_gpio_set':
/home/v4l/v4l/patchwork/drivers/media/video/cx23885/cx23885-417.c:636: multiple definition of `mc417_gpio_set'
drivers/media/video/cx231xx/built-in.o:/home/v4l/v4l/patchwork/drivers/media/video/cx231xx/cx231xx-417.c:615: first defined here
drivers/media/video/cx23885/built-in.o: In function `mc417_gpio_enable':
/home/v4l/v4l/patchwork/drivers/media/video/cx23885/cx23885-417.c:656: multiple definition of `mc417_gpio_enable'
drivers/media/video/cx231xx/built-in.o:/home/v4l/v4l/patchwork/drivers/media/video/cx231xx/cx231xx-417.c:635: first defined here
drivers/media/video/cx23885/built-in.o: In function `mc417_memory_read':
/home/v4l/v4l/patchwork/drivers/media/video/cx23885/cx23885-417.c:546: multiple definition of `mc417_memory_read'
drivers/media/video/cx231xx/built-in.o:/home/v4l/v4l/patchwork/drivers/media/video/cx231xx/cx231xx-417.c:541: first defined here
drivers/media/video/cx23885/built-in.o: In function `mc417_gpio_clear':
/home/v4l/v4l/patchwork/drivers/media/video/cx23885/cx23885-417.c:646: multiple definition of `mc417_gpio_clear'
drivers/media/video/cx231xx/built-in.o:/home/v4l/v4l/patchwork/drivers/media/video/cx231xx/cx231xx-417.c:625: first defined here
drivers/media/video/cx23885/built-in.o: In function `mc417_register_read':
/home/v4l/v4l/patchwork/drivers/media/video/cx23885/cx23885-417.c:388: multiple definition of `mc417_register_read'
drivers/media/video/cx231xx/built-in.o:/home/v4l/v4l/patchwork/drivers/media/video/cx231xx/cx231xx-417.c:401: first defined here
drivers/media/video/cx23885/built-in.o: In function `mc417_register_write':
/home/v4l/v4l/patchwork/drivers/media/video/cx23885/cx23885-417.c:324: multiple definition of `mc417_register_write'
drivers/media/video/cx231xx/built-in.o:/home/v4l/v4l/patchwork/drivers/media/video/cx231xx/cx231xx-417.c:343: first defined here

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years ago[media] cx231xx-417: Fix a gcc warning
Mauro Carvalho Chehab [Thu, 7 Oct 2010 06:33:00 +0000 (03:33 -0300)]
[media] cx231xx-417: Fix a gcc warning

gcc didn't like to have i++ inside a complex operation:

drivers/media/video/cx231xx/cx231xx-417.c: In function ‘cx231xx_load_firmware’:
drivers/media/video/cx231xx/cx231xx-417.c:1059: warning: operation on ‘i’ may be undefined
drivers/media/video/cx231xx/cx231xx-417.c:1061: warning: operation on ‘i’ may be undefined
drivers/media/video/cx231xx/cx231xx-417.c:1063: warning: operation on ‘i’ may be undefined

Btw, I agree with gcc, as we're using i and i++ at the same operation and,
depending on how optimization may occur, it may produce a wrong code.

While here, fix CodingStyle issues on the changed code.

Acked-by: Sri Deevi <Srinivasa.Deevi@conexant.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years ago[media] CodingStyle cleanup at s5h1432 and cx231xx
Mauro Carvalho Chehab [Thu, 7 Oct 2010 06:23:25 +0000 (03:23 -0300)]
[media] CodingStyle cleanup at s5h1432 and cx231xx

The patches received from the vendor contained a lot of CodingStyle
issues. Cleans the style issues reported by checkpatch.pl on
those drivers.

It is better to do such style fixes when merging a big set of
changes than latter. Of course, the better is to receive patches
already cleaned ;)

Acked-by: Sri Deevi <Srinivasa.Deevi@conexant.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years ago[media] cx231xx-audio: fix some locking issues
Mauro Carvalho Chehab [Mon, 27 Sep 2010 06:07:22 +0000 (03:07 -0300)]
[media] cx231xx-audio: fix some locking issues

Acked-by: Sri Deevi <Srinivasa.Deevi@conexant.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years ago[media] tda18271: allow restricting max out to 4 bytes
Mauro Carvalho Chehab [Mon, 27 Sep 2010 01:58:28 +0000 (22:58 -0300)]
[media] tda18271: allow restricting max out to 4 bytes

By default, tda18271 tries to optimize I2C bus by updating all registers
at the same time. Unfortunately, some devices doesn't support it.

The current logic has a problem when small_i2c is equal to 8, since there
are some transfers using 11 + 1 bytes.

Fix the problem by enforcing the max size at the right place, and allows
reducing it to max = 3 + 1.

Acked-by: Michael Krufky <mkrufky@kernellabs.com>
Acked-by: Sri Deevi <Srinivasa.Deevi@conexant.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years ago[media] cx231xx: Only change gpio direction when needed
Mauro Carvalho Chehab [Sun, 26 Sep 2010 23:48:38 +0000 (20:48 -0300)]
[media] cx231xx: Only change gpio direction when needed

Acked-by: Sri Deevi <Srinivasa.Deevi@conexant.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years ago[media] cx231xx: better handle the master port enable command
Mauro Carvalho Chehab [Sun, 26 Sep 2010 23:38:24 +0000 (20:38 -0300)]
[media] cx231xx: better handle the master port enable command

Improves the logic, for it to be clearer and to avoid having
board-dependent config there.

Acked-by: Sri Deevi <Srinivasa.Deevi@conexant.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years ago[media] cx231xx: properly use the right tuner i2c address
Mauro Carvalho Chehab [Sun, 26 Sep 2010 23:01:51 +0000 (20:01 -0300)]
[media] cx231xx: properly use the right tuner i2c address

The driver has a field to indicate what bus is used by tuner and
by demod. However, this field were never used. On Pixelview,
it uses I2C 2 for tuner, instead of I2C 1.

drivers/media/video/cx231xx/cx231xx-cards.c

Acked-by: Sri Deevi <Srinivasa.Deevi@conexant.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years ago[media] cx231xx: properly implement URB control messages log
Mauro Carvalho Chehab [Sun, 26 Sep 2010 21:16:51 +0000 (18:16 -0300)]
[media] cx231xx: properly implement URB control messages log

This allows usage of a tool at v4l-utils tree to parse URB messages
and display them to userspace. The tool is available at:

http://git.linuxtv.org/v4l-utils.git?a=blob;f=contrib/cx231xx/parse_cx231xx.pl;hb=HEAD

Acked-by: Sri Deevi <Srinivasa.Deevi@conexant.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years ago[media] cx231xx: fix Kconfig dependencies
Mauro Carvalho Chehab [Sun, 26 Sep 2010 03:00:49 +0000 (00:00 -0300)]
[media] cx231xx: fix Kconfig dependencies

ERROR: "cx2341x_mpeg_ctrls" [drivers/media/video/cx231xx/cx231xx.ko] undefined!
ERROR: "cx2341x_fill_defaults" [drivers/media/video/cx231xx/cx231xx.ko] undefined!
ERROR: "cx2341x_log_status" [drivers/media/video/cx231xx/cx231xx.ko] undefined!
ERROR: "cx2341x_ctrl_get_menu" [drivers/media/video/cx231xx/cx231xx.ko] undefined!
ERROR: "cx2341x_update" [drivers/media/video/cx231xx/cx231xx.ko] undefined!
ERROR: "cx2341x_ctrl_query" [drivers/media/video/cx231xx/cx231xx.ko] undefined!
ERROR: "cx2341x_ext_ctrls" [drivers/media/video/cx231xx/cx231xx.ko] undefined!

Acked-by: Sri Deevi <Srinivasa.Deevi@conexant.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years ago[media] cx231xx: remove a printk warning at -avcore and at -417
Mauro Carvalho Chehab [Sun, 26 Sep 2010 02:46:08 +0000 (23:46 -0300)]
[media] cx231xx: remove a printk warning at -avcore and at -417

drivers/media/video/cx231xx/cx231xx-avcore.c:1608: warning: format ‘%d’ expects type ‘int’, but argument 3 has type ‘long unsigned int’
drivers/media/video/cx231xx/cx231xx-417.c:1047: warning: format ‘%d’ expects type ‘int’, but argument 3 has type ‘size_t’

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years ago[media] cx231xx: Fix vblank/vactive line counts for PAL/SECAM
Devin Heitmueller [Thu, 19 Aug 2010 18:18:32 +0000 (15:18 -0300)]
[media] cx231xx: Fix vblank/vactive line counts for PAL/SECAM

Adjust the vblank and vactive counts so that they don't throw an error in
cx25840's set_std call (we did an equivalent change for NTSC when we got the
scaler working).

Signed-off-by: Devin Heitmueller <dheitmueller@hauppauge.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years ago[media] cx231xx: properly set active line count for PAL/SECAM
Devin Heitmueller [Thu, 19 Aug 2010 16:45:56 +0000 (13:45 -0300)]
[media] cx231xx: properly set active line count for PAL/SECAM

The cx231xx_do_mode_ctrl_overrides() function was not touching the vactive line
count for PAL/SECAM modes, which in some use cases results in it being left in
the chip default state of 480 (NTSC).

Explicitly set the values, as is already done for NTSC.

Signed-off-by: Devin Heitmueller <dheitmueller@hauppauge.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years ago[media] cx231xx: whitespace cleanup
Devin Heitmueller [Thu, 19 Aug 2010 14:09:28 +0000 (11:09 -0300)]
[media] cx231xx: whitespace cleanup

Fix some indentation problems and remove an "if (1)" from the Colibri setup
function.

Signed-off-by: Devin Heitmueller <dheitmueller@hauppauge.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years ago[media] cx231xx: remove board specific check for Colibri configuration
Devin Heitmueller [Thu, 19 Aug 2010 14:05:38 +0000 (11:05 -0300)]
[media] cx231xx: remove board specific check for Colibri configuration

The cx231xx_set_Colibri_For_LowIF() function is only ever called if the tuner
has a DIF (see vidioc_s_frequency() in cx231xx-video.c).  Hence, we do not
need to do a board specific check in this function.

Signed-off-by: Devin Heitmueller <dheitmueller@hauppauge.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years ago[media] cx231xx: Make the DIF configuration based on the tuner not the board id
Devin Heitmueller [Thu, 19 Aug 2010 13:55:05 +0000 (10:55 -0300)]
[media] cx231xx: Make the DIF configuration based on the tuner not the board id

The current code was deciding whether a DIF was present based on the board
profile.  However, this is just another thing for someone to get wrong when
adding new boards.  Make the decision based on the tuner instead, so that a
developer adding new boards only needs to specify which tuner the device has.

Of course, the first time somebody adds a board with a tuner other than xc5000
or tda18271, he/she will need to add another line for that tuner.  But we
provide a friendly message in dmesg to let them know that.

Signed-off-by: Devin Heitmueller <dheitmueller@hauppauge.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years ago[media] cx231xx: remove i2c ir stubs
Devin Heitmueller [Wed, 18 Aug 2010 22:10:03 +0000 (19:10 -0300)]
[media] cx231xx: remove i2c ir stubs

Nobody is ever going to implement an i2c based IR controller on a bridge that
has an onboard universal IR receiver.  This stuff was all copied from em28xx,
which has old enough versions of the chip that some didn't have onboard IR.

Remove the stubs related to i2c based IR (keeping the cx231xx-input code).

Signed-off-by: Devin Heitmueller <dheitmueller@hauppauge.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years ago[media] cx231xx: move printk() line related to 417 initialization
Devin Heitmueller [Wed, 18 Aug 2010 21:09:28 +0000 (18:09 -0300)]
[media] cx231xx: move printk() line related to 417 initialization

Move a printk() message which refers to enabling the cx23417 so that it only
shows up on a board that has the cx23417.

Signed-off-by: Devin Heitmueller <dheitmueller@hauppauge.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years ago[media] cx231xx: fixup video grabber board profile
Devin Heitmueller [Wed, 18 Aug 2010 21:04:04 +0000 (18:04 -0300)]
[media] cx231xx: fixup video grabber board profile

The video grabber reference design (Veyron) does not have a tuner input, so
do not have it defined in the board profile.

Signed-off-by: Devin Heitmueller <dheitmueller@hauppauge.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years ago[media] cx231xx: make output mode configurable via the board profile
Devin Heitmueller [Wed, 18 Aug 2010 20:50:07 +0000 (17:50 -0300)]
[media] cx231xx: make output mode configurable via the board profile

Extend the board profile structure to allow configuration of the output mode.
Right now they are all doing VIP 1.1 format, but we have a board that needs
ITU656 format (which hasn't been checked in yet).

Signed-off-by: Devin Heitmueller <dheitmueller@hauppauge.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years ago[media] cx231xx: Add initial support for Hauppauge USB-Live2
Devin Heitmueller [Sat, 31 Jul 2010 03:49:01 +0000 (00:49 -0300)]
[media] cx231xx: Add initial support for Hauppauge USB-Live2

Add initial support for the Hauppauge USBLive 2 (2040:c200).  Note that I
had to copy a bunch of the case statements used for the Conexant video grabber
reference design (which also doesn't have a tuner).  This will likely need to
be refactored out into the board profile.

Signed-off-by: Devin Heitmueller <dheitmueller@hauppauge.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years ago[media] cx231xx: set correct i2c port for Exeter tuner
Devin Heitmueller [Mon, 12 Jul 2010 19:52:10 +0000 (16:52 -0300)]
[media] cx231xx: set correct i2c port for Exeter tuner

The tuner is on i2c port 3 just like all the reference designs.  Having it
improperly set to port #1 causes the tuner initialization to fail when enabling
the device.

Signed-off-by: Devin Heitmueller <dheitmueller@hauppauge.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years ago[media] cx231xx: set standard tune to last known frequency when switching inputs
Devin Heitmueller [Mon, 12 Jul 2010 19:50:30 +0000 (16:50 -0300)]
[media] cx231xx: set standard tune to last known frequency when switching inputs

If switching to a tuner input, reset the standard and tune to the last known
frequency.  We need to do this in particular for this bridge since the tuner
gets powered down when captuing on the composite or s-video inputs.

Signed-off-by: Devin Heitmueller <dheitmueller@hauppauge.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years ago[media] cx231xx: Remove hack which puts device into bulk mode
Devin Heitmueller [Mon, 12 Jul 2010 18:42:34 +0000 (15:42 -0300)]
[media] cx231xx: Remove hack which puts device into bulk mode

Remove a hack which was jammed into s_input to force the device into bulk mode
at runtime (an abuse of the API).  If this sort of functionality is actually
needed (aside from the existing "transfer_mode" modprobe variable), a patch
can be submitted which makes use of a private control.

Signed-off-by: Devin Heitmueller <dheitmueller@hauppauge.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years ago[media] cx231xx: Set the power mode instead of using the digital mux GPIOs
Devin Heitmueller [Mon, 12 Jul 2010 18:37:00 +0000 (15:37 -0300)]
[media] cx231xx: Set the power mode instead of using the digital mux GPIOs

The Exeter hardware design does not use GPIOs to manage whether its in
digital mode or analog mode, but we need to setup the power control properly.

For that board, setup power control and remove the mux select call.  It is
highly likely that this change could be used by other boards as well, which
would make power management cleaner (fixing known issues transitioning between
analog and digital mode).

Signed-off-by: Devin Heitmueller <dheitmueller@hauppauge.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years ago[media] cx231xx: do not call video_mux as part of isoc setup
Devin Heitmueller [Mon, 12 Jul 2010 18:34:57 +0000 (15:34 -0300)]
[media] cx231xx: do not call video_mux as part of isoc setup

You cannot call the video_mux routine from within the isoc setup, because that
code is shared with the digital isoc handler.  This was causing the GPIOs and
power control to be put into the wrong state when starting up digital mode.

Signed-off-by: Devin Heitmueller <dheitmueller@hauppauge.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years ago[media] cx231xx: Clear avmode bits before setting
Devin Heitmueller [Mon, 12 Jul 2010 18:31:56 +0000 (15:31 -0300)]
[media] cx231xx: Clear avmode bits before setting

We need to clear out the field before setting individual bits, or else we end
up with a union of whatever was there and what we are trying to set.  For
example, switching to digital mode ends up being 0x30 instead of 0x10 if we
were previously in analog tv mode.

Signed-off-by: Devin Heitmueller <dheitmueller@hauppauge.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years ago[media] cx231xx: make video scaler work properly
Devin Heitmueller [Fri, 9 Jul 2010 16:29:31 +0000 (13:29 -0300)]
[media] cx231xx: make video scaler work properly

Move the responsibility for setting up the horizontal and vertical scalers
entirely to the cx25840 driver.  The cx231xx-avcore was actually programming
garbage into the HSCALE_CTRL and VSCALE_CTRL registers (because of differences
in how the em28xx driver worked, which the cx231xx driver was derived from).

The net effect is that the scaler now works properly (tested with both PAL
and NTSC under mplayer and tvtime).

This patch also gets rid of cx25840 errors showing up in dmesg which say
"720x480 is not a valid size" (since we now properly setup the size of the
active video area).

Signed-off-by: Devin Heitmueller <dheitmueller@hauppauge.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years ago[media] cx231xx: reduce log severity for some debug events
Devin Heitmueller [Thu, 8 Jul 2010 20:20:04 +0000 (17:20 -0300)]
[media] cx231xx: reduce log severity for some debug events

Change the log level from info to debug for some log events that occur
frequently and should never need to be seen in normal operation.

Signed-off-by: Devin Heitmueller <dheitmueller@hauppauge.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years ago[media] cx231xx: remove board specific initialization
Devin Heitmueller [Thu, 8 Jul 2010 20:05:30 +0000 (17:05 -0300)]
[media] cx231xx: remove board specific initialization

There is no need for a switch statement here.  Use the contents of the board
profile to dictate the tuner driver and i2c address.  Eventually if a board
ever comes around which has a different i2c bus than #1, well that should be a
field in the board profile as well.

Signed-off-by: Devin Heitmueller <dheitmueller@hauppauge.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years ago[media] cx231xx: Ensure VBI fields are sent in the correct order
Devin Heitmueller [Thu, 8 Jul 2010 18:45:13 +0000 (15:45 -0300)]
[media] cx231xx: Ensure VBI fields are sent in the correct order

The current code was sending one videobuf per field (despite having specified
V4L2_FIELD_SEQ_TB during setup).  As a result, application which used the
read() interface would work, except they would sometimes have the fields
reversed (depending on the luck of which field the device was on when the
application started VBI capture).  The net effect was that CC decoding would
only work about 50% of the time.

Restructure the VBI code a bit so that works like all the other drivers, such
that both fields are delivered in a single videobuf buffer, which ensures that
they are always received in a predictable order.

Signed-off-by: Devin Heitmueller <dheitmueller@hauppauge.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years ago[media] cx231xx: Fix VBI parameters for sampling rate and offset
Devin Heitmueller [Thu, 8 Jul 2010 16:12:47 +0000 (13:12 -0300)]
[media] cx231xx: Fix VBI parameters for sampling rate and offset

The VBI sampling rate and offset were incorrectly specified, which resulted in
CC data not being rendered under zvbi or tvtime.

Set the fields correctly.

Signed-off-by: Devin Heitmueller <dheitmueller@hauppauge.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years ago[media] cx231xx: fix format string warning
Devin Heitmueller [Wed, 7 Jul 2010 22:28:23 +0000 (19:28 -0300)]
[media] cx231xx: fix format string warning

Change a %x to a %p since the variable is a pointer

Signed-off-by: Devin Heitmueller <dheitmueller@hauppauge.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years ago[media] cx231xx-dvb: remove unused variable
Devin Heitmueller [Wed, 7 Jul 2010 22:26:42 +0000 (19:26 -0300)]
[media] cx231xx-dvb: remove unused variable

Get rid of warning about unused variable

Signed-off-by: Devin Heitmueller <dheitmueller@hauppauge.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years ago[media] s5h1432: fix codingstyle issues
Devin Heitmueller [Wed, 7 Jul 2010 21:25:38 +0000 (18:25 -0300)]
[media] s5h1432: fix codingstyle issues

Run Lindent and fix a few spacing issues.

This patch makes no functional change to the driver.

Signed-off-by: Devin Heitmueller <dheitmueller@hauppauge.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years ago[media] Use smaller i2c transaction size with 18271 tuner
Devin Heitmueller [Wed, 7 Jul 2010 14:33:56 +0000 (11:33 -0300)]
[media] Use smaller i2c transaction size with 18271 tuner

Configure the tda18271 to use a smaller transaction size by default, which
works around some sort of i2c bug in the Polaris driver (which needs to be
debugged).

This should be safe for other boards (being in tuner-core means it will be
enabled by default), although testing needs to be done.

Signed-off-by: Devin Heitmueller <dheitmueller@hauppauge.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years ago[media] cx231xx: fix race condition in DVB initialization
Devin Heitmueller [Tue, 6 Jul 2010 22:24:19 +0000 (19:24 -0300)]
[media] cx231xx: fix race condition in DVB initialization

Fix case where analog calls come in while the DVB side of the board is still
initializing.  This patch is actually just an exact port of the same patch
made by Mauro to em28xx in hg rev 14762.

Signed-off-by: Devin Heitmueller <dheitmueller@hauppauge.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years ago[media] cx231xx: add USB ID Hauppauge model 111301
Devin Heitmueller [Tue, 6 Jul 2010 21:25:19 +0000 (18:25 -0300)]
[media] cx231xx: add USB ID Hauppauge model 111301

Add a USB ID for model 111301.

Signed-off-by: Devin Heitmueller <dheitmueller@hauppauge.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years ago[media] cx231xx: add support for Hauppauge EXETER
Michael Krufky [Tue, 6 Jul 2010 21:23:53 +0000 (18:23 -0300)]
[media] cx231xx: add support for Hauppauge EXETER

Add support for various Hauppauge EXETER designs.

Note by DJH: fixed a few minor 'make checkpatch' warnings before commit.

Signed-off-by: Michael Krufky <mkrufky@kernellabs.com>
Signed-off-by: Devin Heitmueller <dheitmueller@hauppauge.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years ago[media] cx231xx: Added support for Carraera, Shelby, RDx_253S and VIDEO_GRABBER
Palash Bandyopadhyay [Tue, 6 Jul 2010 21:12:25 +0000 (18:12 -0300)]
[media] cx231xx: Added support for Carraera, Shelby, RDx_253S and VIDEO_GRABBER

Added support for new cx231xx boards - Carraera, Shelby, RDx_253S and
VIDEO_GRABBER.

[mchehab@redhat.com: Fix a merge conflict with BKL removal patches]
Signed-off-by: Palash Bandyopadhyay <palash.bandyopadhyay@conexant.com>
Signed-off-by: Devin Heitmueller <dheitmueller@hauppauge.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years ago[media] s5h1432: Add new s5h1432 driver
Palash Bandyopadhyay [Tue, 6 Jul 2010 19:40:58 +0000 (16:40 -0300)]
[media] s5h1432: Add new s5h1432 driver

Introduce a new driver for the s5h1432

Signed-off-by: Palash Bandyopadhyay <palash.bandyopadhyay@conexant.com>
Signed-off-by: Devin Heitmueller <dheitmueller@hauppauge.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years ago[media] Staging: cx25821: fix braces and space coding style issues
Ruslan Pisarev [Mon, 27 Sep 2010 13:01:36 +0000 (10:01 -0300)]
[media] Staging: cx25821: fix braces and space coding style issues

Errors found by the checkpatch.pl tool.

[mchehab@redhat.com: merged a series of CodingStyle cleanup patches for cx25851. They're all from the same author, and patches the same driver]
Signed-off-by: Ruslan Pisarev <ruslan@rpisarev.org.ua>
Cc: Palash Bandyopadhyay <Palash.Bandyopadhyay@conexant.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years ago[media] Staging: cx25821: remove spaces after parenthesis
Ruslan Pisarev [Mon, 27 Sep 2010 13:00:24 +0000 (10:00 -0300)]
[media] Staging: cx25821: remove spaces after parenthesis

fix "ERROR: space prohibited after that open parenthesis '('"

This is a patch to the cx25821-audio-upstream.h file that fixed up a
space errors found by the checkpatch.pl tools.

Signed-off-by: Ruslan Pisarev <ruslan@rpisarev.org.ua>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years ago[media] cafe_ccic: Implement VIDIOC_ENUM_FRAMEINTERVALS and ENUM_FRAMESIZES
Daniel Drake [Fri, 24 Sep 2010 17:17:47 +0000 (14:17 -0300)]
[media] cafe_ccic: Implement VIDIOC_ENUM_FRAMEINTERVALS and ENUM_FRAMESIZES

This allows GStreamer to pick appropriate framerates and resolutions
based on desired capture parameters.

Signed-off-by: Daniel Drake <dsd@laptop.org>
Acked-by: Jonathan Corbet <corbet@lwn.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years ago[media] ov7670: implement VIDIOC_ENUM_FRAMESIZES
Daniel Drake [Fri, 24 Sep 2010 17:17:37 +0000 (14:17 -0300)]
[media] ov7670: implement VIDIOC_ENUM_FRAMESIZES

GStreamer uses this.

Signed-off-by: Daniel Drake <dsd@laptop.org>
Acked-by: Jonathan Corbet <corbet@lwn.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years ago[media] ov7670: implement VIDIOC_ENUM_FRAMEINTERVALS
Jonathan Corbet [Fri, 24 Sep 2010 17:17:29 +0000 (14:17 -0300)]
[media] ov7670: implement VIDIOC_ENUM_FRAMEINTERVALS

Inquiring minds (and gstreamer) want to know.

Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Signed-off-by: Daniel Drake <dsd@laptop.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years ago[media] cafe_ccic: Fix hang in command write processing
Daniel Drake [Fri, 24 Sep 2010 17:17:17 +0000 (14:17 -0300)]
[media] cafe_ccic: Fix hang in command write processing

This patch, which basically reverts 6d77444ac, fixes an occasional
on-boot or on-capture hang on the XO-1 laptop.

It seems like the cafe hardware is flakier than we thought and that in
some cases, the commands get executed but are never reported as completed
(even if we substantially increase the delays before reading registers).

Reintroduce the 1-second CAFE_SMBUS_TIMEOUT to catch and avoid this
strange hardware bug.

Signed-off-by: Daniel Drake <dsd@laptop.org>
Acked-by: Jonathan Corbet <corbet@lwn.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years ago[media] go7007: MJPEG buffer overflow
Pete Eberlein [Thu, 23 Sep 2010 17:43:41 +0000 (14:43 -0300)]
[media] go7007: MJPEG buffer overflow

The go7007 driver has a potential buffer overflow and pointer corruption
bug which causes a crash while capturing MJPEG. The motion detection
(MODET) active_map array can be overflowed by JPEG frame data that
emulates a MODET start code. The active_map overflow overwrites the
active_buf pointer, causing a crash.

The JPEG data that emulated MODET start code was being removed from the
output, resulting in garbled JPEG frames. Therefore ignore MODET start
codes when MODET is not enabled.

Signed-off-by: Pete Eberlein <pete@sensoray.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years ago[media] staging/tm6000: Fix a warning message
Mauro Carvalho Chehab [Thu, 7 Oct 2010 12:42:43 +0000 (09:42 -0300)]
[media] staging/tm6000: Fix a warning message

I added a code to the driver to force it to produce a warning. This
were intended to remind me about a very bad hack. I never found a way
to workaround. So, instead of those warnings:

drivers/staging/tm6000/tm6000-core.c: In function ‘tm6000_init_analog_mode’:
drivers/staging/tm6000/tm6000-core.c:328: warning: ISO C90 forbids mixed declarations and code

Let's document the issue and hope if someone with the support of the vendor
might fix it.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years ago[media] lirc_igorplugusb: Fix a compilation waring
Mauro Carvalho Chehab [Thu, 7 Oct 2010 12:36:43 +0000 (09:36 -0300)]
[media] lirc_igorplugusb: Fix a compilation waring

drivers/staging/lirc/lirc_igorplugusb.c: In function ‘usb_remote_probe’:
drivers/staging/lirc/lirc_igorplugusb.c:393: warning: format ‘%lu’ expects type ‘long unsigned int’, but argument 3 has type ‘unsigned int’

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years ago[media] videobuf-dma-sg: Use min_t(size_t, PAGE_SIZE ..)
Mauro Carvalho Chehab [Thu, 7 Oct 2010 12:31:33 +0000 (09:31 -0300)]
[media] videobuf-dma-sg: Use min_t(size_t, PAGE_SIZE ..)

As pointed by Laurent:

I think min_t(size_t, PAGE_SIZE, size) is the preferred way.

Thanks-to: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years ago[media] lirc: Make struct file_operations pointer const
Geert Uytterhoeven [Thu, 30 Sep 2010 19:55:07 +0000 (16:55 -0300)]
[media] lirc: Make struct file_operations pointer const

struct file_operations was made const in the drivers, but not in struct
lirc_driver:

drivers/staging/lirc/lirc_it87.c:365: warning: initialization discards qualifiers from pointer target type
drivers/staging/lirc/lirc_parallel.c:571: warning: initialization discards qualifiers from pointer target type
drivers/staging/lirc/lirc_serial.c:1073: warning: initialization discards qualifiers from pointer target type
drivers/staging/lirc/lirc_sir.c:482: warning: initialization discards qualifiers from pointer target type
drivers/staging/lirc/lirc_zilog.c:1284: warning: assignment discards qualifiers from pointer target type

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Acked-by: Jarod Wilson <jarod@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB: Fix a merge conflict that affects unlock_ioctl
Mauro Carvalho Chehab [Sat, 9 Oct 2010 19:43:40 +0000 (16:43 -0300)]
V4L/DVB: Fix a merge conflict that affects unlock_ioctl

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB: tm6000: Fix warnings due to a small array size
Mauro Carvalho Chehab [Thu, 7 Oct 2010 01:54:33 +0000 (22:54 -0300)]
V4L/DVB: tm6000: Fix warnings due to a small array size

drivers/staging/tm6000/tm6000-stds.c:101: warning: excess elements in array initializer
drivers/staging/tm6000/tm6000-stds.c:101: warning: (near initialization for ‘tv_stds[0].common’)
drivers/staging/tm6000/tm6000-stds.c:160: warning: excess elements in array initializer
drivers/staging/tm6000/tm6000-stds.c:160: warning: (near initialization for ‘tv_stds[1].common’)
drivers/staging/tm6000/tm6000-stds.c:219: warning: excess elements in array initializer
drivers/staging/tm6000/tm6000-stds.c:219: warning: (near initialization for ‘tv_stds[2].common’)
drivers/staging/tm6000/tm6000-stds.c:336: warning: excess elements in array initializer
drivers/staging/tm6000/tm6000-stds.c:336: warning: (near initialization for ‘tv_stds[4].common’)

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB: saa7134-input can't be a module right now
Mauro Carvalho Chehab [Thu, 7 Oct 2010 01:02:58 +0000 (22:02 -0300)]
V4L/DVB: saa7134-input can't be a module right now

There are some symbols at saa7134-input that are used on saa7134
and vice-versa. Due to that, module install fails.

So, partially revert commit 9f495cf7d691c99bf7bdcec9f35fcfdad2cf9ae9.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB: videobuf-dma-sg: Fix a warning due to the usage of min(PAGE_SIZE, arg)
Mauro Carvalho Chehab [Thu, 7 Oct 2010 00:57:04 +0000 (21:57 -0300)]
V4L/DVB: videobuf-dma-sg: Fix a warning due to the usage of min(PAGE_SIZE, arg)

drivers/media/video/videobuf-dma-sg.c: In function ‘videobuf_pages_to_sg’:
drivers/media/video/videobuf-dma-sg.c:119: warning: comparison of distinct pointer types lacks a cast
drivers/media/video/videobuf-dma-sg.c:120: warning: comparison of distinct pointer types lacks a cast

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB: gspca - sonixj: Have 0c45:6130 handled by sonixj instead of sn9c102
Jean-François Moine [Fri, 1 Oct 2010 11:06:51 +0000 (08:06 -0300)]
V4L/DVB: gspca - sonixj: Have 0c45:6130 handled by sonixj instead of sn9c102

The driver sn9c102 does not know about the sensor mi0360b.

Signed-off-by: Jean-François Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB: gspca - sonixj: Bad detection of the end of image
Jean-François Moine [Fri, 1 Oct 2010 10:54:30 +0000 (07:54 -0300)]
V4L/DVB: gspca - sonixj: Bad detection of the end of image

The 'end of image' block may be splitted between two ISOC packets.
This case was not tested, so, some images could be lost and concatenated
to previous one(s), raising 'frame overflow' errors.

Signed-off-by: Jean-François Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB: gspca - sonixj: Add sensor mi0360b
Jean-François Moine [Fri, 1 Oct 2010 10:51:24 +0000 (07:51 -0300)]
V4L/DVB: gspca - sonixj: Add sensor mi0360b

Signed-off-by: Jean-François Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB: gspca - mr97310a: Declare static the constant tables
Jean-François Moine [Fri, 1 Oct 2010 10:37:15 +0000 (07:37 -0300)]
V4L/DVB: gspca - mr97310a: Declare static the constant tables

Signed-off-by: Jean-François Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB: gspca - many subdrivers: Handle the buttons when CONFIG_INPUT=m
Jean-François Moine [Fri, 1 Oct 2010 10:33:26 +0000 (07:33 -0300)]
V4L/DVB: gspca - many subdrivers: Handle the buttons when CONFIG_INPUT=m

Signed-off-by: Jean-François Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB: radio-si4713: Release i2c adapter in driver cleanup paths
Jarkko Nikula [Tue, 21 Sep 2010 08:49:42 +0000 (05:49 -0300)]
V4L/DVB: radio-si4713: Release i2c adapter in driver cleanup paths

Call to i2c_put_adapter was missing in radio_si4713_pdriver_probe and
radio_si4713_pdriver_remove.

Signed-off-by: Jarkko Nikula <jhnikula@gmail.com>
Acked-by: Eduardo Valentin <eduardo.valentin@nokia.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB: tm6000+audio
Dmitri Belimov [Mon, 20 Sep 2010 20:07:15 +0000 (17:07 -0300)]
V4L/DVB: tm6000+audio

I rework my last patch for audio and now audio works well. This patch
can be submited to GIT tree Quality of audio now is good for SECAM-DK.
For other standard I set some value from datasheet need some tests.

1. Fix pcm buffer overflow
2. Rework pcm buffer fill method
3. Swap bytes in audio stream
4. Change some registers value for TM6010
5. Change pcm buffer size

Signed-off-by: Beholder Intl. Ltd. Dmitry Belimov <d.belimov@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB: uvc: Enable USB autosuspend by default on uvcvideo
Matthew Garrett [Thu, 16 Sep 2010 18:00:04 +0000 (15:00 -0300)]
V4L/DVB: uvc: Enable USB autosuspend by default on uvcvideo

We've been doing this for a while in Fedora without any complaints.

Signed-off-by: Matthew Garrett <mjg@redhat.com>
Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB: tda18271: Add some hint about what tda18217 reg ID returned
Mauro Carvalho Chehab [Sun, 26 Sep 2010 03:39:26 +0000 (00:39 -0300)]
V4L/DVB: tda18271: Add some hint about what tda18217 reg ID returned

Instead of doing:

[   82.581639] tda18271 4-0060: creating new instance
[   82.588411] Unknown device detected @ 4-0060, device not supported.
[   82.594695] tda18271_attach: [4-0060|M] error -22 on line 1272
[   82.600530] tda18271 4-0060: destroying instance

Print:
[  468.740392] Unknown device (0) detected @ 4-0060, device not supported.

for the error message, to help detecting what's going wrong with the
device.

This helps to detect when the driver is using the wrong I2C bus (or have
the i2g gate switch pointing to the wrong place), on devices like cx231xx
that just return 0 on reads to a non-existent i2c device.

Reviewed-by: Michael Krufky <mkrufky@kernellabs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB: v4l2-common: Move v4l2_find_nearest_format from videodev2.h to v4l2-common.h
Hans Verkuil [Thu, 30 Sep 2010 12:29:37 +0000 (09:29 -0300)]
V4L/DVB: v4l2-common: Move v4l2_find_nearest_format from videodev2.h to v4l2-common.h

This function is an internal API and belongs in v4l2-common.h, not
videodev.h. The return pointer and probe argument should be const as well.

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB: videobuf: add ext_lock argument to the queue init functions (part 2)
Hans Verkuil [Thu, 30 Sep 2010 12:18:52 +0000 (09:18 -0300)]
V4L/DVB: videobuf: add ext_lock argument to the queue init functions (part 2)

Missed a few init functions on non-Intel platforms the first time :-(

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB: gspca - sonixj: Propagate USB errors to higher level
Jean-François Moine [Sat, 25 Sep 2010 09:12:44 +0000 (06:12 -0300)]
V4L/DVB: gspca - sonixj: Propagate USB errors to higher level

Signed-off-by: Jean-François Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB: gspca - spca505: Remove the eeprom write commands of NxUltra
Jean-François Moine [Sat, 25 Sep 2010 08:36:11 +0000 (05:36 -0300)]
V4L/DVB: gspca - spca505: Remove the eeprom write commands of NxUltra

With a null request byte, these commands prevented the next commands
to be executed.

Signed-off-by: Jean-François Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB: gspca - cpia1: Fix compilation warning when gspca debug disabled
Jean-François Moine [Sat, 25 Sep 2010 06:23:34 +0000 (03:23 -0300)]
V4L/DVB: gspca - cpia1: Fix compilation warning when gspca debug disabled

Signed-off-by: Jean-François Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB: gspca - benq: Remove useless module load/unload messages
Jean-François Moine [Sat, 25 Sep 2010 06:20:45 +0000 (03:20 -0300)]
V4L/DVB: gspca - benq: Remove useless module load/unload messages

Signed-off-by: Jean-François Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB: gspca - benq: Display error messages when gspca debug disabled
Jean-François Moine [Sat, 25 Sep 2010 06:19:33 +0000 (03:19 -0300)]
V4L/DVB: gspca - benq: Display error messages when gspca debug disabled

Signed-off-by: Jean-François Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB: soc-camera: allow only one video queue per device
Guennadi Liakhovetski [Tue, 17 Aug 2010 17:29:51 +0000 (14:29 -0300)]
V4L/DVB: soc-camera: allow only one video queue per device

Multiple user-space application instances can open the same video device, but
it only makes sense for one of them to manage the videobuffer queue and set
video format of the device. Restrict soc-camera respectively.

Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB: V4L2: add a generic function to find the nearest discrete format to the...
Guennadi Liakhovetski [Fri, 27 Aug 2010 16:41:44 +0000 (13:41 -0300)]
V4L/DVB: V4L2: add a generic function to find the nearest discrete format to the required one

Many video drivers implement a fixed set of frame formats and thus face a task
of finding the best match for a user-requested format. Implementing this in a
generic function has also an advantage, that different drivers with similar
supported format sets will select the same format for the user, which improves
consistency across drivers.

Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB: mx2_camera: add informative camera clock frequency printout
Michael Grzeschik [Fri, 27 Aug 2010 12:39:05 +0000 (09:39 -0300)]
V4L/DVB: mx2_camera: add informative camera clock frequency printout

Signed-off-by: Michael Grzeschik <m.grzeschik@pengutronix.de>
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB: mx2_camera: implement forced termination of active buffer for mx25
Baruch Siach [Tue, 27 Jul 2010 12:06:10 +0000 (09:06 -0300)]
V4L/DVB: mx2_camera: implement forced termination of active buffer for mx25

This allows userspace to terminate a capture without waiting for the current
frame to complete.

Signed-off-by: Baruch Siach <baruch@tkos.co.il>
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB: mx2_camera: fix comment typo
Baruch Siach [Tue, 27 Jul 2010 12:06:09 +0000 (09:06 -0300)]
V4L/DVB: mx2_camera: fix comment typo

Signed-off-by: Baruch Siach <baruch@tkos.co.il>
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB: mx2_camera: remove emma limitation for RGB565
Michael Grzeschik [Mon, 9 Aug 2010 14:57:04 +0000 (11:57 -0300)]
V4L/DVB: mx2_camera: remove emma limitation for RGB565

In the current source status the emma has no limitation for any PIXFMT
since the data is parsed raw and unprocessed into the memory.

Signed-off-by: Michael Grzeschik <m.grzeschik@pengutronix.de>
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB: mt9m111: register cleanup hex to dec bitoffset
Michael Grzeschik [Tue, 3 Aug 2010 10:57:41 +0000 (07:57 -0300)]
V4L/DVB: mt9m111: register cleanup hex to dec bitoffset

Signed-off-by: Philipp Wiesner <p.wiesner@phytec.de>
Signed-off-by: Michael Grzeschik <m.grzeschik@pengutronix.de>
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB: cpia2: remove V4L1 support from this driver
Hans Verkuil [Sun, 19 Sep 2010 09:00:54 +0000 (06:00 -0300)]
V4L/DVB: cpia2: remove V4L1 support from this driver

V4L1 is deprecated and will be removed completely soon.

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB: em28xx: fix a compilation warning
Mauro Carvalho Chehab [Thu, 30 Sep 2010 11:41:49 +0000 (08:41 -0300)]
V4L/DVB: em28xx: fix a compilation warning

drivers/media/video/em28xx/em28xx-video.c: In function ‘vidioc_s_register’:
drivers/media/video/em28xx/em28xx-video.c:1617: warning: unused variable ‘rc’

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB: radio-mr800: remove BKL
Hans Verkuil [Sun, 26 Sep 2010 11:01:18 +0000 (08:01 -0300)]
V4L/DVB: radio-mr800: remove BKL

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB: em28xx: the default std was not passed on to the subdevs
Hans Verkuil [Sun, 26 Sep 2010 10:45:15 +0000 (07:45 -0300)]
V4L/DVB: em28xx: the default std was not passed on to the subdevs

The initial em28xx std (PAL) was not passed on to the subdevs. This led to
these tvp5150 kernel log errors when running v4l2-ctl --all:

tvp5150 0-005c: VBI can't be configured without knowing number of lines

The reason was that tvp5150 was still using its own internal default: STD_ALL.

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB: em28xx: remove BKL
Hans Verkuil [Sun, 26 Sep 2010 10:34:45 +0000 (07:34 -0300)]
V4L/DVB: em28xx: remove BKL

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB: vivi: remove BKL
Hans Verkuil [Mon, 20 Sep 2010 21:25:55 +0000 (18:25 -0300)]
V4L/DVB: vivi: remove BKL

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB: videobuf: add queue argument to videobuf_waiton()
Hans Verkuil [Sun, 26 Sep 2010 12:01:26 +0000 (09:01 -0300)]
V4L/DVB: videobuf: add queue argument to videobuf_waiton()

videobuf_waiton() must unlock and relock ext_lock if it has to wait.
For that to happen it needs the videobuf_queue pointer.

Don't attempt to unlock/relock q->ext_lock unless it was locked in the
first place.

vb->state has to be protected by a spinlock to be safe.

This patch is based on code from Mauro Carvalho Chehab <mchehab@redhat.com>.

[mchehab@redhat.com: add extra argument to a few missing places]
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB: videobuf: add ext_lock argument to the queue init functions
Hans Verkuil [Mon, 20 Sep 2010 20:39:46 +0000 (17:39 -0300)]
V4L/DVB: videobuf: add ext_lock argument to the queue init functions

Add an ext_lock argument to the videobuf init functions. This allows
drivers to pass the vdev->lock pointer (or any other externally held lock)
to videobuf. For now all drivers just pass NULL.

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB: videobuf: prepare to make locking optional in videobuf
Hans Verkuil [Mon, 20 Sep 2010 20:24:30 +0000 (17:24 -0300)]
V4L/DVB: videobuf: prepare to make locking optional in videobuf

Currently videobuf uses the vb_lock mutex to lock its data structures.
But this locking will (optionally) move into the v4l2 core, which means
that in that case vb_lock shouldn't be used since the external lock is already
held.

Prepare for this by adding a pointer to such an external mutex and
don't lock if that pointer is set.

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>