From 6c0e502c873206f0f6542bc52eaac314fe8e577c Mon Sep 17 00:00:00 2001 From: Andrew de Quincey Date: Tue, 18 Apr 2006 17:47:12 -0300 Subject: [PATCH] --- yaml --- r: 29918 b: refs/heads/master c: 4e2eccae27d13d756826533e7cd1214b5825d97c h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/drivers/media/dvb/frontends/mt352.c | 24 ++++++++++++++++++----- 2 files changed, 20 insertions(+), 6 deletions(-) diff --git a/[refs] b/[refs] index 9ae4a3516309..298e9b907c5f 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 74aa7a29fea916cb40c98c38e885cc2087c78774 +refs/heads/master: 4e2eccae27d13d756826533e7cd1214b5825d97c diff --git a/trunk/drivers/media/dvb/frontends/mt352.c b/trunk/drivers/media/dvb/frontends/mt352.c index a7a347a3cad0..3c86018e7f9d 100644 --- a/trunk/drivers/media/dvb/frontends/mt352.c +++ b/trunk/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; }