Gitweb: http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=78f3b0b672c79df9ffa55399a7d6fc4b173e9b4b Commit: 78f3b0b672c79df9ffa55399a7d6fc4b173e9b4b Parent: 820eacd84cff23b76693f4be1e28feb672f4488f Author: Chris Pascoe <[EMAIL PROTECTED]> AuthorDate: Mon Nov 19 03:47:07 2007 -0300 Committer: Mauro Carvalho Chehab <[EMAIL PROTECTED]> CommitDate: Tue Dec 11 18:08:13 2007 -0200
V4L/DVB (6629): zl10353: fix default adc_clock and TRL nominal rate calculation The default adc_clock for the zl10353 is different from what was originally thought to be the case and the TRL nominal rate formula was incorrect as a result. Use a better (and hopefully now correct) formula. Signed-off-by: Chris Pascoe <[EMAIL PROTECTED]> Signed-off-by: Mauro Carvalho Chehab <[EMAIL PROTECTED]> --- drivers/media/dvb/frontends/zl10353.c | 4 ++-- drivers/media/dvb/frontends/zl10353.h | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/media/dvb/frontends/zl10353.c b/drivers/media/dvb/frontends/zl10353.c index a97a7fd..0106df4 100644 --- a/drivers/media/dvb/frontends/zl10353.c +++ b/drivers/media/dvb/frontends/zl10353.c @@ -122,7 +122,7 @@ static void zl10353_calc_nominal_rate(struct dvb_frontend *fe, enum fe_bandwidth bandwidth, u16 *nominal_rate) { - u32 adc_clock = 22528; /* 20.480 MHz on the board(!?) */ + u32 adc_clock = 45056; /* 45.056 MHz */ u8 bw; struct zl10353_state *state = fe->demodulator_priv; @@ -142,7 +142,7 @@ static void zl10353_calc_nominal_rate(struct dvb_frontend *fe, break; } - *nominal_rate = (64 * bw * (1<<16) / (7 * 8) * 4000 / adc_clock + 2) / 4; + *nominal_rate = (bw * (1 << 23) / 7 * 125 + adc_clock / 2) / adc_clock; dprintk("%s: bw %d, adc_clock %d => 0x%x\n", __FUNCTION__, bw, adc_clock, *nominal_rate); diff --git a/drivers/media/dvb/frontends/zl10353.h b/drivers/media/dvb/frontends/zl10353.h index cb274dc..1c3d494 100644 --- a/drivers/media/dvb/frontends/zl10353.h +++ b/drivers/media/dvb/frontends/zl10353.h @@ -30,7 +30,7 @@ struct zl10353_config u8 demod_address; /* frequencies in kHz */ - int adc_clock; // default: 22528 + int adc_clock; /* default: 45056 */ /* set if no pll is connected to the secondary i2c bus */ int no_tuner; - To unsubscribe from this list: send the line "unsubscribe git-commits-head" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html