提交 853ea132 编写于 作者: S Soeren Moch 提交者: Mauro Carvalho Chehab

V4L/DVB (7070): Fix some tuning problems

The attached patch solves all my vdr tuning problems on a dib7000p
nova-t stick as far as I could check within the last weekend.

It disables streaming while tuning, like that the number of faulty TS
packets is reduced.
Signed-off-by: NSoeren Moch <Soeren.Moch@stud.uni-hannover.de>
Signed-off-by: NPatrick Boettcher <pb@linuxtv.org>
Signed-off-by: NMauro Carvalho Chehab <mchehab@infradead.org>
上级 13b83b5d
...@@ -684,6 +684,9 @@ static int dib3000mc_set_frontend(struct dvb_frontend* fe, ...@@ -684,6 +684,9 @@ static int dib3000mc_set_frontend(struct dvb_frontend* fe,
struct dvb_frontend_parameters *fep) struct dvb_frontend_parameters *fep)
{ {
struct dib3000mc_state *state = fe->demodulator_priv; struct dib3000mc_state *state = fe->demodulator_priv;
int ret;
dib3000mc_set_output_mode(state, OUTMODE_HIGH_Z);
state->current_bandwidth = fep->u.ofdm.bandwidth; state->current_bandwidth = fep->u.ofdm.bandwidth;
dib3000mc_set_bandwidth(state, BANDWIDTH_TO_KHZ(fep->u.ofdm.bandwidth)); dib3000mc_set_bandwidth(state, BANDWIDTH_TO_KHZ(fep->u.ofdm.bandwidth));
...@@ -715,10 +718,11 @@ static int dib3000mc_set_frontend(struct dvb_frontend* fe, ...@@ -715,10 +718,11 @@ static int dib3000mc_set_frontend(struct dvb_frontend* fe,
dib3000mc_get_frontend(fe, fep); dib3000mc_get_frontend(fe, fep);
} }
ret = dib3000mc_tune(fe, fep);
/* make this a config parameter */ /* make this a config parameter */
dib3000mc_set_output_mode(state, OUTMODE_MPEG2_FIFO); dib3000mc_set_output_mode(state, OUTMODE_MPEG2_FIFO);
return ret;
return dib3000mc_tune(fe, fep);
} }
static int dib3000mc_read_status(struct dvb_frontend *fe, fe_status_t *stat) static int dib3000mc_read_status(struct dvb_frontend *fe, fe_status_t *stat)
......
...@@ -1171,7 +1171,9 @@ static int dib7000m_set_frontend(struct dvb_frontend* fe, ...@@ -1171,7 +1171,9 @@ static int dib7000m_set_frontend(struct dvb_frontend* fe,
struct dvb_frontend_parameters *fep) struct dvb_frontend_parameters *fep)
{ {
struct dib7000m_state *state = fe->demodulator_priv; struct dib7000m_state *state = fe->demodulator_priv;
int time; int time, ret;
dib7000m_set_output_mode(state, OUTMODE_HIGH_Z);
state->current_bandwidth = fep->u.ofdm.bandwidth; state->current_bandwidth = fep->u.ofdm.bandwidth;
dib7000m_set_bandwidth(state, BANDWIDTH_TO_KHZ(fep->u.ofdm.bandwidth)); dib7000m_set_bandwidth(state, BANDWIDTH_TO_KHZ(fep->u.ofdm.bandwidth));
...@@ -1206,10 +1208,11 @@ static int dib7000m_set_frontend(struct dvb_frontend* fe, ...@@ -1206,10 +1208,11 @@ static int dib7000m_set_frontend(struct dvb_frontend* fe,
dib7000m_get_frontend(fe, fep); dib7000m_get_frontend(fe, fep);
} }
ret = dib7000m_tune(fe, fep);
/* make this a config parameter */ /* make this a config parameter */
dib7000m_set_output_mode(state, OUTMODE_MPEG2_FIFO); dib7000m_set_output_mode(state, OUTMODE_MPEG2_FIFO);
return ret;
return dib7000m_tune(fe, fep);
} }
static int dib7000m_read_status(struct dvb_frontend *fe, fe_status_t *stat) static int dib7000m_read_status(struct dvb_frontend *fe, fe_status_t *stat)
......
...@@ -1128,8 +1128,9 @@ static int dib7000p_set_frontend(struct dvb_frontend* fe, ...@@ -1128,8 +1128,9 @@ static int dib7000p_set_frontend(struct dvb_frontend* fe,
struct dvb_frontend_parameters *fep) struct dvb_frontend_parameters *fep)
{ {
struct dib7000p_state *state = fe->demodulator_priv; struct dib7000p_state *state = fe->demodulator_priv;
int time; int time, ret;
dib7000p_set_output_mode(state, OUTMODE_HIGH_Z);
state->current_bandwidth = fep->u.ofdm.bandwidth; state->current_bandwidth = fep->u.ofdm.bandwidth;
dib7000p_set_bandwidth(state, BANDWIDTH_TO_KHZ(fep->u.ofdm.bandwidth)); dib7000p_set_bandwidth(state, BANDWIDTH_TO_KHZ(fep->u.ofdm.bandwidth));
...@@ -1166,10 +1167,11 @@ static int dib7000p_set_frontend(struct dvb_frontend* fe, ...@@ -1166,10 +1167,11 @@ static int dib7000p_set_frontend(struct dvb_frontend* fe,
dib7000p_get_frontend(fe, fep); dib7000p_get_frontend(fe, fep);
} }
ret = dib7000p_tune(fe, fep);
/* make this a config parameter */ /* make this a config parameter */
dib7000p_set_output_mode(state, OUTMODE_MPEG2_FIFO); dib7000p_set_output_mode(state, OUTMODE_MPEG2_FIFO);
return ret;
return dib7000p_tune(fe, fep);
} }
static int dib7000p_read_status(struct dvb_frontend *fe, fe_status_t *stat) static int dib7000p_read_status(struct dvb_frontend *fe, fe_status_t *stat)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册