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.
31 lines
850 B
31 lines
850 B
adjust signal strength report for devices with eLNA set to 0xA0
|
|
|
|
From: Gianluca Gennari <gennarone@gmail.com>
|
|
---
|
|
drivers/staging/media/as102/as102_fe.c | 10 ++++++++++
|
|
1 file changed, 10 insertions(+)
|
|
|
|
diff --git a/drivers/staging/media/as102/as102_fe.c b/drivers/staging/media/as102/as102_fe.c
|
|
index 9ce8c9d..d188818 100644
|
|
--- a/drivers/staging/media/as102/as102_fe.c
|
|
+++ b/drivers/staging/media/as102/as102_fe.c
|
|
@@ -224,6 +224,16 @@ static int as102_fe_read_signal_strength(struct dvb_frontend *fe,
|
|
|
|
*strength = (((0xffff * 400) * dev->signal_strength + 41000) * 2);
|
|
|
|
+ switch (dev->elna_cfg) {
|
|
+ case 0xA0:
|
|
+ /* with eLNA set to 0xA0, the signal strength is capped at about 53% */
|
|
+ *strength = *strength > 0x8ccc ? 0xffff : *strength * 20 / 11;
|
|
+ break;
|
|
+ case 0XC0:
|
|
+ default:
|
|
+ break;
|
|
+ }
|
|
+
|
|
LEAVE();
|
|
return 0;
|
|
}
|
|
--
|
|
1.7.9.5
|
|
|
|
|