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.
26 lines
711 B
26 lines
711 B
5 years ago
|
diff --git a/drivers/media/dvb-frontends/af9033.c b/drivers/media/dvb-frontends/af9033.c
|
||
|
index 464ad87..28ec763 100644
|
||
|
--- a/drivers/media/dvb-frontends/af9033.c
|
||
|
+++ b/drivers/media/dvb-frontends/af9033.c
|
||
|
@@ -21,6 +21,10 @@
|
||
|
|
||
|
#include "af9033_priv.h"
|
||
|
|
||
|
+static int af9033_snrdb;
|
||
|
+module_param_named(snrdb, af9033_snrdb, int, 0644);
|
||
|
+MODULE_PARM_DESC(snrdb, "Turn on/off SNR output as dBx10 (default:off).");
|
||
|
+
|
||
|
struct af9033_state {
|
||
|
struct i2c_adapter *i2c;
|
||
|
struct dvb_frontend fe;
|
||
|
@@ -754,6 +758,9 @@ static int af9033_read_snr(struct dvb_frontend *fe, u16 *snr)
|
||
|
|
||
|
*snr = tmp * 10; /* dB/10 */
|
||
|
|
||
|
+ if (len && !af9033_snrdb)
|
||
|
+ *snr = 0xffff * (int)tmp / (int)snr_lut[len - 1].snr;
|
||
|
+
|
||
|
return 0;
|
||
|
|
||
|
err:
|