summaryrefslogtreecommitdiffstats
path: root/drivers/media/dvb/frontends/mt352.c
diff options
context:
space:
mode:
authorAndrew de Quincey <adq_dvb@lidskialf.net>2006-04-18 17:47:12 -0300
committerMauro Carvalho Chehab <mchehab@infradead.org>2006-06-25 01:59:17 -0300
commit4e2eccae27d13d756826533e7cd1214b5825d97c (patch)
tree0f305b462d4b58f5d2860abfbee7dd8a33545661 /drivers/media/dvb/frontends/mt352.c
parent74aa7a29fea916cb40c98c38e885cc2087c78774 (diff)
downloadop-kernel-dev-4e2eccae27d13d756826533e7cd1214b5825d97c.zip
op-kernel-dev-4e2eccae27d13d756826533e7cd1214b5825d97c.tar.gz
V4L/DVB (3889): Sort out support for non-attached tuners on mt352
Make it use set_params/pllbuf as appropriate so it works with dvb_pll_attach()ed tuners. Signed-off-by: Andrew de Quincey <adq_dvb@lidskialf.net> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Diffstat (limited to 'drivers/media/dvb/frontends/mt352.c')
-rw-r--r--drivers/media/dvb/frontends/mt352.c24
1 files changed, 19 insertions, 5 deletions
diff --git a/drivers/media/dvb/frontends/mt352.c b/drivers/media/dvb/frontends/mt352.c
index a7a347a..3c86018 100644
--- a/drivers/media/dvb/frontends/mt352.c
+++ b/drivers/media/dvb/frontends/mt352.c
@@ -287,18 +287,32 @@ static int mt352_set_parameters(struct dvb_frontend* fe,
mt352_calc_nominal_rate(state, op->bandwidth, buf+4);
mt352_calc_input_freq(state, buf+6);
+ // if there is no secondary tuner, call set_params to set up a potential
+ // tuner attached elsewhere
+ if (state->config.no_tuner) {
+ if (fe->ops->tuner_ops.set_params) {
+ fe->ops->tuner_ops.set_params(fe, param);
+ if (fe->ops->i2c_gate_ctrl) fe->ops->i2c_gate_ctrl(fe, 0);
+ }
+
+ /* start decoding only */
+ mt352_write(fe, fsm_go, 2);
+ }
+
+ // retrieve the pllbuf - we do this even if there is no
+ // secondary tuner simply so we have a record of what was sent for
+ // debugging.
if (fe->ops->tuner_ops.pllbuf) {
fe->ops->tuner_ops.pllbuf(fe, param, buf+8, 5);
buf[8] <<= 1;
mt352_write(fe, buf, sizeof(buf));
}
- if (state->config.no_tuner) {
- /* start decoding */
- mt352_write(fe, fsm_go, 2);
- } else {
- /* start tuning */
+
+ // send PLL and start tuning and then decoding
+ if (!state->config.no_tuner) {
mt352_write(fe, tuner_go, 2);
}
+
return 0;
}
OpenPOWER on IntegriCloud