From: Abylay Ospan Date: Wed, 20 Apr 2016 17:02:58 +0000 (-0300) Subject: [media] Fix DVB-T frequency offset calculation X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=4da093ce4e8bd36223763c900f623ce36a0d51c3;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git [media] Fix DVB-T frequency offset calculation Fix offset calculation inside cxd2841er_get_carrier_offset_t Now DVB-T should be tuned correctly Signed-off-by: Abylay Ospan Signed-off-by: Mauro Carvalho Chehab --- diff --git a/drivers/media/dvb-frontends/cxd2841er.c b/drivers/media/dvb-frontends/cxd2841er.c index 94613af6900d..609187d52d7a 100644 --- a/drivers/media/dvb-frontends/cxd2841er.c +++ b/drivers/media/dvb-frontends/cxd2841er.c @@ -1116,6 +1116,8 @@ static int cxd2841er_get_carrier_offset_t(struct cxd2841er_priv *priv, *offset = -1 * sign_extend32( ((u32)(data[0] & 0x1F) << 24) | ((u32)data[1] << 16) | ((u32)data[2] << 8) | (u32)data[3], 29); + *offset *= (bandwidth / 1000000); + *offset /= 235; return 0; }