From: Mauro Carvalho Chehab Date: Mon, 10 Mar 2014 11:18:31 +0000 (-0300) Subject: [media] drx-j: Fix detection of no signal X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=80846a5c2f6650c903e6fa0708030cb6ba1124c8;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git [media] drx-j: Fix detection of no signal When the signal is 7, it means that no signal was received. Value experimentally measured. Signed-off-by: Mauro Carvalho Chehab --- diff --git a/drivers/media/dvb-frontends/drx39xyj/drxj.c b/drivers/media/dvb-frontends/drx39xyj/drxj.c index 9958277dd943..8098d87cda0b 100644 --- a/drivers/media/dvb-frontends/drx39xyj/drxj.c +++ b/drivers/media/dvb-frontends/drx39xyj/drxj.c @@ -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;