Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit f286c2a4 authored by Evgeny Plehov's avatar Evgeny Plehov Committed by Mauro Carvalho Chehab
Browse files

[media] cxd2820r_c: fix if_ctl calculation



fixes tuning for DVB-C

Signed-off-by: default avatarEvgeny Plehov <EvgenyPlehov@ukr.net>
Reviewed-by: default avatarAntti Palosaari <crope@iki.fi>
Signed-off-by: default avatarMichael Krufky <mkrufky@linuxtv.org>
Signed-off-by: default avatarMauro Carvalho Chehab <m.chehab@samsung.com>
parent 648ad154
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -78,7 +78,7 @@ int cxd2820r_set_frontend_c(struct dvb_frontend *fe)

	num = if_freq / 1000; /* Hz => kHz */
	num *= 0x4000;
	if_ctl = cxd2820r_div_u64_round_closest(num, 41000);
	if_ctl = 0x4000 - cxd2820r_div_u64_round_closest(num, 41000);
	buf[0] = (if_ctl >> 8) & 0x3f;
	buf[1] = (if_ctl >> 0) & 0xff;