Hi,

ves1820 has only 20 bits for BER estimation. Actually I do not have
access to ves1893 documentation, but I guess it has only 20 bits, too,
as the ves1993 has.

I think the BER value should be multiplied by 10, because the register
counts 10 ^ -8 bits, since PVBER is set to 1 1.

Regards,
Andreas



diff -u -r1.1 alps_bsrv2.c
--- linux/drivers/media/dvb/frontends/alps_bsrv2.c      16 Oct 2002 16:52:27 -0000     
 1.1
+++ linux/drivers/media/dvb/frontends/alps_bsrv2.c      23 Oct 2002 23:07:56 -0000
@@ -342,7 +342,7 @@
 
                *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 -u -r1.2 ves1820.c
--- linux/drivers/media/dvb/frontends/ves1820.c 21 Oct 2002 11:06:15 -0000      1.2
+++ linux/drivers/media/dvb/frontends/ves1820.c 23 Oct 2002 23:07:57 -0000
@@ -433,10 +433,9 @@
        }
 
        case FE_READ_BER:
-               *((u32*) arg) = ves1820_readreg(frontend->i2c, 0x14) |
+               *((u32*) arg) = (ves1820_readreg(frontend->i2c, 0x14) |
                                (ves1820_readreg(frontend->i2c, 0x15) << 8) |
-                               (ves1820_readreg(frontend->i2c, 0x16) << 16);
-               /* XXX FIXME: scale!!*/
+                               ((ves1820_readreg(frontend->i2c, 0x16) & 0x0F) << 16)) 
+* 10;
                break;
 
        case FE_READ_SIGNAL_STRENGTH:



-- 
Info:
To unsubscribe send a mail to [EMAIL PROTECTED] with "unsubscribe linux-dvb" as 
subject.

Reply via email to