platform/kernel/linux-3.10.git
10 years agoupstream: [media] em28xx: push mutex down to extensions on .fini callback
Mauro Carvalho Chehab [Mon, 13 Jan 2014 05:53:44 +0000 (02:53 -0300)]
upstream: [media] em28xx: push mutex down to extensions on .fini callback

Avoid circular mutex lock by pushing the dev->lock to the .fini
callback on each extension.

As em28xx-dvb, em28xx-alsa and em28xx-rc have their own data
structures, and don't touch at the common structure during .fini,
only em28xx-v4l needs to be locked.

[   90.994317] ======================================================
[   90.994356] [ INFO: possible circular locking dependency detected ]
[   90.994395] 3.13.0-rc1+ #24 Not tainted
[   90.994427] -------------------------------------------------------
[   90.994458] khubd/54 is trying to acquire lock:
[   90.994490]  (&card->controls_rwsem){++++.+}, at: [<ffffffffa0177b08>] snd_ctl_dev_free+0x28/0x60 [snd]
[   90.994656]
[   90.994656] but task is already holding lock:
[   90.994688]  (&dev->lock){+.+.+.}, at: [<ffffffffa040db81>] em28xx_close_extension+0x31/0x90 [em28xx]
[   90.994843]
[   90.994843] which lock already depends on the new lock.
[   90.994843]
[   90.994874]
[   90.994874] the existing dependency chain (in reverse order) is:
[   90.994905]
-> #1 (&dev->lock){+.+.+.}:
[   90.995057]        [<ffffffff810b8fa3>] __lock_acquire+0xb43/0x1330
[   90.995121]        [<ffffffff810b9f82>] lock_acquire+0xa2/0x120
[   90.995182]        [<ffffffff816a5b6c>] mutex_lock_nested+0x5c/0x3c0
[   90.995245]        [<ffffffffa0422cca>] em28xx_vol_put_mute+0x1ba/0x1d0 [em28xx_alsa]
[   90.995309]        [<ffffffffa017813d>] snd_ctl_elem_write+0xfd/0x140 [snd]
[   90.995376]        [<ffffffffa01791c2>] snd_ctl_ioctl+0xe2/0x810 [snd]
[   90.995442]        [<ffffffff811db8b0>] do_vfs_ioctl+0x300/0x520
[   90.995504]        [<ffffffff811dbb51>] SyS_ioctl+0x81/0xa0
[   90.995568]        [<ffffffff816b1929>] system_call_fastpath+0x16/0x1b
[   90.995630]
-> #0 (&card->controls_rwsem){++++.+}:
[   90.995780]        [<ffffffff810b7a47>] check_prevs_add+0x947/0x950
[   90.995841]        [<ffffffff810b8fa3>] __lock_acquire+0xb43/0x1330
[   90.995901]        [<ffffffff810b9f82>] lock_acquire+0xa2/0x120
[   90.995962]        [<ffffffff816a762b>] down_write+0x3b/0xa0
[   90.996022]        [<ffffffffa0177b08>] snd_ctl_dev_free+0x28/0x60 [snd]
[   90.996088]        [<ffffffffa017a255>] snd_device_free+0x65/0x140 [snd]
[   90.996154]        [<ffffffffa017a751>] snd_device_free_all+0x61/0xa0 [snd]
[   90.996219]        [<ffffffffa0173af4>] snd_card_do_free+0x14/0x130 [snd]
[   90.996283]        [<ffffffffa0173f14>] snd_card_free+0x84/0x90 [snd]
[   90.996349]        [<ffffffffa0423397>] em28xx_audio_fini+0x97/0xb0 [em28xx_alsa]
[   90.996411]        [<ffffffffa040dba6>] em28xx_close_extension+0x56/0x90 [em28xx]
[   90.996475]        [<ffffffffa040f639>] em28xx_usb_disconnect+0x79/0x90 [em28xx]
[   90.996539]        [<ffffffff814a06e7>] usb_unbind_interface+0x67/0x1d0
[   90.996620]        [<ffffffff8142920f>] __device_release_driver+0x7f/0xf0
[   90.996682]        [<ffffffff814292a5>] device_release_driver+0x25/0x40
[   90.996742]        [<ffffffff81428b0c>] bus_remove_device+0x11c/0x1a0
[   90.996801]        [<ffffffff81425536>] device_del+0x136/0x1d0
[   90.996863]        [<ffffffff8149e0c0>] usb_disable_device+0xb0/0x290
[   90.996923]        [<ffffffff814930c5>] usb_disconnect+0xb5/0x1d0
[   90.996984]        [<ffffffff81495ab6>] hub_port_connect_change+0xd6/0xad0
[   90.997044]        [<ffffffff814967c3>] hub_events+0x313/0x9b0
[   90.997105]        [<ffffffff81496e95>] hub_thread+0x35/0x170
[   90.997165]        [<ffffffff8108ea2f>] kthread+0xff/0x120
[   90.997226]        [<ffffffff816b187c>] ret_from_fork+0x7c/0xb0
[   90.997287]
[   90.997287] other info that might help us debug this:
[   90.997287]
[   90.997318]  Possible unsafe locking scenario:
[   90.997318]
[   90.997348]        CPU0                    CPU1
[   90.997378]        ----                    ----
[   90.997408]   lock(&dev->lock);
[   90.997497]                                lock(&card->controls_rwsem);
[   90.997607]                                lock(&dev->lock);
[   90.997697]   lock(&card->controls_rwsem);
[   90.997786]
[   90.997786]  *** DEADLOCK ***
[   90.997786]
[   90.997817] 5 locks held by khubd/54:
[   90.997847]  #0:  (&__lockdep_no_validate__){......}, at: [<ffffffff81496564>] hub_events+0xb4/0x9b0
[   90.998025]  #1:  (&__lockdep_no_validate__){......}, at: [<ffffffff81493076>] usb_disconnect+0x66/0x1d0
[   90.998204]  #2:  (&__lockdep_no_validate__){......}, at: [<ffffffff8142929d>] device_release_driver+0x1d/0x40
[   90.998383]  #3:  (em28xx_devlist_mutex){+.+.+.}, at: [<ffffffffa040db77>] em28xx_close_extension+0x27/0x90 [em28xx]
[   90.998567]  #4:  (&dev->lock){+.+.+.}, at: [<ffffffffa040db81>] em28xx_close_extension+0x31/0x90 [em28xx]

Reviewed-by: Frank Schäfer <fschaefer.oss@googlemail.com>
Tested-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
10 years agoupstream: [media] em28xx-v4l: fix the freeing of the video devices memory
Frank Schaefer [Sun, 12 Jan 2014 16:24:25 +0000 (13:24 -0300)]
upstream: [media] em28xx-v4l: fix the freeing of the video devices memory

Remove some dead code from em28xx_v4l2_fini() and fix the leaking of the video,
vbi and radio video_device struct memories.

Signed-off-by: Frank Schäfer <fschaefer.oss@googlemail.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
10 years agoupstream: [media] em28xx: always call em28xx_release_resources() in the usb disconnec...
Frank Schaefer [Sun, 12 Jan 2014 16:24:24 +0000 (13:24 -0300)]
upstream: [media] em28xx: always call em28xx_release_resources() in the usb disconnect handler

When the usb device is disconnected, the resources are no longer available,
so there is no reason to keep them registered.

This will also fix the various sysfs group removal warnings which we can see
since kernel 3.13.

Signed-off-by: Frank Schäfer <fschaefer.oss@googlemail.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
10 years agoupstream: [media] em28xx-v4l: move v4l2_ctrl_handler freeing and v4l2_device unregist...
Frank Schaefer [Sun, 12 Jan 2014 16:24:22 +0000 (13:24 -0300)]
upstream: [media] em28xx-v4l: move v4l2_ctrl_handler freeing and v4l2_device unregistration to em28xx_v4l2_fini

v4l2_ctrl_handler_free() and v4l2_device_unregister() are currently only called
when the last user closes the device and the device is already disconnected.
But that's wrong, we need to call these functions whenever the em28xx-v4l
extension is closed and we can already do this if the device is still opened
by some users.

Signed-off-by: Frank Schäfer <fschaefer.oss@googlemail.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
10 years agoupstream: [media] em28xx: move v4l2 dummy clock deregistration from the core to the...
Frank Schaefer [Sun, 12 Jan 2014 16:24:23 +0000 (13:24 -0300)]
upstream: [media] em28xx: move v4l2 dummy clock deregistration from the core to the v4l extension

Signed-off-by: Frank Schäfer <fschaefer.oss@googlemail.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
10 years agoupstream: [media] em28xx: fix xc3028 demod and firmware setup on DVB
Mauro Carvalho Chehab [Sun, 12 Jan 2014 14:08:22 +0000 (11:08 -0300)]
upstream: [media] em28xx: fix xc3028 demod and firmware setup on DVB

Now that em28xx can be compiled without V4L support, we should
call em28xx_setup_xc3028() on both em28xx-v4l and em28xx-dvb
modules.

Reported-by: Chris Lee <updatelee@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
10 years agoupstream: [media] em28xx: fix I2S audio sample rate definitions and info output
Frank Schaefer [Sun, 22 Dec 2013 14:17:46 +0000 (11:17 -0300)]
upstream: [media] em28xx: fix I2S audio sample rate definitions and info output

The audio configuration in chip config register 0x00 and eeprom are always
consistent. But currently the audio configuration #defines for the chip config
register say 0x20 means 3 sample rates and 0x30 5 sample rates, while the eeprom
info output says 0x20 means 1 sample rate and 0x30 3 sample rates.

I've checked the datasheet excerpts I have and it seems that the meaning of
these bits is different for em2820/40 (1 and 3 sample rates) and em2860+
(3 and 5 smaple rates).
I have also checked my Hauppauge WinTV USB 2 (em2840) and the chip/eeprom
audio config 0x20 matches the sample rates reproted by the USB device
descriptor (32k only).

Signed-off-by: Frank Schäfer <fschaefer.oss@googlemail.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
10 years agoupstream: [media] cx231xx: use after free on error path in probe
Dan Carpenter [Fri, 1 Nov 2013 10:34:40 +0000 (07:34 -0300)]
upstream: [media] cx231xx: use after free on error path in probe

We dereference "dev" after it has already been freed.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Cc: stable@vger.kernel.org
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
10 years agoupstream: [media] V4L2: em28xx: register a V4L2 clock source
Guennadi Liakhovetski [Wed, 28 Aug 2013 13:28:28 +0000 (10:28 -0300)]
upstream: [media] V4L2: em28xx: register a V4L2 clock source

Camera sensors usually require a master clock for data sampling. This patch
registers such a clock source for em28xx cameras. This fixes the currently
broken em28xx ov2640 camera support and can also be used by other camera
sensors.

Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
10 years agoupstream: [media] az6027: fix sparse warnings
Hans Verkuil [Fri, 4 Oct 2013 14:01:48 +0000 (11:01 -0300)]
upstream: [media] az6027: fix sparse warnings

drivers/media/usb/dvb-usb/az6027.c:257:23: warning: symbol 'az6027_stb0899_config' was not declared. Should it be static?
drivers/media/usb/dvb-usb/az6027.c:294:23: warning: symbol 'az6027_stb6100_config' was not declared. Should it be static?

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
10 years agoupstream: [media] stk1135: fix two warnings added by changeset 76e0598
Mauro Carvalho Chehab [Thu, 26 Sep 2013 10:41:30 +0000 (07:41 -0300)]
upstream: [media] stk1135: fix two warnings added by changeset 76e0598

drivers/media/usb/gspca/stk1135.c:615:6: warning: no previous prototype for 'stk1135_try_fmt' [-Wmissing-prototypes]
 void stk1135_try_fmt(struct gspca_dev *gspca_dev, struct v4l2_format *fmt)
      ^
drivers/media/usb/gspca/stk1135.c:627:5: warning: no previous prototype for 'stk1135_enum_framesizes' [-Wmissing-prototypes]
 int stk1135_enum_framesizes(struct gspca_dev *gspca_dev,

Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
10 years agoupstream: [media] gspca-stk1135: Add variable resolution support
Ondrej Zary [Fri, 30 Aug 2013 20:54:25 +0000 (17:54 -0300)]
upstream: [media] gspca-stk1135: Add variable resolution support

Add variable resolution support to Syntek STK1135 subdriver.

Signed-off-by: Ondrej Zary <linux@rainbow-software.org>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
10 years agoupstream: [media] gspca: Support variable resolution
Ondrej Zary [Fri, 30 Aug 2013 20:54:24 +0000 (17:54 -0300)]
upstream: [media] gspca: Support variable resolution

Add variable resolution support to gspca by allowing subdrivers to
specify try_fmt and enum_framesizes functions.

Signed-off-by: Ondrej Zary <linux@rainbow-software.org>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
10 years agoupstream: [media] gspca: store current mode instead of individual parameters
Ondrej Zary [Fri, 30 Aug 2013 20:54:23 +0000 (17:54 -0300)]
upstream: [media] gspca: store current mode instead of individual parameters

Store complete current mode (struct v4l2_pix_format) in struct gspca_dev
instead of separate pixfmt, width and height parameters.
This is a preparation for variable resolution support.

Signed-off-by: Ondrej Zary <linux@rainbow-software.org>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
10 years agoupstream: [media] uvc: Depend on VIDEO_V4L2
Laurent Pinchart [Sat, 22 Jun 2013 14:23:58 +0000 (11:23 -0300)]
upstream: [media] uvc: Depend on VIDEO_V4L2

The uvcvideo driver lost its dependency on VIDEO_V4L2 during the big
media directory reorganization. Add it back.

Reported-by: Randy Dunlap <rdunlap@infradead.org>
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Acked-by: Randy Dunlap <rdunlap@infradead.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
10 years agoupstream: [media] bttv: Add support for PCI-8604PW
Daniel Glöckner [Wed, 19 Mar 2014 09:50:41 +0000 (06:50 -0300)]
upstream: [media] bttv: Add support for PCI-8604PW

This patch adds support for the PCI-8604PW card equipped with four 878A.
It is unknown who the manufacturer of this card is and no drivers were
available during development of the patch. According to images found
online, the card is originally sold with Linux DVR software.

A CPLD on the card prevents the 878A from requesting access to the
bus until an initialization sequence has been issued via GPIOs. The
implemented sequence uses the minimum number of GPIOs needed to
successfully unlock bus access. As there are many more GPIOs connected
to the CPLD, it is very likely that some of the others have an influence
on the bus arbitration scheduling. This should be investigated further
in case of performance issues.

The tested card contains an EEPROM on one of the 878A, but it is
completely empty (i.e. contains only 0xff), so it is not possible
to detect the card.

Signed-off-by: Daniel Glöckner <daniel-gl@gmx.net>
Tested-by: Robert Longbottom <rongblor@googlemail.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
10 years agoupstream: [media] media: bt8xx: add missing put_device call
Levente Kurusa [Thu, 19 Dec 2013 15:06:49 +0000 (12:06 -0300)]
upstream: [media] media: bt8xx: add missing put_device call

This is required so that we give up the last reference to the device.
Remove the kfree() because the put_device() call will actually call
release_sub_device which in turn kfrees the device.

Signed-off-by: Levente Kurusa <levex@linux.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
10 years agoupstream: [media] media: pci: remove DEFINE_PCI_DEVICE_TABLE macro
Jingoo Han [Mon, 2 Dec 2013 23:15:04 +0000 (20:15 -0300)]
upstream: [media] media: pci: remove DEFINE_PCI_DEVICE_TABLE macro

Don't use DEFINE_PCI_DEVICE_TABLE macro, because this macro
is not preferred.

Signed-off-by: Jingoo Han <jg1.han@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
10 years agoupstream: [media] cx88: use correct pci drvdata type in cx88_audio_finidev()
Wei Yongjun [Thu, 21 Nov 2013 03:38:44 +0000 (00:38 -0300)]
upstream: [media] cx88: use correct pci drvdata type in cx88_audio_finidev()

We had set the pci drvdata in cx88_audio_initdev() as a type of
struct snd_card, so cx88_audio_finidev() should used it as the
same type too.

Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
10 years agoupstream: [media] cx23885: Add DTV support for Mygica X8502/X8507 boards
Mauro Carvalho Chehab [Fri, 9 Aug 2013 11:53:27 +0000 (08:53 -0300)]
upstream: [media] cx23885: Add DTV support for Mygica X8502/X8507 boards

Those boards were missing the ISDB-T support.
Most of the work on this patch were done by Alfredo.
My work here were to port this patch from Kernel 3.2 to upstream,
fix the issue caused by the set_frontend bad hook, and add the
Kconfig bits.
Tested on a X8502 board rebranded as:
"Leadership - Placa PCI-e de Captura de Vídeo Híbrida" - product code 3800.

Thanks-to: Alfredo Delaiti <alfredodelaiti@netscape.net>
Tested-by: Alfredo Delaiti <alfredodelaiti@netscape.net>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
10 years agoupstream: [media] drivers/media/pci/pt1/pt1: Convert to module_pci_driver
Libo Chen [Mon, 27 May 2013 01:31:56 +0000 (22:31 -0300)]
upstream: [media] drivers/media/pci/pt1/pt1: Convert to module_pci_driver

use module_pci_driver instead of init/exit, make code clean.

Signed-off-by: Libo Chen <libo.chen@huawei.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
10 years agoupstream: [media] stb0899: remove commented value from IQ_SWAP_ON/OFF usages
Reinhard Nissl [Wed, 8 May 2013 20:54:57 +0000 (17:54 -0300)]
upstream: [media] stb0899: remove commented value from IQ_SWAP_ON/OFF usages

As the enum values have changed recently, the comments are void.

Signed-off-by: Reinhard Nißl <rnissl@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
10 years agoupstream: [media] si2157: add copyright and license
Antti Palosaari [Tue, 15 Apr 2014 00:51:32 +0000 (21:51 -0300)]
upstream: [media] si2157: add copyright and license

Add copyright and license for each file.

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
10 years agoupstream: [media] si2157: extend frequency range for DVB-C
Antti Palosaari [Sat, 12 Apr 2014 04:53:51 +0000 (01:53 -0300)]
upstream: [media] si2157: extend frequency range for DVB-C

DVB-C uses lower frequencies than DVB-T. Extend frequency range down to
110 MHz in order to support DVB-C. 110 - 862 MHz range is defined by
NorDig Unified 2.2 specification.

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
10 years agoupstream: [media] si2157: Silicon Labs Si2157 silicon tuner driver
Antti Palosaari [Fri, 11 Apr 2014 00:58:10 +0000 (21:58 -0300)]
upstream: [media] si2157: Silicon Labs Si2157 silicon tuner driver

Silicon Labs Si2157 silicon tuner driver.
Currently it supports only DVB-T.

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
10 years agoupstream: [media] xc2028: add missing break to switch
Antti Palosaari [Sat, 5 Apr 2014 20:23:44 +0000 (17:23 -0300)]
upstream: [media] xc2028: add missing break to switch

Coverity CID 1196501: Missing break in switch (MISSING_BREAK)

I introduced that bug recently by commit
96a5b3a869e3dc7d55bf04a48a8dca8a4025787e.
As a result, it will flood unintentionally error message to log.

Reported-by: <scan-admin@coverity.com>
Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
10 years agoupstream: [media] e4000: make VIDEO_V4L2 dependency optional
Antti Palosaari [Sun, 16 Mar 2014 21:13:05 +0000 (18:13 -0300)]
upstream: [media] e4000: make VIDEO_V4L2 dependency optional

That tuner driver is mainly for DVB API, but there is some V4L2 API
controls for SDR usage. Make driver compile conditional so that V4L2
is not mandatory. Without the V4L2 support driver is build as a DVB
only, without SDR controls.

Fixes following errors reported by kbuild test robot:
ERROR: "v4l2_ctrl_auto_cluster" [drivers/media/tuners/e4000.ko] undefined!
ERROR: "v4l2_ctrl_new_std" [drivers/media/tuners/e4000.ko] undefined!
ERROR: "v4l2_ctrl_handler_init_class" [drivers/media/tuners/e4000.ko] undefined!
ERROR: "v4l2_ctrl_handler_free" [drivers/media/tuners/e4000.ko] undefined!

Reported-by: kbuild test robot <fengguang.wu@intel.com>
Cc: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
10 years agoupstream: [media] e4000: fix 32-bit build error
Antti Palosaari [Fri, 14 Mar 2014 18:22:24 +0000 (15:22 -0300)]
upstream: [media] e4000: fix 32-bit build error

All error/warnings:
   drivers/built-in.o: In function `e4000_set_params':
>> e4000.c:(.text+0x1219a1b): undefined reference to `__umoddi3'

Reported-by: kbuild test robot <fengguang.wu@intel.com>
Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
10 years agoupstream: [media] e4000: rename some variables
Antti Palosaari [Tue, 11 Feb 2014 01:52:51 +0000 (22:52 -0300)]
upstream: [media] e4000: rename some variables

Rename some variables.
Change error status checks from (ret < 0) to (ret).
No actual functionality changes.

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
10 years agoupstream: [media] e4000: convert to Regmap API
Antti Palosaari [Sat, 8 Feb 2014 09:20:35 +0000 (06:20 -0300)]
upstream: [media] e4000: convert to Regmap API

That comes possible after driver was converted to kernel I2C model
(I2C binding & proper I2C client with no gate control hack). All
nasty low level I2C routines are now covered by regmap.

Cc: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
10 years agoupstream: [media] e4000: get rid of DVB i2c_gate_ctrl()
Antti Palosaari [Sat, 8 Feb 2014 07:21:10 +0000 (04:21 -0300)]
upstream: [media] e4000: get rid of DVB i2c_gate_ctrl()

Gate control is now implemented by rtl2832 I2C adapter so we do not
need proprietary DVB i2c_gate_ctrl() anymore.

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
10 years agoupstream: [media] tda18212: add support for ATSC and clearQAM on tda18272
Mauro Carvalho Chehab [Mon, 3 Mar 2014 19:27:38 +0000 (16:27 -0300)]
upstream: [media] tda18212: add support for ATSC and clearQAM on tda18272

tda18272 is programmed just like tda18212, but it also
supports ClearQAM and ATSC.

Add support for them. Tested with a Kworld UB435-Q on both
8VSB and 256QAM modes.

Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
10 years agoupstream: [media] tda9887: remove an warning when compiling for alpha
Mauro Carvalho Chehab [Fri, 1 Nov 2013 15:40:40 +0000 (12:40 -0300)]
upstream: [media] tda9887: remove an warning when compiling for alpha

There's no need to zero the buffer, as if the routine gets an error,
rc will be different than one.
That fixes the following warning:
drivers/media/tuners/tda9887.c: In function 'tda9887_status':
drivers/media/tuners/tda9887.c:539:2: warning: value computed is not used [-Wunused-value]
While here, make fix the CodingStyle on this function.

Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
Reviewed-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
10 years agoupstream: [media] r820t: add support for R828D
Antti Palosaari [Wed, 30 Oct 2013 03:17:02 +0000 (00:17 -0300)]
upstream: [media] r820t: add support for R828D

Small changes in order to support tuner version R828D @ 16 MHz clock.
There was 'vco_fine_tune' check, which seems to adjust synthesizer
output divider (mixer dix / LO div / Rout) by one. R828D seems to
return vco_fine_tune=1 every time and that condition causes tuning
fail as output divider was increased by one.
Resolve problem by skipping whole condition in case of R828D tuner.
Just to mention, other tuner, R820T, seems to return 2 here.
Synthesizer maximum frequency check was hard coded to check synthesizer N
and thus worked correctly only for clock frequencies around 30 MHz.
As whole test is quite useless in any case, I removed it totally.

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
10 years agoupstream: staging: media: omap24xx: tcm825x.c Fix that open brace { should be on...
Aybuke Ozdemir [Sun, 16 Mar 2014 05:27:54 +0000 (07:27 +0200)]
upstream: staging: media: omap24xx: tcm825x.c Fix that open brace { should be on the previous line

The patch fixes the following checkpatch.pl errors:
ERROR: that open brace { should be on the previous line.

Signed-off-by: Aybuke Ozdemir <aybuke.147@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agoupstream: [media] omap24xx/tcm825x: move to staging for future removal
Hans Verkuil [Thu, 12 Dec 2013 12:04:44 +0000 (09:04 -0300)]
upstream: [media] omap24xx/tcm825x: move to staging for future removal

The omap24xx driver and the tcm825x sensor driver are the only two
remaining drivers to still use the old deprecated v4l2-int-device API.

Nobody maintains these drivers anymore. But unfortunately the v4l2-int-device
API is used by out-of-tree drivers (MXC platform). This is a very bad situation
since as long as this deprecated API stays in the kernel there is no reason for
those out-of-tree drivers to convert.

This patch moves v4l2-int-device and the two drivers that depend on it to
staging in preparation for their removal.

If someone would be interested in getting these drivers to work, then start with
this since it's not very far from the state where they used to work:

<URL:http://vihersipuli.retiisi.org.uk/cgi-bin/gitweb.cgi?p=~sailus/linux-omap/.git;a=summary>

The branch is n800-cam. Porting to up-to-date APIs can then be done. David
might have done some work in that area, so check with him first.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Cc: Sakari Ailus <sakari.ailus@iki.fi>
Cc: David Cohen <dacohen@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
Conflicts:
drivers/staging/media/Kconfig
drivers/staging/media/Makefile

10 years agoupstream: [media] DocBook media: v4l2_format_sdr was renamed to v4l2_sdr_format
Hans Verkuil [Fri, 14 Mar 2014 11:57:06 +0000 (08:57 -0300)]
upstream: [media] DocBook media: v4l2_format_sdr was renamed to v4l2_sdr_format

Update the DocBook files accordingly.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Cc: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
10 years agoupstream: [media] DocBook media: clarify v4l2_buffer/plane fields
Hans Verkuil [Fri, 7 Mar 2014 13:16:48 +0000 (10:16 -0300)]
upstream: [media] DocBook media: clarify v4l2_buffer/plane fields

Be more specific as to who has to fill in each field/flag: the driver
or the application.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
10 years agoupstream: [media] v4l: rename v4l2_format_sdr to v4l2_sdr_format
Antti Palosaari [Mon, 10 Mar 2014 13:43:24 +0000 (10:43 -0300)]
upstream: [media] v4l: rename v4l2_format_sdr to v4l2_sdr_format

Rename v4l2_format_sdr to v4l2_sdr_format in order to keep it in
line with other formats.

Reported-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
10 years agoupstream: [media] DocBook: V4L: add V4L2_SDR_FMT_CU8 - 'CU08'
Antti Palosaari [Fri, 31 Jan 2014 02:44:59 +0000 (23:44 -0300)]
upstream: [media] DocBook: V4L: add V4L2_SDR_FMT_CU8 - 'CU08'

Document V4L2_SDR_FMT_CU8 SDR format.
It is complex unsigned 8-bit IQ sample. Used by software defined
radio devices.

Cc: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Antti Palosaari <crope@iki.fi>
Acked-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
10 years agoupstream: [media] rtl28xxu: add USB ID for Genius TVGo DVB-T03
Jan Vcelak [Wed, 26 Feb 2014 00:30:45 +0000 (21:30 -0300)]
upstream: [media] rtl28xxu: add USB ID for Genius TVGo DVB-T03

0458:707f KYE Systems Corp. (Mouse Systems) TVGo DVB-T03 [RTL2832]

The USB dongle uses RTL2832U demodulator and FC0012 tuner.

Signed-off-by: Jan Vcelak <jv@fcelda.cz>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
10 years agoupstream: [media] rc-main: fix missing unlock if no devno left
James Hogan [Sat, 1 Mar 2014 22:52:25 +0000 (19:52 -0300)]
upstream: [media] rc-main: fix missing unlock if no devno left

While playing with make coccicheck I noticed this message:
drivers/media/rc/rc-main.c:1245:3-9: preceding lock on line 1238

It was introduced by commit 587d1b06e07b ([media] rc-core: reuse device
numbers) which returns -ENOMEM after a mutex_lock without first
unlocking it when there are no more device numbers left. The added code
doesn't depend on the device lock, so move it before the lock is taken.

Signed-off-by: James Hogan <james.hogan@imgtec.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
10 years agoupstream: [media] rc-main: automatically refresh filter on protocol change
James Hogan [Fri, 28 Feb 2014 23:17:06 +0000 (20:17 -0300)]
upstream: [media] rc-main: automatically refresh filter on protocol change

When either of the normal or wakeup filter protocols are changed,
refresh the corresponding scancode filter, i.e. try and set the same
scancode filter with the new protocol. If that fails clear the filter
instead.

If no protocol was selected the filter is just cleared, and if no
s_filter callback exists the filter is left unmodified.

Similarly clear the filter mask when the filter is set if no protocol is
currently selected.

This simplifies driver code which no longer has to explicitly worry
about modifying the filter on a protocol change. This also allows the
change_wakeup_protocol callback to be omitted entirely if there is only
a single available wakeup protocol at a time, since selecting no
protocol will automatically clear the wakeup filter, disabling wakeup.

Signed-off-by: James Hogan <james.hogan@imgtec.com>
Reviewed-by: Antti Seppälä <a.seppala@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
10 years agoupstream: [media] rc: add wakeup_protocols sysfs file
James Hogan [Fri, 28 Feb 2014 23:17:05 +0000 (20:17 -0300)]
upstream: [media] rc: add wakeup_protocols sysfs file

Add a wakeup_protocols sysfs file which controls the new
rc_dev::enabled_protocols[RC_FILTER_WAKEUP], which is the mask of
protocols that are used for the wakeup filter.

A new RC driver callback change_wakeup_protocol() is called to change
the wakeup protocol mask.

Signed-off-by: James Hogan <james.hogan@imgtec.com>
Reviewed-by: Antti Seppälä <a.seppala@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
Conflicts:
Documentation/ABI/testing/sysfs-class-rc
Documentation/DocBook/media/v4l/remote_controllers.xml

10 years agoupstream: [media] rc-core: do not change 32bit NEC scancode format for now
David Härdeman [Fri, 4 Apr 2014 22:05:56 +0000 (19:05 -0300)]
upstream: [media] rc-core: do not change 32bit NEC scancode format for now

This reverts 18bc17448147e93f31cc9b1a83be49f1224657b2 and changes
the code at img-ir-nec.c to use the order used by the other NEC decoders.

The original patch ignored the fact that NEC32 scancodes are generated not
only in the NEC raw decoder but also directly in some drivers. Whichever
approach is chosen it should be consistent across drivers and this patch
needs more discussion.

Furthermore, I'm convinced that we have to stop playing games trying to
decipher the "meaning" of NEC scancodes (what's the customer/vendor/address,
which byte is the MSB, etc).

Signed-off-by: David Härdeman <david@hardeman.nu>
Acked-by: James Hogan <james.hogan@imgtec.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
10 years agoupstream: [media] rc: img-ir: hw: Fix min/max bits setup
James Hogan [Thu, 13 Mar 2014 10:29:22 +0000 (07:29 -0300)]
upstream: [media] rc: img-ir: hw: Fix min/max bits setup

The calculated values for the minlen and maxlen fields, which were
rounded to multiples of 2 and clamped to a valid range, were left
unused. Use them in the calculation of the register value rather than
using the raw input minlen and maxlen.

This fixes the following warning with a W=1 build:
drivers/media/rc/img-ir/img-ir-hw.c In function ‘img_ir_free_timing’:
drivers/media/rc/img-ir/img-ir-hw.c +228 :23: warning: variable ‘maxlen’ set but not used [-Wunused-but-set-variable]
drivers/media/rc/img-ir/img-ir-hw.c +228 :15: warning: variable ‘minlen’ set but not used [-Wunused-but-set-variable]

Reported-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
Signed-off-by: James Hogan <james.hogan@imgtec.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
10 years agoupstream: [media] rc: img-ir: jvc: Remove unused no-leader timings
James Hogan [Thu, 13 Mar 2014 10:29:23 +0000 (07:29 -0300)]
upstream: [media] rc: img-ir: jvc: Remove unused no-leader timings

The JVC timings included timings intended for the secondary decoder
(which matches messages with no leader), however they were in the wrong
part of the timings structure, repeating s00 and s01 rather than being
in s10 and s11.

Distinct repeat timings can't be properly supported yet for JVC anyway
since the scancode callback cannot determine which decoder matched the
message, so for now remove these timings and don't bother to enable the
secondary decoder.

This fixes the following warnings with W=1:
drivers/media/rc/img-ir/img-ir-jvc.c +76 :3: warning: initialized field overwritten [-Woverride-init]
drivers/media/rc/img-ir/img-ir-jvc.c +76 :3: warning: (near initialization for ‘img_ir_jvc.timings.s00’) [-Woverride-init]
drivers/media/rc/img-ir/img-ir-jvc.c +81 :3: warning: initialized field overwritten [-Woverride-init]
drivers/media/rc/img-ir/img-ir-jvc.c +81 :3: warning: (near initialization for ‘img_ir_jvc.timings.s01’) [-Woverride-init]

Reported-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
Signed-off-by: James Hogan <james.hogan@imgtec.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
10 years agoupstream: [media] rc: img-ir: add Sanyo decoder module
James Hogan [Fri, 28 Feb 2014 23:29:00 +0000 (20:29 -0300)]
upstream: [media] rc: img-ir: add Sanyo decoder module

Add an img-ir module for decoding the Sanyo infrared protocol.

Signed-off-by: James Hogan <james.hogan@imgtec.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
10 years agoupstream: [media] rc: img-ir: add Sharp decoder module
James Hogan [Fri, 28 Feb 2014 23:28:59 +0000 (20:28 -0300)]
upstream: [media] rc: img-ir: add Sharp decoder module

Add an img-ir module for decoding the Sharp infrared protocol.

Signed-off-by: James Hogan <james.hogan@imgtec.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
10 years agoupstream: [media] rc: img-ir: add Sony decoder module
James Hogan [Fri, 28 Feb 2014 23:28:58 +0000 (20:28 -0300)]
upstream: [media] rc: img-ir: add Sony decoder module

Add an img-ir module for decoding the Sony infrared protocol.

Signed-off-by: James Hogan <james.hogan@imgtec.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
10 years agoupstream: [media] rc: img-ir: add JVC decoder module
James Hogan [Fri, 28 Feb 2014 23:28:57 +0000 (20:28 -0300)]
upstream: [media] rc: img-ir: add JVC decoder module

Add an img-ir module for decoding the JVC infrared protocol.

Signed-off-by: James Hogan <james.hogan@imgtec.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
10 years agoupstream: [media] rc: img-ir: add NEC decoder module
James Hogan [Fri, 28 Feb 2014 23:28:56 +0000 (20:28 -0300)]
upstream: [media] rc: img-ir: add NEC decoder module

Add an img-ir module for decoding the NEC and extended NEC infrared
protocols.

Signed-off-by: James Hogan <james.hogan@imgtec.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
10 years agoupstream: [media] rc: img-ir: add to build
James Hogan [Fri, 28 Feb 2014 23:28:55 +0000 (20:28 -0300)]
upstream: [media] rc: img-ir: add to build

Add ImgTec IR decoder driver to the build system.

Signed-off-by: James Hogan <james.hogan@imgtec.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
10 years agoupstream: [media] rc: img-ir: add base driver
James Hogan [Fri, 28 Feb 2014 23:28:52 +0000 (20:28 -0300)]
upstream: [media] rc: img-ir: add base driver

Add base driver for the ImgTec Infrared decoder block. The driver is
split into separate components for raw (software) decode and hardware
decoder which are in following commits.

Signed-off-by: James Hogan <james.hogan@imgtec.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
10 years agoupstream: [media] media: rc: change 32bit NEC scancode format
James Hogan [Fri, 17 Jan 2014 13:58:50 +0000 (10:58 -0300)]
upstream: [media] media: rc: change 32bit NEC scancode format

Change 32bit NEC scancode format (used by Apple and TiVo remotes) to
encode the data with the correct bit order. Previously the raw bits were
used without being bit reversed, now each 16bit half is bit reversed
compared to before.

So for the raw NEC data:
  (LSB/First) 0xAAaaCCcc (MSB/Last)
(where traditionally AA=address, aa=~address, CC=command, cc=~command)

We now generate the scancodes:
  (MSB) 0x0000AACC (LSB) (normal NEC)
  (MSB) 0x00AAaaCC (LSB) (extended NEC, address check wrong)
  (MSB) 0xaaAAccCC (LSB) (32-bit NEC, command check wrong)

Note that the address byte order in 32-bit NEC scancodes is different to
that of the extended NEC scancodes. I chose this way as it maintains the
order of the bits in the address/command fields, and CC is clearly
intended to be the LSB of the command if the TiVo codes are anything to
go by so it makes sense for AA to also be the LSB.

The TiVo keymap is updated accordingly.

Signed-off-by: James Hogan <james.hogan@imgtec.com>
Cc: Mauro Carvalho Chehab <m.chehab@samsung.com>
Cc: Jarod Wilson <jarod@redhat.com>
Cc: linux-media@vger.kernel.org
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
10 years agoupstream: [media] rc: ir-raw: Load ir-sharp-decoder module at init
James Hogan [Wed, 5 Feb 2014 22:15:16 +0000 (19:15 -0300)]
upstream: [media] rc: ir-raw: Load ir-sharp-decoder module at init

Commit 1d184b0bc13d ([media] media: rc: add raw decoder for Sharp
protocol) added a new raw IR decoder for the sharp protocol, but didn't
add the code to load the module at init as is done for other raw
decoders, so add that code now.

Signed-off-by: James Hogan <james.hogan@imgtec.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
10 years agoupstream: [media] rc: add allowed/enabled wakeup protocol masks
James Hogan [Fri, 28 Feb 2014 23:17:04 +0000 (20:17 -0300)]
upstream: [media] rc: add allowed/enabled wakeup protocol masks

Only a single allowed and enabled protocol mask currently exists in
struct rc_dev, however to support a separate wakeup filter protocol two
of each are needed, ideally as an array.

Therefore make both rc_dev::allowed_protos and rc_dev::enabled_protocols
arrays, update all users to reference the first element
(RC_FILTER_NORMAL), and add a couple more helper functions for drivers
to use for setting the allowed and enabled wakeup protocols.

We also rename allowed_protos to allowed_protocols while we're at it,
which is more consistent with enabled_protocols.

Signed-off-by: James Hogan <james.hogan@imgtec.com>
Reviewed-by: Antti Seppälä <a.seppala@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
10 years agoupstream: [media] rc-main: add generic scancode filtering
James Hogan [Fri, 28 Feb 2014 23:17:02 +0000 (20:17 -0300)]
upstream: [media] rc-main: add generic scancode filtering

Add generic scancode filtering of RC input events, and fall back to
permitting any RC_FILTER_NORMAL scancode filter to be set if no s_filter
callback exists. This allows raw IR decoder events to be filtered, and
potentially allows hardware decoders to set looser filters and rely on
generic code to filter out the corner cases.

Signed-off-by: James Hogan <james.hogan@imgtec.com>
Reviewed-by: Antti Seppälä <a.seppala@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
10 years agoupstream: [media] rc-core: ir_core_dev_number can be static
Fengguang Wu [Wed, 15 Jan 2014 22:42:57 +0000 (19:42 -0300)]
upstream: [media] rc-core: ir_core_dev_number can be static

Fix sparse warning:
drivers/media/rc/rc-main.c:27:1: sparse: symbol 'ir_core_dev_number' was not declared. Should it be static?

Signed-off-by: Fengguang Wu <fengguang.wu@intel.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
10 years agoupstream: [media] rc-core: reuse device numbers
Mauro Carvalho Chehab [Tue, 14 Jan 2014 19:27:55 +0000 (16:27 -0300)]
upstream: [media] rc-core: reuse device numbers

Before changeset d8b4b5822f51e, the remote controller device numbers
were released when the device were unregistered. That helped to maintain
some sanity, as, when USB devices are replugged, the remote controller
would get the same number.

Restore the same behaviour.

Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
10 years agoupstream: [media] media: rc: rdev->open or rdev->close can be NULL
Juergen Lock [Fri, 16 Aug 2013 18:00:24 +0000 (15:00 -0300)]
upstream: [media] media: rc: rdev->open or rdev->close can be NULL

At least technisat-usb2.c doesn't set these...

Signed-off-by: Juergen Lock <nox@jelal.kn-bremen.de>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
10 years agoupstream: [media] rc-main: store_filter: pass errors to userland
James Hogan [Mon, 10 Feb 2014 21:31:56 +0000 (18:31 -0300)]
upstream: [media] rc-main: store_filter: pass errors to userland

Propagate errors returned by drivers from the s_filter callback back to
userland when updating scancode filters. This allows userland to see
when the filter couldn't be updated, usually because it's not a valid
filter for the hardware.

Previously the filter was being updated conditionally on success of
s_filter, but the write always reported success back to userland.

Reported-by: Antti Seppälä <a.seppala@gmail.com>
Signed-off-by: James Hogan <james.hogan@imgtec.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
10 years agoupstream: [media] bttv: Add support for Kworld V-Stream Xpert TV PVR878
Pojar George [Fri, 7 Feb 2014 17:56:17 +0000 (14:56 -0300)]
upstream: [media] bttv: Add support for Kworld V-Stream Xpert TV PVR878

New board addition. No other changes.

[m.chehab@samsung.com: rebase patch and fix whitespace mangling]
Signed-off-by: Pojar George <geoubuntu@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
10 years agoupstream: [media] mem2mem_testdev: return pending buffers in stop_streaming()
Hans Verkuil [Mon, 10 Mar 2014 13:58:27 +0000 (10:58 -0300)]
upstream: [media] mem2mem_testdev: return pending buffers in stop_streaming()

To keep the vb2 buffer administration in balance stop_streaming() must
return any pending buffers to the vb2 framework.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Kamil Debski <k.debski@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
Conflicts:
drivers/media/platform/mem2mem_testdev.c

10 years agoupstream: [media] saa6752hs: depends on CRC32
Hans Verkuil [Mon, 17 Feb 2014 09:52:06 +0000 (06:52 -0300)]
upstream: [media] saa6752hs: depends on CRC32

Have saa6752hs select CRC32.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Reported-by: kbuild test robot <fengguang.wu@intel.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
10 years agoupstream: [media] adv7180: free an interrupt on failure paths in init_device()
Alexey Khoroshilov [Fri, 14 Mar 2014 21:04:03 +0000 (18:04 -0300)]
upstream: [media] adv7180: free an interrupt on failure paths in init_device()

There is request_irq() in init_device(), but the interrupt is not removed
on failure paths. The patch adds proper error handling.

Found by Linux Driver Verification project (linuxtesting.org).

Signed-off-by: Alexey Khoroshilov <khoroshilov@ispras.ru>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
10 years agoupstream: [media] media: i2c: Kconfig: create dependency to MEDIA_CONTROLLER for...
Marcus Folkesson [Wed, 5 Feb 2014 15:56:13 +0000 (12:56 -0300)]
upstream: [media] media: i2c: Kconfig: create dependency to MEDIA_CONTROLLER for adv7*

These chips makes use of the media_entity in the v4l2_subdev struct
and is therefor dependent of the  MEDIA_CONTROLLER config.

Signed-off-by: Marcus Folkesson <marcus.folkesson@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
10 years agoupstream: [media] lm3646: add new dual LED Flash driver
Daniel Jeong [Mon, 3 Mar 2014 09:52:10 +0000 (06:52 -0300)]
upstream: [media] lm3646: add new dual LED Flash driver

This patch adds the driver for the LM3646, dual LED Flash driver.
The LM3646 has two 1.5A sync. boost converter with dual white current source.
It is controlled via an I2C compatible interface.
Each flash brightness, torch brightness and enable/disable can be controlled.
Under voltage, input voltage monitor and thermal threshhold Faults are added.
Please refer the datasheet http://www.ti.com/lit/ds/snvs962/snvs962.pdf

Signed-off-by: Daniel Jeong <gshark.jeong@gmail.com>
Signed-off-by: Sakari Ailus <sakari.ailus@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
10 years agoupstream: [media] mt9p031: Add support for PLL bypass
Laurent Pinchart [Sun, 9 Feb 2014 20:31:47 +0000 (17:31 -0300)]
upstream: [media] mt9p031: Add support for PLL bypass

When the input clock frequency is out of bounds for the PLL, bypass the
PLL and just divide the input clock to achieve the requested output
frequency.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
10 years agoupstream: [media] s5k5baf: allow to handle arbitrary long i2c sequences
Andrzej Hajda [Thu, 9 Jan 2014 12:55:43 +0000 (09:55 -0300)]
upstream: [media] s5k5baf: allow to handle arbitrary long i2c sequences

Using variable length array in s5k5baf_write_arr_seq caused
an implicit assumption that i2c sequences should be short.
The patch rewrites the function so it can handle sequences
of any length and does not use variable length array.

Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Andrzej Hajda <a.hajda@samsung.com>
Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
10 years agoupstream: [media] s5k5baf: Fix checkpatch error
Sachin Kamat [Tue, 24 Dec 2013 11:42:04 +0000 (08:42 -0300)]
upstream: [media] s5k5baf: Fix checkpatch error

Fixes the following error:
ERROR: return is not a function, parentheses are not required
FILE: drivers/media/i2c/s5k5baf.c:1353:

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
10 years agoupstream: [media] saa6588: after calling CMD_CLOSE, CMD_POLL is broken
Hans Verkuil [Sat, 14 Dec 2013 11:28:34 +0000 (08:28 -0300)]
upstream: [media] saa6588: after calling CMD_CLOSE, CMD_POLL is broken

CMD_CLOSE sets data_available_for_read to 1, which is necessary to do the
wakeup call, but it is never reset to 0.

Because of this calling CMD_POLL afterwards will always return that data is
available, even if there isn't any.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
10 years agoupstream: [media] ths8200: fix compilation with GCC < 4.4.6
Gianluca Gennari [Fri, 30 Aug 2013 11:29:25 +0000 (08:29 -0300)]
upstream: [media] ths8200: fix compilation with GCC < 4.4.6

Signed-off-by: Gianluca Gennari <gennarone@gmail.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
10 years agoupstream: [media] ad9389b: fix compilation with GCC < 4.4.6
Gianluca Gennari [Fri, 30 Aug 2013 11:29:24 +0000 (08:29 -0300)]
upstream: [media] ad9389b: fix compilation with GCC < 4.4.6

Signed-off-by: Gianluca Gennari <gennarone@gmail.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
10 years agoupstream: [media] adv7511: fix compilation with GCC < 4.4.6
Gianluca Gennari [Fri, 30 Aug 2013 11:29:23 +0000 (08:29 -0300)]
upstream: [media] adv7511: fix compilation with GCC < 4.4.6

Signed-off-by: Gianluca Gennari <gennarone@gmail.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
10 years agoupstream: [media] media: i2c: tvp7002: add OF support
Lad, Prabhakar [Sun, 11 Aug 2013 05:25:21 +0000 (02:25 -0300)]
upstream: [media] media: i2c: tvp7002: add OF support

add OF support for the tvp7002 driver.

Signed-off-by: Lad, Prabhakar <prabhakar.csengg@gmail.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
10 years agoupstream: [media] tvp514x: s_routing should just change routing, not try to detect...
Hans Verkuil [Thu, 20 Sep 2012 12:06:33 +0000 (09:06 -0300)]
upstream: [media] tvp514x: s_routing should just change routing, not try to detect a signal

The s_routing function should not try to detect a signal. It is a really
bad idea to try to detect a valid video signal and return an error if
you can't. Changing input should do just that and nothing more.
Also don't power on the ADCs on s_routing, instead do that on querystd.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Acked-by: Lad, Prabhakar <prabhakar.lad@ti.com>
Tested-by: Lad, Prabhakar <prabhakar.lad@ti.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
10 years agoupstream: [media] lm3560: prevent memory leak in case of pdata absence
Andy Shevchenko [Wed, 12 Feb 2014 09:02:07 +0000 (06:02 -0300)]
upstream: [media] lm3560: prevent memory leak in case of pdata absence

If we have no pdata defined and driver fails to register we leak memory.
Converting to devm_kzalloc prevents this to happen.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Sakari Ailus <sakari.ailus@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
10 years agoupstream: [media] lm3560: keep style for the comments
Andy Shevchenko [Wed, 12 Feb 2014 09:02:06 +0000 (06:02 -0300)]
upstream: [media] lm3560: keep style for the comments

Let's keep the style for all comments in the code, namely using small letters
whenever it's possible.

There is no functional change.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Sakari Ailus <sakari.ailus@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
10 years agoupstream: [media] lm3560: remove FSF address from the license
Andy Shevchenko [Wed, 12 Feb 2014 09:02:05 +0000 (06:02 -0300)]
upstream: [media] lm3560: remove FSF address from the license

There is no need to keep the FSF address inside each file. Moreover, it might
change in future which will make this one obsolete.

There is no functional change.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Sakari Ailus <sakari.ailus@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
10 years agoupstream: [media] media: i2c: lm3560: use correct clientdata in lm3560_remove()
Wei Yongjun [Sat, 9 Nov 2013 00:24:18 +0000 (21:24 -0300)]
upstream: [media] media: i2c: lm3560: use correct clientdata in lm3560_remove()

We had set the i2c clientdata to &flash->subdev_led[LM3560_LED1]
after call lm3560_subdev_init(flash, LM3560_LED1, "lm3560-led1"),
but the container_of() in lm3560_remove() return the wrong pointer
to flash.(should be container_of(subdev, struct lm3560_flash,
subdev_led[LM3560_LED_MAX-1])
This patch fix to set i2c clientdata to flash so we can get flash
from clientdata directly.

Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
10 years agoupstream: [media] media: i2c: lm3560: fix missing unlock on error in lm3560_set_ctrl()
Wei Yongjun [Thu, 7 Nov 2013 12:44:42 +0000 (09:44 -0300)]
upstream: [media] media: i2c: lm3560: fix missing unlock on error in lm3560_set_ctrl()

Add the missing unlock before return from function lm3560_set_ctrl()
in the error handling case.

Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
10 years agoupstream: [media] media: i2c: lm3560: fix missing unlock on error, fault handling
Daniel Jeong [Fri, 6 Dec 2013 05:43:27 +0000 (02:43 -0300)]
upstream: [media] media: i2c: lm3560: fix missing unlock on error, fault handling

Correct reference of reading values. (rval -> reg_val)
Add the missing unlock before return from function lm3560_get_ctrl()
to avoid deadlock.
Thank you Dan Carpenter & Sakari.

Signed-off-by: Daniel Jeong <gshark.jeong@gmail.com>
Signed-off-by: Sakari Ailus <sakari.ailus@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
10 years agoupstream: [media] media: i2c: add driver for dual LED Flash, lm3560
Daniel Jeong [Wed, 16 Oct 2013 07:12:19 +0000 (04:12 -0300)]
upstream: [media] media: i2c: add driver for dual LED Flash, lm3560

Adds the driver for the LM3560, dual LED Flash The LM3560 has two 1A
constant current driver for high current white LEDs.

It is controlled via an I2C compatible interface(up to 400kHz).

Each flash brightness, torch  brightness and enable/disable can be
controlled independantly, but flash timeout and operation mode are shared.

Signed-off-by: Daniel Jeong <gshark.jeong@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
10 years agoupstream: [media] media: soc_camera: rcar_vin: Add support for 10-bit YUV cameras
Phil Edworthy [Tue, 25 Feb 2014 09:10:27 +0000 (06:10 -0300)]
upstream: [media] media: soc_camera: rcar_vin: Add support for 10-bit YUV cameras

Add support for MBUS YUV10 BT656 and BT601 formats at rcar driver.

Signed-off-by: Phil Edworthy <phil.edworthy@renesas.com>
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
10 years agoupstream: [media] vivi: fix ENUM_FRAMEINTERVALS implementation
Hans Verkuil [Tue, 25 Feb 2014 10:15:54 +0000 (07:15 -0300)]
upstream: [media] vivi: fix ENUM_FRAMEINTERVALS implementation

This function never checked if width and height are correct. Add such
a check so the v4l2-compliance tool returns OK again for vivi.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
10 years agoupstream: [media] vivi: correctly cleanup after a start_streaming failure
Hans Verkuil [Fri, 21 Feb 2014 08:34:49 +0000 (05:34 -0300)]
upstream: [media] vivi: correctly cleanup after a start_streaming failure

If start_streaming fails then any queued buffers must be given back
to the vb2 core.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
10 years agoupstream: [media] vivi: fix sequence counting
Hans Verkuil [Mon, 10 Feb 2014 11:08:45 +0000 (08:08 -0300)]
upstream: [media] vivi: fix sequence counting

The sequence counting was not reset to 0 between each streaming run,
and it was increased only every other frame. This is incorrect behavior:
the confusion is with FIELD_ALTERNATE systems where each field is transmitted
separately and only when both fields have been received is the frame
sequence number increased.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
10 years agoupstream: [media] vb2: only call start_streaming if sufficient buffers are queued
Hans Verkuil [Mon, 24 Feb 2014 16:51:03 +0000 (13:51 -0300)]
upstream: [media] vb2: only call start_streaming if sufficient buffers are queued

In commit 02f142ecd24aaf891324ffba8527284c1731b561 support was added to
start_streaming to return -ENOBUFS if insufficient buffers were queued
for the DMA engine to start. The vb2 core would attempt calling
start_streaming again if another buffer would be queued up.

Later analysis uncovered problems with the queue management if start_streaming
would return an error: the buffers are enqueued to the driver before the
start_streaming op is called, so after an error they are never returned to
the vb2 core. The solution for this is to let the driver return them to
the vb2 core in case of an error while starting the DMA engine. However,
in the case of -ENOBUFS that would be weird: it is not a real error, it
just says that more buffers are needed. Requiring start_streaming to give
them back only to have them requeued again the next time the application
calls QBUF is inefficient.

This patch changes this mechanism: it adds a 'min_buffers_needed' field
to vb2_queue that drivers can set with the minimum number of buffers
required to start the DMA engine. The start_streaming op is only called
if enough buffers are queued. The -ENOBUFS handling has been dropped in
favor of this new method.

Drivers are expected to return buffers back to vb2 core with state QUEUED
if start_streaming would return an error. The vb2 core checks for this
and produces a warning if that didn't happen and it will forcefully
reclaim such buffers to ensure that the internal vb2 core state remains
consistent and all buffer-related resources have been correctly freed
and all op calls have been balanced.

__reqbufs() has been updated to check that at least min_buffers_needed
buffers could be allocated. If fewer buffers were allocated then __reqbufs
will free what was allocated and return -ENOMEM. Based on a suggestion from
Pawel Osciak.

__create_bufs() doesn't do that check, since the use of __create_bufs
assumes some advance scenario where the user might want more control.
Instead streamon will check if enough buffers were allocated to prevent
streaming with fewer than the minimum required number of buffers.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
10 years agoupstream: [media] v4l: Copy timestamp source flags to destination on m2m devices
Sakari Ailus [Sat, 8 Feb 2014 17:21:35 +0000 (14:21 -0300)]
upstream: [media] v4l: Copy timestamp source flags to destination on m2m devices

Copy the flags containing the timestamp source from source buffer flags to
the destination buffer flags on memory-to-memory devices. This is analogous
to copying the timestamp field from source to destination.

Signed-off-by: Sakari Ailus <sakari.ailus@iki.fi>
Acked-by: Kamil Debski <k.debski@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
10 years agoupstream: [media] exynos-gsc, m2m-deinterlace, mx2_emmaprp: Copy v4l2_buffer data...
Sakari Ailus [Sat, 8 Feb 2014 16:37:59 +0000 (13:37 -0300)]
upstream: [media] exynos-gsc, m2m-deinterlace, mx2_emmaprp: Copy v4l2_buffer data from src to dst

The timestamp and timecode fields were copied from destination to source,
not the other way around as they should. Fix it.

Signed-off-by: Sakari Ailus <sakari.ailus@iki.fi>
Acked-by: Kamil Debski <k.debski@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
10 years agoupstream: [media] uvcvideo: Tell the user space we're using start-of-exposure timestamps
Sakari Ailus [Mon, 10 Feb 2014 22:26:44 +0000 (19:26 -0300)]
upstream: [media] uvcvideo: Tell the user space we're using start-of-exposure timestamps

The UVC device provided timestamps are taken from the clock once the
exposure of the frame has begun, not when the reception of the frame would
have been finished as almost anywhere else. Show this to the user space by
using V4L2_BUF_FLAG_TSTAMP_SRC_SOE buffer flag.

Signed-off-by: Sakari Ailus <sakari.ailus@iki.fi>
Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
10 years agoupstream: [media] v4l: Add timestamp source flags, mask and document them
Sakari Ailus [Sun, 25 Aug 2013 20:57:03 +0000 (17:57 -0300)]
upstream: [media] v4l: Add timestamp source flags, mask and document them

Some devices do not produce timestamps that correspond to the end of the
frame. The user space should be informed on the matter. This patch achieves
that by adding buffer flags (and a mask) for timestamp sources since more
possible timestamping points are expected than just two.

A three-bit mask is defined (V4L2_BUF_FLAG_TSTAMP_SRC_MASK) and two of the
eight possible values is are defined V4L2_BUF_FLAG_TSTAMP_SRC_EOF for end of
frame (value zero) V4L2_BUF_FLAG_TSTAMP_SRC_SOE for start of exposure (next
value).

Signed-off-by: Sakari Ailus <sakari.ailus@iki.fi>
Acked-by: Kamil Debski <k.debski@samsung.com>
Acked-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
10 years agoupstream: [media] v4l: Rename vb2_queue.timestamp_type as timestamp_flags
Sakari Ailus [Tue, 25 Feb 2014 22:12:19 +0000 (19:12 -0300)]
upstream: [media] v4l: Rename vb2_queue.timestamp_type as timestamp_flags

The timestamp_type field used to contain only the timestamp type. Soon it
will be used for timestamp source flags as well. Rename the field
accordingly.

[m.chehab@samsung.com: do the change also to drivers/staging/media and at s2255]
Signed-off-by: Sakari Ailus <sakari.ailus@iki.fi>
Acked-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
Conflicts:
drivers/media/platform/mem2mem_testdev.c
drivers/media/platform/s5p-g2d/g2d.c
drivers/staging/media/msi3101/sdr-msi3101.c

10 years agoupstream: [media] rtl28xxu: silence error log about disabled rtl2832_sdr module
Antti Palosaari [Wed, 9 Apr 2014 21:08:37 +0000 (18:08 -0300)]
upstream: [media] rtl28xxu: silence error log about disabled rtl2832_sdr module

It printed a little bit too heavy looking error log "DVB: Unable to
find symbol rtl2832_sdr_attach()" when staging module was disabled.
Silence that error by introducing own version of dvb_attach() macro
without the error logging.

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
10 years agoupstream: [media] rtl28xxu: do not hard depend on staging SDR module
Antti Palosaari [Wed, 9 Apr 2014 15:42:35 +0000 (12:42 -0300)]
upstream: [media] rtl28xxu: do not hard depend on staging SDR module

RTL2832 SDR extension module is currently on staging. SDR module
headers were included from staging causing direct dependency staging
directory. As a solution, add needed headers to main driver.
Motivation of that change comes from Luis / driver backports project.

Reported-by: Luis R. Rodriguez <mcgrof@do-not-panic.com>
Cc: backports@vger.kernel.org
Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
10 years agoupstream: [media] rtl28xxu: remove duplicate ID 0458:707f Genius TVGo DVB-T03
Antti Palosaari [Wed, 26 Mar 2014 22:20:30 +0000 (19:20 -0300)]
upstream: [media] rtl28xxu: remove duplicate ID 0458:707f Genius TVGo DVB-T03

That ID was added twice mistakenly.
1st commit ac298ccdde4fe9b0a966e548a232ff4e8a6b8a31
2nd commit 1c1b8734094551eb4075cf68cf76892498c0da61

Revert commit 1c1b8734094551eb4075cf68cf76892498c0da61

Reported-by: Jan Vcelak <jv@fcelda.cz>
Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
10 years agoupstream: [media] af9033: Don't export functions for the hardware filter
Mauro Carvalho Chehab [Fri, 14 Mar 2014 17:29:06 +0000 (14:29 -0300)]
upstream: [media] af9033: Don't export functions for the hardware filter

Exporting functions for hardware filter is a bad idea, as it
breaks compilation if:
CONFIG_DVB_USB_AF9035=y
CONFIG_DVB_AF9033=m

Because the PID filter function calls would be hardcoded at
af9035.

The same doesn't happen with af9033_attach() because the
dvb_attach() doesn't hardcode it. Instead, it dynamically
links it at runtime.

However, calling dvb_attach() multiple times is problematic,
as it increments module kref.

So, the better is to pass one parameter for the af9033 module
to fill the hardware filters, and then use it inside af9035.

Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
10 years agoupstream: [media] af9035: use af9033 PID filters
Antti Palosaari [Thu, 13 Feb 2014 18:53:05 +0000 (15:53 -0300)]
upstream: [media] af9035: use af9033 PID filters

PID filters are property of af9033 demod. Use PID filters from af9033
driver as it provides those now.

Allow possible dual mode on USB 1.1 mode too as bandwidth could be
just enough when filters are used on both frontends.

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
10 years agoupstream: [media] rtl28xxu: use muxed RTL2832 I2C adapters for E4000 and RTL2832_SDR
Antti Palosaari [Sat, 8 Feb 2014 07:03:57 +0000 (04:03 -0300)]
upstream: [media] rtl28xxu: use muxed RTL2832 I2C adapters for E4000 and RTL2832_SDR

RTL2832 driver provides muxed I2C adapters for tuner bus I2C gate
control. Pass those adapters to rtl2832_sdr and e4000 modules in order
to get rid of proprietary DVB .i2c_gate_ctrl() callback use.

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>