[media] drx-j: Fix detection of no signal
authorMauro Carvalho Chehab <m.chehab@samsung.com>
Mon, 10 Mar 2014 11:18:31 +0000 (08:18 -0300)
committerMauro Carvalho Chehab <m.chehab@samsung.com>
Tue, 11 Mar 2014 10:37:20 +0000 (07:37 -0300)
When the signal is 7, it means that no signal was received.

Value experimentally measured.

Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
drivers/media/dvb-frontends/drx39xyj/drxj.c

index 9958277dd943b037540d500f899690433a25af59..8098d87cda0b0f89f9c3195a88c04f8798e51446 100644 (file)
@@ -9420,6 +9420,9 @@ static int get_sig_strength(struct drx_demod_instance *demod, u16 *sig_strength)
                *sig_strength = (20 * if_gain / if_agc_sns);
        }
 
+       if (*sig_strength <= 7)
+               *sig_strength = 0;
+
        return 0;
        rw_error:
        return -EIO;