summaryrefslogtreecommitdiff
path: root/drivers/media/dvb-frontends
diff options
context:
space:
mode:
authorAbylay Ospan <aospan@netup.ru>2016-04-20 14:02:58 -0300
committerMauro Carvalho Chehab <mchehab@osg.samsung.com>2016-06-07 12:12:46 -0300
commit4da093ce4e8bd36223763c900f623ce36a0d51c3 (patch)
tree1b75111ca7b9f6c284ac4ee7e956c79fad287c27 /drivers/media/dvb-frontends
parent30ae3307adcf500229e95731a5e116bc3a8c31f8 (diff)
[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 <aospan@netup.ru> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Diffstat (limited to 'drivers/media/dvb-frontends')
-rw-r--r--drivers/media/dvb-frontends/cxd2841er.c2
1 files changed, 2 insertions, 0 deletions
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;
}