diff options
| author | Chris Pascoe <c.pascoe@itee.uq.edu.au> | 2007-11-19 01:47:07 -0500 |
|---|---|---|
| committer | Mauro Carvalho Chehab <mchehab@infradead.org> | 2007-12-11 15:08:13 -0500 |
| commit | 78f3b0b672c79df9ffa55399a7d6fc4b173e9b4b (patch) | |
| tree | a812b2baa98b2d1f6da918df60e86f7be2489813 /drivers | |
| parent | 820eacd84cff23b76693f4be1e28feb672f4488f (diff) | |
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 <c.pascoe@itee.uq.edu.au>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Diffstat (limited to 'drivers')
| -rw-r--r-- | drivers/media/dvb/frontends/zl10353.c | 4 | ||||
| -rw-r--r-- | 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 a97a7fd2c891..0106df4c55e8 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, | |||
| 122 | enum fe_bandwidth bandwidth, | 122 | enum fe_bandwidth bandwidth, |
| 123 | u16 *nominal_rate) | 123 | u16 *nominal_rate) |
| 124 | { | 124 | { |
| 125 | u32 adc_clock = 22528; /* 20.480 MHz on the board(!?) */ | 125 | u32 adc_clock = 45056; /* 45.056 MHz */ |
| 126 | u8 bw; | 126 | u8 bw; |
| 127 | struct zl10353_state *state = fe->demodulator_priv; | 127 | struct zl10353_state *state = fe->demodulator_priv; |
| 128 | 128 | ||
| @@ -142,7 +142,7 @@ static void zl10353_calc_nominal_rate(struct dvb_frontend *fe, | |||
| 142 | break; | 142 | break; |
| 143 | } | 143 | } |
| 144 | 144 | ||
| 145 | *nominal_rate = (64 * bw * (1<<16) / (7 * 8) * 4000 / adc_clock + 2) / 4; | 145 | *nominal_rate = (bw * (1 << 23) / 7 * 125 + adc_clock / 2) / adc_clock; |
| 146 | 146 | ||
| 147 | dprintk("%s: bw %d, adc_clock %d => 0x%x\n", | 147 | dprintk("%s: bw %d, adc_clock %d => 0x%x\n", |
| 148 | __FUNCTION__, bw, adc_clock, *nominal_rate); | 148 | __FUNCTION__, bw, adc_clock, *nominal_rate); |
diff --git a/drivers/media/dvb/frontends/zl10353.h b/drivers/media/dvb/frontends/zl10353.h index cb274dc12b82..1c3d494a6da9 100644 --- a/drivers/media/dvb/frontends/zl10353.h +++ b/drivers/media/dvb/frontends/zl10353.h | |||
| @@ -30,7 +30,7 @@ struct zl10353_config | |||
| 30 | u8 demod_address; | 30 | u8 demod_address; |
| 31 | 31 | ||
| 32 | /* frequencies in kHz */ | 32 | /* frequencies in kHz */ |
| 33 | int adc_clock; // default: 22528 | 33 | int adc_clock; /* default: 45056 */ |
| 34 | 34 | ||
| 35 | /* set if no pll is connected to the secondary i2c bus */ | 35 | /* set if no pll is connected to the secondary i2c bus */ |
| 36 | int no_tuner; | 36 | int no_tuner; |
