[1/3] ASoC: amd: acp: Enable rt5682s clocks in acp slave mode

Message ID 20240118143023.1903984-1-venkataprasad.potturu@amd.com
State New
Headers
Series [1/3] ASoC: amd: acp: Enable rt5682s clocks in acp slave mode |

Commit Message

Venkata Prasad Potturu Jan. 18, 2024, 2:30 p.m. UTC
  Set and enable rt5682s codec bclk and lrclk rates when
acp is in slave mode.

Signed-off-by: Venkata Prasad Potturu <venkataprasad.potturu@amd.com>
---
 sound/soc/amd/acp/acp-mach-common.c | 7 +++++++
 1 file changed, 7 insertions(+)
  

Comments

Mark Brown Jan. 22, 2024, 8:44 p.m. UTC | #1
On Thu, 18 Jan 2024 20:00:19 +0530, Venkata Prasad Potturu wrote:
> Set and enable rt5682s codec bclk and lrclk rates when
> acp is in slave mode.
> 
> 

Applied to

   https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-next

Thanks!

[1/3] ASoC: amd: acp: Enable rt5682s clocks in acp slave mode
      commit: 1d565de8d53cfa823576abac84e82ab1561f04eb
[2/3] ASoC: amd: acp: Update platform name for different boards
      commit: 4bae2029ffcccfbefb8f31563556494464e7bf2d
[3/3] ASoC: amd: acp: Add check for cpu dai link initialization
      commit: 6cc2aa9a75f2397d42b78d4c159bc06722183c78

All being well this means that it will be integrated into the linux-next
tree (usually sometime in the next 24 hours) and sent to Linus during
the next merge window (or sooner if it is a bug fix), however if
problems are discovered then the patch may be dropped or reverted.

You may get further e-mails resulting from automated or manual testing
and review of the tree, please engage with people reporting problems and
send followup patches addressing any issues that are reported if needed.

If any updates are required or you are submitting further changes they
should be sent as incremental updates against current git, existing
patches will not be replaced.

Please add any relevant lists and maintainers to the CCs when replying
to this mail.

Thanks,
Mark
  

Patch

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;
 }