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@amd.com>
Link: https://msgid.link/r/20240118143023.1903984-1-venkataprasad.potturu@amd.com
Signed-off-by: Mark Brown <broonie@kernel.org>
This commit is contained in:
Venkata Prasad Potturu 2024-01-18 20:00:19 +05:30 committed by Mark Brown
parent 4d0e8bdfa4
commit 1d565de8d5
No known key found for this signature in database
GPG Key ID: 24D68B725D5487D0

View File

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