From: Sasha Levin <sashal@kernel.org>
To: linux-kernel@vger.kernel.org, stable@vger.kernel.org
Cc: Sameer Pujar <spujar@nvidia.com>, Mark Brown <broonie@kernel.org>,
Michael Walle <michael@walle.cc>, Sasha Levin <sashal@kernel.org>,
alsa-devel@alsa-project.org
Subject: [PATCH AUTOSEL 4.9 12/13] ASoC: rt5659: Update MCLK rate in set_sysclk()
Date: Thu, 25 Mar 2021 07:28:12 -0400 [thread overview]
Message-ID: <20210325112814.1928637-12-sashal@kernel.org> (raw)
In-Reply-To: <20210325112814.1928637-1-sashal@kernel.org>
From: Sameer Pujar <spujar@nvidia.com>
[ Upstream commit dbf54a9534350d6aebbb34f5c1c606b81a4f35dd ]
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.
Suggested-by: Mark Brown <broonie@kernel.org>
Suggested-by: Michael Walle <michael@walle.cc>
Signed-off-by: Sameer Pujar <spujar@nvidia.com>
Link: https://lore.kernel.org/r/1615829492-8972-3-git-send-email-spujar@nvidia.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
sound/soc/codecs/rt5659.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/sound/soc/codecs/rt5659.c b/sound/soc/codecs/rt5659.c
index 635818fcda00..21a007c26407 100644
--- a/sound/soc/codecs/rt5659.c
+++ b/sound/soc/codecs/rt5659.c
@@ -3389,12 +3389,17 @@ static int rt5659_set_dai_sysclk(struct snd_soc_dai *dai,
struct snd_soc_codec *codec = dai->codec;
struct rt5659_priv *rt5659 = snd_soc_codec_get_drvdata(codec);
unsigned int reg_val = 0;
+ int ret;
if (freq == rt5659->sysclk && clk_id == rt5659->sysclk_src)
return 0;
switch (clk_id) {
case RT5659_SCLK_S_MCLK:
+ ret = clk_set_rate(rt5659->mclk, freq);
+ if (ret)
+ return ret;
+
reg_val |= RT5659_SCLK_SRC_MCLK;
break;
case RT5659_SCLK_S_PLL1:
--
2.30.1
next prev parent reply other threads:[~2021-03-25 11:35 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-03-25 11:28 [PATCH AUTOSEL 4.9 01/13] ext4: fix bh ref count on error paths Sasha Levin
2021-03-25 11:28 ` [PATCH AUTOSEL 4.9 02/13] rpc: fix NULL dereference on kmalloc failure Sasha Levin
2021-03-25 11:28 ` [PATCH AUTOSEL 4.9 03/13] ASoC: rt5640: Fix dac- and adc- vol-tlv values being off by a factor of 10 Sasha Levin
2021-03-25 11:28 ` [PATCH AUTOSEL 4.9 04/13] ASoC: rt5651: " Sasha Levin
2021-03-25 11:28 ` [PATCH AUTOSEL 4.9 05/13] ASoC: sgtl5000: set DAP_AVC_CTRL register to correct default value on probe Sasha Levin
2021-03-25 11:28 ` [PATCH AUTOSEL 4.9 06/13] powerpc: Force inlining of cpu_has_feature() to avoid build failure Sasha Levin
2021-03-25 11:28 ` [PATCH AUTOSEL 4.9 07/13] vhost: Fix vhost_vq_reset() Sasha Levin
2021-03-25 11:28 ` [PATCH AUTOSEL 4.9 08/13] scsi: st: Fix a use after free in st_open() Sasha Levin
2021-03-25 11:28 ` [PATCH AUTOSEL 4.9 09/13] scsi: qla2xxx: Fix broken #endif placement Sasha Levin
2021-03-25 11:28 ` [PATCH AUTOSEL 4.9 10/13] staging: comedi: cb_pcidas: fix request_irq() warn Sasha Levin
2021-03-25 11:28 ` [PATCH AUTOSEL 4.9 11/13] staging: comedi: cb_pcidas64: " Sasha Levin
2021-03-25 11:28 ` Sasha Levin [this message]
2021-03-25 11:28 ` [PATCH AUTOSEL 4.9 13/13] ext4: do not iput inode under running transaction in ext4_rename() Sasha Levin
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=20210325112814.1928637-12-sashal@kernel.org \
--to=sashal@kernel.org \
--cc=alsa-devel@alsa-project.org \
--cc=broonie@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=michael@walle.cc \
--cc=spujar@nvidia.com \
--cc=stable@vger.kernel.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