diff options
author | Patrick Boettcher <devnull@localhost> | 2004-09-25 13:36:52 +0000 |
---|---|---|
committer | Patrick Boettcher <devnull@localhost> | 2004-09-25 13:36:52 +0000 |
commit | 43bb93add9ac1d529f100ace179402f8bc4f848f (patch) | |
tree | 8189b49bd1c22286d46c9f4a08c0f84e26ff1399 /linux/drivers/media/dvb/frontends/dib3000mb.c | |
parent | 2f9202097e4418d085a0d6ef636de1d0b0fb84dd (diff) | |
download | mediapointer-dvb-s2-43bb93add9ac1d529f100ace179402f8bc4f848f.tar.gz mediapointer-dvb-s2-43bb93add9ac1d529f100ace179402f8bc4f848f.tar.bz2 |
corrected FEC values
Diffstat (limited to 'linux/drivers/media/dvb/frontends/dib3000mb.c')
-rw-r--r-- | linux/drivers/media/dvb/frontends/dib3000mb.c | 17 |
1 files changed, 12 insertions, 5 deletions
diff --git a/linux/drivers/media/dvb/frontends/dib3000mb.c b/linux/drivers/media/dvb/frontends/dib3000mb.c index 4ee48a516..e93123e1b 100644 --- a/linux/drivers/media/dvb/frontends/dib3000mb.c +++ b/linux/drivers/media/dvb/frontends/dib3000mb.c @@ -694,7 +694,7 @@ static int dib3000mb_read_status(struct dib3000mb_state *state,fe_status_t *stat static int dib3000mb_read_ber(struct dib3000mb_state *state,u32 *ber) { *ber = - (((rd(DIB3000MB_REG_BER_MSB) & 0x1f) << 16) | rd(DIB3000MB_REG_BER_LSB) ); + ((rd(DIB3000MB_REG_BER_MSB) << 16) | rd(DIB3000MB_REG_BER_LSB) ); return 0; } @@ -706,10 +706,17 @@ static int dib3000mb_read_signal_strength(struct dib3000mb_state *state, u16 *st static int dib3000mb_read_snr(struct dib3000mb_state *state,u16 *snr) { -// int sigpow = rd(DIB3000MB_REG_SIGNAL_POWER); -// u32 icipow = ((rd(DIB3000MB_REG_NOISE_POWER_MSB) & 0xff) << 16) | -// rd(DIB3000MB_REG_NOISE_POWER_LSB); -// if (sigpow > 0) + short sigpow = rd(DIB3000MB_REG_SIGNAL_POWER); + int icipow = ((rd(DIB3000MB_REG_NOISE_POWER_MSB) & 0xff) << 16) | + rd(DIB3000MB_REG_NOISE_POWER_LSB); + + deb_info("sigpow: %d, icipow: %d\n",sigpow,icipow); + + if (sigpow > 0 && icipow > 0) { + *snr = (sigpow << 8 / icipow); + } else + snr = 0; + return 0; } |