[media] cx231xx: use callback to set agc on PixelView

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
[media] mb86a20s: add support for serial streams

By comparing the traffic between Pixelview (cx23102-based and Kworld
(saa7134-based), the only difference is at register 0xd5. After some
tests, It seems that it is used to change mode between serial and parallel.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
[media] Add support for Kworld SBTVD board

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
[media] Add DVB support for SAA7134_BOARD_KWORLD_PCI_SBTVD_FULLSEG

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
[media] cx231xx: Add a driver for I2C-based IR

Although cx231xx has a very good IR support, already supported by
mceusb driver, some designs decided to add a separate I2C
microcontroller chip in order to handle IR.

Due to that, add a glue to ir-kbd-i2c is needed, in order to support
those devices.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
[media] cx231xx: Add IR support for Pixelview Hybrid SBTVD

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
[media] drivers/media: Removed unnecessary KERN_<level>s from dprintk uses

Converted if (debug >= 2) printk(KERN_DEBUG... to if debug >= 2) dprintk(...)

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
[media] cafe_ccic: fix colorspace corruption on resume

If you suspend and resume during video capture, the video colours
are corrupted on resume. This is because the sensor is being unconditionally
powered off during the resume path.

Only power down during resume if the camera is not in use, and correctly
reconfigure the sensor during resume.
Fixes http://dev.laptop.org/ticket/10190

Signed-off-by: Daniel Drake <dsd@laptop.org>
Acked-by: Jonathan Corbet <corbet@lwn.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
[media] lmed04: Improve frontend handling

Improved frontend handling.

Frontend now remains open at all times, with signal lock, snr & signal level
polled from Interupt.

Updated driver for DM04/QQBOX USB DVB-S BOXES to version 1.70.

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
[media] Documentation/lmedm04: Fix firmware extract information

Corrected Firmware Information for LG on LME2510.

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
[media] lmedm04: change USB Timeouts to avoid troubles

DM04/QQBOX USB Timing change.

Improved timing to avoid USB corruptions on some systems.

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
[media] gspca: submit interrupt urbs *after* isoc urbs

Currently gspca supported usb-1.1 webcams for which we support the input
button through an interrupt endpoint won't stream (not enough bandwidth
error) when used through an USB-2.0 hub.

After much debugging I've found out that the cause for this is that the
ehci-sched.c schedeling code does not like it when there are already urb's
scheduled when (large) isoc urbs are queued. By moving the submission
of the interrupt urbs to after submitting the isoc urbs the camera
starts working again through usb-2.0 hubs.

Note that this does not fix isoc. streaming through a usb-hub while another
1.1 usb device (like the microphone of the same cam) is also active
at the same time :(

I've spend a long time analyzing the linux kernel ehci scheduler code,
resulting in this (long) mail:
http://www.spinics.net/lists/linux-usb/msg37982.html

The conclusion of the following mail thread is that yes there are several
issues when using usb-1.1 devices through a usb-2.0 hub, but these are not
easily fixable in the current code. Fixing this in ehci-sched.c requires
an almost full rewrite, which is not bound to happen anytime soon.

So with this patch gspca driven usb-1.1 webcams will atleast work when
connected through an usb-2.0 hub when the microphone is not used.

As an added bonus this patch avoids extra destroy/create input urb cycles
when we end up falling back to a lower speed alt setting because of bandwidth
limitations.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
[media] gspca: only set gspca->int_urb if submitting it succeeds

Currently alloc_and_submit_int_urb() is setting gspca->int_urb
as soon as the allocation has succeeded, but if the subsequent
submit fails, the urb gets destroyed. And then later will
get destroyed again in gspca_input_destroy_urb() because
gspca->int_urb is set, leading to a double free.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
[media] gspca_xirlink_cit: various usb bandwidth allocation improvements / fixes

The following usb bandwidth allocation changes were made to the ibm netcam
pro code:
- Don't restart negotiation at max packet size on stop0, as that gets called
  by gspca_main during negotiation. Move this to sd_isoc_init.
- Don't ask for full bandwidth when running at 160x120, that does not need
  full bandwidth
- Make minimum acceptable bandwidth depend upon resolution

[mchehab@redhat.com: Fix CodingStyle problems at switch statements]
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
[media] gspca_xirlink_cit: Frames have a 4 byte footer

At least on the ibm netcam pro frames have a 4 byte footer, take this
into account when calculating sizeimage.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
[media] gspca_xirlink_cit: Add support camera button

gspca_xirlink_cit: Add support camera button

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
[media] gspca_ov519: generate release button event on stream stop if needed

Generate a release button event when the button is still pressed when the
stream stops.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
[media] gspca - main: Version change

Signed-off-by: Jean-François Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
[media] gspca - main: Fix a small code error

Signed-off-by: Jean-François Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
[media] gspca - zc3xx: Bad clocksetting for mt9v111_3 with 640x480 resolution

The bad value prevented the autogain to work correctly
and some images were truncated.

Signed-off-by: Jean-François Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>