Commit graph

3411 commits

Author SHA1 Message Date
Mauro Carvalho Chehab
6225f18b88 [media] Don't test for ops->info.type inside drivers
Now, ops->info.type is handled inside the dvb_frontend
core, only for DVBv3 calls, and according with the
delivery system. So, drivers should not care or use it,
otherwise, it may have issues with DVBv5 calls.

The drivers that were still using it were detected via
this small temporary hack:

--- a/include/linux/dvb/frontend.h
+++ b/include/linux/dvb/frontend.h
@@ -29,13 +29,16 @@
 #include <linux/types.h>

 typedef enum fe_type {
+#if defined(__DVB_CORE__) || !defined (__KERNEL__)
        FE_QPSK,
        FE_QAM,
        FE_OFDM,
        FE_ATSC
+#else
+FE_FOOO
+#endif
 } fe_type_t;

-
 typedef enum fe_caps {
        FE_IS_STUPID                    = 0,
        FE_CAN_INVERSION_AUTO           = 0x1,

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-01-04 23:10:19 -02:00
Mauro Carvalho Chehab
534e048103 [media] drxk: Add support for parallel mode and prints mpeg mode
While the driver has support for both serial and parallel mode,
There's was way to select serial mode via configuration. Add
a config option for that, while keeping the default in serial mode.

Also, at debug mode, it will now print a message when mpeg is
enabled/disabled, and showing if parallel or serial mode were
selected, helping developers to double-check if the DRX-K is at
the right mode.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-01-04 22:49:10 -02:00
Mauro Carvalho Chehab
0d3e6fe7cb [media] drxk: Improve a few debug messages
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-01-04 22:49:08 -02:00
Mauro Carvalho Chehab
7581e61d8d [media] dvb: Remove ops->info.type from frontends
Now that this field is deprecated, and core generates it for
DVBv3 calls, remove it from the drivers.

It also adds .delsys on the few drivers where this were missed.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-01-04 17:30:34 -02:00
Mauro Carvalho Chehab
e399ce77e6 [media] dvb: get rid of fepriv->parameters_in
This var were used during DVBv3 times, in order to keep a copy
of the parameters used by the events. This is not needed anymore,
as the parameters are now dynamically generated from the DVBv5
structure.

So, just get rid of it. That means that a DVBv5 pure call won't
use anymore any DVBv3 parameters.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-01-04 17:30:02 -02:00
Mauro Carvalho Chehab
a520ca97a5 [media] dvb-core: Fix ISDB-T defaults
using -1 for ISDB-T parameters do the wrong thing. Fix it.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-01-04 17:29:55 -02:00
Mauro Carvalho Chehab
04be0f76a8 [media] dvb_frontend: Fix DVBv3 emulation
For frontends with ISDB-T, DVB-T2, CMDBTH, etc, some code is
needed, in order to provide emulation. Add such code, and check
if the desired delivery system is supported by the frontend.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-01-04 17:29:50 -02:00
Mauro Carvalho Chehab
5bfaaddef8 [media] dvb_frontend: Don't use ops->info.type anymore
Get rid of using ops->info.type defined on DVB drivers,
as it doesn't apply anymore.

Currently, one driver (cxd2820) supports more than one different
info.type, as it can be used for DVB-T/T2 and DVB-C. There are more
drivers like that to come. So, the same frontend will have

different DVBv3 types, depending on the current delivery system.

This breaks the existing logic at dvb_frontend, that assumes that
just one delivery system DVBv3 type is supported by all delsys.

In order to easy the DVBv3->DVBv5 conversion, an ancillary function
that maps DVBv3 delivery systems into DVBv5 were added.

Also, on all places, except for the event logic, the DVBv5 cache
will be used to check parameters, instead of the DVBv5 copy.

This patch simplifies the cache sync logic, and warrants that the
cache will be in a clear state at DVB frontend register. This way,
ops->info.type will be filled to reflect the first delivery system,
providing backward compatibility support for it.

For example, in the cases like cxd2820, where the delivery systems
are defined as:
        .delsys = { SYS_DVBT, SYS_DVBT2, SYS_DVBC_ANNEX_A },

A pure DVBv3 will be able to use both DVB-T and DVB-T2, as, at
DVB cache clear, the ops->info.type will be equal to FE_OFDM.

However, DVB-C won't be visible. A quick workaround would be to
do a DVBv5 call to set the delivery system to SYS_DVBC_ANNEX_A.

After such call, ops->info.type will be equal to FE_QAM, and a
DVBv3 application will see the frontend as a DVB-C one.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-01-04 17:29:36 -02:00
Mauro Carvalho Chehab
9682cea27e [media] dvb: move dvb_set_frontend logic into a separate routine
This change is there in order to prepare the code to avoid calling
 dvb_frontend_ioctl_legacy() from FE_SET_PROPERTY.

A call to dvb_frontend_ioctl_legacy() would require to update the
DVBv3 cache without need, mangling calls for newer delivery system
without any reason.

No functional changes here.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-01-04 17:29:17 -02:00
Mauro Carvalho Chehab
9a27e6a0b7 [media] dvb_frontend: Handle all possible DVBv3 values for bandwidth
Due to DVB-T2, several new possible values for bandwidth were added.
As the DVBv3 struct were updated to handle them, the core needs to
handle all of them, as a DVBv3 application might try to use it.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-01-04 17:29:01 -02:00
Mauro Carvalho Chehab
26c924febc [media] dvb: Initialize all cache values
By default, initialize the frontend current delivery system with
the first one. This warrants that a DVBv3 application will be able
to tune to it, after the removal of ops->init.type filling at
the drivers.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-01-04 17:28:45 -02:00
Mauro Carvalho Chehab
1e73fa5d56 [media] stb6100: Properly retrieve symbol rate
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-12-31 17:26:23 -02:00
Mauro Carvalho Chehab
a95c471eb7 stv0297: Fix delivery system
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-12-31 11:34:14 -02:00
Mauro Carvalho Chehab
533b673b19 [media] dvb: Add ops.delsys to the remaining frontends
A few drivers don't have .delsys. Add it, in order to allow
future patches for dvb_frontend.c to not use info.type.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-12-31 10:38:23 -02:00
Mauro Carvalho Chehab
7c61d80a9b [media] dvb: don't require a parameter for get_frontend
Just like set_frontend, use the dvb cache properties for get_frontend.
This is more consistent, as both functions are now symetric. Also,
at the places get_frontend is called, it makes sense to update the
cache.

Most of this patch were generated by this small perl script:

	while (<>) { $file .= $_; }
	if ($file =~ m/\.get_frontend\s*=\s*([\d\w_]+)/) {
		my $get = $1;
		$file =~ s/($get)(\s*\([^\,\)]+)\,\s*struct\s+dtv_frontend_properties\s*\*\s*([_\d\w]+)\)\s*\{/\1\2)\n{\n\tstruct dtv_frontend_properties *\3 = &fe->dtv_property_cache;/g;
	}
	print $file;

Of course, the changes at dvb_frontend.[ch] were made by hand,
as well as the changes on a few other places, where get_frontend()
is called internally inside the driver.

On some places, get_frontend() were just a void function. Those
occurrences were removed, as the DVB core handles such cases.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-12-31 10:28:23 -02:00
Mauro Carvalho Chehab
ac3852c41b [media] dvb_frontend: Fix inversion breakage due to DVBv5 conversion
On several places inside dvb_frontend, only the DVBv3 parameters
were updated. Change it to be sure that, on all places, the DVBv5
parameters will be changed instead.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-12-31 10:23:49 -02:00
Mauro Carvalho Chehab
63aad05b8d [media] s921: Properly report the delivery system
Before this patch, a query for the delivery systems were
returned SYS_UNDEFINED.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-12-31 10:23:40 -02:00
Mauro Carvalho Chehab
8de8594a79 [media] dvb-core: be sure that drivers won't use DVBv3 internally
Now that all frontends are implementing DVBv5, don't export the
DVBv3 specific stuff to the drivers. Only the core should be
aware of that, as it will keep providing DVBv3 backward compatibility.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-12-31 10:23:01 -02:00
Mauro Carvalho Chehab
c6f56e7d79 [media] dvb: don't use DVBv3 bandwidth macros
Every frontend now uses DVBv5 way. So, let's not use the DVBv3
macros internally anymore.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-12-31 10:22:49 -02:00
Mauro Carvalho Chehab
88ab898f66 [media] dvb-core: don't use fe_bandwidth_t on driver
Now that everybody is talking DVBv5 API dialect, using this
DVBv3 macro internally is not ok.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-12-31 10:22:41 -02:00
Mauro Carvalho Chehab
1b5d8716b1 [media] dvb: remove the track() fops
This callback is not used anywhere. Maybe it were used in the
past to optimize the custom algo, but, as it is not used anymore,
let's just remove it.

If later needed, some patch may re-add it with a proper
implementation.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-12-31 10:22:29 -02:00
Mauro Carvalho Chehab
41da5320df [media] dvb: don't pass a DVBv3 parameter for search() fops
Just like the other DVB algorithms, drivers should use the DVBv5
way to retrieve parameters: via the cache struct.

Actually, several drivers were partially using the DVBv3 struct
and partially using the DVBv5 way, with is confusing and may
lead into troubles.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-12-31 10:16:32 -02:00
Mauro Carvalho Chehab
7e0722215a [media] dvb-core: Don't pass DVBv3 parameters on tune() fops
As all parameters are passed via DVBv5 to the frontends, there's
no need to pass them again via fops. Also, most drivers weren't using
it anyway. So, instead, just pass a parameter to indicate if the
hardware algorithm wants the driver to re-tune or not.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-12-31 10:08:46 -02:00
Mauro Carvalho Chehab
5581e130ad [media] dvb: simplify get_tune_settings() struct
In the past, dvb_frontent_parameters were passed inside the
struct where get_tuner_settings should store their result.

This is not needed anymore, as all parameters needed are stored
already at the fe property cache. So, use it, where needed.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-12-31 10:04:45 -02:00
Mauro Carvalho Chehab
b1e9a65010 [media] dvb-core: remove get|set_frontend_legacy
Now that all drivers were converted, we can get rid of those
emulation calls.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-12-31 10:00:40 -02:00
Mauro Carvalho Chehab
0009e0e3e6 [media] af9015: 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:58:25 -02:00
Mauro Carvalho Chehab
59d3cc1975 [media] af9013: convert get|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:58:19 -02:00
Mauro Carvalho Chehab
f311f68abb [media] cxd2820: convert get|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:58:09 -02:00
Mauro Carvalho Chehab
f159451c12 [media] ttusb-dec: 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:57:52 -02:00
Mauro Carvalho Chehab
15115c17cb [media] siano: 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:57:47 -02:00
Mauro Carvalho Chehab
e11eb28876 [media] firedtv: 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.

Cc: Stefan Richter <stefanr@s5r6.in-berlin.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-12-31 09:57:40 -02:00
Mauro Carvalho Chehab
e4b40030bf [media] vp7045-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:57:16 -02:00
Mauro Carvalho Chehab
4fa102d5cc [media] vp702x-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:55:45 -02:00
Mauro Carvalho Chehab
531157b35c [media] mxl111sf-demod: 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:55:01 -02:00
Mauro Carvalho Chehab
6e07d5c52d [media] gp8psk-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:54:57 -02:00
Mauro Carvalho Chehab
955c41c09c [media] friio-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:54:52 -02:00
Mauro Carvalho Chehab
adcc8f0e19 [media] dtt200u-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:54:45 -02:00
Mauro Carvalho Chehab
7830bbaff9 [media] cinergyT2-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:53:09 -02:00
Mauro Carvalho Chehab
f9e54512fd [media] af9005-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:52:11 -02:00
Mauro Carvalho Chehab
5942c679a8 [media] dst: 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:49:12 -02:00
Mauro Carvalho Chehab
f6c699680c [media] vez1820: 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:48:55 -02:00
Mauro Carvalho Chehab
042e5eb79f [media] tda8083: 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:48:47 -02:00
Mauro Carvalho Chehab
102a820d36 [media] s55h1411: 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:47:32 -02:00
Mauro Carvalho Chehab
fd12984456 [media] s5h1409: 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:47:27 -02:00
Mauro Carvalho Chehab
d42c08695a [media] or51211: 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:47:22 -02:00
Mauro Carvalho Chehab
d8f7cc2846 [media] or51132: 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:46:10 -02:00
Mauro Carvalho Chehab
81931e940e [media] nxt200x: 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:43:36 -02:00
Mauro Carvalho Chehab
6714049e04 [media] tda10086: 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:43:10 -02:00
Mauro Carvalho Chehab
b2a29b578d [media] tda10071: 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:42:28 -02:00
Mauro Carvalho Chehab
787d92e176 [media] tda10023: 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:42:19 -02:00