From: troy.kisky@boundarydevices•com (Troy Kisky)
To: linux-arm-kernel@lists•infradead.org
Subject: [PATCH] ASoC: DaVinci: Added support for cpu clocking I2S
Date: Mon, 28 Jun 2010 12:11:13 -0700 [thread overview]
Message-ID: <4C28F3D1.5060806@boundarydevices.com> (raw)
In-Reply-To: <1277707487-3371-1-git-send-email-lamiaposta71@gmail.com>
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;
next prev parent reply other threads:[~2010-06-28 19:11 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-06-28 6:44 [PATCH] ASoC: DaVinci: Added support for cpu clocking I2S Raffaele Recalcati
2010-06-28 10:30 ` Mark Brown
2010-06-30 8:17 ` Raffaele Recalcati
2010-06-30 10:00 ` Raffaele Recalcati
2010-06-30 14:53 ` Mark Brown
2010-06-28 19:11 ` Troy Kisky [this message]
2010-06-30 8:52 ` Raffaele Recalcati
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4C28F3D1.5060806@boundarydevices.com \
--to=troy.kisky@boundarydevices$(echo .)com \
--cc=linux-arm-kernel@lists$(echo .)infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox