diff options
author | Olivier Grenie <olivier.grenie@dibcom.fr> | 2009-11-30 04:38:49 -0500 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2009-12-15 21:18:19 -0500 |
commit | 89dfc557d1b85bbaf04ca4c9927c6ea22df72e04 (patch) | |
tree | ec7bf3a11c29bcfcfd697df6580b435e08251db9 /drivers | |
parent | acc5c9ee393952c00eb7fab8bdd529d45226f6ed (diff) |
V4L/DVB (13587): DiB8000: enhance status lock
Enhance status lock behaviour.
Signed-off-by: Olivier Grenie <olivier.grenie@dibcom.fr>
Signed-off-by: Patrick Boettcher <pboettcher@kernellabs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/media/dvb/frontends/dib8000.c | 28 |
1 files changed, 15 insertions, 13 deletions
diff --git a/drivers/media/dvb/frontends/dib8000.c b/drivers/media/dvb/frontends/dib8000.c index 5218a5c19d1f..bb2ec1567cd6 100644 --- a/drivers/media/dvb/frontends/dib8000.c +++ b/drivers/media/dvb/frontends/dib8000.c | |||
@@ -2083,29 +2083,31 @@ static int dib8000_read_status(struct dvb_frontend *fe, fe_status_t * stat) | |||
2083 | 2083 | ||
2084 | *stat = 0; | 2084 | *stat = 0; |
2085 | 2085 | ||
2086 | if ((lock >> 14) & 1) // AGC | 2086 | if ((lock >> 13) & 1) |
2087 | *stat |= FE_HAS_SIGNAL; | 2087 | *stat |= FE_HAS_SIGNAL; |
2088 | 2088 | ||
2089 | if ((lock >> 8) & 1) // Equal | 2089 | if ((lock >> 8) & 1) /* Equal */ |
2090 | *stat |= FE_HAS_CARRIER; | 2090 | *stat |= FE_HAS_CARRIER; |
2091 | 2091 | ||
2092 | if ((lock >> 3) & 1) // TMCC_SYNC | 2092 | if (((lock >> 1) & 0xf) == 0xf) /* TMCC_SYNC */ |
2093 | *stat |= FE_HAS_SYNC; | 2093 | *stat |= FE_HAS_SYNC; |
2094 | 2094 | ||
2095 | if ((lock >> 5) & 7) // FEC MPEG | 2095 | if (((lock >> 12) & 1) && ((lock >> 5) & 7)) /* FEC MPEG */ |
2096 | *stat |= FE_HAS_LOCK; | 2096 | *stat |= FE_HAS_LOCK; |
2097 | 2097 | ||
2098 | lock = dib8000_read_word(state, 554); // Viterbi Layer A | 2098 | if ((lock >> 12) & 1) { |
2099 | if (lock & 0x01) | 2099 | lock = dib8000_read_word(state, 554); /* Viterbi Layer A */ |
2100 | *stat |= FE_HAS_VITERBI; | 2100 | if (lock & 0x01) |
2101 | *stat |= FE_HAS_VITERBI; | ||
2101 | 2102 | ||
2102 | lock = dib8000_read_word(state, 555); // Viterbi Layer B | 2103 | lock = dib8000_read_word(state, 555); /* Viterbi Layer B */ |
2103 | if (lock & 0x01) | 2104 | if (lock & 0x01) |
2104 | *stat |= FE_HAS_VITERBI; | 2105 | *stat |= FE_HAS_VITERBI; |
2105 | 2106 | ||
2106 | lock = dib8000_read_word(state, 556); // Viterbi Layer C | 2107 | lock = dib8000_read_word(state, 556); /* Viterbi Layer C */ |
2107 | if (lock & 0x01) | 2108 | if (lock & 0x01) |
2108 | *stat |= FE_HAS_VITERBI; | 2109 | *stat |= FE_HAS_VITERBI; |
2110 | } | ||
2109 | 2111 | ||
2110 | return 0; | 2112 | return 0; |
2111 | } | 2113 | } |