From: Jarkko Nikula <jhnikula@gmail.com>
To: Liam Girdwood <lrg@slimlogic.co.uk>
Cc: alsa-devel <alsa-devel@alsa-project.org>,
Mark Brown <broonie@opensource.wolfsonmicro.com>,
Peter Ujfalusi <peter.ujfalusi@nokia.com>,
Graeme Gregory <gg@slimlogic.co.uk>
Subject: Re: [PATCH] ASoC - Add support for upto 16 channels on OMAP MCBSP
Date: Thu, 5 Nov 2009 21:28:22 +0200 [thread overview]
Message-ID: <20091105212822.2fab9974.jhnikula@gmail.com> (raw)
In-Reply-To: <1257432930.3603.902.camel@odin>
On Thu, 05 Nov 2009 14:55:30 +0000
Liam Girdwood <lrg@slimlogic.co.uk> wrote:
> I've reworked this myself now. It does appear that the current FPER
> calculations assume BCLK scales with rate
>
> i.e. BCLK = rate * channels * word len
>
> This is fine for when McBSP is FRM/BCLK slave (all users except pandora)
> as FPER should be ignored internally.
>
> However, when BCLK is constant (e.g. McBSP BCLK derived from constant
> source) and we run McBSP as FRM/BCLK master we currently break our
> sample rate generation.
>
This is true, currently possibilities to get standard sample rates as
accurately as possible when using McBSP as a master and when using
fixed sample rate generator input clock (CLKSRG) are too much limited.
So the period size adjustment is a good improvement.
CLKSRG can take its input from internal fixed 96 MHz, CLKS pin, CLKR
pin, CLKX pin or internal interface clock (proprotional to CPU freq).
> Imho, it's better to generate FPER based upon BCLK and rate. e.g. we
> calculate the frame size required for the given BCLK and rate.
>
Yep.
Actually BCLK doesn't have to be fixed as it is derived by dividing the
CLKSRG with CLKGDV. This can allow to optimize the BCLK and frame size
to be smaller when CLKSRG >> BCLK.
Would be nice if both the divider and frame size are calculated
dynamically based on CLKSRG frequency and sample rate.
> I'm now slightly curious about how pandora handles different rates since
> it uses the McBSP in master mode too. I guess they can only handle a
> single sample rate ?
>
IRCC correctly the external master clock used in Pandora was derived
from the codec and that clock was following the sample rate.
--
Jarkko
next prev parent reply other threads:[~2009-11-05 19:27 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-11-04 17:53 [PATCH] ASoC - Add support for upto 16 channels on OMAP MCBSP Liam Girdwood
2009-11-04 18:28 ` Mark Brown
2009-11-04 18:55 ` Graeme Gregory
2009-11-04 19:46 ` Liam Girdwood
2009-11-05 7:51 ` Jarkko Nikula
2009-11-05 14:55 ` Liam Girdwood
2009-11-05 19:28 ` Jarkko Nikula [this message]
2009-11-05 20:08 ` Liam Girdwood
2009-11-06 13:20 ` Mark Brown
2009-11-06 14:25 ` Liam Girdwood
2009-11-06 15:00 ` Mark Brown
2009-11-05 8:14 ` Peter Ujfalusi
2009-11-05 8:26 ` Peter Ujfalusi
2009-11-05 10:05 ` Liam Girdwood
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=20091105212822.2fab9974.jhnikula@gmail.com \
--to=jhnikula@gmail.com \
--cc=alsa-devel@alsa-project.org \
--cc=broonie@opensource.wolfsonmicro.com \
--cc=gg@slimlogic.co.uk \
--cc=lrg@slimlogic.co.uk \
--cc=peter.ujfalusi@nokia.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.