platform/kernel/linux-stable.git
12 years ago[media] dvb-core: allow demods to specify the supported delsys
Mauro Carvalho Chehab [Thu, 22 Dec 2011 11:56:48 +0000 (08:56 -0300)]
[media] dvb-core: allow demods to specify the supported delsys

The dvb were originally written for DVB-T/C/S and ATSC. So,
the original frontend struct has fields to describe only those three
standards.

While 2nd gen standards are similar to these, new standards
like DSS, ISDB and CTTB don't fit on any of the above types.

While there's a way for the drivers to explicitly change whatever
default DELSYS were filled inside the core, still a fake value is
needed there, and a "compat" code to allow DVBv3 applications to
work with those delivery systems is needed. This is good for a
short term solution, while applications aren't using DVBv5 directly.

However, at long term, this is bad, as the compat code runs even
if the application is using DVBv5. Also, the compat code is not
perfect, and only works when the frontend is capable of auto-detecting
the parameters that aren't visible by the faked delivery systems.

So, let the frontend fill the supported delivery systems at the
device properties directly.

The future plan is that the drivers will stop filling ops->info.type,
filling, instead, ops->delsys. This will allow multi-frontend
devices like drx-k to use just one frontend structure for all supported
delivery systems.

Of course, the core will keep using it, in order to keep allowing
DVBv3 calls.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] tuners: remove dvb_frontend_parameters from set_params()
Mauro Carvalho Chehab [Sat, 24 Dec 2011 15:24:33 +0000 (12:24 -0300)]
[media] tuners: remove dvb_frontend_parameters from set_params()

This is a big patch, yet trivial: now that all tuners use the DVBv5
way to pass parameters (e. g. via fe->dtv_property_cache), the
extra parameter can be removed from set_params() call.

After this change, very few DVBv3 specific stuff are left at the
tuners.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] dvb: remove dvb_frontend_parameters from calc_regs()
Mauro Carvalho Chehab [Sat, 24 Dec 2011 15:03:05 +0000 (12:03 -0300)]
[media] dvb: remove dvb_frontend_parameters from calc_regs()

The calc_regs() callback is used by a few frontends (mt352, nxt200x,
digitv and zl10353). On all places it is called, the parameters are
set by DVBv5 way. So, just use the DVBv5 struct and remove the
extra parameter.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] budget: use DVBv5 parameters on set_params()
Mauro Carvalho Chehab [Sat, 24 Dec 2011 14:00:13 +0000 (11:00 -0300)]
[media] budget: use DVBv5 parameters on set_params()

Instead of using DVBv3 parameters, rely on DVBv5 parameters to
set the tuner

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] budget-av: use DVBv5 parameters on set_params()
Mauro Carvalho Chehab [Sat, 24 Dec 2011 13:51:15 +0000 (10:51 -0300)]
[media] budget-av: use DVBv5 parameters on set_params()

Instead of using DVBv3 parameters, rely on DVBv5 parameters to
set the tuner

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] dib0700_devices: use DVBv5 parameters on set_params()
Mauro Carvalho Chehab [Sat, 24 Dec 2011 13:18:24 +0000 (10:18 -0300)]
[media] dib0700_devices: use DVBv5 parameters on set_params()

Instead of using DVBv3 parameters, rely on DVBv5 parameters to
set the tuner

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] cxusb: use DVBv5 parameters on set_params()
Mauro Carvalho Chehab [Sat, 24 Dec 2011 13:17:30 +0000 (10:17 -0300)]
[media] cxusb: use DVBv5 parameters on set_params()

Instead of using DVBv3 parameters, rely on DVBv5 parameters to
set the tuner

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] dib0070: Remove unused dvb_frontend_parameters
Mauro Carvalho Chehab [Thu, 22 Dec 2011 21:19:55 +0000 (18:19 -0300)]
[media] dib0070: Remove unused dvb_frontend_parameters

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] zl10036: use DVBv5 parameters on set_params()
Mauro Carvalho Chehab [Fri, 23 Dec 2011 09:56:47 +0000 (06:56 -0300)]
[media] zl10036: use DVBv5 parameters on set_params()

Instead of using DVBv3 parameters, rely on DVBv5 parameters to
set the tuner

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] dvb-pll: use DVBv5 parameters on set_params()
Mauro Carvalho Chehab [Wed, 21 Dec 2011 14:16:39 +0000 (11:16 -0300)]
[media] dvb-pll: use DVBv5 parameters on set_params()

Instead of using DVBv3 parameters, rely on DVBv5 parameters to
set the tuner.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] dvb-bt8xx: use DVBv5 parameters on set_params()
Mauro Carvalho Chehab [Wed, 21 Dec 2011 13:21:21 +0000 (10:21 -0300)]
[media] dvb-bt8xx: use DVBv5 parameters on set_params()

Instead of using DVBv3 parameters, rely on DVBv5 parameters to
set the tuner.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] tuner-simple: use DVBv5 parameters on set_params()
Mauro Carvalho Chehab [Wed, 21 Dec 2011 12:38:52 +0000 (09:38 -0300)]
[media] tuner-simple: use DVBv5 parameters on set_params()

Despite its name, tuner-simple has a complex logic to set freqs ;)

Basically, it can be called by two different ways: via set_params()
or via calc_regs() callbacks. Both are bound to the DVBv3 API.
Also, set_params internally calls calc_regs().

In order to get rid of DVBv3 params at set_params(), it shouldn't
call calc_regs() anymore. The code duplication is very small,
as most of the code there is just to check for invalid parameters.

With regards to calc_regs(), it should still trust on bandwidth and
frequency parameters passed via DVBv3, until a later patch fixes
it.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] dvb-ttusb-budget: use DVBv5 parameters on set_params()
Mauro Carvalho Chehab [Fri, 23 Dec 2011 10:15:40 +0000 (07:15 -0300)]
[media] dvb-ttusb-budget: use DVBv5 parameters on set_params()

Instead of using DVBv3 parameters, rely on DVBv5 parameters to
set the tuner

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] pluto2: use DVBv5 parameters on set_params()
Mauro Carvalho Chehab [Fri, 23 Dec 2011 10:05:31 +0000 (07:05 -0300)]
[media] pluto2: use DVBv5 parameters on set_params()

Instead of using DVBv3 parameters, rely on DVBv5 parameters to
set the tuner

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] mantis_vp2040: use DVBv5 parameters on set_params()
Mauro Carvalho Chehab [Fri, 23 Dec 2011 10:18:04 +0000 (07:18 -0300)]
[media] mantis_vp2040: use DVBv5 parameters on set_params()

Instead of using DVBv3 parameters, rely on DVBv5 parameters to
set the tuner

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] mantis_vp2033: use DVBv5 parameters on set_params()
Mauro Carvalho Chehab [Fri, 23 Dec 2011 10:10:02 +0000 (07:10 -0300)]
[media] mantis_vp2033: use DVBv5 parameters on set_params()

Instead of using DVBv3 parameters, rely on DVBv5 parameters to
set the tuner

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] mantis_vp1033: use DVBv5 parameters on set_params()
Mauro Carvalho Chehab [Fri, 23 Dec 2011 10:01:06 +0000 (07:01 -0300)]
[media] mantis_vp1033: use DVBv5 parameters on set_params()

Instead of using DVBv3 parameters, rely on DVBv5 parameters to
set the tuner

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] mxl111sf-tuner: use DVBv5 parameters on set_params()
Mauro Carvalho Chehab [Fri, 23 Dec 2011 21:55:51 +0000 (18:55 -0300)]
[media] mxl111sf-tuner: use DVBv5 parameters on set_params()

Instead of using DVBv3 parameters, rely on DVBv5 parameters to
set the tuner

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] tda826x: use DVBv5 parameters on set_params()
Mauro Carvalho Chehab [Fri, 23 Dec 2011 21:43:29 +0000 (18:43 -0300)]
[media] tda826x: use DVBv5 parameters on set_params()

Instead of using DVBv3 parameters, rely on DVBv5 parameters to
set the tuner

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] stb6000: use DVBv5 parameters on set_params()
Mauro Carvalho Chehab [Fri, 23 Dec 2011 21:35:34 +0000 (18:35 -0300)]
[media] stb6000: use DVBv5 parameters on set_params()

Instead of using DVBv3 parameters, rely on DVBv5 parameters to
set the tuner

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] ix2505v: use DVBv5 parameters on set_params()
Mauro Carvalho Chehab [Fri, 23 Dec 2011 21:33:18 +0000 (18:33 -0300)]
[media] ix2505v: use DVBv5 parameters on set_params()

Instead of using DVBv3 parameters, rely on DVBv5 parameters to
set the tuner

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] bsbe1, bsru6, tdh1: use DVBv5 parameters on set_params()
Mauro Carvalho Chehab [Fri, 23 Dec 2011 21:27:35 +0000 (18:27 -0300)]
[media] bsbe1, bsru6, tdh1: use DVBv5 parameters on set_params()

Instead of using DVBv3 parameters, rely on DVBv5 parameters to
set the tuner

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] itd1000: use DVBv5 parameters on set_params()
Mauro Carvalho Chehab [Fri, 23 Dec 2011 21:03:51 +0000 (18:03 -0300)]
[media] itd1000: use DVBv5 parameters on set_params()

Instead of using DVBv3 parameters, rely on DVBv5 parameters to
set the tuner

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] tua6100: use DVBv5 parameters on set_params()
Mauro Carvalho Chehab [Fri, 23 Dec 2011 20:56:57 +0000 (17:56 -0300)]
[media] tua6100: use DVBv5 parameters on set_params()

Instead of using DVBv3 parameters, rely on DVBv5 parameters to
set the tuner

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] cx88: use DVBv5 parameters on set_params()
Mauro Carvalho Chehab [Fri, 23 Dec 2011 15:33:05 +0000 (12:33 -0300)]
[media] cx88: use DVBv5 parameters on set_params()

Instead of using DVBv3 parameters, rely on DVBv5 parameters to
set the tuner

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] saa7134: use DVBv5 parameters on set_params()
Mauro Carvalho Chehab [Fri, 23 Dec 2011 15:25:04 +0000 (12:25 -0300)]
[media] saa7134: use DVBv5 parameters on set_params()

Instead of using DVBv3 parameters, rely on DVBv5 parameters to
set the tuner

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] budget-patch: use DVBv5 parameters on set_params()
Mauro Carvalho Chehab [Fri, 23 Dec 2011 11:06:18 +0000 (08:06 -0300)]
[media] budget-patch: use DVBv5 parameters on set_params()

Instead of using DVBv3 parameters, rely on DVBv5 parameters to
set the tuner

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] budget-ci: use DVBv5 parameters on set_params()
Mauro Carvalho Chehab [Fri, 23 Dec 2011 11:04:27 +0000 (08:04 -0300)]
[media] budget-ci: use DVBv5 parameters on set_params()

Instead of using DVBv3 parameters, rely on DVBv5 parameters to
set the tuner

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] av7110: use DVBv5 parameters on set_params()
Mauro Carvalho Chehab [Fri, 23 Dec 2011 11:01:05 +0000 (08:01 -0300)]
[media] av7110: use DVBv5 parameters on set_params()

Instead of using DVBv3 parameters, rely on DVBv5 parameters to
set the tuner

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] zl10039: use DVBv5 parameters on set_params()
Mauro Carvalho Chehab [Fri, 23 Dec 2011 00:20:31 +0000 (21:20 -0300)]
[media] zl10039: use DVBv5 parameters on set_params()

Instead of using DVBv3 parameters, rely on DVBv5 parameters to
set the tuner

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] cx24113: use DVBv5 parameters on set_params()
Mauro Carvalho Chehab [Thu, 22 Dec 2011 19:54:09 +0000 (16:54 -0300)]
[media] cx24113: use DVBv5 parameters on set_params()

Instead of using DVBv3 parameters, rely on DVBv5 parameters to
set the tuner

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] xc4000: use DVBv5 parameters on set_params()
Mauro Carvalho Chehab [Wed, 21 Dec 2011 12:02:55 +0000 (09:02 -0300)]
[media] xc4000: use DVBv5 parameters on set_params()

Instead of using DVBv3 parameters, rely on DVBv5 parameters to
set the tuner.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] tuner-xc2028: use DVBv5 parameters on set_params()
Mauro Carvalho Chehab [Wed, 21 Dec 2011 11:53:22 +0000 (08:53 -0300)]
[media] tuner-xc2028: use DVBv5 parameters on set_params()

Instead of using DVBv3 parameters, rely on DVBv5 parameters to
set the tuner.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] tda827x: use DVBv5 parameters on set_params()
Mauro Carvalho Chehab [Wed, 21 Dec 2011 11:39:44 +0000 (08:39 -0300)]
[media] tda827x: use DVBv5 parameters on set_params()

Instead of using DVBv3 parameters, rely on DVBv5 parameters to
set the tuner.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] tda18271-fe: use DVBv5 parameters on set_params()
Mauro Carvalho Chehab [Wed, 21 Dec 2011 11:15:29 +0000 (08:15 -0300)]
[media] tda18271-fe: use DVBv5 parameters on set_params()

Instead of using DVBv3 parameters, rely on DVBv5 parameters to
set the tuner.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] tda18271: add support for QAM 7 MHz map
Mauro Carvalho Chehab [Wed, 21 Dec 2011 11:07:52 +0000 (08:07 -0300)]
[media] tda18271: add support for QAM 7 MHz map

This standard is not properly documented, but its settings are at
the tda18271dd driver, and are somewhat obvious, as they follow
the same logic as DVB-T 7MHz.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] tda18218: use DVBv5 parameters on set_params()
Mauro Carvalho Chehab [Wed, 21 Dec 2011 10:47:27 +0000 (07:47 -0300)]
[media] tda18218: use DVBv5 parameters on set_params()

Instead of using DVBv3 parameters, rely on DVBv5 parameters to
set the tuner.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] mxl5007t: use DVBv5 parameters on set_params()
Mauro Carvalho Chehab [Wed, 21 Dec 2011 10:31:23 +0000 (07:31 -0300)]
[media] mxl5007t: use DVBv5 parameters on set_params()

Instead of using DVBv3 parameters, rely on DVBv5 parameters to
set the tuner.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] mxl5005s: fix: don't discard bandwidth changes
Mauro Carvalho Chehab [Wed, 21 Dec 2011 10:13:50 +0000 (07:13 -0300)]
[media] mxl5005s: fix: don't discard bandwidth changes

There is a bug on mxl5005s logic: when the bandwidth changes, but using
the same delivery system, the code discard the set_params()
reconfiguration request.

This was happening because, in the previous coding, the bandwidth
calculus were after the check for delivery system changes.

The previous patch changed the logic to estimate the bandwidth to
happend together with the changes at the delivery system.

So, with a one-statement change, it is possible to make the tuner to
reconfigure, in order to adjust to bandwidth changes. this will
likely fix issues on countries that use 7MHz/8MHz DVB-T channels.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] mxl5005s: use DVBv5 parameters on set_params()
Mauro Carvalho Chehab [Wed, 21 Dec 2011 10:10:58 +0000 (07:10 -0300)]
[media] mxl5005s: use DVBv5 parameters on set_params()

Instead of using DVBv3 parameters, rely on DVBv5 parameters to
set the tuner.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] mt2266: use DVBv5 parameters for set_params()
Mauro Carvalho Chehab [Wed, 21 Dec 2011 00:49:12 +0000 (21:49 -0300)]
[media] mt2266: use DVBv5 parameters for set_params()

Instead of using DVBv3 parameters, rely on DVBv5 parameters to
set the tuner.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] max2165: use DVBv5 parameters on set_params()
Mauro Carvalho Chehab [Tue, 20 Dec 2011 19:49:18 +0000 (16:49 -0300)]
[media] max2165: use DVBv5 parameters on set_params()

Instead of using DVBv3 parameters, rely on DVBv5 parameters to
set the tuner.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] mc44s803: use DVBv5 parameters on set_params()
Mauro Carvalho Chehab [Tue, 20 Dec 2011 19:53:50 +0000 (16:53 -0300)]
[media] mc44s803: use DVBv5 parameters on set_params()

Instead of using DVBv3 parameters, rely on DVBv5 parameters to
set the tuner.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] mt2031: remove fake implementaion of get_bandwidth()
Mauro Carvalho Chehab [Wed, 21 Dec 2011 00:26:01 +0000 (21:26 -0300)]
[media] mt2031: remove fake implementaion of get_bandwidth()

This driver implements a fake get_bandwidth() callback. In
reallity, the tuner driver won't adjust its low-pass
filter based on a bandwidth, and were just providing a fake
method for demods to read whatever was "set".

This code is useless, as none of the drivers that use
this tuner seems to require a get_bandwidth() callback.

While here, convert set_params to use the DVBv5 way to pass
parameters to tuners.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] mt2060: remove fake implementaion of get_bandwidth()
Mauro Carvalho Chehab [Tue, 20 Dec 2011 20:09:15 +0000 (17:09 -0300)]
[media] mt2060: remove fake implementaion of get_bandwidth()

This driver implements a fake get_bandwidth() callback. In
reallity, the tuner driver won't adjust its low-pass
filter based on a bandwidth, and were just providing a fake
method for demods to read whatever was "set".

This code is useless, as none of the drivers that use
this tuner seems to require a get_bandwidth() callback.

While here, convert set_params to use the DVBv5 way to pass
parameters to tuners.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] qt1010: remove fake implementaion of get_bandwidth()
Mauro Carvalho Chehab [Wed, 21 Dec 2011 10:39:33 +0000 (07:39 -0300)]
[media] qt1010: remove fake implementaion of get_bandwidth()

This driver implements a fake get_bandwidth() callback. In
reallity, the tuner driver won't adjust its low-pass
filter based on a bandwidth, and were just providing a fake
method for demods to read whatever was "set".

This code is useless, as none of the drivers that use
this tuner seems to require a get_bandwidth() callback.

While here, convert set_params to use the DVBv5 way to pass
parameters to tuners.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] dvb_core: estimate bw for all non-terrestial systems
Mauro Carvalho Chehab [Wed, 21 Dec 2011 11:27:20 +0000 (08:27 -0300)]
[media] dvb_core: estimate bw for all non-terrestial systems

Instead of just estimating the bandwidth for DVB-C annex A/C,
also fill it at the core for ATSC and DVB-C annex B. This
simplifies the logic inside the tuners, as all non-satellite
tuners can just use c->bandwidth_hz for all supported
delivery systems.

It could make sense to latter use it also for satellite
systems, as several DVB-S drivers have their own calculus.
However, on DVB-S2 the bw estimation is a little more complex,
and the existing drivers have some optimized calculus for
bandwidth. So, let's not touch on it for now.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] dvb: replace SYS_DVBC_ANNEX_AC by the right delsys
Mauro Carvalho Chehab [Thu, 22 Dec 2011 21:11:39 +0000 (18:11 -0300)]
[media] dvb: replace SYS_DVBC_ANNEX_AC by the right delsys

SYS_DVBC_ANNEX_AC is an alias for SYS_DVBC_ANNEX_A. However,
the first one is incorrect, as not all devices support both.
So, replace its occurrences by the proper value (either
SYS_DVBC_ANNEX_A or both SYS_DVBC_ANNEX_A and SYS_DVBC_ANNEX_C).

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] cx88-dvb avoid dangling core->gate_ctrl pointer
David Fries [Thu, 15 Dec 2011 04:59:20 +0000 (01:59 -0300)]
[media] cx88-dvb avoid dangling core->gate_ctrl pointer

dvb_register calls videobuf_dvb_register_bus, but if that returns
a failure the module will be unloaded without clearing the
value of core->gate_ctrl which will cause an oops in macros
called from video_open in cx88-video.c

Signed-off-by: David Fries <David@Fries.net>
Cc: Mauro Carvalho Chehab <mchehab@infradead.org>
Cc: Istvan Varga <istvan_v@mailbox.hu>
Cc: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] tm6000: using an uninitialized variable in debug code
Dan Carpenter [Wed, 14 Dec 2011 05:17:36 +0000 (02:17 -0300)]
[media] tm6000: using an uninitialized variable in debug code

dprintk() dereferences "ir".  I'm not sure why gcc doesn't complain
about this.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] update Documentation/video4linux/CARDLIST.*
Mauro Carvalho Chehab [Fri, 30 Dec 2011 19:25:31 +0000 (17:25 -0200)]
[media] update Documentation/video4linux/CARDLIST.*

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] KWorld 355U and 380U support
Aivar Päkk [Sun, 11 Dec 2011 21:15:00 +0000 (18:15 -0300)]
[media] KWorld 355U and 380U support

This patch adds Kworld 355U and 380U support

Signed-off-by: Aivar Päkk <aivar11@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] it913x stop dual frontend attach in warm state with single devices
Malcolm Priestley [Sun, 11 Dec 2011 20:09:46 +0000 (17:09 -0300)]
[media] it913x stop dual frontend attach in warm state with single devices

Stop dual frontend attach in warm state with single devices.

Since this is a no reconnect device this occurs only after a warm system
reboot.

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] [BUG] Re: add support for IT9135 9005 devices
Malcolm Priestley [Sun, 11 Dec 2011 15:20:28 +0000 (12:20 -0300)]
[media] [BUG] Re: add support for IT9135 9005 devices

Re: [git:v4l-dvb/for_v3.3] [media] it9135:  add support for IT9135 9005 devices
On Sun, 2011-12-11 at 11:55 +0100, Mauro Carvalho Chehab wrote:
> This is an automatic generated email to let you know that the following patch were queued at the
> http://git.linuxtv.org/media_tree.git tree:
>
> Subject: [media] it9135:  add support for IT9135 9005 devices
> Author:  Malcolm Priestley <tvboxspy@gmail.com>
> Date:    Wed Nov 30 17:16:09 2011 -0300
>
> Support add for IT9135 9005 devices
>
> With this patch IT9135 devices now move to using
> dvb-usb-it9135-01.fw firmware
> IT9137 remain on previous firmware.
Hi Mauro,

I have made a small mistake on this patch.

I forgot to increase number of num_device_descs to 4.

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] xc4000: Use kcalloc instead of kzalloc to allocate array
Thomas Meyer [Tue, 29 Nov 2011 20:08:00 +0000 (17:08 -0300)]
[media] xc4000: Use kcalloc instead of kzalloc to allocate array

The advantage of kcalloc is, that will prevent integer overflows which could
result from the multiplication of number of elements and size and it is also
a bit nicer to read.

The semantic patch that makes this change is available
in https://lkml.org/lkml/2011/11/25/107

Signed-off-by: Thomas Meyer <thomas@m3y3r.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] v4l2-ctrls: Use kcalloc instead of kzalloc to allocate array
Thomas Meyer [Tue, 29 Nov 2011 20:08:00 +0000 (17:08 -0300)]
[media] v4l2-ctrls: Use kcalloc instead of kzalloc to allocate array

The advantage of kcalloc is, that will prevent integer overflows which could
result from the multiplication of number of elements and size and it is also
a bit nicer to read.

The semantic patch that makes this change is available
in https://lkml.org/lkml/2011/11/25/107

Signed-off-by: Thomas Meyer <thomas@m3y3r.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] uvcvideo: Use kcalloc instead of kzalloc to allocate array
Thomas Meyer [Tue, 29 Nov 2011 20:08:00 +0000 (17:08 -0300)]
[media] uvcvideo: Use kcalloc instead of kzalloc to allocate array

The advantage of kcalloc is, that will prevent integer overflows which could
result from the multiplication of number of elements and size and it is also
a bit nicer to read.

The semantic patch that makes this change is available
in https://lkml.org/lkml/2011/11/25/107

Signed-off-by: Thomas Meyer <thomas@m3y3r.de>
Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] v4l: s5p-tv: Use kcalloc instead of kzalloc to allocate array
Thomas Meyer [Tue, 29 Nov 2011 20:08:00 +0000 (17:08 -0300)]
[media] v4l: s5p-tv: Use kcalloc instead of kzalloc to allocate array

The advantage of kcalloc is, that will prevent integer overflows which could
result from the multiplication of number of elements and size and it is also
a bit nicer to read.

The semantic patch that makes this change is available
in https://lkml.org/lkml/2011/11/25/107

Signed-off-by: Thomas Meyer <thomas@m3y3r.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] DVB: dvb_frontend: fix delayed thread exit
Andreas Oberritter [Sat, 10 Dec 2011 00:37:00 +0000 (21:37 -0300)]
[media] DVB: dvb_frontend: fix delayed thread exit

There are some issues and miss-behaves at the dvb fe thread:

1) dvb_shutdown_timeout should be dvb_shutdown_timeout * HZ
   instead of (dvb_shutdown_timeout * HZ + 1);

2) add a memory barrier to warrant that all CPU's will consider the
   new value for release_jiffies;

3) wake up dvb thread also when fepriv->exit == DVB_FE_NO_EXIT.

Signed-off-by: Andreas Oberritter <obi@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] [saa7134] do not change mute state for capturing audio
Stas Sergeev [Sat, 3 Dec 2011 19:40:45 +0000 (16:40 -0300)]
[media] [saa7134] do not change mute state for capturing audio

The attached patch fixes the automute logic of saa7134.
It avoids the white noise on the pulseaudio startup.
(pulseaudio reads the saa7134 alsa device on startup)

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] wl128x: fmdrv_tx: fix signedness bugs
Xi Wang [Fri, 2 Dec 2011 09:01:13 +0000 (06:01 -0300)]
[media] wl128x: fmdrv_tx: fix signedness bugs

Message-Id: <1322820073-19347-4-git-send-email-xi.wang@gmail.com>

The error handling with (ret < 0) didn't work where ret is a u32.
Use int instead.  To be consistent we also change the functions to
return an int.

Signed-off-by: Xi Wang <xi.wang@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] wl128x: fmdrv_rx: fix signedness bugs
Xi Wang [Fri, 2 Dec 2011 09:01:12 +0000 (06:01 -0300)]
[media] wl128x: fmdrv_rx: fix signedness bugs

Message-Id: <1322820073-19347-3-git-send-email-xi.wang@gmail.com>

The error handling with (ret < 0) didn't work where ret is a u32.
Use int instead.  To be consistent we also change the functions to
return an int.

Signed-off-by: Xi Wang <xi.wang@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] wl128x: fmdrv_common: fix signedness bugs
Xi Wang [Fri, 2 Dec 2011 09:01:11 +0000 (06:01 -0300)]
[media] wl128x: fmdrv_common: fix signedness bugs

Message-Id: <1322820073-19347-2-git-send-email-xi.wang@gmail.com>

The error handling with (ret < 0) didn't work where ret is a u32.
Use int instead.  To be consistent we also change the functions to
return an int.

Signed-off-by: Xi Wang <xi.wang@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] gscpa_vicam: Fix oops if unplugged while streaming
Hans de Goede [Thu, 29 Dec 2011 19:50:57 +0000 (16:50 -0300)]
[media] gscpa_vicam: Fix oops if unplugged while streaming

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] gspca_pac207: Raise max exposure + various autogain setting tweaks
Hans de Goede [Mon, 31 Oct 2011 10:50:32 +0000 (07:50 -0300)]
[media] gspca_pac207: Raise max exposure + various autogain setting tweaks

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] gspca: Fix bulk mode cameras no longer working (regression fix)
Hans de Goede [Thu, 29 Dec 2011 19:43:12 +0000 (16:43 -0300)]
[media] gspca: Fix bulk mode cameras no longer working (regression fix)

The new iso bandwidth calculation code accidentally has broken support
for bulk mode cameras. This has broken the following drivers:
finepix, jeilinj, ovfx2, ov534, ov534_9, se401, sq905, sq905c, sq930x,
stv0680, vicam.

Thix patch fixes this. Fix tested with: se401, sq905, sq905c, stv0680 &
vicam cams.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] videobuf2-core: fix a warning at vb2
Mauro Carvalho Chehab [Fri, 30 Dec 2011 18:10:44 +0000 (16:10 -0200)]
[media] videobuf2-core: fix a warning at vb2

It seems that a cut-and-past error were added by the last patch:

drivers/media/video/videobuf2-core.c: In function â€˜vb2_qbuf’:
drivers/media/video/videobuf2-core.c:1099:14: warning: comparison between â€˜enum v4l2_buf_type’ and â€˜enum v4l2_memory’ [-Wenum-compare]

On all places V4L2_MEMORY_USERPTR is used, it is associated with
q->memory, and not b->type. So, the fix seems obvious.

Cc: Andrzej Pietrasiewicz <andrzej.p@samsung.com>
Cc: Kyungmin Park <kyungmin.park@samsung.com>
Cc: Marek Szyprowski <m.szyprowski@samsung.com>
Cc: Pawel Osciak <pawel@osciak.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] media: vb2: vmalloc-based allocator user pointer handling
Andrzej Pietrasiewicz [Thu, 13 Oct 2011 10:30:51 +0000 (07:30 -0300)]
[media] media: vb2: vmalloc-based allocator user pointer handling

This patch adds support for user pointer memory buffers to vmalloc
videobuf2 allocator.

Signed-off-by: Andrzej Pietrasiewicz <andrzej.p@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
CC: Pawel Osciak <pawel@osciak.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] media: vb2: review mem_priv usage and fix potential bugs
Marek Szyprowski [Thu, 15 Dec 2011 08:53:06 +0000 (05:53 -0300)]
[media] media: vb2: review mem_priv usage and fix potential bugs

This patch is a result of review of mem_priv entry usage in videobuf2 core.
It fixes all all potential places where it was not checked against NULL or
zeroed after freeing as well as a few style issues.

Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
CC: Pawel Osciak <pawel@osciak.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] media: vb2: remove plane argument from call_memop and cleanup mempriv usage
Marek Szyprowski [Thu, 15 Dec 2011 08:44:12 +0000 (05:44 -0300)]
[media] media: vb2: remove plane argument from call_memop and cleanup mempriv usage

This patch removes unused 'plane' argument from call_memop macro.

Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
CC: Pawel Osciak <pawel@osciak.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] media: vb2: fix potential deadlock in mmap vs. get_userptr handling
Marek Szyprowski [Thu, 17 Nov 2011 08:32:17 +0000 (05:32 -0300)]
[media] media: vb2: fix potential deadlock in mmap vs. get_userptr handling

To get direct access to userspace memory pages vb2 allocator needs to
gather read access on mmap semaphore in the current process.
The same semaphore is taken before calling mmap operation, while
both mmap and qbuf are called by the driver or v4l2 core with
driver's lock held. To avoid a AB-BA deadlock (mmap_sem then
driver's lock in mmap and driver's lock then mmap_sem in qbuf)
the videobuf2 core release driver's lock, takes mmap_sem and then
takes again driver's lock. get_userptr methods are now called with
all needed locks already taken to avoid further lock magic inside
memory allocator's code.

Reported-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
CC: Pawel Osciak <pawel@osciak.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] media: vb2: fix queueing of userptr buffers with null buffer pointer
Marek Szyprowski [Wed, 16 Nov 2011 18:09:40 +0000 (15:09 -0300)]
[media] media: vb2: fix queueing of userptr buffers with null buffer pointer

Heuristic that checks if the memory pointer has been changed lacked a check
if the pointer was actually provided by the userspace, what allowed one to
queue a NULL pointer which was accepted without further checking. This
patch fixes this issue.

Reported-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
CC: Pawel Osciak <pawel@osciak.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] lgdt330x: warn on errors blasting modulation config to the lgdt3303
Michael Krufky [Thu, 15 Dec 2011 13:30:38 +0000 (10:30 -0300)]
[media] lgdt330x: warn on errors blasting modulation config to the lgdt3303

fix the following build warning:

lgdt330x.c: In function "lgdt330x_set_parameters":
lgdt330x.c:346:6: warning: variable "err" set but not used
[-Wunused-but-set-variable]

Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] lgdt330x: fix behavior of read errors in lgdt330x_read_ucblocks
Michael Krufky [Thu, 15 Dec 2011 13:16:09 +0000 (10:16 -0300)]
[media] lgdt330x: fix behavior of read errors in lgdt330x_read_ucblocks

initialize *ucblocks to zero & fix the following build warning:

lgdt330x.c: In function "lgdt330x_read_ucblocks":
lgdt330x.c:288:6: warning: variable "err" set but not used
[-Wunused-but-set-variable]

Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] PCTV290E: Attach a single frontend
Manu Abraham [Sat, 10 Dec 2011 03:44:24 +0000 (00:44 -0300)]
[media] PCTV290E: Attach a single frontend

PCTV290E: Attach a single frontend, rather than a frontend each per
delivery system, whereby a multistandard frontend can advertise all
associated delivery systems.

Signed-off-by: Manu Abraham <abraham.manu@gmail.com>
Acked-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] CXD2820r: Query DVB frontend delivery capabilities
Manu Abraham [Thu, 24 Nov 2011 14:59:53 +0000 (11:59 -0300)]
[media] CXD2820r: Query DVB frontend delivery capabilities

Override default delivery system information provided by FE_GET_INFO,
so that applications can enumerate delivery systems provided by the
frontend.

Signed-off-by: Manu Abraham <abraham.manu@gmail.com>
Acked-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] tda18271c2dd: fix support for DVB-C
Mauro Carvalho Chehab [Fri, 30 Dec 2011 17:34:51 +0000 (15:34 -0200)]
[media] tda18271c2dd: fix support for DVB-C

As reported by Hartmut <e9hack@googlemail.com>:

> A break is missing before the default statement. Delivery systems for DVB-C result always
> in an error.

Reported-by: Hartmut <e9hack@googlemail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] af9013: rewrite whole driver
Antti Palosaari [Mon, 28 Nov 2011 23:58:11 +0000 (20:58 -0300)]
[media] af9013: rewrite whole driver

Rewrite whole af9013 demod driver in order to decrease I2C I/O.

We need to decrease I2C load since AF9015 (I2C adapter / USB-bridge used)
seems to have some problems under heavy I2C traffic.

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] af9015: limit I2C access to keep FW happy
Antti Palosaari [Sun, 13 Nov 2011 01:33:30 +0000 (22:33 -0300)]
[media] af9015: limit I2C access to keep FW happy

AF9015 firmware does not like if it gets interrupted by I2C adapter
request on some critical phases. During normal operation I2C adapter
is used only 2nd demodulator and tuner on dual tuner devices.

Override demodulator callbacks and use mutex for limit access to
those "critical" paths to keep AF9015 happy.

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] s5p-csis: Enable v4l subdev device node
Sylwester Nawrocki [Tue, 15 Nov 2011 18:34:06 +0000 (15:34 -0300)]
[media] s5p-csis: Enable v4l subdev device node

Set v4l2_subdev flags for a host driver to create a sub-device
node for the driver so the subdev can be directly configured
by applications. Add the subdev open() handler.

Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] m5mols: Enable v4l subdev device node
Sylwester Nawrocki [Fri, 1 Jul 2011 11:38:13 +0000 (08:38 -0300)]
[media] m5mols: Enable v4l subdev device node

Set V4L2_SUBDEV_FL_HAS_DEVNODE flag for the host driver to create
the sensor device node.

Acked-by: HeungJun Kim <riverful.kim@samsung.com>
Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] m5mols: Change auto exposure control default value to AUTO
Sylwester Nawrocki [Wed, 23 Nov 2011 13:19:54 +0000 (10:19 -0300)]
[media] m5mols: Change auto exposure control default value to AUTO

Enabling automatic exposure yields better image quality. With this setting
the anti-flicker algorithm is also enabled in automatic frequency detection
mode which effectively eliminates distortion from fluctuations of light
intensity at power line frequency.

Acked-by: HeungJun Kim <riverful.kim@samsung.com>
Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] m5mols: Do not reset the configured pixel format when unexpected
Sylwester Nawrocki [Tue, 15 Nov 2011 18:55:17 +0000 (15:55 -0300)]
[media] m5mols: Do not reset the configured pixel format when unexpected

Initialize default pixel format in driver probe() rather than in
s_power handler. This also prevents resetting the configuration
applied before the device was powered on.

Acked-by: HeungJun Kim <riverful.kim@samsung.com>
Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] m5mols: Move the control handler initialization to probe()
Sylwester Nawrocki [Sat, 3 Dec 2011 17:53:30 +0000 (14:53 -0300)]
[media] m5mols: Move the control handler initialization to probe()

This is prerequisite for enabling the sub-device node.

The control handler is now initialized in driver's probe callback
in order to allow the user space access controls before the device
power is enabled with s_power. This is needed due to s_power being
currently called only by the host driver.

It also adds the subdev internal operations, only open() for now
for the TRY format initialization.

Acked-by: HeungJun Kim <riverful.kim@samsung.com>
Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] m5mols: Don't ignore v4l2_ctrl_handler_setup() return value
Sylwester Nawrocki [Mon, 12 Dec 2011 18:45:56 +0000 (15:45 -0300)]
[media] m5mols: Don't ignore v4l2_ctrl_handler_setup() return value

v4l2_ctrl_handler_setup() may fail so check its return value when
restoring controls after device is powered on. While at it simplify
the m5mols_restore_function() a bit.

Acked-by: HeungJun Kim <riverful.kim@samsung.com>
Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] m5mols: Change the end of frame v4l2_subdev notification id
Sylwester Nawrocki [Fri, 28 Oct 2011 14:50:44 +0000 (11:50 -0300)]
[media] m5mols: Change the end of frame v4l2_subdev notification id

Change the v4l2_device notifications id to S5P_FIMC_TX_END_NOTIFY.

Moreover, when frame capture fails, send an 'end of frame' notification
with size set to 0 to let the host driver return a buffer back to the
user and prevent applications waiting forever on DQBUF.

The notification is needed only for the s5p-fimc driver.

Acked-by: HeungJun Kim <riverful.kim@samsung.com>
Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] m5mols: Optimize the capture set up sequence
HeungJun Kim [Sat, 3 Dec 2011 14:18:57 +0000 (11:18 -0300)]
[media] m5mols: Optimize the capture set up sequence

Improve the single frame capture set up sequence. Since there is
no need to re-enable the interrupts in each capture sequence, unmask
the required interrupts once at the device initialization time.

Signed-off-by: HeungJun Kim <riverful.kim@samsung.com>
Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] m5mols: Add support for the system initialization interrupt
HeungJun Kim [Sat, 3 Dec 2011 14:47:40 +0000 (11:47 -0300)]
[media] m5mols: Add support for the system initialization interrupt

The M-5MOLS internal controller's initialization time depends on the
hardware and firmware revision. Currently the driver just waits for
worst case time period, after applying the voltage supplies, for
the device to be ready. The M-5MOLS supports "System initialization"
interrupt which is triggered after the controller finished booting.
So use this interrupt to optimize the initialization sequence.

After the voltage supplies are applied the I2C communication will
fail, until the internal controller initializes to Flash Writer
state. For the period when the I2C is not accessible use the
isp_ready flag to suppress the error logs.

Signed-off-by: HeungJun Kim <riverful.kim@samsung.com>
Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] m5mols: Remove mode_save field from struct m5mols_info
Sylwester Nawrocki [Sat, 3 Dec 2011 00:55:04 +0000 (21:55 -0300)]
[media] m5mols: Remove mode_save field from struct m5mols_info

There is no need to keep this in the drivers' private data structure,
an on the stack variable is enough. Also simplify a bit the ISP state
switching function.

Acked-by: HeungJun Kim <riverful.kim@samsung.com>
Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] m5mols: Improve the interrupt handling routines
HeungJun Kim [Sat, 3 Dec 2011 00:53:20 +0000 (21:53 -0300)]
[media] m5mols: Improve the interrupt handling routines

The work struct based interrupt handling is not flexible enough
as the M-5MOLS control sequence involves I2C access sequences
before and after an interrupt is generated. A single waitqueue is
enough for the job so remove the work struct based code.

Signed-off-by: HeungJun Kim <riverful.kim@samsung.com>
Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] m5mols: Extend the busy wait helper
HeungJun Kim [Mon, 12 Dec 2011 11:04:03 +0000 (08:04 -0300)]
[media] m5mols: Extend the busy wait helper

Make m5mols_busy_wait function jiffies based rather than relying
on some fixed number of I2C read iterations while busy waiting
for the device to execute a request. With fixed number of iterations
we may be getting different wait times, depending on the I2C speed.

In some conditions we have to wait even if the I2C communications
fails, in those cases M5MOLS_I2C_RDY_WAIT_MASK should be passed
as the mask argument to m5mols_busy_wait().

Signed-off-by: HeungJun Kim <riverful.kim@samsung.com>
Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] m5mols: Simplify the I2C registers definition
Sylwester Nawrocki [Fri, 25 Nov 2011 23:37:23 +0000 (20:37 -0300)]
[media] m5mols: Simplify the I2C registers definition

The redundant definitions of the m5mols I2C register addresses within
the pages (categories) are removed. In place of symbolic definitions
plain numbers are used which simplifies the code and eases identifying
the registers in the documentation.

Also make the m5mols_busy() function accept I2C_REG() value as a register
address, like all other functions, rather than using the category and
command values.

Acked-by: HeungJun Kim <riverful.kim@samsung.com>
Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] s5p-fimc: Add support for alpha component configuration
Sylwester Nawrocki [Thu, 1 Dec 2011 17:02:24 +0000 (14:02 -0300)]
[media] s5p-fimc: Add support for alpha component configuration

On Exynos SoCs the FIMC IP allows to configure globally the alpha
component of all pixels for V4L2_PIX_FMT_RGB32, V4L2_PIX_FMT_RGB555
and V4L2_PIX_FMT_RGB444 image formats. This patch adds a v4l2 control
in order to let the applications control the alpha component value.

The alpha value range depends on the pixel format, for RGB32 it's
0..255 (8-bits), for RGB555 - 0..1 (1-bit) and for RGB444 - 0..15
(4-bits). The v4l2 control range is always 0..255 and the alpha
component data width is determined by currently set format on the
V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE buffer queue. The applications
need to match the alpha channel value range and the pixel format
since the driver will clamp the alpha component. Depending on
fourcc the valid alpha bits are:

 - V4L2_PIX_FMT_RGB555  [0]
 - V4L2_PIX_FMT_RGB444  [3:0]
 - V4L2_PIX_FMT_RGB32   [7:0]

When switching to a pixel format with smaller alpha component width
the currently set alpha value will be clamped to maximum value valid
for current format. When switching to a format with wider alpha the
alpha value remains unchanged.

The variant description data structure is extended with a new entry
so an additional control is created only where really supported by
the hardware.

V4L2_PIX_FMT_RGB555 and V4L2_PIX_FMT_RGB444 formats are only valid
for V4L2_BUF_TYPE_VIDEO_CAPTURE buffer queue.

Signed-off-by: Sylwester Nawrocki <s.nawrocki@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 new alpha component control
Sylwester Nawrocki [Mon, 14 Nov 2011 11:48:18 +0000 (08:48 -0300)]
[media] v4l: Add new alpha component control

The V4L2_CID_ALPHA_COMPONENT control is intended for the video capture
or memory-to-memory devices that are capable of setting up the per-pixel
alpha component to some arbitrary value. It allows to set the alpha
component for all pixels to an arbitrary value.

Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years agoMerge tag 'v3.2-rc7' into staging/for_v3.3
Mauro Carvalho Chehab [Fri, 30 Dec 2011 15:59:37 +0000 (13:59 -0200)]
Merge tag 'v3.2-rc7' into staging/for_v3.3

Linux 3.2-rc7

* tag 'v3.2-rc7': (1304 commits)
  Linux 3.2-rc7
  netfilter: xt_connbytes: handle negation correctly
  Btrfs: call d_instantiate after all ops are setup
  Btrfs: fix worker lock misuse in find_worker
  net: relax rcvbuf limits
  rps: fix insufficient bounds checking in store_rps_dev_flow_table_cnt()
  net: introduce DST_NOPEER dst flag
  mqprio: Avoid panic if no options are provided
  bridge: provide a mtu() method for fake_dst_ops
  md/bitmap: It is OK to clear bits during recovery.
  md: don't give up looking for spares on first failure-to-add
  md/raid5: ensure correct assessment of drives during degraded reshape.
  md/linear: fix hot-add of devices to linear arrays.
  sparc64: Fix MSIQ HV call ordering in pci_sun4v_msiq_build_irq().
  pata_of_platform: Add missing CONFIG_OF_IRQ dependency.
  ipv4: using prefetch requires including prefetch.h
  VFS: Fix race between CPU hotplug and lglocks
  vfs: __read_cache_page should use gfp argument rather than GFP_KERNEL
  USB: Fix usb/isp1760 build on sparc
  net: Add a flow_cache_flush_deferred function
  ...

Conflicts:
drivers/media/common/tuners/tda18218.c
drivers/media/video/omap3isp/ispccdc.c
drivers/staging/media/as102/as102_drv.h

13 years agoLinux 3.2-rc7 v3.2-rc7
Linus Torvalds [Sat, 24 Dec 2011 05:51:06 +0000 (21:51 -0800)]
Linux 3.2-rc7

13 years agoMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs
Linus Torvalds [Sat, 24 Dec 2011 05:47:28 +0000 (21:47 -0800)]
Merge branch 'for-linus' of git://git./linux/kernel/git/viro/vfs

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs:
  VFS: Fix race between CPU hotplug and lglocks

13 years agoMerge tag 'writeback' of git://git.kernel.org/pub/scm/linux/kernel/git/wfg/linux
Linus Torvalds [Sat, 24 Dec 2011 04:25:36 +0000 (20:25 -0800)]
Merge tag 'writeback' of git://git./linux/kernel/git/wfg/linux

for linus: writeback reason binary tracing format fix

* tag 'writeback' of git://git.kernel.org/pub/scm/linux/kernel/git/wfg/linux:
  writeback: show writeback reason with __print_symbolic

13 years agoMerge branch 'rc-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild
Linus Torvalds [Fri, 23 Dec 2011 23:01:24 +0000 (15:01 -0800)]
Merge branch 'rc-fixes' of git://git./linux/kernel/git/mmarek/kbuild

* 'rc-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild:
  kconfig: adapt update-po-config to new UML layout

13 years agoMerge branch 'v4l_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab...
Linus Torvalds [Fri, 23 Dec 2011 22:59:08 +0000 (14:59 -0800)]
Merge branch 'v4l_for_linus' of git://git./linux/kernel/git/mchehab/linux-media

* 'v4l_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media:
  [media] omap3isp: Fix crash caused by subdevs now having a pointer to devnodes