Gitweb: http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=c6e62a3a398d62e8ae366ac1465911db0ac7fc0b Commit: c6e62a3a398d62e8ae366ac1465911db0ac7fc0b Parent: 5ccaf905015c83a9b28e8496b4504b9b8dc25a80 Author: Chris Pascoe <[EMAIL PROTECTED]> AuthorDate: Tue Nov 20 02:49:41 2007 -0300 Committer: Mauro Carvalho Chehab <[EMAIL PROTECTED]> CommitDate: Fri Jan 25 19:02:36 2008 -0200
V4L/DVB (6654): mt352: support oversampled IF input Rework the input frequency calculation so that it produces the right values when the ADC oversamples the IF input. This means MT352 devices can now process a near-zero IF (according to the, specs 4.57MHz is supported with the default crystal). Signed-off-by: Chris Pascoe <[EMAIL PROTECTED]> Signed-off-by: Mauro Carvalho Chehab <[EMAIL PROTECTED]> --- drivers/media/dvb/frontends/mt352.c | 8 +++++++- 1 files changed, 7 insertions(+), 1 deletions(-) diff --git a/drivers/media/dvb/frontends/mt352.c b/drivers/media/dvb/frontends/mt352.c index 5dd9b73..7cd190b 100644 --- a/drivers/media/dvb/frontends/mt352.c +++ b/drivers/media/dvb/frontends/mt352.c @@ -152,7 +152,13 @@ static void mt352_calc_input_freq(struct mt352_state* state, if (state->config.if2) if2 = state->config.if2; - ife = (2*adc_clock - if2); + if (adc_clock >= if2 * 2) + ife = if2; + else { + ife = adc_clock - (if2 % adc_clock); + if (ife > adc_clock / 2) + ife = adc_clock - ife; + } value = -16374 * ife / adc_clock; dprintk("%s: if2 %d, ife %d, adc_clock %d => %d / 0x%x\n", __FUNCTION__, if2, ife, adc_clock, value, value & 0x3fff); - 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