diff options
author | Mauro Carvalho Chehab <mchehab@redhat.com> | 2012-07-04 01:33:55 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2012-07-04 01:46:58 -0400 |
commit | 1d432a3d7783b0b86ff08a111b7a4bea550fc4a2 (patch) | |
tree | e92473488d7674c171f6d7fa59da4186a7e6044b /drivers/media/video/tuner-core.c | |
parent | 90acb85fb48372f30e0a2f6d516d2285faea6e6c (diff) |
[media] tuner, xc2028: add support for get_afc()
Implement API support to return AFC frequency shift, as this device
supports it. The only other driver that implements it is tda9887,
and the frequency there is reported in Hz. So, use Hz also for this
tuner.
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/video/tuner-core.c')
-rw-r--r-- | drivers/media/video/tuner-core.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/drivers/media/video/tuner-core.c b/drivers/media/video/tuner-core.c index 98adeeebb8b..b5a819af2b8 100644 --- a/drivers/media/video/tuner-core.c +++ b/drivers/media/video/tuner-core.c | |||
@@ -228,6 +228,16 @@ static int fe_has_signal(struct dvb_frontend *fe) | |||
228 | return strength; | 228 | return strength; |
229 | } | 229 | } |
230 | 230 | ||
231 | static int fe_get_afc(struct dvb_frontend *fe) | ||
232 | { | ||
233 | s32 afc = 0; | ||
234 | |||
235 | if (fe->ops.tuner_ops.get_afc) | ||
236 | fe->ops.tuner_ops.get_afc(fe, &afc); | ||
237 | |||
238 | return 0; | ||
239 | } | ||
240 | |||
231 | static int fe_set_config(struct dvb_frontend *fe, void *priv_cfg) | 241 | static int fe_set_config(struct dvb_frontend *fe, void *priv_cfg) |
232 | { | 242 | { |
233 | struct dvb_tuner_ops *fe_tuner_ops = &fe->ops.tuner_ops; | 243 | struct dvb_tuner_ops *fe_tuner_ops = &fe->ops.tuner_ops; |
@@ -247,6 +257,7 @@ static struct analog_demod_ops tuner_analog_ops = { | |||
247 | .set_params = fe_set_params, | 257 | .set_params = fe_set_params, |
248 | .standby = fe_standby, | 258 | .standby = fe_standby, |
249 | .has_signal = fe_has_signal, | 259 | .has_signal = fe_has_signal, |
260 | .get_afc = fe_get_afc, | ||
250 | .set_config = fe_set_config, | 261 | .set_config = fe_set_config, |
251 | .tuner_status = tuner_status | 262 | .tuner_status = tuner_status |
252 | }; | 263 | }; |