summaryrefslogtreecommitdiff
path: root/linux/drivers/media/dvb/frontends/cx24123.c
diff options
context:
space:
mode:
authorSteven Toth <stoth@hauppauge.com>2006-10-02 20:35:40 -0400
committerSteven Toth <stoth@hauppauge.com>2006-10-02 20:35:40 -0400
commit27f1ca00af6b61fcb546e54ce0b2b6ad3322031f (patch)
tree65c2f3a7c20ebfb8d9190c12c3af23922d914512 /linux/drivers/media/dvb/frontends/cx24123.c
parentecc8214b3d4174ae769cecc509f5984d35b31e6a (diff)
downloadmediapointer-dvb-s2-27f1ca00af6b61fcb546e54ce0b2b6ad3322031f.tar.gz
mediapointer-dvb-s2-27f1ca00af6b61fcb546e54ce0b2b6ad3322031f.tar.bz2
CX24109 patch to eliminate the weird mis-tunings
From: Steven Toth <stoth@hauppauge.com> A number of people have been reporting wierd tuning problems with various cards. Yeasah tracked down the problem to a miss-read datasheet. This resolves the problems. Signed-off-by: Yeasah Pell <yeasah@schwide.net> Signed-off-by: Steven Toth <stoth@hauppauge.com>
Diffstat (limited to 'linux/drivers/media/dvb/frontends/cx24123.c')
-rw-r--r--linux/drivers/media/dvb/frontends/cx24123.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/linux/drivers/media/dvb/frontends/cx24123.c b/linux/drivers/media/dvb/frontends/cx24123.c
index 842dc9a02..801d9c22e 100644
--- a/linux/drivers/media/dvb/frontends/cx24123.c
+++ b/linux/drivers/media/dvb/frontends/cx24123.c
@@ -564,8 +564,8 @@ static int cx24123_pll_calculate(struct dvb_frontend* fe, struct dvb_frontend_pa
ndiv = ( ((p->frequency * vco_div * 10) / (2 * XTAL / 1000)) / 32) & 0x1ff;
adiv = ( ((p->frequency * vco_div * 10) / (2 * XTAL / 1000)) % 32) & 0x1f;
- if (adiv == 0)
- ndiv++;
+ if (adiv == 0 && ndiv > 0)
+ ndiv--;
/* control bits 11, refdiv 11, charge pump polarity 1, charge pump current, ndiv, adiv */
state->pllarg = (3 << 19) | (3 << 17) | (1 << 16) | (pump << 14) | (ndiv << 5) | adiv;