[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20240118143023.1903984-1-venkataprasad.potturu@amd.com>
Date: Thu, 18 Jan 2024 20:00:19 +0530
From: Venkata Prasad Potturu <venkataprasad.potturu@....com>
To: <broonie@...nel.org>, <alsa-devel@...a-project.org>
CC: <Vijendar.Mukunda@....com>, <Basavaraj.Hiregoudar@....com>,
<Sunil-kumar.Dommati@....com>, <syed.sabakareem@....com>, "Venkata Prasad
Potturu" <venkataprasad.potturu@....com>, Liam Girdwood
<lgirdwood@...il.com>, Jaroslav Kysela <perex@...ex.cz>, Takashi Iwai
<tiwai@...e.com>, Syed Saba Kareem <Syed.SabaKareem@....com>, "Alper Nebi
Yasak" <alpernebiyasak@...il.com>, Marian Postevca <posteuca@...ex.one>,
Kuninori Morimoto <kuninori.morimoto.gx@...esas.com>, "open list:SOUND - SOC
LAYER / DYNAMIC AUDIO POWER MANAGEM..." <linux-sound@...r.kernel.org>, open
list <linux-kernel@...r.kernel.org>
Subject: [PATCH 1/3] ASoC: amd: acp: Enable rt5682s clocks in acp slave mode
Set and enable rt5682s codec bclk and lrclk rates when
acp is in slave mode.
Signed-off-by: Venkata Prasad Potturu <venkataprasad.potturu@....com>
---
sound/soc/amd/acp/acp-mach-common.c | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/sound/soc/amd/acp/acp-mach-common.c b/sound/soc/amd/acp/acp-mach-common.c
index c90ec3419247..a224043ccd42 100644
--- a/sound/soc/amd/acp/acp-mach-common.c
+++ b/sound/soc/amd/acp/acp-mach-common.c
@@ -505,6 +505,13 @@ static int acp_card_rt5682s_hw_params(struct snd_pcm_substream *substream,
clk_set_rate(drvdata->wclk, srate);
clk_set_rate(drvdata->bclk, srate * ch * format);
+ if (!drvdata->soc_mclk) {
+ ret = acp_clk_enable(drvdata, srate, ch * format);
+ if (ret < 0) {
+ dev_err(rtd->card->dev, "Failed to enable HS clk: %d\n", ret);
+ return ret;
+ }
+ }
return 0;
}
--
2.25.1
Powered by blists - more mailing lists