[media] si2168: relax demod lock checks a little
authorAntti Palosaari <crope@iki.fi>
Wed, 23 Apr 2014 00:36:32 +0000 (21:36 -0300)
committerMauro Carvalho Chehab <m.chehab@samsung.com>
Wed, 23 Apr 2014 12:54:26 +0000 (09:54 -0300)
bit3 was not cleared always leaving driver reporting demod is not
fully locked. Do not check bit0 as it seems to be always 0.

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
drivers/media/dvb-frontends/si2168.c

index dc5b64afd8726707911668a7f93a9cd91de4adc5..8637d2ed76238b1c76c95d6b6bf2f994f19a3562 100644 (file)
@@ -132,14 +132,11 @@ static int si2168_read_status(struct dvb_frontend *fe, fe_status_t *status)
         * [b4] statistics ready? Set in a few secs after lock is gained.
         */
 
-       switch ((cmd.args[2] >> 0) & 0x0f) {
-       case 0x0a:
+       switch ((cmd.args[2] >> 1) & 0x03) {
+       case 0x01:
                *status = FE_HAS_SIGNAL | FE_HAS_CARRIER;
                break;
-       case 0x0e:
-               *status = FE_HAS_SIGNAL | FE_HAS_CARRIER | FE_HAS_VITERBI;
-               break;
-       case 0x06:
+       case 0x03:
                *status = FE_HAS_SIGNAL | FE_HAS_CARRIER | FE_HAS_VITERBI |
                                FE_HAS_SYNC | FE_HAS_LOCK;
                break;