[media] m88rs2000: Correct m88rs2000_get_fec
authorMalcolm Priestley <tvboxspy@gmail.com>
Sat, 28 Dec 2013 17:04:51 +0000 (14:04 -0300)
committerMauro Carvalho Chehab <m.chehab@samsung.com>
Tue, 7 Jan 2014 11:40:34 +0000 (09:40 -0200)
Value of fec is achieved by the upper nibble bits 6,7 & 8.

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
drivers/media/dvb-frontends/m88rs2000.c

index 002b109d938361ad25f6e61f61fe2adefcd47c31..b2351466b0dac0e73b7de1b6ad96698e1ed88c97 100644 (file)
@@ -581,18 +581,20 @@ static fe_code_rate_t m88rs2000_get_fec(struct m88rs2000_state *state)
        reg = m88rs2000_readreg(state, 0x76);
        m88rs2000_writereg(state, 0x9a, 0xb0);
 
+       reg &= 0xf0;
+       reg >>= 5;
+
        switch (reg) {
-       case 0x88:
+       case 0x4:
                return FEC_1_2;
-       case 0x68:
+       case 0x3:
                return FEC_2_3;
-       case 0x48:
+       case 0x2:
                return FEC_3_4;
-       case 0x28:
+       case 0x1:
                return FEC_5_6;
-       case 0x18:
+       case 0x0:
                return FEC_7_8;
-       case 0x08:
        default:
                break;
        }