Raffaele Recalcati wrote:
> + if (dev->i2s_fast_clock) {
> + clk_div = 256;
can you have
f = (freq / params->rate_num) * params->rate_den;
> + do {
> + framesize = (freq / (--clk_div)) /
> + params->rate_num *
> + params->rate_den;
and
framesize = f / (--clk_div);
> + } while (((framesize < 33) || (framesize > 4095)) &&
> + (clk_div));
> + clk_div--;
looks like clk_div can go negative here, should the above while say (clk_div >
1)
> + srgr |= DAVINCI_MCBSP_SRGR_FPER(framesize - 1);
> + } else {
> + /* symmetric waveforms */
> + clk_div = freq / (mcbsp_word_length * 16) /
> + params->rate_num * params->rate_den;
> + srgr |= DAVINCI_MCBSP_SRGR_FPER(mcbsp_word_length *
> + 16 - 1);
> + }
> + clk_div &= 0xFF;
> + srgr |= clk_div;
_______________________________________________
Davinci-linux-open-source mailing list
[email protected]
http://linux.davincidsp.com/mailman/listinfo/davinci-linux-open-source
- [PATCH] ASoC: DaVinci: Added support for cpu clocking I... Raffaele Recalcati
- Re: [PATCH] ASoC: DaVinci: Added support for cpu c... Mark Brown
- Re: [PATCH] ASoC: DaVinci: Added support for c... Raffaele Recalcati
- Re: [PATCH] ASoC: DaVinci: Added support f... Raffaele Recalcati
- Re: [PATCH] ASoC: DaVinci: Added support f... Mark Brown
- Re: [PATCH] ASoC: DaVinci: Added support for cpu c... Troy Kisky
- Re: [PATCH] ASoC: DaVinci: Added support for c... Raffaele Recalcati
