aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/dvb/frontends/mt352.c
diff options
context:
space:
mode:
authorAndrew de Quincey <adq_dvb@lidskialf.net>2006-05-16 16:22:02 -0400
committerMauro Carvalho Chehab <mchehab@infradead.org>2006-06-25 01:00:34 -0400
commit0463f12c5cdc3d5577002826c302471b95b2532c (patch)
treed63dd02cfe8ec2cc424bedc84c3e461d8a7977b5 /drivers/media/dvb/frontends/mt352.c
parent976e3483799ce5f718753d67454378d46500f0da (diff)
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 ed3bede029e..8601a3f4307 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,
287 mt352_calc_nominal_rate(state, op->bandwidth, buf+4); 287 mt352_calc_nominal_rate(state, op->bandwidth, buf+4);
288 mt352_calc_input_freq(state, buf+6); 288 mt352_calc_input_freq(state, buf+6);
289 289
290 // if there is no secondary tuner, call set_params to set up a potential
291 // tuner attached elsewhere
292 if (state->config.no_tuner) { 290 if (state->config.no_tuner) {
293 if (fe->ops->tuner_ops.set_params) { 291 if (fe->ops->tuner_ops.set_params) {
294 fe->ops->tuner_ops.set_params(fe, param); 292 fe->ops->tuner_ops.set_params(fe, param);
295 if (fe->ops->i2c_gate_ctrl) fe->ops->i2c_gate_ctrl(fe, 0); 293 if (fe->ops->i2c_gate_ctrl)
294 fe->ops->i2c_gate_ctrl(fe, 0);
296 } 295 }
297 296
298 /* start decoding only */ 297 mt352_write(fe, buf, 8);
299 mt352_write(fe, fsm_go, 2); 298 mt352_write(fe, fsm_go, 2);
300 } 299 } else {
301 300 if (fe->ops->tuner_ops.calc_regs) {
302 // retrieve the pllbuf - we do this even if there is no 301 fe->ops->tuner_ops.calc_regs(fe, param, buf+8, 5);
303 // secondary tuner simply so we have a record of what was sent for 302 buf[8] <<= 1;
304 // debugging. 303 mt352_write(fe, buf, sizeof(buf));
305 if (fe->ops->tuner_ops.calc_regs) { 304 mt352_write(fe, tuner_go, 2);
306 fe->ops->tuner_ops.calc_regs(fe, param, buf+8, 5); 305 }
307 buf[8] <<= 1;
308 mt352_write(fe, buf, sizeof(buf));
309 }
310
311 // send PLL and start tuning and then decoding
312 if (!state->config.no_tuner) {
313 mt352_write(fe, tuner_go, 2);
314 } 306 }
315 307
316 return 0; 308 return 0;