V4L/DVB (7630): au8522: fix au8522_read_ucblocks for qam
authorMichael Krufky <mkrufky@linuxtv.org>
Sun, 6 Apr 2008 02:08:08 +0000 (23:08 -0300)
committerMauro Carvalho Chehab <mchehab@infradead.org>
Thu, 24 Apr 2008 17:09:43 +0000 (14:09 -0300)
ucblocks are reported in separate registers for vsb & qam

Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
drivers/media/dvb/frontends/au8522.c

index dc01e75cdc606688824c21565afaff06990546aa..9fb61e6ed679ab8b9d40c6d8568e899a4bbb42f0 100644 (file)
@@ -340,7 +340,10 @@ static int au8522_read_ucblocks(struct dvb_frontend *fe, u32 *ucblocks)
 {
        struct au8522_state *state = fe->demodulator_priv;
 
-       *ucblocks = au8522_readreg(state, 0x4087);
+       if (state->current_modulation == VSB_8)
+               *ucblocks = au8522_readreg(state, 0x4087);
+       else
+               *ucblocks = au8522_readreg(state, 0x4543);
 
        return 0;
 }