diff options
author | Michael Krufky <mkrufky@kernellabs.com> | 2011-04-16 12:22:10 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2011-04-19 10:32:44 -0400 |
commit | 3f688e8c62fb69ff65bc9325831b5b3d3f5ef8ed (patch) | |
tree | aa5fc2696c410d3dc09bccb4c5a9ec7c2e3dc341 /drivers/media/common | |
parent | 381ad0ea146465406a0740f437e9971ceb6465a9 (diff) |
[media] tda18271: fix bad calculation of main post divider byte
R_MPD bit 3 does not depend on analog vs. digital. Just use
(0x7f & pd) directly from the values in the main pll table.
Thanks to Stefan Sibiga for pointing this out.
Cc: Stefan Sibiga <stefansibiga@yahoo.ca>
Signed-off-by: Michael Krufky <mkrufky@kernellabs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/common')
-rw-r--r-- | drivers/media/common/tuners/tda18271-common.c | 11 |
1 files changed, 1 insertions, 10 deletions
diff --git a/drivers/media/common/tuners/tda18271-common.c b/drivers/media/common/tuners/tda18271-common.c index 5466d47db899..aae40e52af5b 100644 --- a/drivers/media/common/tuners/tda18271-common.c +++ b/drivers/media/common/tuners/tda18271-common.c | |||
@@ -533,16 +533,7 @@ int tda18271_calc_main_pll(struct dvb_frontend *fe, u32 freq) | |||
533 | if (tda_fail(ret)) | 533 | if (tda_fail(ret)) |
534 | goto fail; | 534 | goto fail; |
535 | 535 | ||
536 | regs[R_MPD] = (0x77 & pd); | 536 | regs[R_MPD] = (0x7f & pd); |
537 | |||
538 | switch (priv->mode) { | ||
539 | case TDA18271_ANALOG: | ||
540 | regs[R_MPD] &= ~0x08; | ||
541 | break; | ||
542 | case TDA18271_DIGITAL: | ||
543 | regs[R_MPD] |= 0x08; | ||
544 | break; | ||
545 | } | ||
546 | 537 | ||
547 | div = ((d * (freq / 1000)) << 7) / 125; | 538 | div = ((d * (freq / 1000)) << 7) / 125; |
548 | 539 | ||