From: Mark Brown <broonie@opensource.wolfsonmicro.com>
To: Raffaele Recalcati <lamiaposta71@gmail.com>
Cc: davinci-linux-open-source@linux.davincidsp.com,
Raffaele Recalcati <raffaele.recalcati@bticino.it>,
Davide Bonfanti <davide.bonfanti@bticino.it>,
Russell King <linux@arm.linux.org.uk>,
Chaithrika U S <chaithrika@ti.com>,
Troy Kisky <troy.kisky@boundarydevices.com>,
Liam Girdwood <lrg@slimlogic.co.uk>,
Jaroslav Kysela <perex@perex.cz>, Takashi Iwai <tiwai@suse.de>,
linux-arm-kernel@lists.infradead.org,
linux-kernel@vger.kernel.org, alsa-devel@alsa-project.org
Subject: Re: [PATCH 3/3] ASoC: DaVinci: Added fast clock timing for McBSP (I2S)
Date: Thu, 1 Jul 2010 16:01:40 +0100 [thread overview]
Message-ID: <20100701150140.GE8742@rakim.wolfsonmicro.main> (raw)
In-Reply-To: <1277905678-4695-4-git-send-email-lamiaposta71@gmail.com>
On Wed, Jun 30, 2010 at 03:47:58PM +0200, Raffaele Recalcati wrote:
> + /*
> + * This define works when both clock and FS are output for the cpu
> + * and makes clock very fast (FS is not symmetrical, but sampling
> + * frequency is better approximated
> + */
> + bool i2s_fast_clock;
I'm having a hard time following the description here - which clock is
being made very fast? The output clocks, which are the ones people can
observe, will presumably not suddenly start running very fast.
It's probably better to rename this option to reflect the actual
function (trading off between frequency accuracy and mark/space ratio)
rather than the way it's implemented internally.
> - srgr |= DAVINCI_MCBSP_SRGR_FPER(mcbsp_word_length *
> - 16 - 1);
> + if (dev->i2s_fast_clock) {
> + clk_div = 256;
> + do {
> + framesize = (freq / (--clk_div)) /
> + params->rate_num *
> + params->rate_den;
> + } while (((framesize < 33) || (framesize > 4095)) &&
> + (clk_div));
> + clk_div--;
> + 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);
> + }
Hrm. This doesn't really correspond to your commit message at all.
Your commit message makes it sound like you've changed something about
the clocking setup of the device, such as adding another clock source,
but what you've actually done here is change the method used to
calculate the divider.
I'm *guessing* that the actual effect of your change is that you will
normally end up selecting a very much higher bit clock than would
otherwise be the case. It strikes me that there must be a better
algorithm for the calculation - for example, working up from the minimum
clock rate - which will give the same results as we currently have where
the driver is already generating accurate rates.
next prev parent reply other threads:[~2010-07-01 15:01 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <1277905678-4695-1-git-send-email-lamiaposta71@gmail.com>
2010-06-30 13:47 ` [PATCH 1/3] ASoC: DaVinci: Added two clocking possibilities to McBSP (I2S) Raffaele Recalcati
2010-07-01 14:35 ` Mark Brown
2010-06-30 13:47 ` [PATCH 2/3] ASoC: DaVinci: Added selection of clk input pin for McBSP Raffaele Recalcati
2010-07-01 14:36 ` Mark Brown
2010-06-30 13:47 ` [PATCH 3/3] ASoC: DaVinci: Added fast clock timing for McBSP (I2S) Raffaele Recalcati
2010-07-01 15:01 ` Mark Brown [this message]
2010-07-01 15:03 ` Mark Brown
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=20100701150140.GE8742@rakim.wolfsonmicro.main \
--to=broonie@opensource.wolfsonmicro.com \
--cc=alsa-devel@alsa-project.org \
--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=perex@perex.cz \
--cc=raffaele.recalcati@bticino.it \
--cc=tiwai@suse.de \
--cc=troy.kisky@boundarydevices.com \
/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