From: Sameer Pujar <spujar@nvidia.com>
To: <robh+dt@kernel.org>, <krzysztof.kozlowski+dt@linaro.org>,
<thierry.reding@gmail.com>, <jonathanh@nvidia.com>,
<oder_chiou@realtek.com>, <broonie@kernel.org>
Cc: <perex@perex.cz>, <tiwai@suse.com>, <lgirdwood@gmail.com>,
<kuninori.morimoto.gx@renesas.com>, <devicetree@vger.kernel.org>,
<linux-tegra@vger.kernel.org>, <linux-kernel@vger.kernel.org>,
<alsa-devel@alsa-project.org>, Sameer Pujar <spujar@nvidia.com>
Subject: [PATCH 1/2] ASoC: rt5640: Update MCLK rate in set_sysclk()
Date: Thu, 9 Feb 2023 20:06:56 +0530 [thread overview]
Message-ID: <1675953417-8686-2-git-send-email-spujar@nvidia.com> (raw)
In-Reply-To: <1675953417-8686-1-git-send-email-spujar@nvidia.com>
Simple-card/audio-graph-card drivers do not handle MCLK clock when it
is specified in the codec device node. The expectation here is that,
the codec should actually own up the MCLK clock and do necessary setup
in the driver.
This is inspired from,
commit dbf54a953435 ("ASoC: rt5659: Update MCLK rate in set_sysclk()").
Cc: Oder Chiou <oder_chiou@realtek.com>
Signed-off-by: Sameer Pujar <spujar@nvidia.com>
---
sound/soc/codecs/rt5640.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/sound/soc/codecs/rt5640.c b/sound/soc/codecs/rt5640.c
index 9e6341a..1392570 100644
--- a/sound/soc/codecs/rt5640.c
+++ b/sound/soc/codecs/rt5640.c
@@ -1838,9 +1838,14 @@ static int rt5640_set_dai_sysclk(struct snd_soc_dai *dai,
struct rt5640_priv *rt5640 = snd_soc_component_get_drvdata(component);
unsigned int reg_val = 0;
unsigned int pll_bit = 0;
+ int ret;
switch (clk_id) {
case RT5640_SCLK_S_MCLK:
+ ret = clk_set_rate(rt5640->mclk, freq);
+ if (ret)
+ return ret;
+
reg_val |= RT5640_SCLK_SRC_MCLK;
break;
case RT5640_SCLK_S_PLL1:
--
2.7.4
next prev parent reply other threads:[~2023-02-09 14:38 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-02-09 14:36 [PATCH 0/2] Codec support on Jetson AGX Orin Sameer Pujar
2023-02-09 14:36 ` Sameer Pujar [this message]
2023-02-09 23:42 ` [PATCH 1/2] ASoC: rt5640: Update MCLK rate in set_sysclk() Kuninori Morimoto
2023-02-10 8:30 ` Sameer Pujar
2023-02-12 23:56 ` Kuninori Morimoto
2023-02-09 14:36 ` [PATCH 2/2] arm64: tegra: Audio codec support on Jetson AGX Orin Sameer Pujar
2023-02-10 8:45 ` Krzysztof Kozlowski
2023-02-10 9:02 ` Sameer Pujar
2023-02-09 18:36 ` (subset) [PATCH 0/2] Codec " 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=1675953417-8686-2-git-send-email-spujar@nvidia.com \
--to=spujar@nvidia.com \
--cc=alsa-devel@alsa-project.org \
--cc=broonie@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=jonathanh@nvidia.com \
--cc=krzysztof.kozlowski+dt@linaro.org \
--cc=kuninori.morimoto.gx@renesas.com \
--cc=lgirdwood@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-tegra@vger.kernel.org \
--cc=oder_chiou@realtek.com \
--cc=perex@perex.cz \
--cc=robh+dt@kernel.org \
--cc=thierry.reding@gmail.com \
--cc=tiwai@suse.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;
as well as URLs for NNTP newsgroup(s).