34 lines
1.0 KiB
Diff
34 lines
1.0 KiB
Diff
|
From a88aee76184f21b460e9995c25af068870766f13 Mon Sep 17 00:00:00 2001
|
||
|
From: Ondrej Jirman <megi@xff.cz>
|
||
|
Date: Sat, 27 Aug 2022 20:48:32 +0200
|
||
|
Subject: [PATCH 367/464] ASoC: codec: rt5640: Resolve failure to set DMIC
|
||
|
clock after playback
|
||
|
|
||
|
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>
|
||
|
---
|
||
|
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 b2f8b8064f4f..c5bacf8d145e 100644
|
||
|
--- a/sound/soc/codecs/rt5640.c
|
||
|
+++ b/sound/soc/codecs/rt5640.c
|
||
|
@@ -1840,6 +1840,9 @@ static int rt5640_set_dai_sysclk(struct snd_soc_dai *dai,
|
||
|
unsigned int pll_bit = 0;
|
||
|
int ret;
|
||
|
|
||
|
+ if (freq == 0)
|
||
|
+ return 0;
|
||
|
+
|
||
|
switch (clk_id) {
|
||
|
case RT5640_SCLK_S_MCLK:
|
||
|
ret = clk_set_rate(rt5640->mclk, freq);
|
||
|
--
|
||
|
2.34.1
|
||
|
|