V4L/DVB (13987): [STV090x] Quit processing if the tuner did not lock
Exit stv090x_algo() if the tuner did not lock. This might happen due to missing signal or invalid/incomplete tuning parameters. Signed-off-by: Oliver Endriss <o.endriss@gmx.de> Signed-off-by: Manu Abraham <abraham.manu@gmail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
This commit is contained in:
parent
2c1f750ba3
commit
41894b9700
|
@ -3256,22 +3256,22 @@ static enum stv090x_signal_state stv090x_algo(struct stv090x_state *state)
|
|||
|
||||
msleep(50);
|
||||
|
||||
if (stv090x_i2c_gate_ctrl(fe, 1) < 0)
|
||||
goto err;
|
||||
|
||||
if (state->config->tuner_get_status) {
|
||||
if (stv090x_i2c_gate_ctrl(fe, 1) < 0)
|
||||
goto err;
|
||||
if (state->config->tuner_get_status(fe, ®) < 0)
|
||||
goto err_gateoff;
|
||||
if (stv090x_i2c_gate_ctrl(fe, 0) < 0)
|
||||
goto err;
|
||||
|
||||
if (reg)
|
||||
dprintk(FE_DEBUG, 1, "Tuner phase locked");
|
||||
else {
|
||||
dprintk(FE_DEBUG, 1, "Tuner unlocked");
|
||||
return STV090x_NOCARRIER;
|
||||
}
|
||||
}
|
||||
|
||||
if (reg)
|
||||
dprintk(FE_DEBUG, 1, "Tuner phase locked");
|
||||
else
|
||||
dprintk(FE_DEBUG, 1, "Tuner unlocked");
|
||||
|
||||
if (stv090x_i2c_gate_ctrl(fe, 0) < 0)
|
||||
goto err;
|
||||
|
||||
msleep(10);
|
||||
agc1_power = MAKEWORD16(STV090x_READ_DEMOD(state, AGCIQIN1),
|
||||
STV090x_READ_DEMOD(state, AGCIQIN0));
|
||||
|
|
Loading…
Reference in New Issue