From: Jarrah Gosbell <kernel@undef.tools>
To: Oder Chiou <oder_chiou@realtek.com>,
Liam Girdwood <lgirdwood@gmail.com>,
Mark Brown <broonie@kernel.org>, Jaroslav Kysela <perex@perex.cz>,
Takashi Iwai <tiwai@suse.com>,
alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org
Cc: Jarrah Gosbell <kernel@undef.tools>,
phone-devel@vger.kernel.org, Ondrej Jirman <megi@xff.cz>
Subject: [PATCH] ASoC: codec: rt5640: Resolve failure to set DMIC clock after playback
Date: Sat, 14 Jan 2023 00:30:54 +0000 [thread overview]
Message-ID: <20230114003053.401274-1-kernel@undef.tools> (raw)
From: Ondrej Jirman <megi@xff.cz>
rt5640_set_dai_sysclk is called with freq == 0 when playback stops. This
causes DMIC setup code to fail. I2S interface doesn't need to be active
for codec to work, so don't clear rt5640->sysclk after
rt5640_set_dai_sysclk is called with freq == 0.
Signed-off-by: Ondrej Jirman <megi@xff.cz>
Signed-off-by: Jarrah Gosbell <kernel@undef.tools>
---
sound/soc/codecs/rt5640.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/sound/soc/codecs/rt5640.c b/sound/soc/codecs/rt5640.c
index 18e01949f20e..054de41ceccb 100644
--- a/sound/soc/codecs/rt5640.c
+++ b/sound/soc/codecs/rt5640.c
@@ -1839,6 +1839,9 @@ static int rt5640_set_dai_sysclk(struct snd_soc_dai *dai,
unsigned int reg_val = 0;
unsigned int pll_bit = 0;
+ if (freq == 0)
+ return 0;
+
switch (clk_id) {
case RT5640_SCLK_S_MCLK:
reg_val |= RT5640_SCLK_SRC_MCLK;
--
2.39.0
next reply other threads:[~2023-01-15 7:52 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-01-14 0:30 Jarrah Gosbell [this message]
2023-01-14 17:25 ` [PATCH] ASoC: codec: rt5640: Resolve failure to set DMIC clock after playback 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=20230114003053.401274-1-kernel@undef.tools \
--to=kernel@undef.tools \
--cc=alsa-devel@alsa-project.org \
--cc=broonie@kernel.org \
--cc=lgirdwood@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=megi@xff.cz \
--cc=oder_chiou@realtek.com \
--cc=perex@perex.cz \
--cc=phone-devel@vger.kernel.org \
--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