Skip to content

Commit

Permalink
[media] tda18271: fix bad calculation of main post divider byte
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Michael Krufky authored and Mauro Carvalho Chehab committed Apr 19, 2011
1 parent 381ad0e commit 3f688e8
Showing 1 changed file with 1 addition and 10 deletions.
11 changes: 1 addition & 10 deletions drivers/media/common/tuners/tda18271-common.c
Original file line number Diff line number Diff line change
Expand Up @@ -533,16 +533,7 @@ int tda18271_calc_main_pll(struct dvb_frontend *fe, u32 freq)
if (tda_fail(ret))
goto fail;

regs[R_MPD] = (0x77 & pd);

switch (priv->mode) {
case TDA18271_ANALOG:
regs[R_MPD] &= ~0x08;
break;
case TDA18271_DIGITAL:
regs[R_MPD] |= 0x08;
break;
}
regs[R_MPD] = (0x7f & pd);

div = ((d * (freq / 1000)) << 7) / 125;

Expand Down

0 comments on commit 3f688e8

Please sign in to comment.