diff options
author | Michael Krufky <mkrufky@linuxtv.org> | 2007-12-16 17:27:23 -0500 |
---|---|---|
committer | Michael Krufky <mkrufky@linuxtv.org> | 2007-12-16 17:27:23 -0500 |
commit | 72459008a1643c4804ee6688426d7c29a66a545b (patch) | |
tree | 46cb081dcb501d266f249905d9f4d2c1f7ee8e29 /linux/drivers | |
parent | 0dd5f9acbc4f69e168833c43267d3c3ca74d7a25 (diff) | |
download | mediapointer-dvb-s2-72459008a1643c4804ee6688426d7c29a66a545b.tar.gz mediapointer-dvb-s2-72459008a1643c4804ee6688426d7c29a66a545b.tar.bz2 |
tuner: add set_config to struct analog_tuner_ops
From: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Diffstat (limited to 'linux/drivers')
-rw-r--r-- | linux/drivers/media/video/tuner-core.c | 14 | ||||
-rw-r--r-- | linux/drivers/media/video/tuner-driver.h | 3 |
2 files changed, 17 insertions, 0 deletions
diff --git a/linux/drivers/media/video/tuner-core.c b/linux/drivers/media/video/tuner-core.c index 479afb1f6..47aafed34 100644 --- a/linux/drivers/media/video/tuner-core.c +++ b/linux/drivers/media/video/tuner-core.c @@ -183,6 +183,19 @@ static int fe_has_signal(struct dvb_frontend *fe) return strength; } +static int fe_set_config(struct dvb_frontend *fe, void *priv_cfg) +{ + struct dvb_tuner_ops *fe_tuner_ops = &fe->ops.tuner_ops; + struct tuner *t = fe->analog_demod_priv; + + if (fe_tuner_ops->set_config) + return fe_tuner_ops->set_config(fe, priv_cfg); + + tuner_warn("Tuner frontend module has no way to set config\n"); + + return 0; +} + static void tuner_status(struct dvb_frontend *fe); static struct analog_tuner_ops tuner_core_ops = { @@ -190,6 +203,7 @@ static struct analog_tuner_ops tuner_core_ops = { .standby = fe_standby, .release = fe_release, .has_signal = fe_has_signal, + .set_config = fe_set_config, .tuner_status = tuner_status }; diff --git a/linux/drivers/media/video/tuner-driver.h b/linux/drivers/media/video/tuner-driver.h index 65ced4350..7f43dc68a 100644 --- a/linux/drivers/media/video/tuner-driver.h +++ b/linux/drivers/media/video/tuner-driver.h @@ -45,6 +45,9 @@ struct analog_tuner_ops { void (*standby)(struct dvb_frontend *fe); void (*release)(struct dvb_frontend *fe); int (*i2c_gate_ctrl)(struct dvb_frontend *fe, int enable); + + /** This is to allow setting tuner-specific configuration */ + int (*set_config)(struct dvb_frontend *fe, void *priv_cfg); }; struct tuner { |