Commit c4fa649a authored by Andreas Regel's avatar Andreas Regel Committed by Mauro Carvalho Chehab

V4L/DVB (13357): stv090x: adds an additional check for signal presence based on AGC1

Signed-off-by: default avatarAndreas Regel <andreas.regel@gmx.de>
Signed-off-by: default avatarManu Abraham <manu@linuxtv.org>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@redhat.com>
parent a4978a83
...@@ -3185,7 +3185,7 @@ static enum stv090x_signal_state stv090x_algo(struct stv090x_state *state) ...@@ -3185,7 +3185,7 @@ static enum stv090x_signal_state stv090x_algo(struct stv090x_state *state)
if ((agc1_power == 0) && (power_iq < STV090x_IQPOWER_THRESHOLD)) { if ((agc1_power == 0) && (power_iq < STV090x_IQPOWER_THRESHOLD)) {
dprintk(FE_ERROR, 1, "No Signal: POWER_IQ=0x%02x", power_iq); dprintk(FE_ERROR, 1, "No Signal: POWER_IQ=0x%02x", power_iq);
lock = 0; lock = 0;
signal_state = STV090x_NOAGC1;
} else { } else {
reg = STV090x_READ_DEMOD(state, DEMOD); reg = STV090x_READ_DEMOD(state, DEMOD);
STV090x_SETFIELD_Px(reg, SPECINV_CONTROL_FIELD, state->inversion); STV090x_SETFIELD_Px(reg, SPECINV_CONTROL_FIELD, state->inversion);
...@@ -3209,9 +3209,8 @@ static enum stv090x_signal_state stv090x_algo(struct stv090x_state *state) ...@@ -3209,9 +3209,8 @@ static enum stv090x_signal_state stv090x_algo(struct stv090x_state *state)
} }
} }
/* need to check for AGC1 state */ if (signal_state == STV090x_NOAGC1)
return signal_state;
if (state->algo == STV090x_BLIND_SEARCH) if (state->algo == STV090x_BLIND_SEARCH)
lock = stv090x_blind_search(state); lock = stv090x_blind_search(state);
......
...@@ -91,6 +91,7 @@ ...@@ -91,6 +91,7 @@
STV090x_SEARCH_AGC2_TH_CUT30) STV090x_SEARCH_AGC2_TH_CUT30)
enum stv090x_signal_state { enum stv090x_signal_state {
STV090x_NOAGC1,
STV090x_NOCARRIER, STV090x_NOCARRIER,
STV090x_NODATA, STV090x_NODATA,
STV090x_DATAOK, STV090x_DATAOK,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment