diff options
author | Andrew de Quincey <adq_dvb@lidskialf.net> | 2006-04-18 16:47:12 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@infradead.org> | 2006-06-25 00:59:17 -0400 |
commit | 4e2eccae27d13d756826533e7cd1214b5825d97c (patch) | |
tree | 0f305b462d4b58f5d2860abfbee7dd8a33545661 /drivers/media | |
parent | 74aa7a29fea916cb40c98c38e885cc2087c78774 (diff) |
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')
-rw-r--r-- | drivers/media/dvb/frontends/mt352.c | 24 |
1 files changed, 19 insertions, 5 deletions
diff --git a/drivers/media/dvb/frontends/mt352.c b/drivers/media/dvb/frontends/mt352.c index a7a347a3cad0..3c86018e7f9d 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, | |||
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) { | ||
293 | if (fe->ops->tuner_ops.set_params) { | ||
294 | fe->ops->tuner_ops.set_params(fe, param); | ||
295 | if (fe->ops->i2c_gate_ctrl) fe->ops->i2c_gate_ctrl(fe, 0); | ||
296 | } | ||
297 | |||
298 | /* start decoding only */ | ||
299 | mt352_write(fe, fsm_go, 2); | ||
300 | } | ||
301 | |||
302 | // retrieve the pllbuf - we do this even if there is no | ||
303 | // secondary tuner simply so we have a record of what was sent for | ||
304 | // debugging. | ||
290 | if (fe->ops->tuner_ops.pllbuf) { | 305 | if (fe->ops->tuner_ops.pllbuf) { |
291 | fe->ops->tuner_ops.pllbuf(fe, param, buf+8, 5); | 306 | fe->ops->tuner_ops.pllbuf(fe, param, buf+8, 5); |
292 | buf[8] <<= 1; | 307 | buf[8] <<= 1; |
293 | mt352_write(fe, buf, sizeof(buf)); | 308 | mt352_write(fe, buf, sizeof(buf)); |
294 | } | 309 | } |
295 | if (state->config.no_tuner) { | 310 | |
296 | /* start decoding */ | 311 | // send PLL and start tuning and then decoding |
297 | mt352_write(fe, fsm_go, 2); | 312 | if (!state->config.no_tuner) { |
298 | } else { | ||
299 | /* start tuning */ | ||
300 | mt352_write(fe, tuner_go, 2); | 313 | mt352_write(fe, tuner_go, 2); |
301 | } | 314 | } |
315 | |||
302 | return 0; | 316 | return 0; |
303 | } | 317 | } |
304 | 318 | ||