diff options
author | Holger Waechtler <devnull@localhost> | 2002-10-24 09:52:39 +0000 |
---|---|---|
committer | Holger Waechtler <devnull@localhost> | 2002-10-24 09:52:39 +0000 |
commit | 414d11591555c94ae972697c1fba5753110a9d68 (patch) | |
tree | 588f35ba570bfdc773655cf793ec1de995329fcf /linux/drivers/media | |
parent | 0213454f4683cc1e7e8788148ae87cd693e0cdc5 (diff) | |
download | mediapointer-dvb-s2-414d11591555c94ae972697c1fba5753110a9d68.tar.gz mediapointer-dvb-s2-414d11591555c94ae972697c1fba5753110a9d68.tar.bz2 |
BER fixes by obi
Diffstat (limited to 'linux/drivers/media')
-rw-r--r-- | linux/drivers/media/dvb/frontends/alps_bsrv2.c | 2 | ||||
-rw-r--r-- | linux/drivers/media/dvb/frontends/ves1820.c | 11 |
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); |