aboutsummaryrefslogtreecommitdiff
path: root/sound/soc/amd
diff options
context:
space:
mode:
authorGravatar Mark Brown <broonie@kernel.org> 2024-01-22 19:36:54 +0000
committerGravatar Mark Brown <broonie@kernel.org> 2024-01-22 19:36:54 +0000
commit5976192d138cb3ef148983d3a0120a1f6001fbab (patch)
treeda1e1cdde954b54b2bf9d5395107a7238caf7278 /sound/soc/amd
parentASoC: codecs: add support for WCD939x Codec (diff)
parentASoC: allow up to eight CPU/codec DAIs (diff)
downloadlinux-5976192d138cb3ef148983d3a0120a1f6001fbab.tar.gz
linux-5976192d138cb3ef148983d3a0120a1f6001fbab.tar.bz2
linux-5976192d138cb3ef148983d3a0120a1f6001fbab.zip
ASoC: Merge up fixes
To facilitate testing get our current fixes into the branch.
Diffstat (limited to 'sound/soc/amd')
-rw-r--r--sound/soc/amd/acp/acp-mach-common.c16
-rw-r--r--sound/soc/amd/acp/acp-sof-mach.c4
2 files changed, 18 insertions, 2 deletions
diff --git a/sound/soc/amd/acp/acp-mach-common.c b/sound/soc/amd/acp/acp-mach-common.c
index 346f7514c81a..665a6ea0a2a8 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;
}
@@ -1464,8 +1471,13 @@ int acp_sofdsp_dai_links_create(struct snd_soc_card *card)
if (drv_data->amp_cpu_id == I2S_SP) {
links[i].name = "acp-amp-codec";
links[i].id = AMP_BE_ID;
- links[i].cpus = sof_sp_virtual;
- links[i].num_cpus = ARRAY_SIZE(sof_sp_virtual);
+ if (drv_data->platform == RENOIR) {
+ links[i].cpus = sof_sp;
+ links[i].num_cpus = ARRAY_SIZE(sof_sp);
+ } else {
+ links[i].cpus = sof_sp_virtual;
+ links[i].num_cpus = ARRAY_SIZE(sof_sp_virtual);
+ }
links[i].platforms = sof_component;
links[i].num_platforms = ARRAY_SIZE(sof_component);
links[i].dpcm_playback = 1;
diff --git a/sound/soc/amd/acp/acp-sof-mach.c b/sound/soc/amd/acp/acp-sof-mach.c
index 19ff4fe5b1ea..fc59ea34e687 100644
--- a/sound/soc/amd/acp/acp-sof-mach.c
+++ b/sound/soc/amd/acp/acp-sof-mach.c
@@ -46,6 +46,7 @@ static struct acp_card_drvdata sof_rt5682s_rt1019_data = {
.hs_codec_id = RT5682S,
.amp_codec_id = RT1019,
.dmic_codec_id = DMIC,
+ .platform = RENOIR,
};
static struct acp_card_drvdata sof_rt5682s_max_data = {
@@ -55,6 +56,7 @@ static struct acp_card_drvdata sof_rt5682s_max_data = {
.hs_codec_id = RT5682S,
.amp_codec_id = MAX98360A,
.dmic_codec_id = DMIC,
+ .platform = RENOIR,
};
static struct acp_card_drvdata sof_nau8825_data = {
@@ -64,6 +66,7 @@ static struct acp_card_drvdata sof_nau8825_data = {
.hs_codec_id = NAU8825,
.amp_codec_id = MAX98360A,
.dmic_codec_id = DMIC,
+ .platform = REMBRANDT,
.soc_mclk = true,
};
@@ -74,6 +77,7 @@ static struct acp_card_drvdata sof_rt5682s_hs_rt1019_data = {
.hs_codec_id = RT5682S,
.amp_codec_id = RT1019,
.dmic_codec_id = DMIC,
+ .platform = REMBRANDT,
.soc_mclk = true,
};