[5/5] ASoC: rt5682: Let dai clks be registered whether mclk exists or not
diff mbox series

Message ID 1591938925-1070-5-git-send-email-derek.fang@realtek.com
State Accepted
Commit 19ab0f005b165146ea4a93f71e9cb5e71de9c0ce
Headers show
Series
  • [1/5] ASoC: rt5682: Enable Vref2 under using PLL2
Related show

Commit Message

Derek [方德義] June 12, 2020, 5:15 a.m. UTC
From: "derek.fang" <derek.fang@realtek.com>

According to ideal rt5682 CCF, the root clk is mclk.
But in some platforms, mclk is not exported to CCF.
In this condition, rt5682_register_dai_clks will not be called.
This patch lets dai clks could be registered whether mclk exists or not.

Signed-off-by: derek.fang <derek.fang@realtek.com>
---
 sound/soc/codecs/rt5682.c | 11 ++++++-----
 1 file changed, 6 insertions(+), 5 deletions(-)

Patch
diff mbox series

diff --git a/sound/soc/codecs/rt5682.c b/sound/soc/codecs/rt5682.c
index f9d8d8c..ff6a5bb 100644
--- a/sound/soc/codecs/rt5682.c
+++ b/sound/soc/codecs/rt5682.c
@@ -2859,12 +2859,13 @@  static int rt5682_probe(struct snd_soc_component *component)
 				return ret;
 			}
 			rt5682->mclk = NULL;
-		} else {
-			/* Register CCF DAI clock control */
-			ret = rt5682_register_dai_clks(component);
-			if (ret)
-				return ret;
 		}
+
+		/* Register CCF DAI clock control */
+		ret = rt5682_register_dai_clks(component);
+		if (ret)
+			return ret;
+
 		/* Initial setup for CCF */
 		rt5682->lrck[RT5682_AIF1] = CLK_48;
 #endif