GitHub/LineageOS/G12/android_kernel_amlogic_linux-4.9.git
12 years ago[media] l64781: convert set_fontend to use DVBv5 parameters
Mauro Carvalho Chehab [Mon, 26 Dec 2011 14:12:03 +0000 (11:12 -0300)]
[media] l64781: convert set_fontend to use DVBv5 parameters

Instead of using dvb_frontend_parameters struct, that were
designed for a subset of the supported standards, use the DVBv5
cache information.

Also, fill the supported delivery systems at dvb_frontend_ops
struct.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] it913x-fe: convert set_fontend to use DVBv5 parameters
Mauro Carvalho Chehab [Mon, 26 Dec 2011 14:00:09 +0000 (11:00 -0300)]
[media] it913x-fe: convert set_fontend to use DVBv5 parameters

Instead of using dvb_frontend_parameters struct, that were
designed for a subset of the supported standards, use the DVBv5
cache information.

Also, fill the supported delivery systems at dvb_frontend_ops
struct.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] ec100: convert set_fontend to use DVBv5 parameters
Mauro Carvalho Chehab [Mon, 26 Dec 2011 13:15:30 +0000 (10:15 -0300)]
[media] ec100: convert set_fontend to use DVBv5 parameters

Instead of using dvb_frontend_parameters struct, that were
designed for a subset of the supported standards, use the DVBv5
cache information.

Also, fill the supported delivery systems at dvb_frontend_ops
struct.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] dvb_dummy_fe: convert set_fontend to use DVBv5 parameters
Mauro Carvalho Chehab [Mon, 26 Dec 2011 13:10:42 +0000 (10:10 -0300)]
[media] dvb_dummy_fe: convert set_fontend to use DVBv5 parameters

Instead of using dvb_frontend_parameters struct, that were
designed for a subset of the supported standards, use the DVBv5
cache information.

Also, fill the supported delivery systems at dvb_frontend_ops
struct.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] ds3000: convert set_fontend to use DVBv5 parameters
Mauro Carvalho Chehab [Mon, 26 Dec 2011 13:03:29 +0000 (10:03 -0300)]
[media] ds3000: convert set_fontend to use DVBv5 parameters

Instead of using dvb_frontend_parameters struct, that were
designed for a subset of the supported standards, use the DVBv5
cache information.

Also, fill the supported delivery systems at dvb_frontend_ops
struct.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] drxk: convert set_fontend to use DVBv5 parameters
Mauro Carvalho Chehab [Mon, 26 Dec 2011 12:57:11 +0000 (09:57 -0300)]
[media] drxk: convert set_fontend to use DVBv5 parameters

Instead of using dvb_frontend_parameters struct, that were
designed for a subset of the supported standards, use the DVBv5
cache information.

Also, fill the supported delivery systems at dvb_frontend_ops
struct.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] drxd: convert set_fontend to use DVBv5 parameters
Mauro Carvalho Chehab [Mon, 26 Dec 2011 12:43:05 +0000 (09:43 -0300)]
[media] drxd: convert set_fontend to use DVBv5 parameters

Instead of using dvb_frontend_parameters struct, that were
designed for a subset of the supported standards, use the DVBv5
cache information.

Also, fill the supported delivery systems at dvb_frontend_ops
struct.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] em28xx-dvb: don't initialize drx-d non-used fields with zero
Mauro Carvalho Chehab [Mon, 26 Dec 2011 12:41:14 +0000 (09:41 -0300)]
[media] em28xx-dvb: don't initialize drx-d non-used fields with zero

There's no need to initialize unused fields with zero, as Kernel does
it automatically.

Removing the initialization makes the code cleaner.

This also allows the removal of the unused pll_set callback.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] zl10353: convert set_fontend to use DVBv5 parameters
Mauro Carvalho Chehab [Fri, 23 Dec 2011 00:12:28 +0000 (21:12 -0300)]
[media] zl10353: convert set_fontend to use DVBv5 parameters

Instead of using dvb_frontend_parameters struct, that were
designed for a subset of the supported standards, use the DVBv5
cache information.

Also, fill the supported delivery systems at dvb_frontend_ops
struct.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] dib9000: get rid of unused dvb_frontend_parameters
Mauro Carvalho Chehab [Thu, 22 Dec 2011 23:42:12 +0000 (20:42 -0300)]
[media] dib9000: get rid of unused dvb_frontend_parameters

This parameter is passed as NULL, and it is never used. Just
remove it.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] dib8000: Remove the old DVBv3 struct from it and add delsys
Mauro Carvalho Chehab [Thu, 22 Dec 2011 23:38:27 +0000 (20:38 -0300)]
[media] dib8000: Remove the old DVBv3 struct from it and add delsys

This driver only uses the DVBv5 struct. All it needs is to remove
the non-used params var, and to add the ISDB-T to the delivery
systems.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] dib3000mb: convert set_fontend to use DVBv5 parameters
Mauro Carvalho Chehab [Thu, 22 Dec 2011 23:34:47 +0000 (20:34 -0300)]
[media] dib3000mb: convert set_fontend to use DVBv5 parameters

Instead of using dvb_frontend_parameters struct, that were
designed for a subset of the supported standards, use the DVBv5
cache information.

Also, fill the supported delivery systems at dvb_frontend_ops
struct.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] dib9000: Get rid of the remaining DVBv3 legacy stuff
Mauro Carvalho Chehab [Thu, 22 Dec 2011 23:12:18 +0000 (20:12 -0300)]
[media] dib9000: Get rid of the remaining DVBv3 legacy stuff

dib9000 is almost ok, with regards to the usage of DVBv5 parameters.
It has just a few stuff using the old way, at set_frontend.

Replace them by the DVBv5 way, and add the delivery system.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] cx24113: cleanup: remove unused init
Mauro Carvalho Chehab [Thu, 22 Dec 2011 23:19:00 +0000 (20:19 -0300)]
[media] cx24113: cleanup: remove unused init

There's no need to initialize with zero. This only wastes
space at the data segment.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] dib9000: remove unused parameters
Mauro Carvalho Chehab [Thu, 22 Dec 2011 22:54:08 +0000 (19:54 -0300)]
[media] dib9000: remove unused parameters

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] dibx000: convert set_fontend to use DVBv5 parameters
Mauro Carvalho Chehab [Thu, 22 Dec 2011 22:06:20 +0000 (19:06 -0300)]
[media] dibx000: convert set_fontend to use DVBv5 parameters

Instead of using dvb_frontend_parameters struct, that were
designed for a subset of the supported standards, use the DVBv5
cache information.

Also, fill the supported delivery systems at dvb_frontend_ops
struct.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] cx23123: convert set_fontend to use DVBv5 parameters
Mauro Carvalho Chehab [Thu, 22 Dec 2011 20:54:00 +0000 (17:54 -0300)]
[media] cx23123: convert set_fontend to use DVBv5 parameters

Instead of using dvb_frontend_parameters struct, that were
designed for a subset of the supported standards, use the DVBv5
cache information.

Also, fill the supported delivery systems at dvb_frontend_ops
struct.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] av7110: convert set_fontend to use DVBv5 parameters
Mauro Carvalho Chehab [Fri, 23 Dec 2011 21:19:24 +0000 (18:19 -0300)]
[media] av7110: convert set_fontend to use DVBv5 parameters

Instead of using dvb_frontend_parameters struct, that were
designed for a subset of the supported standards, use the DVBv5
cache information.

Also, fill the supported delivery systems at dvb_frontend_ops
struct.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] cx23123: remove an unused argument from cx24123_pll_writereg()
Mauro Carvalho Chehab [Thu, 22 Dec 2011 20:44:43 +0000 (17:44 -0300)]
[media] cx23123: remove an unused argument from cx24123_pll_writereg()

cx24123_pll_writereg doesn't use dvb_frontend_parameters. Just
remove it.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] cx24116: report delivery system and cleanups
Mauro Carvalho Chehab [Thu, 22 Dec 2011 20:28:11 +0000 (17:28 -0300)]
[media] cx24116: report delivery system and cleanups

This is one of the first drivers using DVBv5. It relies only
on DVBv5 way, but still it contains some stub for unused
methods. Remove them, add the delivery system and do some
trivial cleanups.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] cx24110: convert set_fontend to use DVBv5 parameters
Mauro Carvalho Chehab [Thu, 22 Dec 2011 19:44:14 +0000 (16:44 -0300)]
[media] cx24110: convert set_fontend to use DVBv5 parameters

Instead of using dvb_frontend_parameters struct, that were
designed for a subset of the supported standards, use the DVBv5
cache information.

Also, fill the supported delivery systems at dvb_frontend_ops
struct.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] cx22702: convert set_fontend to use DVBv5 parameters
Mauro Carvalho Chehab [Thu, 22 Dec 2011 19:40:49 +0000 (16:40 -0300)]
[media] cx22702: convert set_fontend to use DVBv5 parameters

Instead of using dvb_frontend_parameters struct, that were
designed for a subset of the supported standards, use the DVBv5
cache information.

Also, fill the supported delivery systems at dvb_frontend_ops
struct.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] cx22700: convert set_fontend to use DVBv5 parameters
Mauro Carvalho Chehab [Thu, 22 Dec 2011 13:14:08 +0000 (10:14 -0300)]
[media] cx22700: convert set_fontend to use DVBv5 parameters

Instead of using dvb_frontend_parameters struct, that were
designed for a subset of the supported standards, use the DVBv5
cache information.

Also, fill the supported delivery systems at dvb_frontend_ops
struct.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] bcm3510: convert set_fontend to use DVBv5 parameters
Mauro Carvalho Chehab [Thu, 22 Dec 2011 13:03:11 +0000 (10:03 -0300)]
[media] bcm3510: convert set_fontend to use DVBv5 parameters

Instead of using dvb_frontend_parameters struct, that were
designed for a subset of the supported standards, use the DVBv5
cache information.

Also, fill the supported delivery systems at dvb_frontend_ops
struct.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] au8522_dig: convert set_fontend to use DVBv5 parameters
Mauro Carvalho Chehab [Thu, 22 Dec 2011 12:53:20 +0000 (09:53 -0300)]
[media] au8522_dig: convert set_fontend to use DVBv5 parameters

Instead of using dvb_frontend_parameters struct, that were
designed for a subset of the supported standards, use the DVBv5
cache information.

Also, fill the supported delivery systems at dvb_frontend_ops
struct.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] atbm8830: convert set_fontend to new way and fix delivery system
Mauro Carvalho Chehab [Thu, 22 Dec 2011 12:42:32 +0000 (09:42 -0300)]
[media] atbm8830: convert set_fontend to new way and fix delivery system

This is one of the cases where the frontend changes is required:
while this device lies to applications that it is a DVB-T, it is,
in fact, a frontend for CTTB delivery system. So, the information
provided for a DVBv3 application should be different than the one
provided to a DVBv5 application.

So, fill delsys with the CTTB delivery system, and use the new
way. there aren't many changes here, as everything on this driver
is on auto mode, probably because of the lack of a proper API
for this delivery system.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] dvb-core: add support for a DVBv5 get_frontend() callback
Mauro Carvalho Chehab [Thu, 22 Dec 2011 17:47:48 +0000 (14:47 -0300)]
[media] dvb-core: add support for a DVBv5 get_frontend() callback

Creates a DVBv5 get_frontend call, renaming the DVBv3 one to
get_frontend_legacy(), while not all frontends are converted.

After the conversion for all drivers, get_frontend_legacy()
will be removed.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] Rename set_frontend fops to set_frontend_legacy
Mauro Carvalho Chehab [Tue, 20 Dec 2011 18:31:54 +0000 (15:31 -0300)]
[media] Rename set_frontend fops to set_frontend_legacy

Passing DVBv3 parameters to set_frontend is not fun, as the
core doesn't have any way to know if the driver is using the
v3 or v5 parameters. So, rename the callback and add a new
one to allow distinguish between a mixed v3/v5 paramenter call
from a pure v5 call.

After having all frontends to use the new way, the legacy
call can be removed.

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