[media] cx22702: Fix signal strength
authorJean Delvare <khali@linux-fr.org>
Sun, 12 Feb 2012 18:03:03 +0000 (15:03 -0300)
committerMauro Carvalho Chehab <mchehab@redhat.com>
Thu, 8 Mar 2012 11:54:42 +0000 (08:54 -0300)
commit06302ffbb470359c8cbcf1ee8b057d6930300f90
treed2f8ad2bf7b0bf2650eecc1d9643c94464f07944
parent6c5637e4eda58292f7d9ee6ee0b1f9aa4b0a7e7f
[media] cx22702: Fix signal strength

The signal strength value returned is not quite correct, it decreases
when I increase the gain of my antenna, and vice versa. It also
doesn't span over the whole 0x0000-0xffff range. Compute a value which
at least increases when signal strength increases, and spans the whole
allowed range.

In practice I get 67% with my antenna fully amplified and 51% with
no amplification. This is close enough to what I get on my other
DVB-T adapter with the same antenna.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Cc: Steven Toth <stoth@kernellabs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
drivers/media/dvb/frontends/cx22702.c