diff options
author | Ondrej Zary <linux@rainbow-software.org> | 2013-02-03 20:48:56 -0500 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2013-04-08 06:01:15 -0400 |
commit | 5b0e5350cecb5a370ecdaa71ac113728e36e1d55 (patch) | |
tree | 620d08119655f73fffefa1925edf434b9b0f26e7 /drivers | |
parent | 2f719f7a9aa599bc9e1516190336a4ac5c59b18a (diff) |
[media] tda8290: Allow custom std_map for tda18271
Allow specifying a custom std_map for tda18271 by external configuration.
This is required by cards that require custom std_map for analog TV or radio,
like AverMedia A706.
Signed-off-by: Ondrej Zary <linux@rainbow-software.org>
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/media/tuners/tda8290.c | 8 | ||||
-rw-r--r-- | drivers/media/tuners/tda8290.h | 2 |
2 files changed, 8 insertions, 2 deletions
diff --git a/drivers/media/tuners/tda8290.c b/drivers/media/tuners/tda8290.c index a2b7a9fbd344..c1ade88d1fa8 100644 --- a/drivers/media/tuners/tda8290.c +++ b/drivers/media/tuners/tda8290.c | |||
@@ -54,6 +54,7 @@ struct tda8290_priv { | |||
54 | #define TDA18271 16 | 54 | #define TDA18271 16 |
55 | 55 | ||
56 | struct tda827x_config cfg; | 56 | struct tda827x_config cfg; |
57 | struct tda18271_std_map *tda18271_std_map; | ||
57 | }; | 58 | }; |
58 | 59 | ||
59 | /*---------------------------------------------------------------------*/ | 60 | /*---------------------------------------------------------------------*/ |
@@ -635,6 +636,7 @@ static int tda829x_find_tuner(struct dvb_frontend *fe) | |||
635 | if ((data == 0x83) || (data == 0x84)) { | 636 | if ((data == 0x83) || (data == 0x84)) { |
636 | priv->ver |= TDA18271; | 637 | priv->ver |= TDA18271; |
637 | tda829x_tda18271_config.config = priv->cfg.config; | 638 | tda829x_tda18271_config.config = priv->cfg.config; |
639 | tda829x_tda18271_config.std_map = priv->tda18271_std_map; | ||
638 | dvb_attach(tda18271_attach, fe, priv->tda827x_addr, | 640 | dvb_attach(tda18271_attach, fe, priv->tda827x_addr, |
639 | priv->i2c_props.adap, &tda829x_tda18271_config); | 641 | priv->i2c_props.adap, &tda829x_tda18271_config); |
640 | } else { | 642 | } else { |
@@ -746,8 +748,10 @@ struct dvb_frontend *tda829x_attach(struct dvb_frontend *fe, | |||
746 | priv->i2c_props.addr = i2c_addr; | 748 | priv->i2c_props.addr = i2c_addr; |
747 | priv->i2c_props.adap = i2c_adap; | 749 | priv->i2c_props.adap = i2c_adap; |
748 | priv->i2c_props.name = "tda829x"; | 750 | priv->i2c_props.name = "tda829x"; |
749 | if (cfg) | 751 | if (cfg) { |
750 | priv->cfg.config = cfg->lna_cfg; | 752 | priv->cfg.config = cfg->lna_cfg; |
753 | priv->tda18271_std_map = cfg->tda18271_std_map; | ||
754 | } | ||
751 | 755 | ||
752 | if (tda8290_probe(&priv->i2c_props) == 0) { | 756 | if (tda8290_probe(&priv->i2c_props) == 0) { |
753 | priv->ver = TDA8290; | 757 | priv->ver = TDA8290; |
diff --git a/drivers/media/tuners/tda8290.h b/drivers/media/tuners/tda8290.h index b5b51a947747..97f1d0f848ef 100644 --- a/drivers/media/tuners/tda8290.h +++ b/drivers/media/tuners/tda8290.h | |||
@@ -19,6 +19,7 @@ | |||
19 | 19 | ||
20 | #include <linux/i2c.h> | 20 | #include <linux/i2c.h> |
21 | #include "dvb_frontend.h" | 21 | #include "dvb_frontend.h" |
22 | #include "tda18271.h" | ||
22 | 23 | ||
23 | struct tda829x_config { | 24 | struct tda829x_config { |
24 | unsigned int lna_cfg; | 25 | unsigned int lna_cfg; |
@@ -27,6 +28,7 @@ struct tda829x_config { | |||
27 | #define TDA829X_PROBE_TUNER 0 | 28 | #define TDA829X_PROBE_TUNER 0 |
28 | #define TDA829X_DONT_PROBE 1 | 29 | #define TDA829X_DONT_PROBE 1 |
29 | unsigned int no_i2c_gate:1; | 30 | unsigned int no_i2c_gate:1; |
31 | struct tda18271_std_map *tda18271_std_map; | ||
30 | }; | 32 | }; |
31 | 33 | ||
32 | #if IS_ENABLED(CONFIG_MEDIA_TUNER_TDA8290) | 34 | #if IS_ENABLED(CONFIG_MEDIA_TUNER_TDA8290) |