platform/kernel/linux-stable.git
14 years ago[media] drivers/media/dvb/ttpci/av7110_av.c: Add missing error handling code
Julia Lawall [Sat, 2 Oct 2010 13:59:15 +0000 (10:59 -0300)]
[media] drivers/media/dvb/ttpci/av7110_av.c: Add missing error handling code

Extend the error handling code with operations found in other nearby error
handling code.

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

// <smpl>
@r exists@
@r@
statement S1,S2,S3;
constant C1,C2,C3;
@@

*if (...)
 {... S1 return -C1;}
...
*if (...)
 {... when != S1
    return -C2;}
...
*if (...)
 {... S1 return -C3;}
// </smpl>

Signed-off-by: Julia Lawall <julia@diku.dk>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years ago[media] gp8psk: Add support for the Genpix Skywalker-2
Derek Kelly [Sat, 16 Oct 2010 17:23:51 +0000 (14:23 -0300)]
[media] gp8psk: Add support for the Genpix Skywalker-2

gp8psk: Add support for the Genpix Skywalker-2 per user requests.

Patched against git.

Signed-off-by: Derek Kelly <user.vdr@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years ago[media] i2c: Stop using I2C_CLASS_TV_DIGITAL
Jean Delvare [Wed, 13 Oct 2010 12:24:25 +0000 (09:24 -0300)]
[media] i2c: Stop using I2C_CLASS_TV_DIGITAL

Detection class I2C_CLASS_TV_DIGITAL is set by many adapters but no
I2C device driver is setting it anymore, which means it can be
dropped. I2C devices on digital TV adapters are instantiated
explicitly these days, which is much better.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years ago[media] i2c: Stop using I2C_CLASS_TV_ANALOG
Jean Delvare [Wed, 13 Oct 2010 12:22:54 +0000 (09:22 -0300)]
[media] i2c: Stop using I2C_CLASS_TV_ANALOG

Detection class I2C_CLASS_TV_ANALOG is set by a few adapters but no
I2C device driver is setting it anymore, which means it can be
dropped. I2C devices on analog TV adapters are instantiated
explicitly these days, which is much better.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years ago[media] tvp5150: COMPOSITE0 input should not force-enable TV mode
Paul Walmsley [Sat, 9 Oct 2010 04:31:40 +0000 (01:31 -0300)]
[media] tvp5150: COMPOSITE0 input should not force-enable TV mode

When digitizing composite video from a analog videotape source using the
TVP5150's first composite input channel, the captured stream exhibits
tearing and synchronization problems[1].

It turns out that commit c0477ad9feca01bd8eff95d7482c33753d05c700 caused
"TV mode" (as opposed to "VCR mode" or "auto-detect") to be forcibly
enabled for both composite inputs.  According to the chip
documentation[2], "TV mode" disables a "chrominance trap" input filter,
which appears to be necessary for high-quality video capture from an
analog videotape source.  [ Commit
c7c0b34c27bbf0671807e902fbfea6270c8f138d subsequently restricted the
problem to the first composite input, apparently inadvertently. ]

Since any type of composite signal source can be connected to the
TVP5150's first composite input, unconditionally forcing "TV mode" isn't
correct.  There doesn't appear to be a good way for applications to tell
the driver what is connected.  Fortunately, the TVP5150 has an operating
mode auto-detection feature, which, when enabled, should cause the TVP5150
to auto-detect whether it should use "VCR mode" or "TV mode".  Enabling
operating mode auto-detection improved video capture quality
significantly[3].

Therefore, fix this bug by using operating mode auto-detection. (Also,
while here, fix a CodingStyle issue.)

For those users who may find this patch via a mailing list archive but who
are not able to upgrade to a kernel with a fixed driver: the TVP5150's
S-Video and second composite input sources have auto-detection enabled, so
you may wish to try using those -- if available on your device -- until
this fix makes it a downstream distribution near you.

1. Pre-patch tvtime snapshot using a Pinnacle PCTV HD Pro as the
   capture device and a Sony EV-S2000 as a video source:
   http://www.booyaka.com/~paul/tvp5150/1a.png

2. Section 3.21.3, "Operation Mode Control Register", _TVP5150AM1
   Ultralow-Power NTSC/PAL/SECAM Video Decoder (Rev. D)_ [SLES209D],
   downloaded 8 October 2010, available via
   http://focus.ti.com/lit/ds/symlink/tvp5150am1.pdf

3. Post-patch tvtime snapshot (same signal chain as #1, above):
   http://www.booyaka.com/~paul/tvp5150/1b.png

Signed-off-by: Paul Walmsley <paul@booyaka.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years ago[media] IR: ene_ir: few bugfixes
Maxim Levitsky [Fri, 15 Oct 2010 16:06:37 +0000 (13:06 -0300)]
[media] IR: ene_ir: few bugfixes

This is a result of last round of debug with
Sami R <maesesami@gmail.com>.

Thank you Sami very much!

The biggest bug I fixed is that,
I was clobbering the CIRCFG register after it is setup
That wasn't a good idea really

And some small refactoring, etc.

Tested-by: Sami R <maesesami@gmail.com>
Signed-off-by: Maxim Levitsky <maximlevitsky@gmail.com>
Acked-by: Jarod Wilson <jarod@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years ago[media] IR: extend and sort the MCE keymap
Maxim Levitsky [Fri, 15 Oct 2010 16:06:35 +0000 (13:06 -0300)]
[media] IR: extend and sort the MCE keymap

Add new keys, found on:

Toshiba Qosmio F50-10q.
Toshiba Qosmio X300
Toshiba A500-141

Also sort the keytable by scancode number as that makes sense
and alows easily to add new keycodes.

Thanks to:
Sami R <maesesami@gmail.com>
Alexander Skiba <ghostlyrics@gmail.com>
Jordi Pelegrin <pelegrin.jordi@gmail.com>

For reports and testing.

Signed-off-by: Maxim Levitsky <maximlevitsky@gmail.com>
Acked-by: Jarod Wilson <jarod@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years ago[media] IR/nuvoton: address all checkpatch.pl issues
Jarod Wilson [Fri, 15 Oct 2010 14:07:37 +0000 (11:07 -0300)]
[media] IR/nuvoton: address all checkpatch.pl issues

The driver was missing KERN_ facilities on a number of printks. The
register dump functions have been updated to use KERN_INFO, so that the
register dump gets logged in syslog (they only run on driver load, and
only when debug is enabled). The buffer dump routine now uses
KERN_DEBUG, as that spew will happen quite frequently (several times
every IR signal), and shouldn't need to be logged.

Also split up the small handful of lines that were just over 80
characaters, and fixed the ioctl.h include.

Signed-off-by: Jarod Wilson <jarod@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years ago[media] saa7134: add test after for loop
Dan Carpenter [Mon, 4 Oct 2010 19:28:01 +0000 (16:28 -0300)]
[media] saa7134: add test after for loop

Add a check after the for loops to see if we found what we were looking
for or if we reached the end of the list.

Signed-off-by: Dan Carpenter <error27@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years ago[media] vivi: Don't depend on FONTS
Ben Hutchings [Mon, 4 Oct 2010 01:18:11 +0000 (22:18 -0300)]
[media] vivi: Don't depend on FONTS

CONFIG_FONTS has nothing to do with whether find_font() is defined.

Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
Acked-by: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years ago[media] drivers/media/video/cx23885/cx23885-core.c: fix cx23885_dev_checkrevision()
Andrew Morton [Fri, 1 Oct 2010 21:13:41 +0000 (18:13 -0300)]
[media] drivers/media/video/cx23885/cx23885-core.c: fix cx23885_dev_checkrevision()

It was missing the `break'.

Addresses https://bugzilla.kernel.org/show_bug.cgi?id=18672

Reported-by: Igor <i2g2r2@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Cc: stable@kernel.org
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years ago[media] IR: ene_ir: updates
Maxim Levitsky [Mon, 6 Sep 2010 21:26:11 +0000 (18:26 -0300)]
[media] IR: ene_ir: updates

* Add support for newer firmware version that uses different
buffer format. Makes hardware work for many users.

* Register name updates

* Lot of refactoring

* Lots of fixes as a result of full testing

* Idle mode is done now by resetting the device, and this eliminates
the ugly sample_period = 75 hack.

Every feature of the driver is now well tested.

Signed-off-by: Maxim Levitsky <maximlevitsky@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years ago[media] ir: properly handle an error at input_register
Mauro Carvalho Chehab [Thu, 14 Oct 2010 20:49:33 +0000 (17:49 -0300)]
[media] ir: properly handle an error at input_register

Be sure to rollback all init if input register fails.

Cc: Maxim Levitsky <maximlevitsky@gmail.com>
Acked-by: Jarod Wilson <jarod@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years ago[media] IR: make sure we register the input device when it is safe to do so
Maxim Levitsky [Mon, 6 Sep 2010 21:26:07 +0000 (18:26 -0300)]
[media] IR: make sure we register the input device when it is safe to do so

As soon as input device is registered, it might be accessed (and it is)
This can trigger a hardware interrupt that can access
not yet initialized ir->raw, (by sending a sample)

This can be reproduced by holding down a remote button and reloading the module.
And this always crashes the systems where hardware decides to send an interrupt
right at the moment it is enabled.

Signed-off-by: Maxim Levitsky <maximlevitsky@gmail.com>
Acked-by: Jarod Wilson <jarod@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years ago[media] IR: plug races in IR raw thread
Maxim Levitsky [Mon, 6 Sep 2010 21:26:06 +0000 (18:26 -0300)]
[media] IR: plug races in IR raw thread

Unfortunelly (my fault) the kernel thread that now handles IR processing
has classical races in regard to wakeup and stop.
This patch hopefully closes them all.
Tested with module reload running in a loop, while receiver is blasted
with IR data for 10 minutes.

Signed-off-by: Maxim Levitsky <maximlevitsky@gmail.com>
Acked-by: Jarod Wilson <jarod@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years ago[media] Add a todo file for staging/tm6000
Mauro Carvalho Chehab [Thu, 14 Oct 2010 20:35:48 +0000 (17:35 -0300)]
[media] Add a todo file for staging/tm6000

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years ago[media] saa7134: port Asus P7131 Hybrid to use the new rc-core
Mauro Carvalho Chehab [Thu, 30 Sep 2010 17:46:47 +0000 (14:46 -0300)]
[media] saa7134: port Asus P7131 Hybrid to use the new rc-core

The rc map table were corrected thanks to Giorgio input and tests.

Reported-by: Giorgio Vazzana <mywing81@gmail.com>
Tested-by: Giorgio Vazzana <mywing81@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years ago[media] firedtv: support for PSK8 for S2 devices. To watch HD
Tommy Jonsson [Sun, 12 Sep 2010 19:03:45 +0000 (16:03 -0300)]
[media] firedtv: support for PSK8 for S2 devices. To watch HD

Add support for tuning with PSK8 modulation, pilot and rolloff
with the S2 versions of firedtv.

Signed-off-by: Tommy Jonsson <quazzie2@gmail.com>
Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de> (trivial simplification)
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years ago[media] ir: avoid race conditions at device disconnect
Mauro Carvalho Chehab [Thu, 14 Oct 2010 15:23:56 +0000 (12:23 -0300)]
[media] ir: avoid race conditions at device disconnect

It is possible that, while ir_unregister_class() is handling, some
application could try to access the sysfs nodes, causing an OOPS.

Reviewed-by: Jarod Wilson <jarod@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years ago[media] IR/streamzap: fix usec to nsec conversion
Dan Carpenter [Tue, 12 Oct 2010 13:42:08 +0000 (10:42 -0300)]
[media] IR/streamzap: fix usec to nsec conversion

There is an integer overflow here because 0x03000000 * 1000 is too large
for 31 bits.

rawir.duration should be in terms of nsecs.
IR_MAX_DURATION and 0x03000000 are already in terms of nsecs.
STREAMZAP_TIMEOUT and STREAMZAP_RESOLUTION are 255 and 256 respectively
and are in terms of usecs.

The original code had a deadline of 1.005 seconds and the new code has a
deadline of .065 seconds.

Signed-off-by: Dan Carpenter <error27@gmail.com>
Signed-off-by: Jarod Wilson <jarod@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years ago[media] IR/streamzap: shorten up some define names for readability
Jarod Wilson [Tue, 12 Oct 2010 13:41:27 +0000 (10:41 -0300)]
[media] IR/streamzap: shorten up some define names for readability

Signed-off-by: Jarod Wilson <jarod@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years ago[media] lirc_dev: fixup error messages w/missing newlines
Jarod Wilson [Sat, 9 Oct 2010 18:17:03 +0000 (15:17 -0300)]
[media] lirc_dev: fixup error messages w/missing newlines

Signed-off-by: Jarod Wilson <jarod@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years ago[media] lirc: wire up .compat_ioctl to main ioctl handler
Jarod Wilson [Sat, 9 Oct 2010 18:07:06 +0000 (15:07 -0300)]
[media] lirc: wire up .compat_ioctl to main ioctl handler

As pointed out (and tested) by Joris van Rantwijk, we do actually need
to wire up .compat_ioctl for 32-bit lirc userspace to work with 64-bit
lirc kernelspace. Do it. And add a check to make sure we get a valid
irctl in the ioctl handler.

Signed-off-by: Jarod Wilson <jarod@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years ago[media] staging/lirc: ioctl portability fixups
Jarod Wilson [Fri, 8 Oct 2010 20:35:09 +0000 (17:35 -0300)]
[media] staging/lirc: ioctl portability fixups

Signed-off-by: Jarod Wilson <jarod@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years ago[media] IR/lirc: further ioctl portability fixups
Jarod Wilson [Fri, 8 Oct 2010 20:24:21 +0000 (17:24 -0300)]
[media] IR/lirc: further ioctl portability fixups

>From Joris van Rantwijk <jorispubl@xs4all.nl>:

I tested lirc_serial and found that it works fine.
Except the LIRC ioctls do not work in my 64-bit-kernel/32-bit-user
setup. I added compat_ioctl entries in the drivers to fix this.

While doing so, I noticed inconsistencies in the argument type of
the LIRC ioctls. All ioctls are declared in lirc.h as having argument
type __u32, however there are a few places where the driver calls
get_user/put_user with an unsigned long argument.

The patch below changes lirc_dev and lirc_serial to use __u32 for all
ioctl arguments, and adds compat_ioctl entries.
It should probably also be done in the other low-level drivers,
but I don't have hardware to test those.

I've dropped the .compat_ioctl addition from Joris' original patch,
as I swear the non-compat definition should now work for both 32-bit
and 64-bit userspace. Technically, I think we still need/want a
in getting a reply to you).

Reported-by: Joris van Rantwijk <jorispubl@xs4all.nl>
Signed-off-by: Jarod Wilson <jarod@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years ago[media] IR/Kconfig: sort hardware entries alphabetically
Jarod Wilson [Fri, 8 Oct 2010 19:23:56 +0000 (16:23 -0300)]
[media] IR/Kconfig: sort hardware entries alphabetically

Signed-off-by: Jarod Wilson <jarod@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years ago[media] nuvoton-cir: add proper rx fifo overrun handling
Jarod Wilson [Fri, 8 Oct 2010 19:16:23 +0000 (16:16 -0300)]
[media] nuvoton-cir: add proper rx fifo overrun handling

Per discussion with Andy Walls on irc, rx fifo overruns are not all that
uncommon on a busy system, and the initial posting of the nuvoton-cir
driver doesn't handle them well enough. With this addition, we'll drain
the hw fifo, attempt to process any ir pulse trains completed with that
flush, then we'll issue a hw rx fifo clear and reset the raw ir sample
kfifo and start over collecting raw ir data.

Also slightly refactors the cir interrupt enabling so that we always get
consistent flags set and only have to modify them in one place, should
they need to be altered.

Signed-off-by: Jarod Wilson <jarod@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years ago[media] IR: add driver for Nuvoton w836x7hg integrated CIR
Jarod Wilson [Thu, 7 Oct 2010 20:50:34 +0000 (17:50 -0300)]
[media] IR: add driver for Nuvoton w836x7hg integrated CIR

This is a new ir-core pnp driver for the Nuvoton w836x7hg integrated CIR
function. The chip is found on at least the ASRock ION 330HT boxes and
apparently, on a number of Intel DP55-series motherboards:

http://www.asrock.com/nettop/overview.asp?Model=ION%20330HT
http://downloadcenter.intel.com/Detail_Desc.aspx?agr=Y&DwnldID=17685&lang=eng

This driver was made possible by a hardware donation from Nuvoton, along
with sample code (in the form of an lirc driver) and datasheet, so huge
thanks to them for supporting this effort. Note that this driver
constitutes a massive rewrite, porting from the lirc interfaces to the
ir-core interfaces, and restructuring the driver to look more like Maxim
Levitsky's ene_ir driver (as well as generally making it look more like
kernel code).

There's some work left to be done on this driver, to fully support the
range of functionality possible, but receive and IR power-on/wake are
both functional (may require setting wake key under another OS atm). The
hardware I've got (one of the ASRock boxes) only supports RX, so TX is
completely untested as of yet. Certain RX parameters, like sample
resolution and RX IRQ sample length trigger level could possibly stand
to be made tweakable via modparams or sysfs nodes, but the current
values work well enough for me w/an MCE RC6A remote.

The original lirc driver carried support for the Windows MCE IR
keyboard/mouse device, which I plan to add back generically, in a way
that should be usable by any raw IR receiver (or at least by this driver
and the mceusb driver).

Suspend and resume have also been tested, the power button on my remote
can be used to wake the machine, and CIR functionality resumes just
fine. Module unload/reload has also been tested, though not extensively
or repetitively. Also tested to work with the lirc bridge plugin for
userspace decoding.

Signed-off-by: Jarod Wilson <jarod@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years ago[media] gspca - sonixj: Use the new video control mechanism
Jean-François Moine [Sat, 2 Oct 2010 07:35:25 +0000 (04:35 -0300)]
[media] gspca - sonixj: Use the new video control mechanism

Signed-off-by: Jean-François Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years ago[media] gspca - ov519: Use the new video control mechanism
Jean-François Moine [Sat, 2 Oct 2010 07:27:02 +0000 (04:27 -0300)]
[media] gspca - ov519: Use the new video control mechanism

Signed-off-by: Jean-François Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years ago[media] gspca - stk014: Use the new video control mechanism
Jean-François Moine [Sat, 2 Oct 2010 07:17:38 +0000 (04:17 -0300)]
[media] gspca - stk014: Use the new video control mechanism

Signed-off-by: Jean-François Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years ago[media] gspca - main: New video control mechanism
Jean-François Moine [Sat, 2 Oct 2010 07:12:25 +0000 (04:12 -0300)]
[media] gspca - main: New video control mechanism

The new control mechanism uses dynamic control values in the subdriver
descriptor. It simplifies standard control handling.

Signed-off-by: Jean-François Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years ago[media] uvcvideo: Fix uvc_query_v4l2_ctrl() and uvc_xu_ctrl_query() locking
Laurent Pinchart [Sat, 2 Oct 2010 12:04:53 +0000 (09:04 -0300)]
[media] uvcvideo: Fix uvc_query_v4l2_ctrl() and uvc_xu_ctrl_query() locking

Take the ctrl_mutex mutex before touching control information in those
functions.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years ago[media] uvcvideo: Fix bogus XU controls information
Laurent Pinchart [Fri, 1 Oct 2010 18:39:49 +0000 (15:39 -0300)]
[media] uvcvideo: Fix bogus XU controls information

XU control information is supposed to be entirely discoverable using
standard UVC queries. As some devices report bogus information (such as
reporting a read-only control as being read-write), add a fixup table
for XU controls.

This table can also be used to selectively disable requests supposed to
be supported by all XU controls (GET_MIN, GET_MAX, GET_DEF, GET_RES) but
not correctly (or at all) supported by the device.

The table currently disables GET_CUR on the Logitech motor control XU
pan/tilt controls.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years ago[media] uvcvideo: Delay initialization of XU controls
Laurent Pinchart [Wed, 29 Sep 2010 19:03:03 +0000 (16:03 -0300)]
[media] uvcvideo: Delay initialization of XU controls

XU controls initialization requires querying the device for control
information. As some buggy UVC devices will crash when queried
repeatedly in a tight loop, delay XU controls initialization until first
use.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years ago[media] uvcvideo: Embed uvc_control_info inside struct uvc_control
Laurent Pinchart [Wed, 29 Sep 2010 19:00:08 +0000 (16:00 -0300)]
[media] uvcvideo: Embed uvc_control_info inside struct uvc_control

Now that control information structures are not shared between control
instances, embed a uvc_control_info instance inside the uvc_control
structure instead of storing a pointer.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years ago[media] uvcvideo: Remove sysadmin requirements for UVCIOC_CTRL_MAP
Martin Rubli [Wed, 8 Sep 2010 07:15:23 +0000 (04:15 -0300)]
[media] uvcvideo: Remove sysadmin requirements for UVCIOC_CTRL_MAP

This patch removes the sysadmin requirements for UVCIOC_CTRL_MAP (and the stub
implementation of UVCIOC_CTRL_ADD). This requirement no longer makes sense with
the new XU control access mechanisms since XU controls can be accessed without
adding control mappings first.

A maximum number (currently 1024) of control mappings per device is enforced to
avoid excess memory consumption caused by careless user space applications.

Signed-off-by: Martin Rubli <martin_rubli@logitech.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years ago[media] uvcvideo: Hardcode the index/selector relationship for XU controls
Laurent Pinchart [Mon, 20 Sep 2010 08:53:21 +0000 (05:53 -0300)]
[media] uvcvideo: Hardcode the index/selector relationship for XU controls

Devices advertise XU controls using a bitmask, in which each bit
corresponds to a control. The control selector, used to query the
control, isn't available in the USB descriptors.

All known UVC devices use control selectors equal to the control bit
index plus one. Hardcode that relationship in the driver, making the
UVCIOC_CTRL_ADD ioctl obsolete. All necessary information about XU
controls can be obtained by the driver at enumeration time.

The UVCIOC_CTRL_ADD ioctl is still supported for compatibility reasons,
but now always returns -EEXIST.

Finally, control mappings are now on a per-device basis and no longer
global.

As this changes the userspace interface, bump the driver version number
to 1.0.0 (it was about time).

Signed-off-by: Martin Rubli <martin_rubli@logitech.com>
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years ago[media] uvcvideo: Generate discontinuous sequence numbers when frames are lost
Laurent Pinchart [Sat, 2 Oct 2010 14:06:05 +0000 (11:06 -0300)]
[media] uvcvideo: Generate discontinuous sequence numbers when frames are lost

Increase the sequence number of the v4l2_buffer structure regardless of
any buffer states, so that discontinuous sequence numbers allow
applications to detect lost video frames.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years ago[media] uvcvideo: Set bandwidth to at least 1024 with the FIX_BANDWIDTH quirk
Laurent Pinchart [Sun, 3 Oct 2010 20:40:29 +0000 (17:40 -0300)]
[media] uvcvideo: Set bandwidth to at least 1024 with the FIX_BANDWIDTH quirk

The bandwidth estimate computed with the FIX_BANDIWDTH quirk is too low
for many cameras. Don't use maximum packet sizes lower than 1024 bytes
to try and work around the problem. According to measurements done on
two different camera models, the value is high enough to get most
resolutions working while not preventing two simultaneous VGA streams at
15 fps.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years ago[media] uvcvideo: Update e-mail address and copyright notices
Laurent Pinchart [Mon, 20 Sep 2010 09:10:10 +0000 (06:10 -0300)]
[media] uvcvideo: Update e-mail address and copyright notices

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years ago[media] uvcvideo: Print query name in uvc_query_ctrl()
Laurent Pinchart [Fri, 17 Sep 2010 08:37:26 +0000 (05:37 -0300)]
[media] uvcvideo: Print query name in uvc_query_ctrl()

Instead of printing the query hex value in error messages, print its
name to make the messages more readable.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years ago[media] uvcvideo: Constify the uvc_entity_match_guid arguments
Laurent Pinchart [Fri, 17 Sep 2010 08:24:13 +0000 (05:24 -0300)]
[media] uvcvideo: Constify the uvc_entity_match_guid arguments

They're not modified by the function, make them const.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years ago[media] uvcvideo: Blacklist more controls for Hercules Dualpix Exchange
Laurent Pinchart [Fri, 23 Jul 2010 13:06:08 +0000 (10:06 -0300)]
[media] uvcvideo: Blacklist more controls for Hercules Dualpix Exchange

The Hercules Dualpix Exchange (06f8:3005) camera expose an absolute zoom
that is not implemented. Blacklist it.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years ago[media] radio-mr800: fix locking order
Hans Verkuil [Mon, 11 Oct 2010 15:36:37 +0000 (12:36 -0300)]
[media] radio-mr800: fix locking order

Don't hold the lock before unregistering the device, since when the
device is unregistered the datastruct containing the lock may be freed
(if the refcount went to 0).

Also fixed the framework documentation that erroneously suggested the
wrong locking order as well.

Reported-by: David Ellingsworth <david@identd.dyndns.org>
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Acked-by: David Ellingsworth <david@identd.dyndns.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years ago[media] af9015: move remote controllers to new RC core
Antti Palosaari [Tue, 12 Oct 2010 20:22:32 +0000 (17:22 -0300)]
[media] af9015: move remote controllers to new RC core

Use new RC core instead of old legacy RC implementation.

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years ago[media] fix A-Link DTU(m) remote controller PIP button
Antti Palosaari [Tue, 12 Oct 2010 20:19:08 +0000 (17:19 -0300)]
[media] fix A-Link DTU(m) remote controller PIP button

Button is PIP => KEY_NEW
http://www.linuxtv.org/wiki/index.php/Remote_Controllers

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years ago[media] fix TerraTec remote controller PIP button
Antti Palosaari [Tue, 12 Oct 2010 20:13:08 +0000 (17:13 -0300)]
[media] fix TerraTec remote controller PIP button

Button is PIP => KEY_NEW
http://www.linuxtv.org/wiki/index.php/Remote_Controllers
Thanks to Cart.

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years ago[media] fix MSI DIGIVOX mini III remote controller power buttons
Antti Palosaari [Tue, 12 Oct 2010 20:08:10 +0000 (17:08 -0300)]
[media] fix MSI DIGIVOX mini III remote controller power buttons

Fix power button mappings as defined in
http://www.linuxtv.org/wiki/index.php/Remote_Controllers

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years ago[media] Total Media In Hand remote controller
Antti Palosaari [Mon, 11 Oct 2010 23:25:44 +0000 (20:25 -0300)]
[media] Total Media In Hand remote controller

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years ago[media] rename rc-msi-digivox.c -> rc-msi-digivox-iii.c
Antti Palosaari [Mon, 11 Oct 2010 23:19:23 +0000 (20:19 -0300)]
[media] rename rc-msi-digivox.c -> rc-msi-digivox-iii.c

Rename remote controller driver I added earlier.

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years ago[media] MSI DIGIVOX mini II remote controller
Antti Palosaari [Mon, 11 Oct 2010 22:12:58 +0000 (19:12 -0300)]
[media] MSI DIGIVOX mini II remote controller

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years ago[media] A-Link DTU(m) remote controller
Antti Palosaari [Mon, 11 Oct 2010 21:54:13 +0000 (18:54 -0300)]
[media] A-Link DTU(m) remote controller

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years ago[media] TwinHan AzureWave AD-TU700(704J) remote controller
Antti Palosaari [Mon, 11 Oct 2010 20:31:59 +0000 (17:31 -0300)]
[media] TwinHan AzureWave AD-TU700(704J) remote controller

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years ago[media] LeadTek Y04G0051 remote controller keytable
Antti Palosaari [Mon, 11 Oct 2010 19:08:13 +0000 (16:08 -0300)]
[media] LeadTek Y04G0051 remote controller keytable

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years ago[media] AverMedia RM-KS remote controller keytable
Antti Palosaari [Mon, 11 Oct 2010 13:59:48 +0000 (10:59 -0300)]
[media] AverMedia RM-KS remote controller keytable

Imported from af9015.h. Initial keytable was from
Jose Alberto Reguero <jareguero@telefonica.net> and
Felipe Morales Moreno <felipe.morales.moreno@gmail.com>

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years ago[media] Digittrade DVB-T USB Stick remote controller keytable
Antti Palosaari [Mon, 11 Oct 2010 11:24:00 +0000 (08:24 -0300)]
[media] Digittrade DVB-T USB Stick remote controller keytable

Digittrade DVB-T USB Stick remote controller.
Imported from af9015.h. Initial keytable was from Alain Kalker <miki@dds.nl>

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years ago[media] TrekStor DVB-T USB Stick remote controller
Antti Palosaari [Mon, 11 Oct 2010 10:36:54 +0000 (07:36 -0300)]
[media] TrekStor DVB-T USB Stick remote controller

Imported from af9015.h.
Initial keytable was from Marc Schneider <macke@macke.org>

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years ago[media] MSI DIGIVOX mini III remote controller keytable
Antti Palosaari [Mon, 11 Oct 2010 09:56:46 +0000 (06:56 -0300)]
[media] MSI DIGIVOX mini III remote controller keytable

MSI DIGIVOX mini III remote controller. Uses NEC extended 0x61d6.
This remote seems to be same as rc-kworld-315u.c. Anyhow, add new remote
since rc-kworld-315u.c lacks NEC extended address byte.

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years ago[media] TerraTec remote controller keytable
Antti Palosaari [Fri, 8 Oct 2010 00:56:48 +0000 (21:56 -0300)]
[media] TerraTec remote controller keytable

TerraTec slim remote, 7 rows, 4 columns. Uses NEC extended 0x02bd.

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
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>