summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--linux/drivers/media/dvb/frontends/alps_bsrv2.c2
-rw-r--r--linux/drivers/media/dvb/frontends/ves1820.c11
2 files changed, 7 insertions, 6 deletions
diff --git a/linux/drivers/media/dvb/frontends/alps_bsrv2.c b/linux/drivers/media/dvb/frontends/alps_bsrv2.c
index 8da1f5bb5..e0ecd0e24 100644
--- a/linux/drivers/media/dvb/frontends/alps_bsrv2.c
+++ b/linux/drivers/media/dvb/frontends/alps_bsrv2.c
@@ -342,7 +342,7 @@ int bsrv2_ioctl (struct dvb_frontend *fe, unsigned int cmd, void *arg)
*ber = ves1893_readreg (i2c, 0x15);
*ber |= (ves1893_readreg (i2c, 0x16) << 8);
- *ber |= (ves1893_readreg (i2c, 0x17) << 16);
+ *ber |= ((ves1893_readreg (i2c, 0x17) & 0x0f) << 16);
*ber *= 10;
break;
}
diff --git a/linux/drivers/media/dvb/frontends/ves1820.c b/linux/drivers/media/dvb/frontends/ves1820.c
index 196de7809..7f759af1f 100644
--- a/linux/drivers/media/dvb/frontends/ves1820.c
+++ b/linux/drivers/media/dvb/frontends/ves1820.c
@@ -433,12 +433,13 @@ int ves1820_ioctl (struct dvb_frontend *frontend, unsigned int cmd, void *arg)
}
case FE_READ_BER:
- *((u32*) arg) = ves1820_readreg(frontend->i2c, 0x14) |
- (ves1820_readreg(frontend->i2c, 0x15) << 8) |
- (ves1820_readreg(frontend->i2c, 0x16) << 16);
- /* XXX FIXME: scale!!*/
+ {
+ u32 ber = ves1820_readreg(frontend->i2c, 0x14) |
+ (ves1820_readreg(frontend->i2c, 0x15) << 8) |
+ ((ves1820_readreg(frontend->i2c, 0x16) & 0x0f) << 16);
+ *((u32*) arg) = 10 * ber;
break;
-
+ }
case FE_READ_SIGNAL_STRENGTH:
{
u8 gain = ves1820_readreg(frontend->i2c, 0x17);