diff options
author | Michael Krufky <mkrufky@linuxtv.org> | 2011-11-03 08:59:42 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2011-11-08 05:25:15 -0500 |
commit | 8c8ee11345fa26e46cbc9ec88581736e38915b16 (patch) | |
tree | fb7a46ee9dfa120c746c1881d48947c18e2bbbf5 /drivers/media/common/tuners/tda18271-fe.c | |
parent | d697b4ce9490d82380a3fe153a7f9fbe017295f2 (diff) |
[media] tda18271: add tda18271_get_if_frequency
Reported-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/common/tuners/tda18271-fe.c')
-rw-r--r-- | drivers/media/common/tuners/tda18271-fe.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/drivers/media/common/tuners/tda18271-fe.c b/drivers/media/common/tuners/tda18271-fe.c index 63cc4004e211..3347c5b488dd 100644 --- a/drivers/media/common/tuners/tda18271-fe.c +++ b/drivers/media/common/tuners/tda18271-fe.c | |||
@@ -994,6 +994,7 @@ static int tda18271_set_params(struct dvb_frontend *fe, | |||
994 | if (tda_fail(ret)) | 994 | if (tda_fail(ret)) |
995 | goto fail; | 995 | goto fail; |
996 | 996 | ||
997 | priv->if_freq = map->if_freq; | ||
997 | priv->frequency = freq; | 998 | priv->frequency = freq; |
998 | priv->bandwidth = (fe->ops.info.type == FE_OFDM) ? | 999 | priv->bandwidth = (fe->ops.info.type == FE_OFDM) ? |
999 | params->u.ofdm.bandwidth : 0; | 1000 | params->u.ofdm.bandwidth : 0; |
@@ -1050,6 +1051,7 @@ static int tda18271_set_analog_params(struct dvb_frontend *fe, | |||
1050 | if (tda_fail(ret)) | 1051 | if (tda_fail(ret)) |
1051 | goto fail; | 1052 | goto fail; |
1052 | 1053 | ||
1054 | priv->if_freq = map->if_freq; | ||
1053 | priv->frequency = freq; | 1055 | priv->frequency = freq; |
1054 | priv->bandwidth = 0; | 1056 | priv->bandwidth = 0; |
1055 | fail: | 1057 | fail: |
@@ -1086,6 +1088,13 @@ static int tda18271_get_bandwidth(struct dvb_frontend *fe, u32 *bandwidth) | |||
1086 | return 0; | 1088 | return 0; |
1087 | } | 1089 | } |
1088 | 1090 | ||
1091 | static int tda18271_get_if_frequency(struct dvb_frontend *fe, u32 *frequency) | ||
1092 | { | ||
1093 | struct tda18271_priv *priv = fe->tuner_priv; | ||
1094 | *frequency = (u32)priv->if_freq * 1000; | ||
1095 | return 0; | ||
1096 | } | ||
1097 | |||
1089 | /* ------------------------------------------------------------------ */ | 1098 | /* ------------------------------------------------------------------ */ |
1090 | 1099 | ||
1091 | #define tda18271_update_std(std_cfg, name) do { \ | 1100 | #define tda18271_update_std(std_cfg, name) do { \ |
@@ -1245,6 +1254,7 @@ static const struct dvb_tuner_ops tda18271_tuner_ops = { | |||
1245 | .set_config = tda18271_set_config, | 1254 | .set_config = tda18271_set_config, |
1246 | .get_frequency = tda18271_get_frequency, | 1255 | .get_frequency = tda18271_get_frequency, |
1247 | .get_bandwidth = tda18271_get_bandwidth, | 1256 | .get_bandwidth = tda18271_get_bandwidth, |
1257 | .get_if_frequency = tda18271_get_if_frequency, | ||
1248 | }; | 1258 | }; |
1249 | 1259 | ||
1250 | struct dvb_frontend *tda18271_attach(struct dvb_frontend *fe, u8 addr, | 1260 | struct dvb_frontend *tda18271_attach(struct dvb_frontend *fe, u8 addr, |