linux-media.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] cxd2820r_c: Fix if_ctl calculation
@ 2013-11-02 21:04 CrazyCat
  2013-11-03 17:18 ` Antti Palosaari
  0 siblings, 1 reply; 7+ messages in thread
From: CrazyCat @ 2013-11-02 21:04 UTC (permalink / raw)
  To: linux-media

Fix tune for DVB-C.

Signed-off-by: Evgeny Plehov <EvgenyPlehov@ukr.net>
diff --git a/drivers/media/dvb-frontends/cxd2820r_c.c b/drivers/media/dvb-frontends/cxd2820r_c.c
index 125a440..5c6ab49 100644
--- a/drivers/media/dvb-frontends/cxd2820r_c.c
+++ b/drivers/media/dvb-frontends/cxd2820r_c.c
@@ -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;



^ permalink raw reply related	[flat|nested] 7+ messages in thread
* [PATCH] cxd2820r_c: Fix if_ctl calculation
@ 2013-11-01 20:06 CrazyCat
  2013-11-01 20:11 ` Antti Palosaari
  0 siblings, 1 reply; 7+ messages in thread
From: CrazyCat @ 2013-11-01 20:06 UTC (permalink / raw)
  To: linux-media

Fix tune for DVB-C.

Signed-off-by: Evgeny Plehov <EvgenyPlehov@ukr.net>
diff --git a/drivers/media/dvb-frontends/cxd2820r_c.c 
b/drivers/media/dvb-frontends/cxd2820r_c.c
index 125a440..5c6ab49 100644
--- a/drivers/media/dvb-frontends/cxd2820r_c.c
+++ b/drivers/media/dvb-frontends/cxd2820r_c.c
@@ -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;


^ permalink raw reply related	[flat|nested] 7+ messages in thread
* [PATCH] cxd2820r_c: Fix if_ctl calculation
@ 2013-11-01 19:27 CrazyCat
  2013-11-01 20:01 ` Antti Palosaari
  0 siblings, 1 reply; 7+ messages in thread
From: CrazyCat @ 2013-11-01 19:27 UTC (permalink / raw)
  To: linux-media

Fix tune for DVB-C.
Signed-off-by: Evgeny Plehov <EvgenyPlehov@ukr.net 
<mailto:EvgenyPlehov@ukr.net>>
diff --git a/drivers/media/dvb-frontends/cxd2820r_c.c 
b/drivers/media/dvb-frontends/cxd2820r_c.c
index 125a440..5c6ab49 100644
--- a/drivers/media/dvb-frontends/cxd2820r_c.c
+++ b/drivers/media/dvb-frontends/cxd2820r_c.c
@@ -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;

^ permalink raw reply related	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2013-11-03 17:41 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-11-02 21:04 [PATCH] cxd2820r_c: Fix if_ctl calculation CrazyCat
2013-11-03 17:18 ` Antti Palosaari
2013-11-03 17:41   ` Antti Palosaari
  -- strict thread matches above, loose matches on Subject: below --
2013-11-01 20:06 CrazyCat
2013-11-01 20:11 ` Antti Palosaari
2013-11-01 19:27 CrazyCat
2013-11-01 20:01 ` Antti Palosaari

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).