From: Troy Kisky <troy.kisky@boundarydevices.com>
To: Raffaele Recalcati <lamiaposta71@gmail.com>
Cc: davinci-linux-open-source@linux.davincidsp.com,
Russell King <linux@arm.linux.org.uk>,
Takashi Iwai <tiwai@suse.de>,
Mark Brown <broonie@opensource.wolfsonmicro.com>,
alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org,
Davide Bonfanti <davide.bonfanti@bticino.it>,
Raffaele Recalcati <raffaele.recalcati@bticino.it>,
Chaithrika U S <chaithrika@ti.com>,
linux-arm-kernel@lists.infradead.org,
Liam Girdwood <lrg@slimlogic.co.uk>
Subject: Re: [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.com \
--cc=alsa-devel@alsa-project.org \
--cc=broonie@opensource.wolfsonmicro.com \
--cc=chaithrika@ti.com \
--cc=davide.bonfanti@bticino.it \
--cc=davinci-linux-open-source@linux.davincidsp.com \
--cc=lamiaposta71@gmail.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@arm.linux.org.uk \
--cc=lrg@slimlogic.co.uk \
--cc=raffaele.recalcati@bticino.it \
--cc=tiwai@suse.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
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;
as well as URLs for NNTP newsgroup(s).