openwrt/staging/blogic.git
12 years ago[media] dvb: Add a new driver for az6007
Mauro Carvalho Chehab [Thu, 21 Jul 2011 20:46:41 +0000 (17:46 -0300)]
[media] dvb: Add a new driver for az6007

Import the az6007 driver from Terratec H7 source, as-is.

It won't compile or run, so latter patches are needed in order
to fix it.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] as3645a: Fix compilation by including slab.h
Laurent Pinchart [Sun, 8 Jan 2012 23:18:19 +0000 (20:18 -0300)]
[media] as3645a: Fix compilation by including slab.h

The as3645a driver calls kzalloc(). Include slab.h.

Reported-by: Fredrik Lingvall <fredrik.lingvall@gmail.com>
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Acked-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] s5p-fimc: Remove linux/version.h include from fimc-mdevice.c
Sachin Kamat [Tue, 17 Jan 2012 07:55:25 +0000 (04:55 -0300)]
[media] s5p-fimc: Remove linux/version.h include from fimc-mdevice.c

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] s5p-mfc: Remove linux/version.h include from s5p_mfc.c
Sachin Kamat [Tue, 17 Jan 2012 07:52:41 +0000 (04:52 -0300)]
[media] s5p-mfc: Remove linux/version.h include from s5p_mfc.c

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] ds3000: using logical && instead of bitwise &
Dan Carpenter [Tue, 17 Jan 2012 06:28:51 +0000 (03:28 -0300)]
[media] ds3000: using logical && instead of bitwise &

The intent here was to test if the FE_HAS_LOCK was set.  The current
test is equivalent to "if (status) { ..."

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] v4l2-ctrls: make control names consistent
Hans Verkuil [Mon, 16 Jan 2012 15:27:15 +0000 (12:27 -0300)]
[media] v4l2-ctrls: make control names consistent

Several control names used inconsistent capitalization or were inconsistent
in other ways. I also corrected a spelling mistake and fixed four strings
that were too long (>31 characters). Harmless, but the string is cut off when
it is returned with QUERYCTRL.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] DVB: dib0700, add support for Nova-TD LEDs
Jiri Slaby [Tue, 10 Jan 2012 17:11:25 +0000 (14:11 -0300)]
[media] DVB: dib0700, add support for Nova-TD LEDs

Add an override of read_status to intercept lock status. This allows
us to switch LEDs appropriately on and off with signal un/locked.

The second phase is to override sleep to properly turn off both.

This is a hackish way to achieve that.

Thanks to Mike Krufky for his help.

Signed-off-by: Jiri Slaby <jslaby@suse.cz>
Acked-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Patrick Boettcher <pboettcher@kernellabs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] DVB: dib0700, add corrected Nova-TD frontend_attach
Jiri Slaby [Tue, 10 Jan 2012 17:11:24 +0000 (14:11 -0300)]
[media] DVB: dib0700, add corrected Nova-TD frontend_attach

This means cut & paste from the former f. attach. But while at it write
to the right GPIO to turn on the right LED. Also turn the other two
off jsut for sure.

Signed-off-by: Jiri Slaby <jslaby@suse.cz>
Acked-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Patrick Boettcher <pboettcher@kernellabs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] DVB: dib0700, separate stk7070pd initialization
Jiri Slaby [Tue, 10 Jan 2012 17:11:23 +0000 (14:11 -0300)]
[media] DVB: dib0700, separate stk7070pd initialization

The start is common for both stk7070pd and novatd specific routine.
This is just a preparation for the next patch.

Signed-off-by: Jiri Slaby <jslaby@suse.cz>
Acked-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Patrick Boettcher <pboettcher@kernellabs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] DVB: dib0700, move Nova-TD Stick to a separate set
Jiri Slaby [Tue, 10 Jan 2012 17:11:22 +0000 (14:11 -0300)]
[media] DVB: dib0700, move Nova-TD Stick to a separate set

To properly support the three LEDs which are on the stick, we need
a special handling in the ->frontend_attach function. Thus let's have
a separate ->frontend_attach instead of ifs in the common one.

The hadnling itself will be added in further patches.

Signed-off-by: Jiri Slaby <jslaby@suse.cz>
Acked-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Patrick Boettcher <pboettcher@kernellabs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] : add MODULE_FIRMWARE to dib0700
Patrick Boettcher [Tue, 17 Jan 2012 11:41:20 +0000 (08:41 -0300)]
[media] : add MODULE_FIRMWARE to dib0700

The dib0700 needs a binary firmware file. This patch added the MODULE_FIRMWARE-macro.

Signed-off-by: Christoph Anton Mitterer <calestyo@scientia.net>
Signed-off-by: Patrick Boettcher <pboettcher@kernellabs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] DVB-CORE: remove superfluous DTV_CMDs
Patrick Boettcher [Tue, 17 Jan 2012 08:49:14 +0000 (05:49 -0300)]
[media] DVB-CORE: remove superfluous DTV_CMDs

This small patch removes superfluous DTV_CMDs from dvb_frontend.c which were added in the initially when ISBD-T support was added.
They were there unnoticed even though compilers should have warning about those duplicates. Finally they did and now we can remove them.

Thanks to Dan Carpenter <dan.carpenter@oracle.com> for pointing that out.

Signed-off-by: Patrick Boettcher <pboettcher@kernellabs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] s5p-jpeg: adapt to recent videobuf2 changes
Marek Szyprowski [Fri, 13 Jan 2012 08:12:38 +0000 (05:12 -0300)]
[media] s5p-jpeg: adapt to recent videobuf2 changes

queue_setup callback has been extended with struct v4l2_format *fmt
parameter in 2d86401c2c commit. This patch adds this parameter to
s5p-jpeg driver.

Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] s5p-g2d: fixed a bug in controls setting function
Kamil Debski [Mon, 2 Jan 2012 12:19:25 +0000 (09:19 -0300)]
[media] s5p-g2d: fixed a bug in controls setting function

Signed-off-by: Kamil Debski <k.debski@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] s5p-mfc: Fix volatile controls setup
Kamil Debski [Tue, 27 Dec 2011 13:07:24 +0000 (10:07 -0300)]
[media] s5p-mfc: Fix volatile controls setup

Signed-off-by: Kamil Debski <k.debski@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] drivers/media/video/s5p-mfc/s5p_mfc.c: adjust double test
Julia Lawall [Thu, 12 Jan 2012 20:49:30 +0000 (17:49 -0300)]
[media] drivers/media/video/s5p-mfc/s5p_mfc.c: adjust double test

Rewrite a duplicated test to test the correct value

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

// <smpl>
@@
expression E;
@@

(
* E
  || ... || E
|
* E
  && ... && E
)
// </smpl>

Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>
Acked-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] drivers/media/video/s5p-fimc/fimc-capture.c: adjust double test
Julia Lawall [Thu, 12 Jan 2012 20:49:28 +0000 (17:49 -0300)]
[media] drivers/media/video/s5p-fimc/fimc-capture.c: adjust double test

Rewrite a duplicated test to test the correct value

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

// <smpl>
@@
expression E;
@@

(
* E
  || ... || E
|
* E
  && ... && E
)
// </smpl>

Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>
Acked-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] s5p-fimc: Fix incorrect control ID assignment
Sachin Kamat [Tue, 10 Jan 2012 08:46:57 +0000 (05:46 -0300)]
[media] s5p-fimc: Fix incorrect control ID assignment

This patch fixes the mismatch between control IDs (CID) and controls
for hflip, vflip and rotate.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Acked-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] dvb_frontend: Don't call get_frontend() if idle
Mauro Carvalho Chehab [Tue, 17 Jan 2012 18:20:37 +0000 (16:20 -0200)]
[media] dvb_frontend: Don't call get_frontend() if idle

If the frontend is in idle state, don't call get_frontend.

Calling get_frontend() when the device is not tuned may
result in wrong parameters to be returned to the
userspace.

I was tempted to not call get_frontend() at all, except
inside the dvb frontend thread, but this won't work for
all cases. The ISDB-T specs (ABNT NBR 15601 and ARIB
STD-B31) allow the broadcaster to dynamically change the
channel specs at runtime. That means that an ISDB-T optimized
application may want/need to monitor the TMCC tables, decoded
at the frontends via get_frontend call.

So, let's do the simpler change here.

Eventually, the logic could be changed to work only if
the device is tuned and has lock, but, even so, the
lock is also standard-dependent. For ISDB-T, the right
lock to wait is that the demod has TMCC lock. So, drivers
may need to implement some logic to detect if the get_frontend
info was retrieved or not.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] DocBook/dvbproperty.xml: Remove DTV_MODULATION from ISDB-T
Mauro Carvalho Chehab [Tue, 17 Jan 2012 12:00:41 +0000 (10:00 -0200)]
[media] DocBook/dvbproperty.xml: Remove DTV_MODULATION from ISDB-T

On ISDB-T, each layer can have its own independent modulation,
applied to the carriers that belong to the segments associated
with them. So, there's no sense to define a global modulation
parameter.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] DocBook/dvbproperty.xml: Fix ISDB-T delivery system parameters
Mauro Carvalho Chehab [Tue, 17 Jan 2012 11:49:28 +0000 (09:49 -0200)]
[media] DocBook/dvbproperty.xml: Fix ISDB-T delivery system parameters

The ISDB-T differs on its way to implement the hierarchical
transmissions: instead of using a low-priority/high-priority
FEC codes, it does that by using different layers, each layer
with their groups of segments. So, those parameters don't make sense
for ISDB-T.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] DocBook/dvbproperty.xml: Fix the units for DTV_FREQUENCY
Mauro Carvalho Chehab [Tue, 17 Jan 2012 11:45:48 +0000 (09:45 -0200)]
[media] DocBook/dvbproperty.xml: Fix the units for DTV_FREQUENCY

The units for DTV_FREQUENCY are kHz for satellital delivery systems
(DVB-S/DVB-S2/DVB-TURBO/ISDB-S). Fix it at the API spec.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] cxd2820r: do not allow get_frontend() when demod is not initialized
Antti Palosaari [Sun, 15 Jan 2012 21:30:36 +0000 (18:30 -0300)]
[media] cxd2820r: do not allow get_frontend() when demod is not initialized

This fixes bug introduced by multi-frontend to single-frontend change.

Finally HAS_LOCK is got back!
We are not allowed to access hardware in sleep mode...
Chip did not like when .get_frontend() reads some registers while
chip was sleeping and due to that HAS_LOCK bit was never gained.

TODO: We should add logic for dvb-core to drop out illegal calls like that.

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] cxd2820r: wait demod lock for DVB-C too
Antti Palosaari [Sun, 15 Jan 2012 19:50:11 +0000 (16:50 -0300)]
[media] cxd2820r: wait demod lock for DVB-C too

Fix yet another bug introduced be recent cxd2820r multi-frontend to
single-frontend change.

Finally, we have at least almost working picture for DVB-C too.

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] tda18271c2dd: Remove pointless linux/version.h include
Jesper Juhl [Sun, 15 Jan 2012 19:39:13 +0000 (16:39 -0300)]
[media] tda18271c2dd: Remove pointless linux/version.h include

As pointed out by 'make versioncheck', there's no need for
drivers/media/dvb/frontends/tda18271c2dd.c to

Signed-off-by: Jesper Juhl <jj@chaosbits.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] cxd2820r: do not switch to DVB-T when DVB-C fails
Antti Palosaari [Sun, 15 Jan 2012 18:08:30 +0000 (15:08 -0300)]
[media] cxd2820r: do not switch to DVB-T when DVB-C fails

Fix another bug introduced by recent multi-frontend to single-frontend
change.

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] anysee: do not attach same frontend twice
Antti Palosaari [Sun, 15 Jan 2012 17:20:50 +0000 (14:20 -0300)]
[media] anysee: do not attach same frontend twice

cxd2820r implements only one frontend currently which
handles all the standards.

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] tlg2300: fix up check_firmware() return
Dan Carpenter [Sun, 15 Jan 2012 10:32:19 +0000 (07:32 -0300)]
[media] tlg2300: fix up check_firmware() return

The caller doesn't check the return value of check_firmware() but static
checkers complain.  It currently returns negative error codes, or zero
or greater on success but since the return type is boolean the values
are truncated to one or zero.  I've changed it to return an int,
negative on error and zero on success.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] saa7164: remove duplicate initialization
Dan Carpenter [Sun, 15 Jan 2012 10:25:57 +0000 (07:25 -0300)]
[media] saa7164: remove duplicate initialization

These were initialized twice by mistake.  They were defined the same way
both times so this doesn't change how the code works.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] Add registers names to XC2028 tuner from datahseet and use them
Miroslav Slugen [Sun, 11 Dec 2011 23:19:34 +0000 (20:19 -0300)]
[media] Add registers names to XC2028 tuner from datahseet and use them

Signed-off-by: Miroslav Slugen <thunder.mmm@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] xc4000: add support for signal strength measures
Miroslav Slugen [Wed, 21 Dec 2011 00:18:38 +0000 (21:18 -0300)]
[media] xc4000: add support for signal strength measures

In xc4000 chipsets real signal and noise level is stored in register
0x0A and 0x0B,so we can use those registers to monitor signal strength.

I tested this patch on 2 different cards Leadtek DVR3200 and DTV2000H
Plus, both with same results, I used special antenna hubs (toner 4x, 6x,
8x and 12x) with mesured signal lost, both registers are in dB value,
first represent signal with limit value -113.5dB (should be -114dB) and
exactly match with test results. Second represents noise level also in
dB and there is no maximum value, but from tests we can drop everything
above 32dB which tuner realy can't use, signal was usable till 20dB
noise level.

In digital mode we can take signal strength but sadly noise level is not
relevant and real value is stored in demodulator for now just zl10353,
also digital mode is just for testing, because it needs changing other
parts of code which reads data only from demodulator.

In analog mode I was able to test only FM radio, signal level is not
important, it says something about cable and hub losts, but nothing
about real quality of reception, so even if we have signal level at
minimum 113dB we can still here radio, because of that it is displaied
only in debug mode, but for real signal level is used noise register
which is again very accurate, radio noise level was betwen 6-20dB for
good signal, 20-25dB for medium signal, and above 25dB signal is
unusable.

For now real benefit of this patch is only for FM radio mode.

Signed-off-by: Miroslav Slugen <thunder.mmm@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] tuner: Fix numberspace conflict between xc4000 and pti 5nf05 tuners
Miroslav Slugen [Sun, 11 Dec 2011 21:47:32 +0000 (18:47 -0300)]
[media] tuner: Fix numberspace conflict between xc4000 and pti 5nf05 tuners

Update xc4000 tuner definition, number 81 is already in use by
TUNER_PARTSNIC_PTI_5NF05.

Cc: stable@kernel.org
Signed-off-by: Miroslav Slugen <thunder.mmm@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] cx88: fix: don't duplicate xc4000 entry for radio
Miroslav Slugen [Sun, 11 Dec 2011 22:00:06 +0000 (19:00 -0300)]
[media] cx88: fix: don't duplicate xc4000 entry for radio

All radio tuners in cx88 driver using same address for radio and tuner,
so there is no need to probe it twice for same tuner and we can use
radio_type UNSET, this also fix broken radio since kernel 2.6.39-rc1
for those tuners.

Cc: stable@kernel.org
Signed-off-by: Miroslav Slugen <thunder.mmm@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] cx23885: Don't duplicate xc4000 entry for radio
Miroslav Slugen [Sun, 11 Dec 2011 23:19:34 +0000 (20:19 -0300)]
[media] cx23885: Don't duplicate xc4000 entry for radio

All radio tuners in cx23885 driver using same address for radio and
tuner, so there is no need to probe it twice for same tuner and we can
use radio_type UNSET.

Be aware radio support in cx23885 is not yet committed, so this is only
minor fix for future support.

Signed-off-by: Miroslav Slugen <thunder.mmm@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] cx23885-dvb: check if dvb_attach() succeded
Miroslav Slugen [Sun, 11 Dec 2011 21:57:58 +0000 (18:57 -0300)]
[media] cx23885-dvb: check if dvb_attach() succeded

Fix possible null dereference for Leadtek DTV 3200H
XC4000 tuner when no firmware file available.

Cc: stable@kernel.org
Signed-off-by: Miroslav Slugen <thunder.mmm@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] cx231xx: dereferencing NULL after allocation failure
Dan Carpenter [Fri, 13 Jan 2012 05:34:00 +0000 (02:34 -0300)]
[media] cx231xx: dereferencing NULL after allocation failure

"dev" is NULL here so we should use "nr" instead of "dev->devno".

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] mb86a20s: fix off by one checks
Dan Carpenter [Fri, 13 Jan 2012 05:28:34 +0000 (02:28 -0300)]
[media] mb86a20s: fix off by one checks

Clearly ">=" was intended here instead of ">".

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] pwc: Simplify leds parameter parsing
Hans de Goede [Tue, 10 Jan 2012 20:51:12 +0000 (17:51 -0300)]
[media] pwc: Simplify leds parameter parsing

This reduces our module init to a simple usb_register() call, so
that we can make use of the new upcoming macro's for this.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] pwc: Remove dev_hint module parameter
Hans de Goede [Tue, 10 Jan 2012 20:47:25 +0000 (17:47 -0300)]
[media] pwc: Remove dev_hint module parameter

The code for this is rather crufty, and being able to tie a device
to a specific minor is not really something we want to support in
a modern udev based world.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] pwc: Use one shared usb command buffer
Hans de Goede [Tue, 10 Jan 2012 20:02:04 +0000 (17:02 -0300)]
[media] pwc: Use one shared usb command buffer

The pwc driver used to:
1. kmalloc a buffer
2. memcpy data to send over usb there
3. do the usb_control_msg call (which does not work with data on the stack)
4. free the buffer

For every usb command send. This patch changes the code to instead malloc
a buffer for this purpose once and use it everywhere.

[mchehab@redhat.com: Fix a compilation breakage with allyesconfig:
 drivers/media/video/pwc/pwc-ctrl.c: In function ‘pwc_get_cmos_sensor’:
 drivers/media/video/pwc/pwc-ctrl.c:546:3: warning: passing argument 4 of ‘recv_control_msg’ makes integer from pointer without a cast [en$
 drivers/media/video/pwc/pwc-ctrl.c:107:12: note: expected ‘int’ but argument is of type ‘unsigned char *’
 drivers/media/video/pwc/pwc-ctrl.c:546:3: error: too many arguments to function ‘recv_control_msg’
 drivers/media/video/pwc/pwc-ctrl.c:107:12: note: declared here]

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] pwc: Avoid unnecessarily rebuilding the decoder tables
Hans de Goede [Tue, 10 Jan 2012 16:23:34 +0000 (13:23 -0300)]
[media] pwc: Avoid unnecessarily rebuilding the decoder tables

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] pwc: Avoid sending mode info to the camera when it is not needed
Hans de Goede [Tue, 10 Jan 2012 16:14:46 +0000 (13:14 -0300)]
[media] pwc: Avoid sending mode info to the camera when it is not needed

Since we always do a set_video_mode on stream start, there is no need
to actually send the mode info to the device on a s_fmt / s_parm ioctl.
Not doing this saves us doing (slow) usb io.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] pwc: Fix pixfmt handling
Hans de Goede [Tue, 10 Jan 2012 16:01:41 +0000 (13:01 -0300)]
[media] pwc: Fix pixfmt handling

Before this patch various code in the mode setting patch checked
pdev->pixfmt, but that was not set until the mode setting succeeded, so
it was looking at the old pixfmt! This patch fixes this by making the
pixfmt a parameter to set_video_mode, and setting it from set_video_mode
on success.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] pwc: Make decoder data part of the main pwc struct
Hans de Goede [Sun, 8 Jan 2012 14:29:19 +0000 (11:29 -0300)]
[media] pwc: Make decoder data part of the main pwc struct

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] pwc: Make fps runtime configurable through s_parm, drop fps module param
Hans de Goede [Sun, 8 Jan 2012 10:19:29 +0000 (07:19 -0300)]
[media] pwc: Make fps runtime configurable through s_parm, drop fps module param

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] ivtv: remove open_id/id from the filehandle code
Hans Verkuil [Wed, 12 Oct 2011 08:36:04 +0000 (05:36 -0300)]
[media] ivtv: remove open_id/id from the filehandle code

Instead of messing around with id's it's much easier to just compare
against a filehandle pointer.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Acked-by: Andy Walls <awalls@md.metrocast.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] ivtv: switch to the v4l core lock
Hans Verkuil [Tue, 11 Oct 2011 09:06:58 +0000 (06:06 -0300)]
[media] ivtv: switch to the v4l core lock

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Acked-by: Andy Walls <awalls@md.metrocast.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] cx18: remove exclusive open of radio device
Hans Verkuil [Tue, 11 Oct 2011 08:23:36 +0000 (05:23 -0300)]
[media] cx18: remove exclusive open of radio device

For some reason the cx18 driver could open the radio device only once.
Remove this limitation.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Acked-by: Andy Walls <awalls@md.metrocast.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] ivtv: remove exclusive radio open
Hans Verkuil [Tue, 11 Oct 2011 08:18:08 +0000 (05:18 -0300)]
[media] ivtv: remove exclusive radio open

For some reason the /dev/radio device was implemented as an exclusive open:
you could open it only once and not a second time.

Remove this limitation.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Acked-by: Andy Walls <awalls@md.metrocast.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] v4l2-ioctl: make tuner 'type' check more strict for S_FREQUENCY
Hans Verkuil [Tue, 11 Oct 2011 08:12:52 +0000 (05:12 -0300)]
[media] v4l2-ioctl: make tuner 'type' check more strict for S_FREQUENCY

As per the feature removal document, make the tuner type check more strict
so that it is no longer possible to set the radio frequency through a video
node or the TV frequency through a radio node.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] V4L2 Spec: improve the G/S_INPUT/OUTPUT documentation
Hans Verkuil [Wed, 11 Jan 2012 10:37:54 +0000 (07:37 -0300)]
[media] V4L2 Spec: improve the G/S_INPUT/OUTPUT documentation

As Rupert pointed out, the phrase "It is good practice" should be replaced
with "You must".

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Cc: Rupert Eibauer <Rupert.Eibauer@ces.ch>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] V4L2 Spec: fix extended control documentation
Hans Verkuil [Wed, 11 Jan 2012 10:30:55 +0000 (07:30 -0300)]
[media] V4L2 Spec: fix extended control documentation

Update the spec to the behavior implemented by the control framework.
This should have been documented long ago but for some reason it was
never done.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] omap_vout: add missing OVERLAY_OUTPUT cap and set V4L2_FBUF_FLAG_OVERLAY
Hans Verkuil [Tue, 22 Nov 2011 11:23:19 +0000 (08:23 -0300)]
[media] omap_vout: add missing OVERLAY_OUTPUT cap and set V4L2_FBUF_FLAG_OVERLAY

The omap_vout driver has an output overlay, but never advertised that
capability.

The driver should also set the V4L2_FBUF_FLAG_OVERLAY flag.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
CC: Archit Taneja <archit@ti.com>
CC: Vaibhav Hiremath <hvaibhav@ti.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] zoran: do not set V4L2_FBUF_FLAG_OVERLAY
Hans Verkuil [Tue, 22 Nov 2011 11:48:47 +0000 (08:48 -0300)]
[media] zoran: do not set V4L2_FBUF_FLAG_OVERLAY

The zoran driver does not support this flag, so don't set it.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] v4l2 spec: clarify usage of V4L2_FBUF_FLAG_OVERLAY
Hans Verkuil [Tue, 22 Nov 2011 11:59:34 +0000 (08:59 -0300)]
[media] v4l2 spec: clarify usage of V4L2_FBUF_FLAG_OVERLAY

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] cx23885: handle errors from videobuf_dvb_get_frontend()
Dan Carpenter [Tue, 10 Jan 2012 08:04:39 +0000 (05:04 -0300)]
[media] cx23885: handle errors from videobuf_dvb_get_frontend()

The error handling in the original code wasn't complete so static
checkers complained about a potential NULL deference.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] dvb-core: preserve the delivery system at cache clear
Mauro Carvalho Chehab [Fri, 13 Jan 2012 13:46:36 +0000 (11:46 -0200)]
[media] dvb-core: preserve the delivery system at cache clear

The changeset 240ab508aa is incomplete, as the first thing that
happens at cache clear is to do a memset with 0 to the cache.

So, the delivery system needs to be explicitly preserved there.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] dvb-core: fix a regression with MythTV
Mauro Carvalho Chehab [Fri, 13 Jan 2012 13:09:23 +0000 (11:09 -0200)]
[media] dvb-core: fix a regression with MythTV

As reported by Lawrence[1], MythTV 0.24.1 does the wrong thing
with a DVBv5 call: it fills the delivery system with
SYS_UNDEFINED, expecting that the DVB core would work with that.

This used to work by accident, as the DVB core were missing the
check for the supported delivery systems. Yet, fixing it
is easy, so let's add a logic to handle this case, to
provide backward compatibility.

[1] http://patchwork.linuxtv.org/patch/8314/

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] revert patch: HDIC HD29L2 DMB-TH USB2.0 reference design driver
Antti Palosaari [Fri, 13 Jan 2012 18:20:38 +0000 (15:20 -0300)]
[media] revert patch: HDIC HD29L2 DMB-TH USB2.0 reference design driver

I added it by mistake. It is useless as no real hardware.
It even uses even Cypress FX2, general USB bridge chip, default IDs
that makes driver load all FX2 devices having default ID...

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years agomb86a20s: Add a few more register settings at the init seq
Mauro Carvalho Chehab [Wed, 11 Jan 2012 13:00:28 +0000 (11:00 -0200)]
mb86a20s: Add a few more register settings at the init seq

Some time ago, Manoel sent us a patch adding more stuff
to the init sequence. However, his patch were also doing
non-related stuff, by changing the init logic without
any good reason. So, it was asked for him to submit a
patch with just the data that has changed, in order to
allow us to better analyze it.

As he didn't what it was requested, I finally found some
time to dig into his init sequence and add it here.

Basically, new stuff is added there. There are a few changes:

1) The removal of the extra (duplicated) logic that puts
   the chip into the serial mode;
2) Some Viterbi VBER measurement init data was changed from
   0x00 to 0xff for layer A, to match what was done for
   layers B and C.

None of those caused any regressions and both make sense
on my eyes.

The other parameters additions actually increased the
tuning quality for some channels. Yet, some channels that
were previously discovered with scan disappered, while
others appeared instead. This were tested in Brasilia,
with an external antena.

At the overall, it is now a little better. So, better to
add these, and then try to figure out a configuration that
would get even better scanning results.

Reported-by: Manoel Pinheiro <pinusdtv@hotmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years agomb86a20s: Group registers into the same line
Mauro Carvalho Chehab [Wed, 11 Jan 2012 12:56:30 +0000 (10:56 -0200)]
mb86a20s: Group registers into the same line

On mb86a20s, some registers have sub-addresses, while others not.
In order to make easier to compare different settings, group them.

No functional changes in this patch.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] [PATCH] don't reset the delivery system on DTV_CLEAR
Mauro Carvalho Chehab [Tue, 10 Jan 2012 21:00:50 +0000 (18:00 -0300)]
[media] [PATCH] don't reset the delivery system on DTV_CLEAR

As a DVBv3 application may be relying on the delivery system,
don't reset it at DTV_CLEAR. For DVBv5 applications, the
delivery system should be set anyway.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] [BUG] it913x-fe fix typo error making SNR levels unstable
Malcolm Priestley [Tue, 10 Jan 2012 22:45:31 +0000 (19:45 -0300)]
[media] [BUG] it913x-fe fix typo error making SNR levels unstable

Fix error where SNR unstable and jumps levels.

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] cx23885: Query the CX25840 during enum_input for status
Steven Toth [Fri, 6 Jan 2012 14:55:32 +0000 (11:55 -0300)]
[media] cx23885: Query the CX25840 during enum_input for status

We can pass a NO_SIGNAL video decoder state back to applications
if it's available.

Signed-off-by: Steven Toth <stoth@kernellabs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] cx25840: Add support for g_input_status
Steven Toth [Fri, 6 Jan 2012 14:54:05 +0000 (11:54 -0300)]
[media] cx25840: Add support for g_input_status

Allow bridge drivers to query status.

Signed-off-by: Steven Toth <stoth@kernellabs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] rc-videomate-m1f.c Rename to match remote controler name
Samuel Rakitnican [Fri, 6 Jan 2012 20:34:53 +0000 (17:34 -0300)]
[media] rc-videomate-m1f.c Rename to match remote controler name

This remote was added with support for card Compro VideoMate M1F.

This remote is shipped with various Compro cards, not this one only.

Furthermore this remote can be bought separately under name Compro
VideoMate K100.
    http://compro.com.tw/en/product/k100/k100.html

So give it a proper name.

[mchehab@redhat.com: Fix the Makefile]
Signed-off-by: Samuel Rakitničan <samuel.rakitnican@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] drivers: media: au0828: Fix dependency for VIDEO_AU0828
Fabio Estevam [Tue, 10 Jan 2012 12:15:29 +0000 (09:15 -0300)]
[media] drivers: media: au0828: Fix dependency for VIDEO_AU0828

Fix the following build warning:

warning: (VIDEO_AU0828) selects DVB_AU8522 which has unmet direct dependencies (MEDIA_SUPPORT && DVB_CAPTURE_DRIVERS && DVB_CORE && I2C && VIDEO_V4L2)

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] convert drivers/media/* to use module_platform_driver()
Axel Lin [Tue, 10 Jan 2012 06:21:49 +0000 (03:21 -0300)]
[media] convert drivers/media/* to use module_platform_driver()

This patch converts the drivers in drivers/media/* to use the
module_platform_driver() macro which makes the code smaller and a bit
simpler.

Cc: Mauro Carvalho Chehab <mchehab@infradead.org>
Cc: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Cc: Kyungmin Park <kyungmin.park@samsung.com>
Cc: Hans Verkuil <hans.verkuil@cisco.com>
Cc: "Richard Röjfors" <richard.rojfors@pelagicore.com>
Cc: "Matti J. Aaltonen" <matti.j.aaltonen@nokia.com>
Cc: Lucas De Marchi <lucas.demarchi@profusion.mobi>
Cc: Manjunath Hadli <manjunath.hadli@ti.com>
Cc: Muralidharan Karicheri <m-karicheri2@ti.com>
Cc: Anatolij Gustschin <agust@denx.de>
Cc: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Cc: Marek Szyprowski <m.szyprowski@samsung.com>
Cc: Robert Jarzmik <robert.jarzmik@free.fr>
Cc: Jonathan Corbet <corbet@lwn.net>
Cc: Daniel Drake <dsd@laptop.org>
Signed-off-by: Axel Lin <axel.lin@gmail.com>
Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Acked-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Acked-by: Marek Szyprowski <m.szyprowski@samsung.com>
Acked-by: Matti J. Aaltonen <matti.j.aaltonen@nokia.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] drivers: video: cx231xx: Fix dependency for VIDEO_CX231XX_DVB
Fabio Estevam [Mon, 9 Jan 2012 23:51:56 +0000 (20:51 -0300)]
[media] drivers: video: cx231xx: Fix dependency for VIDEO_CX231XX_DVB

Fix the following build warning:

warning: (VIDEO_CX231XX_DVB) selects DVB_MB86A20S which has unmet direct dependencies (MEDIA_SUPPORT && DVB_CAPTURE_DRIVERS && DVB_CORE && I2C)

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] Exynos4 JPEG codec v4l2 driver
Andrzej Pietrasiewicz [Thu, 24 Nov 2011 14:15:23 +0000 (11:15 -0300)]
[media] Exynos4 JPEG codec v4l2 driver

Add driver for the JPEG codec IP block available in Samsung Exynos SoC series.

The driver is implemented as a V4L2 mem-to-mem device. It exposes two video
nodes to user space, one for the encoding part, and one for the decoding part.

Signed-off-by: Andrzej Pietrasiewicz <andrzej.p@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Reviewed-by: Sakari Ailus <sakari.ailus@iki.fi>
Reviewed-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Reviewed-by: Tomasz Stanislawski <t.stanislaws@samsung.com>
Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] doc: v4l: selection: choose pixels as units for selection rectangles
Tomasz Stanislawski [Fri, 9 Dec 2011 16:45:47 +0000 (13:45 -0300)]
[media] doc: v4l: selection: choose pixels as units for selection rectangles

Pixels were preferred units for selection rectangles over driver-dependent
units for almost all use cases. Therefore the units were fixed to pixels.

Signed-off-by: Tomasz Stanislawski <t.stanislaws@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] v4l: s5p-tv: mixer: fix setup of VP scaling
Tomasz Stanislawski [Fri, 25 Nov 2011 08:56:18 +0000 (05:56 -0300)]
[media] v4l: s5p-tv: mixer: fix setup of VP scaling

Adjusting of Video Processor's scaling factors was flawed. It bounded scaling
to range 1/16 to 1/1. The correct range should be 1/4 to 4/1. This patch fixes
this bug.

Signed-off-by: Tomasz Stanislawski <t.stanislaws@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] v4l: s5p-tv: mixer: add support for selection API
Tomasz Stanislawski [Thu, 25 Aug 2011 10:14:26 +0000 (07:14 -0300)]
[media] v4l: s5p-tv: mixer: add support for selection API

This patch add support for V4L2 selection API to s5p-tv driver.  Moreover it
removes old API for cropping.  Old applications would still work because the
crop ioctls are emulated using the selection API.

Signed-off-by: Tomasz Stanislawski <t.stanislaws@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] v4l: emulate old crop API using extended crop/compose API
Tomasz Stanislawski [Tue, 22 Mar 2011 17:04:47 +0000 (14:04 -0300)]
[media] v4l: emulate old crop API using extended crop/compose API

This patch allows new video drivers to work correctly with applications that
use the old-style crop API.  The old crop ioctl is emulated by using selection
callbacks.

Signed-off-by: Tomasz Stanislawski <t.stanislaws@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] doc: v4l: add documentation for selection API
Tomasz Stanislawski [Fri, 19 Aug 2011 10:00:04 +0000 (07:00 -0300)]
[media] doc: v4l: add documentation for selection API

This patch adds a documentation for VIDIOC_{G/S}_SELECTION ioctl. Moreover, the
patch adds the description of modeling of composing, cropping and scaling
features in V4L2. Finally, some examples are presented.

Signed-off-by: Tomasz Stanislawski <t.stanislaws@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] doc: v4l: add binary images for selection API
Tomasz Stanislawski [Thu, 29 Sep 2011 14:00:20 +0000 (11:00 -0300)]
[media] doc: v4l: add binary images for selection API

This patch adds images in binary format for the V4L2 selection API.

Signed-off-by: Tomasz Stanislawski <t.stanislaws@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] v4l: add support for selection api
Tomasz Stanislawski [Wed, 10 Aug 2011 13:37:47 +0000 (10:37 -0300)]
[media] v4l: add support for selection api

This patch introduces new api for a precise control of cropping and composing
features for video devices. The new ioctls are VIDIOC_S_SELECTION and
VIDIOC_G_SELECTION.

Signed-off-by: Tomasz Stanislawski <t.stanislaws@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] hd29l2: fix review findings
Antti Palosaari [Tue, 10 Jan 2012 23:46:26 +0000 (20:46 -0300)]
[media] hd29l2: fix review findings

Fix some issues pointed out by Mauro.
Mauro Carvalho Chehab <mchehab@redhat.com>

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] dvb-core: define general callback value for demodulator
Antti Palosaari [Tue, 10 Jan 2012 23:33:43 +0000 (20:33 -0300)]
[media] dvb-core: define general callback value for demodulator

Allow use of that general callback for demod too.

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] hd29l2: add debug for used IF frequency
Antti Palosaari [Tue, 10 Jan 2012 22:26:35 +0000 (19:26 -0300)]
[media] hd29l2: add debug for used IF frequency

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] hd29l2: synch for latest DVB core changes
Antti Palosaari [Tue, 10 Jan 2012 16:15:16 +0000 (13:15 -0300)]
[media] hd29l2: synch for latest DVB core changes

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] HDIC HD29L2 DMB-TH USB2.0 reference design driver
Antti Palosaari [Mon, 7 Nov 2011 12:28:29 +0000 (09:28 -0300)]
[media] HDIC HD29L2 DMB-TH USB2.0 reference design driver

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] HDIC HD29L2 DMB-TH demodulator driver
Antti Palosaari [Sun, 6 Nov 2011 23:01:13 +0000 (20:01 -0300)]
[media] HDIC HD29L2 DMB-TH demodulator driver

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] em28xx: Fix tuner_type for Terratec Cinergy 200 USB
Sascha Sommer [Sun, 8 Jan 2012 19:41:22 +0000 (16:41 -0300)]
[media] em28xx: Fix tuner_type for Terratec Cinergy 200 USB

The card definition of the Terratec Cinergy 200 USB uses the
wrong tuner type. Therefore some channels are currently missing.
Attached patch fixes this problem.

Signed-off-by: Sascha Sommer <saschasommer@freenet.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] em28xx: increase maxwidth for em2800
Sascha Sommer [Sun, 8 Jan 2012 19:54:28 +0000 (16:54 -0300)]
[media] em28xx: increase maxwidth for em2800

The MaxPacketSize for em2800 based devices is too small to capture at full resolution.
Therefore scale down when the maximum frame size is selected.
The previous workaround that simply reduced the X resolution cannot be used
because it crops a part of the input as
the em2800 can only scale down with a factor of 0.5.

reverts commits 1ca31892e and fb3de0398ab.

[mchehab@redhat.com: Fix CodingStyle]
Signed-off-by: Sascha Sommer <saschasommer@freenet.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] em28xx: Do not modify EM28XX_R06_I2C_CLK for em2800
Sascha Sommer [Sun, 8 Jan 2012 19:32:09 +0000 (16:32 -0300)]
[media] em28xx: Do not modify EM28XX_R06_I2C_CLK for em2800

writing the EM28XX_R06_I2C_CLK register leads to the problem that the
i2c bus on the Terratec Cinergy 200 USB is no longer usable when the
system is rebooted.

The device needs to be unplugged in order to bring it back to life.
Attached patch conditionally disables the write in
em28xx_pre_card_setup() like it is already done in em28xx_card_setup().

Signed-off-by: Sascha Sommer <saschasommer@freenet.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] em28xx: Fix: I2C_CLK write error message checks wrong return code
Sascha Sommer [Sun, 8 Jan 2012 19:19:30 +0000 (16:19 -0300)]
[media] em28xx: Fix: I2C_CLK write error message checks wrong return code

It looks like the return value check that is done after setting the I2C
speed checks the wrong return code.

Signed-off-by: Sascha Sommer <saschasommer@freenet.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] em28xx: simplify argument passing to em28xx_init_dev()
Thomas Petazzoni [Sat, 7 Jan 2012 13:18:45 +0000 (10:18 -0300)]
[media] em28xx: simplify argument passing to em28xx_init_dev()

The 'struct em28xx *' pointer was passed by reference to the
em28xx_init_dev() function, for no reason. Instead, just pass it by
value, which is much more logical and simple.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] af9005, af9015: use symbolic names for USB id table indices
Jonathan Nieder [Sat, 7 Jan 2012 07:11:27 +0000 (04:11 -0300)]
[media] af9005, af9015: use symbolic names for USB id table indices

The af9005_properties and af9015_properties tables make use of USB ids
from the USB id tables with hardcoded indices, as in
"&af9015_usb_table[30]".  Adding new entries before the end breaks
such references, so everyone has had to carefully tiptoe to only add
entries at the end of the list.

In the spirit of "dw2102: use symbolic names for dw2102_table
indices", use C99-style initializers with symbolic names for each
index to avoid this.  In the new regime, properties tables referring
to the USB ids have names like "&af9015_usb_table[CINERGY_T_STICK_RC]"
that do not change meaning when items in the USB id table are
reordered.

Encouraged-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Acked-by: Luca Olivetti <luca@ventoso.org>
Acked-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] cx231xx: use URB_NO_TRANSFER_DMA_MAP on URBs allocated with usb_alloc_urb()
Thomas Petazzoni [Sat, 7 Jan 2012 12:52:37 +0000 (09:52 -0300)]
[media] cx231xx: use URB_NO_TRANSFER_DMA_MAP on URBs allocated with usb_alloc_urb()

URBs allocated with usb_alloc_urb() are allocated from DMA-coherent
areas, and therefore it is not necessary to call dma_map_single() on
such buffers. Worst, on ARM, calling dma_map_single() on a
DMA-coherent buffer will trigger a BUG_ON() in
arch/arm/mm/dma-mapping.c.

Therefore, we mark all URBs allocated with usb_alloc_urb() with the
URB_NO_TRANSFER_DMA_MAP transfer_flags, so that the USB core does not
do dma_map_single()/dma_unmap_single() on those buffers.

This is similar to 882787ff8fdeb0be790547ee9b22b281095e95da for the
gspca driver, and has already been discussed on the linux-media list
in the past:
http://www.mail-archive.com/linux-media@vger.kernel.org/msg37086.html.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] cx231xx: simplify argument passing to cx231xx_init_dev()
Thomas Petazzoni [Sat, 7 Jan 2012 12:52:40 +0000 (09:52 -0300)]
[media] cx231xx: simplify argument passing to cx231xx_init_dev()

The 'struct cx231xx *' pointer was passed by reference to the
cx231xx_init_dev() function, for no reason. Instead, just pass it by
value, which is much more logical and simple.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] mxl5007t: bugfix DVB-T 7 MHz and 8 MHz bandwidth
Antti Palosaari [Tue, 10 Jan 2012 16:31:37 +0000 (13:31 -0300)]
[media] mxl5007t: bugfix DVB-T 7 MHz and 8 MHz bandwidth

DVB-T did not work at all - only 6 MHz was working but it is not
commonly used.
Fix it.

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] tda18271-fe: Fix support for ISDB-T
Mauro Carvalho Chehab [Mon, 9 Jan 2012 20:26:32 +0000 (18:26 -0200)]
[media] tda18271-fe: Fix support for ISDB-T

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] cx231xx: fix device disconnect checks
Mauro Carvalho Chehab [Tue, 10 Jan 2012 11:48:50 +0000 (09:48 -0200)]
[media] cx231xx: fix device disconnect checks

The driver were using DEV_MISCONFIGURED on some places, and
DEV_DISCONNECTED on others. In a matter of fact, DEV_MISCONFIGURED
were set only during the usb disconnect callback, with
was confusing.

Also, the alsa driver never checks if the device is present,
before doing some dangerous things.

Remove DEV_MISCONFIGURED, replacing it by DEV_DISCONNECTED.

Also, fixes the other usecases for DEV_DISCONNECTED.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] cx231xx: cx231xx_devused is racy
Mauro Carvalho Chehab [Tue, 10 Jan 2012 11:33:47 +0000 (09:33 -0200)]
[media] cx231xx: cx231xx_devused is racy

cx231xx_devused is racy. Re-implement it in a proper way,
to remove the risk of mangling it.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] cx231xx: Fix unregister logic
Mauro Carvalho Chehab [Tue, 10 Jan 2012 11:20:01 +0000 (09:20 -0200)]
[media] cx231xx: Fix unregister logic

There are several weirdness at the unregister logic.

First of all, IR has a poll thread. This thread needs to be
removed, as it uses some resources associated to the main driver.
So, the driver needs to explicitly unregister the I2C client for
ir-kbd-i2c.

If, for some reason, the driver needs to wait for a close()
to happen, not all memories will be freed, because the free
logic were in the wrong place.

Also, v4l2_device_unregister() seems to be called too early,
as devices are still using it.

Finally, even with the device disconnected, there is one
USB function call that will still try to talk with it.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] mb86a20s: implement get_frontend()
Mauro Carvalho Chehab [Mon, 9 Jan 2012 20:16:36 +0000 (18:16 -0200)]
[media] mb86a20s: implement get_frontend()

Reports the auto-detected parameters to userspace.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] cx231xx-input: stop polling if the device got removed.
Mauro Carvalho Chehab [Tue, 10 Jan 2012 00:28:13 +0000 (22:28 -0200)]
[media] cx231xx-input: stop polling if the device got removed.

If the device got removed, stops polling it. Also, un-registers
it at input/evdev, as it won't work anymore. We can't free the
IR structure yet, as the ir_remove method will be called later.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] cx231xx: remove useless 'lif' variable in cx231xx_usb_probe()
Thomas Petazzoni [Sat, 7 Jan 2012 12:52:39 +0000 (09:52 -0300)]
[media] cx231xx: remove useless 'lif' variable in cx231xx_usb_probe()

Now that we set the intfdata on the right interface, the 'lif'
variable is useless.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] cx231xx: fix crash after load/unload/load of module
Thomas Petazzoni [Sat, 7 Jan 2012 12:52:38 +0000 (09:52 -0300)]
[media] cx231xx: fix crash after load/unload/load of module

The following sequence of commands was triggering a kernel crash in
cdev_get():

 modprobe cx231xx
 rmmod cx231xx
 modprobe cx231xx
 v4l2grab -n 1

The problem was that cx231xx_usb_disconnect() was not doing anything
because the test:

if (!dev->udev)
return;

was reached (i.e, dev->udev was NULL).

This is due to the fact that the 'dev' pointer placed as intfdata into
the usb_interface structure had the wrong value, because
cx231xx_probe() was doing the usb_set_intfdata() on the wrong
usb_interface structure. For some reason, cx231xx_probe() was doing
the following:

static int cx231xx_usb_probe(struct usb_interface *interface,
     const struct usb_device_id *id)
{
        struct usb_interface *lif = NULL;
[...]
        /* store the current interface */
        lif = interface;
[...]
        /* store the interface 0 back */
        lif = udev->actconfig->interface[0];
[...]
usb_set_intfdata(lif, dev);
[...]
retval = v4l2_device_register(&interface->dev, &dev->v4l2_dev);
[...]
}

So, the usb_set_intfdata() was done on udev->actconfig->interface[0]
and not on the 'interface' passed as argument to the ->probe() and
->disconnect() hooks. Later on, v4l2_device_register() was
initializing the intfdata of the correct usb_interface structure as a
pointer to the v4l2_device structure.

Upon unregistration, the ->disconnect() hook was getting the intfdata
of the usb_interface passed as argument... and casted it to a 'struct
cx231xx *' while it was in fact a 'struct v4l2_device *'.

The correct fix seems to just be to set the intfdata on the proper
interface from the beginning. Now, loading/unloading/reloading the
driver allows to use the device properly.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>