From: Russell King - ARM Linux <linux@arm.linux.org.uk>
To: Jean-Francois Moine <moinejf@free.fr>
Cc: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>,
linux-arm-kernel@lists.infradead.org,
Jason Cooper <jason@lakedaemon.net>,
Rob Herring <rob.herring@calxeda.com>,
Pawel Moll <pawel.moll@arm.com>,
Mark Rutland <mark.rutland@arm.com>,
Stephen Warren <swarren@wwwdotorg.org>,
Ian Campbell <ian.campbell@citrix.com>,
devicetree@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 2/2] ARM: Dove: Add the audio device to the Cubox DT
Date: Sat, 31 Aug 2013 13:17:06 +0100 [thread overview]
Message-ID: <20130831121705.GE6617@n2100.arm.linux.org.uk> (raw)
In-Reply-To: <20130831135519.6ab0e163@armhf>
On Sat, Aug 31, 2013 at 01:55:19PM +0200, Jean-Francois Moine wrote:
> The last case was "when using the two audio controllers with different
> sample rates" (I should have added "in the set [44.1, 48, 96 kHz]").
> Then, with or without the availability of external clocks, both
> controllers will set the unique DCO to two different rates.
Ah, yes. The documentation is rather confusing too. In one part, it
does indeed say that there is only one DCO which is shared between the
two blocks.
However, each block has its own DCO register which allows it to be set
to a different frequency - maybe it accesses the same physical register.
In which case, it probably would be better that we use the external clock
for everything when it is available - Rabeeh's kernel already does that,
as does the kernel which I run on my Cubox. I'll pull that patch over to
the series for mainline later today:
a402fa7 ASoC: kirkwood: prefer external clock over internal clock
(This is copy'n'pasted with gpm, so is white-space damaged).
diff --git a/sound/soc/kirkwood/kirkwood-i2s.c b/sound/soc/kirkwood/kirkwood-i2s.c
index 1c8177b..92cd467 100644
--- a/sound/soc/kirkwood/kirkwood-i2s.c
+++ b/sound/soc/kirkwood/kirkwood-i2s.c
@@ -222,20 +222,20 @@ static void kirkwood_set_rate(struct snd_soc_dai *dai,
{
uint32_t clks_ctrl;
- if (rate == 44100 || rate == 48000 || rate == 96000) {
- /* use internal dco for supported rates */
- dev_dbg(dai->dev, "%s: dco set rate = %lu\n",
- __func__, rate);
- kirkwood_set_dco(priv->io, rate);
-
- clks_ctrl = KIRKWOOD_MCLK_SOURCE_DCO;
- } else if (!IS_ERR(priv->extclk)) {
+ if (!IS_ERR(priv->extclk)) {
/* use optional external clk for other rates */
dev_dbg(dai->dev, "%s: extclk set rate = %lu -> %lu\n",
__func__, rate, 256 * rate);
clk_set_rate(priv->extclk, 256 * rate);
clks_ctrl = KIRKWOOD_MCLK_SOURCE_EXTCLK;
+ } else if (rate == 44100 || rate == 48000 || rate == 96000) {
+ /* use internal dco for supported rates */
+ dev_dbg(dai->dev, "%s: dco set rate = %lu\n",
+ __func__, rate);
+ kirkwood_set_dco(priv->io, rate);
+
+ clks_ctrl = KIRKWOOD_MCLK_SOURCE_DCO;
}
writel(clks_ctrl, priv->io + KIRKWOOD_CLOCKS_CTRL);
}
next prev parent reply other threads:[~2013-08-31 12:22 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-08-28 9:35 Jean-Francois Moine
2013-08-28 10:14 ` Sebastian Hesselbarth
2013-08-31 10:51 ` Jean-Francois Moine
2013-08-31 11:24 ` Russell King - ARM Linux
2013-08-31 11:55 ` Jean-Francois Moine
2013-08-31 12:17 ` Russell King - ARM Linux [this message]
2013-09-01 9:26 ` Sebastian Hesselbarth
2013-09-26 8:11 ` Jean-Francois Moine
2013-09-26 8:31 ` Sebastian Hesselbarth
2013-09-26 11:28 ` Jean-Francois Moine
2013-09-26 12:42 ` Sebastian Hesselbarth
2013-09-28 14:27 ` Sebastian Hesselbarth
2013-10-03 16:17 ` Jean-Francois Moine
2013-10-08 16:11 ` Jason Cooper
2013-10-08 17:59 ` Jean-Francois Moine
2013-10-08 18:00 ` Jason Cooper
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=20130831121705.GE6617@n2100.arm.linux.org.uk \
--to=linux@arm.linux.org.uk \
--cc=devicetree@vger.kernel.org \
--cc=ian.campbell@citrix.com \
--cc=jason@lakedaemon.net \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mark.rutland@arm.com \
--cc=moinejf@free.fr \
--cc=pawel.moll@arm.com \
--cc=rob.herring@calxeda.com \
--cc=sebastian.hesselbarth@gmail.com \
--cc=swarren@wwwdotorg.org \
/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
all inboxes | Powered by JetHome®