Commit graph

1451 commits

Author SHA1 Message Date
Mauro Carvalho Chehab
5135986eb0 [media] stb6100: use get_frontend, instead of get_frontend_legacy()
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-12-31 09:37:07 -02:00
Mauro Carvalho Chehab
5715836fb9 [media] stb0899: convert get_frontend to the new struct
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-12-31 09:37:00 -02:00
Mauro Carvalho Chehab
14e3dcca4a [media] si21xx: 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>
2011-12-31 09:36:53 -02:00
Mauro Carvalho Chehab
9f69afbe31 [media] s5h1420: 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>
2011-12-31 09:36:48 -02:00
Mauro Carvalho Chehab
827b5f3e30 [media] mt312: 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>
2011-12-31 09:36:16 -02:00
Mauro Carvalho Chehab
16e3d13152 [media] s921: 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>
2011-12-31 09:36:10 -02:00
Mauro Carvalho Chehab
5f82e6b18c [media] tda1004x: 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>
2011-12-31 09:36:04 -02:00
Mauro Carvalho Chehab
0f0d1a3939 [media] tda10048: 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>
2011-12-31 09:33:50 -02:00
Mauro Carvalho Chehab
285d55ad5f [media] stv0367: 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>
2011-12-31 09:33:42 -02:00
Mauro Carvalho Chehab
5ebffc3992 [media] sp887x: 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>
2011-12-31 09:33:29 -02:00
Mauro Carvalho Chehab
dcc9a12997 [media] sp8870: 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>
2011-12-31 09:32:39 -02:00
Mauro Carvalho Chehab
6bfc366766 [media] s5h1432: 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>
2011-12-31 09:30:57 -02:00
Mauro Carvalho Chehab
80b5b7459d [media] nxt6000: 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>
2011-12-31 09:30:51 -02:00
Mauro Carvalho Chehab
cf45787ced [media] mt352: 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>
2011-12-31 09:27:56 -02:00
Mauro Carvalho Chehab
2d76e22b70 [media] mb86a20s: 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.

Actually, this driver needs to fill/use the ISDB-T proprieties.

Also, fill the supported delivery systems at dvb_frontend_ops
struct.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-12-31 09:26:53 -02:00
Mauro Carvalho Chehab
5226bb875b [media] mb86a16: Add delivery system type at fe struct
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-12-31 09:26:47 -02:00
Mauro Carvalho Chehab
dba2b0c812 [media] vez1x93: 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>
2011-12-31 09:26:37 -02:00
Mauro Carvalho Chehab
fd91f267d7 [media] lgs8gxx: 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>
2011-12-31 09:25:56 -02:00
Mauro Carvalho Chehab
e14e1ec6d9 [media] lgdt3305: 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>
2011-12-31 09:25:50 -02:00
Mauro Carvalho Chehab
ca7072dd5e [media] lgdt330x: 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>
2011-12-31 09:25:41 -02:00
Mauro Carvalho Chehab
304577b21b [media] lgs8gl5: 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>
2011-12-31 09:25:08 -02:00
Mauro Carvalho Chehab
2de5f412c2 [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>
2011-12-31 09:23:50 -02:00
Mauro Carvalho Chehab
f908cf1dfe [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>
2011-12-31 09:19:35 -02:00
Mauro Carvalho Chehab
41943eaf15 [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>
2011-12-31 09:18:05 -02:00
Mauro Carvalho Chehab
d53b5102e3 [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>
2011-12-31 09:17:58 -02:00
Mauro Carvalho Chehab
9fe3301824 [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>
2011-12-31 09:17:41 -02:00
Mauro Carvalho Chehab
ed5452a2ab [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>
2011-12-31 09:17:34 -02:00
Mauro Carvalho Chehab
9f97c288c0 [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>
2011-12-31 09:17:25 -02:00
Mauro Carvalho Chehab
4e4d2bcf48 [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>
2011-12-31 09:17:11 -02:00
Mauro Carvalho Chehab
f20b12ecb4 [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>
2011-12-31 09:17:05 -02:00
Mauro Carvalho Chehab
490ecd635e [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>
2011-12-31 09:16:43 -02:00
Mauro Carvalho Chehab
fe08492935 [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>
2011-12-31 09:16:34 -02:00
Mauro Carvalho Chehab
9e9c5bf73f [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>
2011-12-31 09:16:14 -02:00
Mauro Carvalho Chehab
be21ced21a [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>
2011-12-31 09:16:04 -02:00
Mauro Carvalho Chehab
759e236c5f [media] dib9000: remove unused parameters
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-12-31 09:15:45 -02:00
Mauro Carvalho Chehab
c1f814f499 [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>
2011-12-31 09:15:34 -02:00
Mauro Carvalho Chehab
a73efc05b7 [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>
2011-12-31 09:15:10 -02:00
Mauro Carvalho Chehab
31b4f32c26 [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>
2011-12-31 09:14:54 -02:00
Mauro Carvalho Chehab
1ac6a854ad [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>
2011-12-31 09:14:36 -02:00
Mauro Carvalho Chehab
4be325c966 [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>
2011-12-31 09:14:28 -02:00
Mauro Carvalho Chehab
19289a24bb [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>
2011-12-31 09:13:27 -02:00
Mauro Carvalho Chehab
fd6072122f [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>
2011-12-31 09:11:44 -02:00
Mauro Carvalho Chehab
a27378c602 [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>
2011-12-31 09:11:07 -02:00
Mauro Carvalho Chehab
9b6a132b3d [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>
2011-12-31 09:11:00 -02:00
Mauro Carvalho Chehab
a552438f54 [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>
2011-12-31 09:10:55 -02:00
Mauro Carvalho Chehab
a689e3657d [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>
2011-12-31 09:10:49 -02:00
Mauro Carvalho Chehab
bc9cd2736b [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>
2011-12-31 09:09:43 -02:00
Mauro Carvalho Chehab
14d24d148c [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>
2011-12-31 08:57:29 -02:00
Mauro Carvalho Chehab
249fa0b01c [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>
2011-12-31 08:52:22 -02:00
Mauro Carvalho Chehab
c79c9fb37e [media] dib0070: Remove unused dvb_frontend_parameters
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-12-31 08:42:58 -02:00
Mauro Carvalho Chehab
f40d0f012e [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>
2011-12-31 08:42:48 -02:00
Mauro Carvalho Chehab
80d8d4985f [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>
2011-12-31 08:42:33 -02:00
Mauro Carvalho Chehab
66e6cd596c [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>
2011-12-31 08:37:45 -02:00
Mauro Carvalho Chehab
3608dbb6dc [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>
2011-12-31 08:37:40 -02:00
Mauro Carvalho Chehab
3cc66df680 [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>
2011-12-31 08:37:36 -02:00
Mauro Carvalho Chehab
e7e10deb58 [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>
2011-12-31 08:37:29 -02:00
Mauro Carvalho Chehab
ab3eee078f [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>
2011-12-31 08:36:47 -02:00
Mauro Carvalho Chehab
5918288a42 [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>
2011-12-31 08:36:38 -02:00
Mauro Carvalho Chehab
8579881bb6 [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>
2011-12-31 08:27:58 -02:00
Mauro Carvalho Chehab
27b7faf13a [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>
2011-12-31 08:27:54 -02:00
Mauro Carvalho Chehab
0349471bc5 [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>
2011-12-31 08:26:24 -02:00
Michael Krufky
54828d19f8 [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>
2011-12-30 15:58:01 -02:00
Michael Krufky
26110dac8b [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>
2011-12-30 15:57:29 -02:00
Manu Abraham
14c038627e [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>
2011-12-30 15:50:29 -02:00
Mauro Carvalho Chehab
1ca8dde859 [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>
2011-12-30 15:34:51 -02:00
Antti Palosaari
f571e004c3 [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>
2011-12-30 15:31:33 -02:00
Mauro Carvalho Chehab
1a5cd29631 [media] tda10021: Add support for DVB-C Annex C
While tda10021 supports both DVB-C Annex A and C, it is currently
hard-coded to Annex A. Add support for Annex C and re-work the
code in order to report the delivery systems, thans to Andreas,
that passed us the register settings for the Roll-off factor.

Thanks-to: Andreas Oberriter <obi@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-12-20 14:01:08 -02:00
Mauro Carvalho Chehab
27d9a5e938 [media] tda10021: Don't use a magic numbers for QAM modulation
Convert the existing data struct to use the QAM modulation macros,
instead of assuming that they're numbered from 0 to 5.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-12-20 13:55:47 -02:00
Mauro Carvalho Chehab
74b4576e63 [media] tda10023: add support for DVB-C Annex C
The difference between Annex A and C is the roll-off factor.
Properly implement it inside the driver, using the information
provided by Andreas.

Thanks-to: Andreas Oberriter <obi@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-12-20 13:51:51 -02:00
Mauro Carvalho Chehab
37c52abd56 [media] tda10023: Don't use a magic numbers for QAM modulation
Convert the existing data struct to use the QAM modulation macros,
instead of assuming that they're numbered from 0 to 5.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-12-20 13:27:19 -02:00
Mauro Carvalho Chehab
0d7d0ac87b [media] drx-k: report the supported delivery systems
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-12-20 11:50:37 -02:00
Mauro Carvalho Chehab
fd66c45dd5 [media] Remove Annex A/C selection via roll-off factor
Instead of using a roll-off factor, change DRX-K & friends to select
the bandwidth filter and the Nyquist half roll-off via delivery system.

This provides a cleaner support for Annex A/C switch.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-12-20 11:50:23 -02:00
Manu Abraham
bcc072756e [media] STV0900: 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>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-12-12 15:04:34 -02:00
Manu Abraham
6bad3aeb8c [media] STV090x: 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>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-12-12 15:04:22 -02:00
Manu Abraham
61d4f9c918 [media] STB0899: 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>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-12-12 15:04:05 -02:00
Malcolm Priestley
990f49af3f [media] it913x: support for different tuner regs
There appears to be differences in the tuner registers
on earlier IT9135 devices.

Using the current IT9137 settings cause corruptions on
some channels

This patch is in preparation for multi firmware loading and
current unsupported types.

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-12-11 08:13:27 -02:00
Malcolm Priestley
ed942c5074 [media] it913x-fe: more user and debugging info
More debugging and user info from it913x-fe.

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-12-11 08:03:29 -02:00
Mauro Carvalho Chehab
48763e2c6e [media] drxk: Switch the delivery system on FE_SET_PROPERTY
The DRX-K doesn't change the delivery system at set_properties,
but do it at frontend init. This causes problems on programs like
w_scan that, by default, opens both frontends.

Instead, explicitly set the format when set_parameters callback is
called.

Tested-by: Eddi De Pieri <eddi@depieri.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-12-09 20:49:05 -02:00
Mauro Carvalho Chehab
78bd3dc8da [media] xc5000,tda18271c2dd: Fix bandwidth calculus
While here, add a debug message, to easy detecting bugs on it.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-12-08 17:04:38 -02:00
Thomas Meyer
53090aada4 [media] drxd: Use kmemdup rather than duplicating its implementation
The semantic patch that makes this change is available
in scripts/coccinelle/api/memdup.cocci.

Signed-off-by: Thomas Meyer <thomas@m3y3r.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-11-24 21:04:51 -02:00
Olivier Grenie
0c32dbd74f [media] add the support for DiBcom dib8096P
The purpose of this patch is to support the DiBcom chip dib8096P.

Signed-off-by: Olivier Grenie <olivier.grenie@dibcom.fr>
Signed-off-by: Patrick Boettcher <patrick.boettcher@dibcom.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-11-24 20:55:20 -02:00
Olivier Grenie
1f6bfcc752 [media] DiB8000: improve the tuning and the SNR monitoring
This patches improves the tuning of the dib8000 and correct the monitoringr
of the SNR.The patch allows to faster detect that there is no ISDB-T channel
on the wanted frequency.

Signed-off-by: Olivier Grenie <olivier.grenie@dibcom.fr>
Signed-off-by: Patrick Boettcher <patrick.boettcher@dibcom.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-11-24 20:49:33 -02:00
Olivier Grenie
a685dbbc65 [media] DiBcom: correct warnings
The intend of this patch is to correct some warnings given.

Signed-off-by: Olivier Grenie <olivier.grenie@dibcom.fr>
Signed-off-by: Patrick Boettcher <patrick.boettcher@dibcom.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-11-24 20:48:29 -02:00
Olivier Grenie
6724a2f4f7 [media] dib7090: add the reference board TFE7090E
The intend of this patch is to add the support for the DiBcom reference
board TFE7090E.

Signed-off-by: Olivier Grenie <olivier.grenie@dibcom.fr>
Signed-off-by: Patrick Boettcher <patrick.boettcher@dibcom.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-11-24 20:48:11 -02:00
Olivier Grenie
2e80286140 [media] dib7000p/dib0090: update the driver
This patch intends to update the dib7000p and dib0090 driver in order to
improve the performances.

Signed-off-by: Olivier Grenie <olivier.grenie@dibcom.fr>
Signed-off-by: Patrick Boettcher <patrick.boettcher@dibcom.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-11-24 20:47:45 -02:00
Antti Palosaari
13d723ba98 [media] cxd2820r: check bandwidth earlier for DVB-T/T2
It is param that could be potentially unsupported and
due to that it is good idea to check it very first.

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-11-24 17:54:35 -02:00
Antti Palosaari
fda23faaff [media] cxd2820r: switch to .get_if_frequency()
All tuners used with cxd2820r offers IF frequency so switch that.

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-11-24 17:54:04 -02:00
Antti Palosaari
6d42b218b4 [media] af9013: use .get_if_frequency() when possible
Get IF frequency from tuner if tuner provides it.

Remove TDA18271 and TDA18218 IF frequency hacks since both tuners provides .get_if_frequency().

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-11-24 17:52:39 -02:00
Mauro Carvalho Chehab
12cbfd0a3c Merge tag 'v3.2-rc2' into staging/for_v3.3
* tag 'v3.2-rc2': (3068 commits)
  Linux 3.2-rc2
  hfs: add sanity check for file name length
  fsl-rio: fix compile error
  blackfin: Fixup export.h includes
  Blackfin: add serial TX IRQ in individual platform resource
  virtio-pci: fix use after free
  ACPI / cpuidle: Remove acpi_idle_suspend (to fix suspend regression)
  drm/radeon/kms/combios: fix dynamic allocation of PM clock modes
  [CPUFREQ] db8500: fix build error due to undeclared i variable
  bma023: Add SFI translation for this device
  vrtc: change its year offset from 1960 to 1972
  ce4100: fix a build error
  arm/imx: fix imx6q mmc error when mounting rootfs
  arm/imx: fix AUTO_ZRELADDR selection
  arm/imx: fix the references to ARCH_MX3
  ARM: mx51/53: set pwm clock parent to ipg_perclk
  btrfs: rename the option to nospace_cache
  drm/radeon/kms/pm: switch to dynamically allocating clock mode array
  drm/radeon/kms: optimize r600_pm_profile_init
  drm/radeon/kms/pm: add a proper pm profile init function for fusion
  ...

Conflicts:
	drivers/media/radio/Kconfig
2011-11-23 19:42:09 -02:00
Mauro Carvalho Chehab
de72405f6f [media] em28xx: Fix CodingStyle issues introduced by changeset 82e7dbb
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-11-20 11:32:34 -02:00
Eddi De Pieri
82e7dbbd4a [media] em28xx: initial support for HAUPPAUGE HVR-930C again
With this patch I try again to add initial support for HVR930C.

Tested only DVB-T, since in Italy Analog service is stopped.

Actually "scan -a0 -f1", find only about 50 channel while 400 should
be available.

[mchehab@redhat.com: Tested with DVB-C and fixed a few whitespace issues]
Tested-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Signed-off-by: Eddi De Pieri <eddi@depieri.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-11-20 11:24:20 -02:00
Mauro Carvalho Chehab
2440f7aff4 [media] Properly implement ITU-T J.88 Annex C support
The Annex C support were broken with the previous implementation,
as, at xc5000 and tda18271c2dd, it were choosing the wrong bandwidth
for some symbol rates.

At DRX-J, it were always selecting Annex A, even having Annex C
support coded there.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-11-11 20:26:03 -02:00
Malcolm Priestley
3339a5b165 [media] it913x-fe ver 1.10 correct SNR reading from frontend
Correction of reading from frontend and represents
a SNR nonlinear scale of minimum signal to full signal.

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-11-08 11:23:03 -02:00
tvboxspy
2b3c13ecce [media] it913x-fe ver 1.09 amend adc table entries
Amend adc table entries and size.

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-11-07 13:25:41 -02:00
Malcolm Priestley
b7d425d391 [media] it913x Support it9135 Verions 2 chip
Support for version 2 type chips and other LNA versions of version 1

Scripts may be compressed slightly at a later stage.

TODO
Firmware loader
However, things are a little confusing,  it is not clear that
dvb-usb-it9137-01.fw does not work with version 2 chips
as in recent files both firmwares are the same.

Should be applied to: 8133 Support for single ITE 9135 device.

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-11-07 13:24:38 -02:00
Michael Krufky
ead32d5357 [media] s5h1411: Calculate signal strength shown as percentage from SNR up to 35dB
As done first in lgdt330x.c, calculate signal strength from SNR up to 35dB
Even though the SNR can go higher than 35dB, there is some comfort factor
in having a range of strong signals that can show at 100%

Signed-off-by: Michael Krufky <mkrufky@kernellabs.com>
Signed-off-by: Devin Heitmueller <dheitmueller@kernellabs.com>
Signed-off-by: Steven Toth <stoth@kernellabs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-11-07 13:20:17 -02:00
Michael Krufky
19661c08fe [media] s5h1409: Calculate signal strength shown as percentage from SNR up to 35dB
As done first in lgdt330x.c, calculate signal strength from SNR up to 35dB
Even though the SNR can go higher than 35dB, there is some comfort factor
in having a range of strong signals that can show at 100%

Signed-off-by: Michael Krufky <mkrufky@kernellabs.com>
Signed-off-by: Devin Heitmueller <dheitmueller@kernellabs.com>
Signed-off-by: Steven Toth <stoth@kernellabs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-11-07 13:19:51 -02:00
Michael Krufky
5279b1ff36 [media] au8522: Calculate signal strength shown as percentage from SNR up to 35dB
As done first in lgdt330x.c, calculate signal strength from SNR up to 35dB
Even though the SNR can go higher than 35dB, there is some comfort factor
in having a range of strong signals that can show at 100%

Signed-off-by: Michael Krufky <mkrufky@kernellabs.com>
Signed-off-by: Devin Heitmueller <dheitmueller@kernellabs.com>
Signed-off-by: Steven Toth <stoth@kernellabs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-11-07 13:19:13 -02:00
Linus Torvalds
32aaeffbd4 Merge branch 'modsplit-Oct31_2011' of git://git.kernel.org/pub/scm/linux/kernel/git/paulg/linux
* 'modsplit-Oct31_2011' of git://git.kernel.org/pub/scm/linux/kernel/git/paulg/linux: (230 commits)
  Revert "tracing: Include module.h in define_trace.h"
  irq: don't put module.h into irq.h for tracking irqgen modules.
  bluetooth: macroize two small inlines to avoid module.h
  ip_vs.h: fix implicit use of module_get/module_put from module.h
  nf_conntrack.h: fix up fallout from implicit moduleparam.h presence
  include: replace linux/module.h with "struct module" wherever possible
  include: convert various register fcns to macros to avoid include chaining
  crypto.h: remove unused crypto_tfm_alg_modname() inline
  uwb.h: fix implicit use of asm/page.h for PAGE_SIZE
  pm_runtime.h: explicitly requires notifier.h
  linux/dmaengine.h: fix implicit use of bitmap.h and asm/page.h
  miscdevice.h: fix up implicit use of lists and types
  stop_machine.h: fix implicit use of smp.h for smp_processor_id
  of: fix implicit use of errno.h in include/linux/of.h
  of_platform.h: delete needless include <linux/module.h>
  acpi: remove module.h include from platform/aclinux.h
  miscdevice.h: delete unnecessary inclusion of module.h
  device_cgroup.h: delete needless include <linux/module.h>
  net: sch_generic remove redundant use of <linux/module.h>
  net: inet_timewait_sock doesnt need <linux/module.h>
  ...

Fix up trivial conflicts (other header files, and  removal of the ab3550 mfd driver) in
 - drivers/media/dvb/frontends/dibx000_common.c
 - drivers/media/video/{mt9m111.c,ov6650.c}
 - drivers/mfd/ab3550-core.c
 - include/linux/dmaengine.h
2011-11-06 19:44:47 -08:00
Paul Gortmaker
7a707b8920 drivers/media: Add module.h to all files using it implicitly
A pending cleanup will mean that module.h won't be implicitly
everywhere anymore.  Make sure the modular drivers in clocksource
are actually calling out for <module.h> explicitly in advance.

Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
2011-10-31 19:31:51 -04:00
Linus Torvalds
1eb6337835 Merge branch 'v4l_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media
* 'v4l_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media: (348 commits)
  [media] pctv452e: Remove bogus code
  [media] adv7175: Make use of media bus pixel codes
  [media] media: vb2: fix incorrect return value
  [media] em28xx: implement VIDIOC_ENUM_FRAMESIZES
  [media] cx23885: Stop the risc video fifo before reconfiguring it
  [media] cx23885: Avoid incorrect error handling and reporting
  [media] cx23885: Avoid stopping the risc engine during buffer timeout
  [media] cx23885: Removed a spurious function cx23885_set_scale()
  [media] cx23885: v4l2 api compliance, set the audioset field correctly
  [media] cx23885: hook the audio selection functions into the main driver
  [media] cx23885: add generic functions for dealing with audio input selection
  [media] cx23885: fixes related to maximum number of inputs and range checking
  [media] cx23885: Initial support for the MPX-885 mini-card
  [media] cx25840: Ensure AUDIO6 and AUDIO7 trigger line-in baseband use
  [media] cx23885: Enable audio line in support from the back panel
  [media] cx23885: Allow the audio mux config to be specified on a per input basis
  [media] cx25840: Enable support for non-tuner LR1/LR2 audio inputs
  [media] cx23885: Name an internal i2c part and declare a bitfield by name
  [media] cx23885: Ensure VBI buffers timeout quickly - bugfix for vbi hangs during streaming
  [media] cx23885: remove channel dump diagnostics when a vbi buffer times out
  ...

Fix up trivial conflicts in drivers/misc/altera-stapl/altera.c (header
file rename vs add)
2011-10-31 15:42:54 -07:00
Lutz Sammer
39342dbb27 [media] stb0899: Fix slow and not locking DVB-S transponder(s)
In stb0899_status stb0899_check_data the first read of STB0899_VSTATUS
could read old (from previous search) LOOP status bit and the search
fails on a good frequency.

With the patch more transponder could be locked and locks about 2*
faster.

Signed-off-by: Lutz Sammer<johns98@gmx.net>
Reviewed-by: Manu Abraham<manu@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-10-11 18:02:57 -03:00
Malcolm Priestley
e305288547 [media] it913x-fe changes to power up and down of tuner
Currently the tuner is constantly powered causing these effects.
1. Remembering last tune channel causing corruptions of changing channel.
2. Causing corruption on other frontend.
3. Higher current in standby of demodulator with clock running.

Power sequence now follows;
Power Up
Tuner on -> Frontend suspend off -> Tuner clk on
Power Down
Frontend suspend on -> Tuner clk off -> Tuner off

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-10-08 08:03:27 -03:00
Dan Carpenter
2f4cf2c3a9 [media] dib9000: release a lock on error
This lock should be released as well on the error path.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Cc: Patrick Boettcher <Patrick.Boettcher@dibcom.fr>
Cc: Olivier Grenie <olivier.grenie@dibcom.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-09-30 13:32:56 -03:00
Paul Bolle
395cf9691d doc: fix broken references
There are numerous broken references to Documentation files (in other
Documentation files, in comments, etc.). These broken references are
caused by typo's in the references, and by renames or removals of the
Documentation files. Some broken references are simply odd.

Fix these broken references, sometimes by dropping the irrelevant text
they were part of.

Signed-off-by: Paul Bolle <pebolle@tiscali.nl>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2011-09-27 18:08:04 +02:00
Guy Martin
4a6c4a9567 [media] stv090x: set status bits when there is no lock
Currently, the stv090x driver only set the status bits to SCVYL when
there is a lock. This patch set the right bits even if there is no lock.

Signed-off-by: Guy Martin <gmsoft@tuxicoman.be>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-09-25 08:45:18 -03:00
Hans Petter Selasky
aad04c7743 [media] Increase a timeout, so that bad scheduling does not accidentially cause a timeout
--HPS

>From 18faaafc9cbbe478bb49023bbeae490149048560 Mon Sep 17 00:00:00 2001

Signed-off-by: Hans Petter Selasky <hselasky@c2i.net>
Acked-by: Manu Abraham <manu@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-09-25 08:44:10 -03:00
Igor M. Liplianin
4e2c53fde6 [media] dvb: Add support for pctv452e
Signed-off-by: Igor M. Liplianin <liplianin@me.by>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-09-24 00:07:42 -03:00
tvboxspy
7c2808e2fd [media] it913x-fe: correct tuner settings
Correct tuner settings for more accuracy. This now makes the tuner
 section more compatible with other versions of the IT913X
 series.

TODOs
Version 2 chip

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-09-23 23:08:17 -03:00
Lutz Sammer
699cc1962c [media] TT-budget S2-3200 cannot tune on HB13E DVBS2 transponder
The FEC fix patch fixed locking on 11,681 Ghz, but not on 12,692 Ghz for
me.

Reviewed-by: Manu Abraham <manu@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-09-21 17:06:56 -03:00
tvboxspy
59152b1cf1 [media] STV0288 frontend provide wider carrier search and DVB-S2 drop out. resend
The following patch provides wider carrier search.

As with existing code search starts at MSB aligned. The boundary
is widened to start at -9.  In order to save time, if no carrier is
detected at the start it advances to the next alignment until carrier
is found.

The stv0288 will detect a DVB-S2 carrier on all steps , a
time out of 11 steps is introduced to drop out of the loop.

In stv0288_set_symbol carrier and timing loops are restored to
default values (inittab) before setting the symbol rate on each tune. A
slight drift was noticed with full scan in the higher IF frequencies of
each band.

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-09-21 14:43:49 -03:00
Antti Palosaari
d102b739f3 [media] tda10071: change sleeps to more suitable ones
msleep() => usleep_range()

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-09-21 10:09:10 -03:00
Antti Palosaari
75d404ec04 [media] tda10071: do not download last byte of fw
Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-09-21 10:09:00 -03:00
Antti Palosaari
de8e420350 [media] tda10071: NXP TDA10071 DVB-S/S2 driver
NXP TDA10071 DVB-S/S2 demodulator & Conexant CX24118A tuner combo driver

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-09-21 10:01:16 -03:00
Antti Palosaari
85bc9b510a [media] a8293: Allegro A8293 SEC driver
Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-09-21 09:59:06 -03:00
Hans Verkuil
23aefb7e0e [media] drxd_hard: fix compiler warnings
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-09-06 14:45:43 -03:00
Edward Sheldrake
f8a26f052a [media] drxd: fix divide error
Fix division by zero in drxd triggered by running "femon" before any DVB
tuning has been done (by "scandvb" or anything else).

Signed-off-by: Edward Sheldrake <ejsheldrake@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-09-04 11:17:11 -03:00
Chris Rankin
0b8bd83cf3 [media] em28xx: don't sleep on disconnect
The DVB framework will try to power-down an adapter that no-one is using
any more, but this assumes that the adapter is still connected to the
machine. That's not always true for a USB adapter, so disable the sleep
operations when the adapter has been physically unplugged.

This prevents I2C write failures with error -19 from appearing
occasionally in the dmesg log.

Signed-off-by: Chris Rankin <rankincj@yahoo.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-09-03 20:50:22 -03:00
Arnaud Lacombe
3f5c14d3d3 [media] drivers/media: do not use EXTRA_CFLAGS
Usage of these flags has been deprecated for nearly 4 years by:

    commit f77bf01425
    Author: Sam Ravnborg <sam@neptun.(none)>
    Date:   Mon Oct 15 22:25:06 2007 +0200

        kbuild: introduce ccflags-y, asflags-y and ldflags-y

Moreover, these flags (at least EXTRA_CFLAGS) have been documented for command
line use. By default, gmake(1) do not override command line setting, so this is
likely to result in build failure or unexpected behavior.

Replace their usage by Kbuild's `{as,cc,ld}flags-y'.

Cc: Sam Ravnborg <sam@ravnborg.org>
Cc: Mauro Carvalho Chehab <mchehab@infradead.org>
Cc: linux-media@vger.kernel.org
Signed-off-by: Arnaud Lacombe <lacombar@gmail.com>
Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-09-03 18:50:59 -03:00
Steve Kerrison
0db4bf42ba [media] CXD2820R: Replace i2c message translation with repeater gate control
This patch implements an i2c_gate_ctrl op for the cxd2820r. Thanks to Robert
Schlabbach for identifying the register address and field to set.

The old i2c intercept code that prefixed messages with a passthrough byte has
been removed and the PCTV nanoStick T2 290e entry in em28xx-dvb has been
updated appropriately.

Tested for DVB-T2 use; I would appreciate it if somebody with DVB-C capabilities
could test it as well - from inspection I cannot see any problems.

This is patch v2. It fixes some schoolboy style errors and removes superfluous
i2c entries in cxd2820r.h.

Signed-off-by: Steve Kerrison <steve@stevekerrison.com>
Acked-by: Antti Palosaari <crope@iki.fi>
Tested-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-09-03 18:13:41 -03:00
Dan Carpenter
2f098cb1c8 [media] dib9000: return error code on failure
The ret = -EIO needs to be before the goto.

Signed-off-by: Dan Carpenter <error27@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-09-03 13:08:20 -03:00
Dan Carpenter
0c61cc3ba4 [media] dib7000p: return error code on allocation failure
The goto needs to be moved after the assignment.

Signed-off-by: Dan Carpenter <error27@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-09-03 13:03:52 -03:00
Mauro Carvalho Chehab
8513e14457 [media] dvb-core, tda18271c2dd: define get_if_frequency() callback
Tuners in general convert a high frequency carrier into an Intermediate
Frequency (IF).

Digital tuners like tda18271, xc3028, etc. generally allow changing the IF
frequency, although they generally have recommented settings for the IF.
Analog tuners, have a fixed IF frequency, that depends on the physical
characteristics of some analog components.

For digital tuners, it makes sense to have ways to configure IF,
via the tuner's configuration structure, like what's done inside the
tda18271-fe maps.

The demods need to know what IF is used by the tuner, as it will need
to convert internally from IF into baseband. Currently, the bridge driver
needs to fill a per-demod configuration struct for it, or pass it via
a dvb_attach parameter.

The tda18271 datasheet recommends to use different IF's for different
delivery system types and for different bandwidths.

The DRX-K demod also needs to know the IF frequency in order to work,
just like all other demods. However, as it accepts different delivery
systems (DVB-C and DVB-T), the IF may change if the standard and/or
bandwidth is changed.

So, the usual procedure of passing it via a config struct doesn't work.

One might try to code it as two separate IF frequencies, or even as a
table in function of the delivery system and the bandwidth, but this
will be messy.

So, it is better and simpler to just add a new callback for it and
require the tuners that can be used with MFE frontends like drx-k
to implement a new callback to return the used IF.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Acked-by: Antti Palosaari <crope@iki.fi>
2011-09-03 12:46:33 -03:00
Jose Alberto Reguero
c9f88aa976 [media] ttusb2: add support for the dvb-t part of CT-3650 v3
Signed-off-by: Jose Alberto Reguero <jareguero@telefonica.net>
Reviewed-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-08-27 11:44:49 -03:00
Malcolm Priestley
3dbbf82f49 [media] it913x_fe: frontend and tuner driver v1.05
Fronted and Tuner Driver for ITE IT913x Series with inital support for
IT9137 integrated demodulator and tuner device.

The driver is loosely based on AF9035 series. However, support is not intended for
this device specificity.

The IT9137 tuner has been tested on UHF bands, but VHF has only been simulated.

Possible TODO the tuner sections may be separated from the main driver. All future devices
should use the it913x_fe_script_loader for other tuner devices.

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
[mchehab@redhat.com: Fix an issue at the Kconfig help]
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-08-27 10:29:20 -03:00
Patrick Boettcher
79fcce3230 [media] DiBcom: protect the I2C bufer access
This patch protects the I2C buffer access in order to manage concurrent
access. This protection is done using mutex.
Furthermore, for the dib9000, if a pid filtering command is
received during the tuning, this pid filtering command is delayed to
avoid any concurrent access issue.

Cc: Mauro Carvalho Chehab <mchehab@redhat.com>
Cc: Florian Mickler <florian@mickler.org>
Cc: stable@kernel.org
Signed-off-by: Olivier Grenie <olivier.grenie@dibcom.fr>
Signed-off-by: Patrick Boettcher <Patrick.Boettcher@dibcom.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-08-06 09:25:15 -03:00
Mauro Carvalho Chehab
cf845297d5 [media] tda18271c2dd: Fix saw filter configuration for DVB-C @6MHz
Currently, the driver assumes that all QAM carriers are spaced with
8MHz. This is wrong, and may decrease QoS on Countries like Brazil,
that have DVB-C carriers with 6MHz-spaced.

Fortunately, both ITU-T J-83 and EN 300 429 specifies a way to
associate the symbol rate with the bandwidth needed for it.

For ITU-T J-83 2007 annex A, the maximum symbol rate for 6 MHz is:
	6 MHz / 1.15 = 5217391 Bauds
For  ITU-T J-83 2007 annex C, the maximum symbol rate for 6 MHz is:
	6 MHz / 1.13 = 5309735 Bauds.

As this tuner is currently used only for DRX-K, and it is currently
hard-coded to annex A, I've opted to use the roll-off factor of 0.15,
instead of 0.13.

If we ever support annex C, the better would be to add a DVB S2API
call to allow changing between Annex A and C, and add the 0.13 roll-off
factor to it.

This code is currently being used on other frontends, so I think we
should later add a core function with this code, to warrant that
it will be properly implemented everywhere.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-07-28 17:09:46 -03:00
Devin Heitmueller
d749fb663e [media] au8522: set signal field to 100% when signal present
The signal state field in G_TUNER is typically scaled from 0-100%.  Since we
don't know the signal level, we really would prefer the field to contain 100%
than 1/256, which in many utilities (such as v4l2-ctl) rounds to 0% even when
a signal is actually present.

This patch makes the behavior consistent with other drivers.

Signed-off-by: Devin Heitmueller <dheitmueller@kernellabs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-07-27 17:56:05 -03:00
Mauro Carvalho Chehab
119faf90ed [media] drxk: Fix the logic that selects between DVB-C annex A and C
Fix the DRX-K logic that selects between DVB-C annex A and C

Fix a typo where DVB-C annex type is set via setEnvParameters, but
the driver, uses, instead, setParamParameters[2].

While here, cleans up the code, fixing a bad identation at the fallback
code for other types of firmware, and put the multiple-line comments
into the Linux CodingStyle.

Acked-by: Oliver Endriss <o.endriss@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-07-27 17:56:04 -03:00
Mauro Carvalho Chehab
f07a0bc111 [media] drxk: Fix read debug message
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-07-27 17:56:03 -03:00
Mauro Carvalho Chehab
e716adacef [media] drxk: Fix error return code during drxk init
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-07-27 17:56:03 -03:00
Mauro Carvalho Chehab
ab12f41f62 [media] drxk: Remove goto/break after return
After return, we don't need any other statement to change the
function flux ;)

Reported-by: Oliver Endriss <o.endriss@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-07-27 17:56:03 -03:00
Mauro Carvalho Chehab
320ed23ebf [media] drxk: Fix a bug at some switches that broke DVB-T
The error propagation changeset c23bf4402 broke the DVB-T
code.

The legacy way for propagate errors was:

do {
	status = foo_func()
	if (status < 0)
		break;
} while (0);
return status;

However, on a few places, it was doing:
do {
	switch(foo) {
	case bar:
		status = foo_func()
		if (status < 0)
			break;
		break;
	}
	switch(foo2) {
	case bar:
		status = foo_func()
		if (status < 0)
			break;
		break;
	}
	...
} while (0);
return (status)

The inner error break were not working, as it were breaking only
the switch, instead of the do. The solution used were to do a
s/break/goto error/ at the inner breaks, but preserving the last
break. Onfortunately, on a few switches, the replacement were
applied also to the final break for the case statements.

Fix the broken logic, by reverting them to break, where pertinent,
in order to fix DVB-T support.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-07-27 17:56:03 -03:00
Mauro Carvalho Chehab
c4c3a3d32a [media] Remove the double symbol increment hack from drxk_hard
Both ngene and ddbrige calls dvb_attach once for drxk_attach.
The logic used there, and by tda18271c2dd driver is different
from similar logic on other frontends.

The right fix is to change them to use the same logic, but,
while we don't do that, we need to patch em28xx-dvb in order
to do cope with ngene/ddbridge magic.

While here, document why drxk_t_release should do nothing.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-07-27 17:56:03 -03:00
Jesper Juhl
8afe9119e2 [media] media, Micronas dvb-t: Fix mem leaks, don't needlessly zero mem, fix spelling
In drivers/media/dvb/frontends/drxd_hard.c::load_firmware() I see 3
small issues:

 1) When the 'fw' variable goes out of scope we'll leak the memory
 allocated to it by request_firmware() by neglecting to call
 release_firmware().

 2) After a successful request_firmware() we allocate fw->size bytes
 of memory using kzalloc() only to immediately overwrite all that
 memory with memcpy(), so asking for zeroed memory seems like wasted
 effort - just use kmalloc().

 3) In one of the error messages "no memory" lacks a space and is
 written as "nomemory".

This patch fixes all 3 issues.

Signed-off-by: Jesper Juhl <jj@chaosbits.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-07-27 17:55:56 -03:00
Mauro Carvalho Chehab
01434faf6d tda18271c2dd: Fix compilation when module is not selected
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-07-27 17:55:53 -03:00
Mauro Carvalho Chehab
ea4d03d138 [media] tda18271c2dd.h: Don't add the same symbol twice
Should be folded with the next patch when sending upstream

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-07-27 17:55:52 -03:00
Mauro Carvalho Chehab
fd0b0814a4 [media] dvb: don't cause missing symbols for drxk/tda18271c2dd
If those demods are unselected, but a bridge driver requires them,
produce a runtime message, instead of missing symbols.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-07-27 17:55:52 -03:00
Mauro Carvalho Chehab
f165f60d42 [media] drxk: remove a now unused variable
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-07-27 17:55:51 -03:00
Mauro Carvalho Chehab
5eee2bb270 [media] drxk: Add a fallback method for QAM parameter setting
The QAM standard is set using this scu_command:
	SCU_RAM_COMMAND_STANDARD_QAM |
	SCU_RAM_COMMAND_CMD_DEMOD_SET_PARAM

The driver implements a version that has 4 parameters, however,
Terratec H5 needs to break this into two separate commands, otherwise,
DVB-C doesn't work.

With this fix, scan is now properly working and getting the
channel list:
>>> tune to: 609000000:INVERSION_AUTO:5217000:FEC_3_4:QAM_256
>>> tuning status == 0x00
>>> tuning status == 0x07
>>> tuning status == 0x1f

0x0093 0x0026: pmt_pid 0x0758 (null) -- SporTV2 (running, scrambled)
0x0093 0x0027: pmt_pid 0x0748 (null) -- SporTV (running, scrambled)
0x0093 0x0036: pmt_pid 0x0768 (null) -- FX (running, scrambled)
0x0093 0x0052: pmt_pid 0x0788 (null) -- The History Channel (running, scrambled)

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-07-27 17:55:51 -03:00
Mauro Carvalho Chehab
7558977a4a [media] drxk: Improve the scu_command error message
Now, it outputs:

[10927.639641] drxk: SCU_RESULT_INVPAR while sending cmd 0x0203 with params:
[10927.646283] drxk: 02 00 00 00 10 00 07 00 03 02                    ..........

Better than ERROR -3. This happens with Terratec H5 firmware.

It adds 2 new error conditions, and something useful to track
what the heck is that.

I suspect that the scu_command is dependent on the firmware
revision.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-07-27 17:55:51 -03:00
Mauro Carvalho Chehab
f1b829704c [media] drxk: Simplify the DVB-C set mode logic
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-07-27 17:55:50 -03:00
Mauro Carvalho Chehab
cf694b141e [media] drxk: Fix driver removal
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-07-27 17:55:50 -03:00
Mauro Carvalho Chehab
90796acad0 [media] drxk: Improves the UIO handling
The driver is too limited: it assumes that UIO is used only for
controlling the antenna, and that only UIO-1 is in usage. However,
from Terratec H7 driver [1], 3 UIO's can be used. In fact, it seems
that H7 needs to use all 3. So, make the code generic enough to handle
the most complex scenario. For now, only antena GPIO can be specified,
but is is easier now to add the other GPIO/UIO needs.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-07-27 17:55:50 -03:00
Mauro Carvalho Chehab
9c6e182800 [media] drxk: Print detected configuration
DRX-K configuration is interesting when writing/testing
new devices. Add an info line showing the discovered info.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-07-27 17:55:50 -03:00
Mauro Carvalho Chehab
147e110bb6 [media] drxk: Fix the antenna switch logic
Terratec H5 doesn't require to switch mode, but generates
an error due to this logic. Also, GPIO's are board-dependent.

So, add it at the board config struct.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-07-27 17:55:50 -03:00
Mauro Carvalho Chehab
d6a0540577 [media] drxk: change mode before calling the set mode routines
The set mode routines assume that state were changed to the
new mode, otherwise, they'll fail.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-07-27 17:55:50 -03:00
Mauro Carvalho Chehab
be44eb283b [media] drxk: Proper handle/propagate the error codes
This driver is very big and complex. An error happening in the middle
of any initialization may cause the frontend to not work. So, it
needs to properly propagate error codes internally and to userspace.

Also, printing the error codes at the places it happened helps to
discover were's a bug at the code.

Before this change, a do { } while (0) loop and lots of breaks inside
were used to propagate errors. While this works, if there are
loops inside other loops, it could be easy to forget to add another
break, causing the error to not abort the function.

Also, as not all functions were reporting errors, it is hard to
discover why something failed.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-07-27 17:55:49 -03:00
Mauro Carvalho Chehab
f1fe1b75d6 [media] drxk: Allow to disable I2C Bridge control switch
On em28xx, tda18271C2 is accessible when the i2c port
is not touched. Touching on it breaks the driver.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-07-27 17:55:49 -03:00
Mauro Carvalho Chehab
e4f4f8758b [media] drxk: Add a parameter for the microcode name
The microcode firmware provided on Terratec H5 seems to be
different. Add a parameter to allow specifying a different
firmware per-device.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-07-27 17:55:49 -03:00
Mauro Carvalho Chehab
39624f7ee8 [media] drxk: Print an error if firmware is not loaded
If something bad happens during firmware load, an error
should be printed at dmesg.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-07-27 17:55:49 -03:00
Mauro Carvalho Chehab
bcd2ebb760 [media] drxk: Avoid OOPSes if firmware is corrupted
Don't read paste the buffer, if the firmware is corrupted.
Instead, print an error message.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-07-27 17:55:48 -03:00
Mauro Carvalho Chehab
e076c92ed6 [media] drxk: Convert an #ifdef logic as a new config parameter
Instead of using #ifdef I2C_LONG_ADR for some devices, convert
it into a parameter. Terratec H5 logs from the original driver
seems to need this mode.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-07-27 17:55:48 -03:00
Mauro Carvalho Chehab
0fc55e81d3 [media] drxk: Move I2C address into a config structure
Currently, the only parameter to be configured is the I2C
address. However, Terratec H5 logs shows that it needs a different
setting for some things, and it has its own firmware.

So, move the addr into a config structure, in order to allow adding
the required configuration bits.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-07-27 17:55:48 -03:00
Mauro Carvalho Chehab
5e66b87840 [media] drxk: remove _0 from read/write routines
The normal 16-bits read routine is called as "Read16_0". This is
due to a flags that could optionally be passed. Yet, on no places
at the code, a flag is passed there.

The same happens with 16-bits write and 32-read/write routines,
and with WriteBlock.

Also, using flags, is an exception: there's no place currently using
flags, except for an #ifdef at WriteBlock.

Rename the function as just "read16", and the one that requires flags,
as "read16_flags".

This helps to see where the flags are used, and also avoid using
CamelCase on Kernel.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-07-27 17:55:48 -03:00
Mauro Carvalho Chehab
2da6750117 [media] drxk: Add debug printk's
This is a complex driver. Adding support for other devices with drxk
requires to be able to debug it and see where it is failing. So, add
optional printk messages to allow debugging it.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-07-27 17:55:48 -03:00
Mauro Carvalho Chehab
f3d40bd099 [media] tda18271c2dd: add tda18271c2dd prefix to the errors
It is hard to identify the origin for those errors without a
prefix to indicate which driver produced them:

[ 1390.220984] i2c_write error
[ 1390.224133] I2C Write error
[ 1391.284202] i2c_read error
[ 1392.288685] i2c_read error

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-07-27 17:55:48 -03:00
Mauro Carvalho Chehab
e0e6ecaf3b [media] drxk: add drxk prefix to the errors
It is hard to identify the origin for those errors without a
prefix to indicate which driver produced them:

[ 1390.220984] i2c_write error
[ 1390.224133] I2C Write error
[ 1391.284202] i2c_read error
[ 1392.288685] i2c_read error

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-07-27 17:55:47 -03:00
Mauro Carvalho Chehab
1bd09ddcff [media] drxk: fix warning: ‘status’ may be used uninitialized in this function
One of the problems of the old CHECK_ERROR is that it was hiding
the status parameter. Maybe due to that, on a few places, the return
code might lead to return incorrect status:

drivers/media/dvb/frontends/drxk_hard.c: In function ‘load_microcode.clone.0’:
drivers/media/dvb/frontends/drxk_hard.c:1281: warning: ‘status’ may be used uninitialized in this function
drivers/media/dvb/frontends/drxk_hard.c:1281: note: ‘status’ was declared here
drivers/media/dvb/frontends/drxk_hard.c: In function ‘GetLockStatus’:
drivers/media/dvb/frontends/drxk_hard.c:1792: warning: ‘status’ may be used uninitialized in this function
drivers/media/dvb/frontends/drxk_hard.c: In function ‘Start.clone.7’:
drivers/media/dvb/frontends/drxk_hard.c:1734: warning: ‘status’ may be used uninitialized in this function

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-07-27 17:55:45 -03:00
Mauro Carvalho Chehab
e16cede5a8 [media] drxk: Return -EINVAL if an invalid bandwidth is used
drivers/media/dvb/frontends/drxk_hard.c: In function ‘SetDVBT’:
drivers/media/dvb/frontends/drxk_hard.c:3766: warning: enumeration value ‘BANDWIDTH_5_MHZ’ not handled in switch
drivers/media/dvb/frontends/drxk_hard.c:3766: warning: enumeration value ‘BANDWIDTH_10_MHZ’ not handled in switch
drivers/media/dvb/frontends/drxk_hard.c:3766: warning: enumeration value ‘BANDWIDTH_1_712_MHZ’ not handled in switch

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-07-27 17:55:45 -03:00
Mauro Carvalho Chehab
469ffe0836 [media] tda18271c2dd: Remove the CHK_ERROR macro
The CHK_ERROR macro does a flow control, violating chapter 12
of the Documentation/CodingStyle. Doing flow controls inside
macros is a bad idea, as it hides what's happening. It also
hides the var "status" with is also a bad idea.

The changes were done by this small perl script:
	my $blk=0;
	while (<>) {
		s/^\s+// if ($blk);
		$f =~ s/\s+$// if ($blk && /^\(/);
		$blk = 1 if (!m/\#/ && m/CHK_ERROR/);
		$blk=0 if ($blk && m/\;/);
		s/\n/ / if ($blk);
		$f.=$_;
	};
	$f=~ s,\n(\t+)CHK_ERROR\((.*)\)\;([^\n]*),\n\1status = \2;\3\n\1if (status < 0)\n\1\tbreak;,g;

	print $f;

And manually fixed.
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-07-27 17:55:44 -03:00
Mauro Carvalho Chehab
ea90f011fd [media] drxk: Remove the CHK_ERROR macro
The CHK_ERROR macro does a flow control, violating chapter 12
of the Documentation/CodingStyle. Doing flow controls inside
macros is a bad idea, as it hides what's happening. It also
hides the var "status" with is also a bad idea.

The changes were done by this small perl script:
	my $blk=0;
	while (<>) {
		s /^\s+// if ($blk);
		$f =~ s/\s+$// if ($blk && /^\(/);
		$blk = 1 if (!m/\#/ && m/CHK_ERROR/);
		$blk=0 if ($blk && m/\;/);
		s/\n/ / if ($blk);
		$f.=$_;
	};
	$f=~ s,\n(\t+)CHK_ERROR\((.*)\)\;([^\n]*),\n\1status = \2;\3\n\1if (status < 0)\n\1\tbreak;,g;
	print $f;

And manually fixed.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-07-27 17:55:44 -03:00
Mauro Carvalho Chehab
b01fbc10e3 [media] drxd/drxk: Don't export MulDiv32 symbol
/home/v4l/v4l/patchwork/drivers/media/dvb/frontends/drxk_hard.c:181: multiple definition of `MulDiv32'
drivers/media/dvb/frontends/drxd.o:/home/v4l/v4l/patchwork/drivers/media/dvb/frontends/drxd_hard.c:236: first defined here

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-07-27 17:55:44 -03:00
Oliver Endriss
f678c3b69a [media] DRX-K, TDA18271c2: Add build support
Add both drivers to Makefile and Kconfig.

Signed-off-by: Oliver Endriss <o.endriss@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-07-27 17:55:41 -03:00
Oliver Endriss
ebc7de220b [media] DRX-K: Tons of coding-style fixes
Tons of coding-style fixes

Signed-off-by: Oliver Endriss <o.endriss@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-07-27 17:55:41 -03:00
Oliver Endriss
874f6518e7 [media] DRX-K: Shrink size of drxk_map.h
Deleted all unused symbold from drxk_map.h,
which reduced the size from 1.1M to 37K!

Signed-off-by: Oliver Endriss <o.endriss@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-07-27 17:55:41 -03:00
Ralph Metzler
43dd07f758 [media] DRX-K: Initial check-in
Driver for the DRX-K DVB-C/T demodulator.

Signed-off-by: Ralph Metzler <rjkm@metzlerbros.de>
Signed-off-by: Oliver Endriss <o.endriss@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-07-27 17:55:41 -03:00
Oliver Endriss
0fe4462930 [media] tda18271c2dd: Lots of coding-style fixes
Signed-off-by: Oliver Endriss <o.endriss@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-07-27 17:55:40 -03:00
Ralph Metzler
e8783950f8 [media] tda18271c2dd: Initial check-in
Driver for the NXP TDA18271c2 silicon tuner.

Signed-off-by: Ralph Metzler <rjkm@metzlerbros.de>
Signed-off-by: Oliver Endriss <o.endriss@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-07-27 17:55:40 -03:00
Mauro Carvalho Chehab
7464aa50c6 [media] nxt6000: i2c bus error should return -EIO
data from/to userspace. Don't mix it with I2C bus error (-EIO).

Acked-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-07-27 17:53:37 -03:00
Mauro Carvalho Chehab
d35ebf9558 [media] drxd, siano: Remove unused include linux/version.h
Both drxd and siano drivers were including linux/version.h without
any reason. Probably, this is due to some compatibility code that
used to exist before having their support added into the Linux
Kernel.

Acked-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-07-27 17:53:12 -03:00
Greg Dietsche
3735edf9fd [media] dvb: remove unnecessary code
remove unnecessary code that matches this coccinelle pattern
	if (...)
		return ret;
	return ret;

Signed-off-by: Greg Dietsche <Gregory.Dietsche@cuw.edu>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-07-27 17:53:09 -03:00
Justin P. Mattock
c3f305aab4 [media] frontends/s5h1420: Change: clock_settting to clock_setting
Changes clock_settting to clock_setting.

Note: This could be intentionally set this way from the beginning and/or
is a typo.

Signed-off-by: Justin P. Mattock <justinmattock@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-07-27 17:53:05 -03:00
Devin Heitmueller
85ec9d7193 [media] dib7000p: setup dev.parent for i2c master built into 7000p
We need to set the dev.parent member on the dib7000p on its i2c master, or
else calls to request_firmware() will hit an oops in 2.6.31.

Signed-off-by: Devin Heitmueller <dheitmueller@kernellabs.com>
Cc: Patrick Boettcher <pboettcher@kernellabs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-07-27 17:52:28 -03:00
Hans Petter Selasky
d294093010 [media] cx24113: Don't reuse core macro names
The info and err macros are already defined by the USB stack. Rename
these macros to avoid macro redefinition warnings.

Signed-off-by: Hans Petter Selasky <hselasky@c2i.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-07-27 17:52:22 -03:00
Hans Petter Selasky
a5bef1d252 [media] itd1000: Don't reuse core macro names
The dbg, warn and info macros are already defined by the USB stack.
Rename these macros to avoid macro redefinition warnings.

Refactor lineshift in printouts.

Signed-off-by: Hans Petter Selasky <hselasky@c2i.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-07-27 17:52:21 -03:00
Antti Palosaari
050bf0faa8 [media] cxd2820r: correct missing error checks
Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-07-27 17:52:17 -03:00
Antti Palosaari
1d44ccb9ea [media] cxd2820r: fix bitfields
error: dubious one-bit signed bitfield

Reported-by: Dan Carpenter <error27@gmail.com>
Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-07-27 17:52:10 -03:00
Antti Palosaari
d838f4c318 [media] cxd2820r: malloc buffers instead of stack
kmalloc I2C buffers

Signed-off-by: Antti Palosaari <crope@iki.fi>
Cc: Dan Carpenter <error27@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-07-27 17:52:09 -03:00
Hans Petter Selasky
96c68795dc [media] Inlined functions should be static
Signed-off-by: Hans Petter Selasky <hselasky@c2i.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-05-25 21:42:26 -03:00
Hans Petter Selasky
2edcdfae98 [media] Remove invalid parameter description
Signed-off-by: Hans Petter Selasky <hselasky@c2i.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-05-25 21:42:23 -03:00
Steve Kerrison
7285d4cc2c [media] cxd2820r: Update frontend capabilities to advertise QAM-256
This is supported in DVB-T2 mode, so added to the T/T2 frontend.

Signed-off-by: Steve Kerrison <steve@stevekerrison.com>
Acked-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-05-20 19:50:19 -03:00
Andreas Oberritter
63952e8c4a [media] DVB: drxd_hard: handle new bandwidths by returning -EINVAL
drivers/media/dvb/frontends/drxd_hard.c: In function ‘DRX_Start’:
drivers/media/dvb/frontends/drxd_hard.c:2327: warning: enumeration value ‘BANDWIDTH_5_MHZ’ not handled in switch
drivers/media/dvb/frontends/drxd_hard.c:2327: warning: enumeration value ‘BANDWIDTH_10_MHZ’ not handled in switch
drivers/media/dvb/frontends/drxd_hard.c:2327: warning: enumeration value ‘BANDWIDTH_1_712_MHZ’ not handled in switch

[mchehab@redhat.com: removed the status = status assignment after the switch]
Signed-off-by: Andreas Oberritter <obi@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-05-20 19:04:49 -03:00
Andreas Oberritter
94d56ffa0a [media] DVB: Add basic API support for DVB-T2 and bump minor version
[steve@stevekerrison.com: Remove private definitions from cxd2820r that existed before API was defined]
Signed-off-by: Andreas Oberritter <obi@linuxtv.org>
Signed-off-by: Steve Kerrison <steve@stevekerrison.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-05-20 18:51:09 -03:00
Olivier Grenie
5a0deeed57 [media] DiBxxxx: get rid of DMA buffer on stack
This patch removes the remaining on-stack buffer for USB DMA transfer.
This patch also reduces the stack memory usage.

Cc: stable@kernel.org
Cc: Florian Mickler <florian@mickler.org>
Signed-off-by: Olivier Grenie <olivier.grenie@dibcom.fr>
Signed-off-by: Patrick Boettcher <patrick.boettcher@dibcom.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-05-20 09:30:52 -03:00
Antti Palosaari
e47b78f036 [media] cxd2820r: switch automatically between DVB-T and DVB-T2
Remove old DVB-T2 freq module param and detect DVB-T/T2 automatically.

Implementation is trial and error, if DVB-T does not lock try DVB-T2
and vice versa. That's done by replacing normal DVBFE_ALGO_SW with
DVBFE_ALGO_CUSTOM which gives better control for tuning process.

DVB-C still uses normal software ZigZag, DVBFE_ALGO_SW.

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-05-20 09:30:19 -03:00
Antti Palosaari
2e1ea06e9c [media] cxd2820r: whitespace fix
Make checkpatch.pl happy by fixing whitespaces introduced by
commit 79e8b8e3b8cbf67130247a3f6d25732373fe2f34

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-05-20 09:30:17 -03:00
Steve Kerrison
9ac51c5e53 [media] cxd2820r: make C, T, T2 and core components as linked objects
Signed-off-by: Steve Kerrison <steve@stevekerrison.com>
Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-05-20 09:30:13 -03:00
Antti Palosaari
27cfc85e3d [media] Sony CXD2820R DVB-T/T2/C demodulator driver
It is very first DVB-T2 Linux driver!

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-05-20 09:30:10 -03:00
Antti Palosaari
e0bae9b33a [media] cx24116: make FW DL split more readable
Change firmware download split, which I introduced few patch earlier,
a little bit to make it more readable as requested [1].

Anyhow, for some reason this seems to increase compiled binary size
52 bytes, on my AMD64 box, which is rather much for so small change.

[1] http://www.spinics.net/lists/linux-media/msg31968.html

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-05-20 09:30:04 -03:00
Antti Palosaari
107d7b181d [media] cx24116: add config option to split firmware download
It is very rare I2C adapter hardware which can provide 32kB I2C write
as one write. Add .i2c_wr_max option to set desired max packet size.
Split transaction to smaller pieces according to that option.

Signed-off-by: Antti Palosaari <crope@iki.fi>
Cc: Steven Toth <stoth@hauppauge.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-05-20 09:30:00 -03:00
Malcolm Priestley
9d8e1b5490 [media] STV0299 Register 02 on Opera1/Bsru6/z0194a/mantis_vp1033
Bits 4 and 5 on register 02 should always be set to 1.

Opera1/Bsru6/z0194a/mantis_vp1033

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Acked-by: Oliver Endriss <o.endriss@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-05-20 09:29:48 -03:00
Malcolm Priestley
24fb06049a [media] STV0299 incorrect standby setting issues register 02 (MCR)
Issues with Register 02 causing spurious channel locking from standby.
Should have always bits 4 & 5 written to 1.
Lower nibble not used in any current driver. Usage if necessary can be
applied through initab to mcr_reg. stv0299 not out of standby before
writing inittab.

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Acked-by: Oliver Endriss <o.endriss@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-05-20 09:29:46 -03:00
Malcolm Priestley
853e3b2930 [media] IX2505V Keep I2C gate control alive
Gate could close after first I2C message. On stv0288 it does.
 Keep 2nd and 3rd message I2C gate control alive.
 Remove unnecessary gate closing in this module.

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-05-20 09:29:25 -03:00
Jesper Juhl
451a51b218 [media] DVB, DiB9000: Fix leak in dib9000_attach()
If the second memory allocation in dib9000_attach() fails, we'll leak the
memory allocated by the first.

Signed-off-by: Jesper Juhl <jj@chaosbits.net>
Cc: Patrick Boettcher <patrick.boettcher@dibcom.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-05-20 09:28:45 -03:00
Malcolm Priestley
bb19a42105 [media] STV0288 Register 42 - Incorrect settings
Register 42 bits 2,3,6 and 7 should be set to 0.
 This gives difficult locking on some channels and may be compensated
 for by other methods.

This affects any driver using the stv0288 frontend on the default
or earda inittab.

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-05-20 09:28:35 -03:00
Oliver Endriss
574312d8ce [media] budget-ci: Add support for TT S-1500 with BSBE1-D01A tuner
Add support for TT S-1500 with BSBE1-D01A tuner.

Signed-off-by: Oliver Endriss <o.endriss@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-05-20 09:28:30 -03:00
Hans Petter Selasky
53f1fe9465 [media] cx24116.c - fix for wrong parameter description
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-05-20 09:28:29 -03:00
Mauro Carvalho Chehab
834751d436 [media] drxd: use mutex instead of semaphore
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-05-20 09:26:53 -03:00
Mauro Carvalho Chehab
b15ca33414 [media] Remove the now obsolete drx397xD
This was replaced by Micronas drxd driver

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-05-20 09:26:43 -03:00