diff options
Diffstat (limited to 'drivers/media/dvb/frontends/mt352.c')
-rw-r--r-- | drivers/media/dvb/frontends/mt352.c | 28 |
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, | |||
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; |