Commit 89dfc557 authored by Olivier Grenie's avatar Olivier Grenie Committed by Mauro Carvalho Chehab

V4L/DVB (13587): DiB8000: enhance status lock

Enhance status lock behaviour.
Signed-off-by: default avatarOlivier Grenie <olivier.grenie@dibcom.fr>
Signed-off-by: default avatarPatrick Boettcher <pboettcher@kernellabs.com>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@redhat.com>
parent acc5c9ee
...@@ -2083,29 +2083,31 @@ static int dib8000_read_status(struct dvb_frontend *fe, fe_status_t * stat) ...@@ -2083,29 +2083,31 @@ static int dib8000_read_status(struct dvb_frontend *fe, fe_status_t * stat)
*stat = 0; *stat = 0;
if ((lock >> 14) & 1) // AGC if ((lock >> 13) & 1)
*stat |= FE_HAS_SIGNAL; *stat |= FE_HAS_SIGNAL;
if ((lock >> 8) & 1) // Equal if ((lock >> 8) & 1) /* Equal */
*stat |= FE_HAS_CARRIER; *stat |= FE_HAS_CARRIER;
if ((lock >> 3) & 1) // TMCC_SYNC if (((lock >> 1) & 0xf) == 0xf) /* TMCC_SYNC */
*stat |= FE_HAS_SYNC; *stat |= FE_HAS_SYNC;
if ((lock >> 5) & 7) // FEC MPEG if (((lock >> 12) & 1) && ((lock >> 5) & 7)) /* FEC MPEG */
*stat |= FE_HAS_LOCK; *stat |= FE_HAS_LOCK;
lock = dib8000_read_word(state, 554); // Viterbi Layer A if ((lock >> 12) & 1) {
lock = dib8000_read_word(state, 554); /* Viterbi Layer A */
if (lock & 0x01) if (lock & 0x01)
*stat |= FE_HAS_VITERBI; *stat |= FE_HAS_VITERBI;
lock = dib8000_read_word(state, 555); // Viterbi Layer B lock = dib8000_read_word(state, 555); /* Viterbi Layer B */
if (lock & 0x01) if (lock & 0x01)
*stat |= FE_HAS_VITERBI; *stat |= FE_HAS_VITERBI;
lock = dib8000_read_word(state, 556); // Viterbi Layer C lock = dib8000_read_word(state, 556); /* Viterbi Layer C */
if (lock & 0x01) if (lock & 0x01)
*stat |= FE_HAS_VITERBI; *stat |= FE_HAS_VITERBI;
}
return 0; return 0;
} }
......
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