You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
37 lines
1.1 KiB
37 lines
1.1 KiB
af9015: fix SNR report in Enigma2/Kaffeine; SNR is now scaled in the full
|
|
0-65536 range; the snrdb module parameter of the af9013 demodulator enables
|
|
the SNR output in dBx10 as before.
|
|
|
|
From: Gianluca Gennari <gennarone@gmail.com>
|
|
---
|
|
drivers/media/dvb-frontends/af9013.c | 7 +++++++
|
|
1 file changed, 7 insertions(+)
|
|
|
|
diff --git a/drivers/media/dvb-frontends/af9013.c b/drivers/media/dvb-frontends/af9013.c
|
|
index a204f28..1295487 100644
|
|
--- a/drivers/media/dvb-frontends/af9013.c
|
|
+++ b/drivers/media/dvb-frontends/af9013.c
|
|
@@ -24,6 +24,10 @@
|
|
|
|
#include "af9013_priv.h"
|
|
|
|
+int af9013_snrdb;
|
|
+module_param_named(snrdb, af9013_snrdb, int, 0644);
|
|
+MODULE_PARM_DESC(snrdb, "Turn on/off SNR output as dBx10 (default:off).");
|
|
+
|
|
struct af9013_state {
|
|
struct i2c_adapter *i2c;
|
|
struct dvb_frontend fe;
|
|
@@ -471,6 +475,9 @@ static int af9013_statistics_snr_result(struct dvb_frontend *fe)
|
|
}
|
|
state->snr = tmp * 10; /* dB/10 */
|
|
|
|
+ if (!af9013_snrdb)
|
|
+ state->snr = (0xffff / (snr_lut[len - 1].snr * 10)) * state->snr;
|
|
+
|
|
return ret;
|
|
err:
|
|
dev_dbg(&state->i2c->dev, "%s: failed=%d\n", __func__, ret);
|
|
--
|
|
1.7.9.5
|
|
|
|
|