summaryrefslogtreecommitdiff
path: root/drivers/media/dvb/frontends/mt352.c
diff options
context:
space:
mode:
authorAndrew de Quincey <adq_dvb@lidskialf.net>2006-05-17 00:22:02 +0400
committerMauro Carvalho Chehab <mchehab@infradead.org>2006-06-25 09:00:34 +0400
commit0463f12c5cdc3d5577002826c302471b95b2532c (patch)
treed63dd02cfe8ec2cc424bedc84c3e461d8a7977b5 /drivers/media/dvb/frontends/mt352.c
parent976e3483799ce5f718753d67454378d46500f0da (diff)
downloadlinux-0463f12c5cdc3d5577002826c302471b95b2532c.tar.xz
V4L/DVB (4032): Fix Pinnacle 300i
I had broken the mt352 tuning when a non-directly connected PLL was used - uncommon, but this is what is used on the pinnacle card. 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.c28
1 files changed, 10 insertions, 18 deletions
diff --git a/drivers/media/dvb/frontends/mt352.c b/drivers/media/dvb/frontends/mt352.c
index ed3bede029eb..8601a3f43074 100644
--- a/drivers/media/dvb/frontends/mt352.c
+++ b/drivers/media/dvb/frontends/mt352.c
@@ -287,30 +287,22 @@ 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);
+ if (fe->ops->i2c_gate_ctrl)
+ fe->ops->i2c_gate_ctrl(fe, 0);
}
- /* start decoding only */
+ mt352_write(fe, buf, 8);
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.calc_regs) {
- fe->ops->tuner_ops.calc_regs(fe, param, buf+8, 5);
- buf[8] <<= 1;
- mt352_write(fe, buf, sizeof(buf));
- }
-
- // send PLL and start tuning and then decoding
- if (!state->config.no_tuner) {
- mt352_write(fe, tuner_go, 2);
+ } else {
+ if (fe->ops->tuner_ops.calc_regs) {
+ fe->ops->tuner_ops.calc_regs(fe, param, buf+8, 5);
+ buf[8] <<= 1;
+ mt352_write(fe, buf, sizeof(buf));
+ mt352_write(fe, tuner_go, 2);
+ }
}
return 0;