ASoC: SOF: amd: add conditional check for acp_clkmux_sel register

Few AMD platforms require ACP ACLK as clock source.
Add conditional check for clock mux selection register for
switching between internal clock and ACP ACLK.

Signed-off-by: Vijendar Mukunda <Vijendar.Mukunda@amd.com>
Link: https://lore.kernel.org/r/20230823073340.2829821-5-Vijendar.Mukunda@amd.com
Signed-off-by: Mark Brown <broonie@kernel.org>
This commit is contained in:
Vijendar Mukunda 2023-08-23 13:03:37 +05:30 committed by Mark Brown
parent f3b2f8b715
commit 0d9e4cf5b6
No known key found for this signature in database
GPG key ID: 24D68B725D5487D0

View file

@ -423,7 +423,9 @@ static int acp_reset(struct snd_sof_dev *sdev)
if (ret < 0) if (ret < 0)
dev_err(sdev->dev, "timeout in releasing reset\n"); dev_err(sdev->dev, "timeout in releasing reset\n");
snd_sof_dsp_write(sdev, ACP_DSP_BAR, desc->acp_clkmux_sel, ACP_CLOCK_ACLK); if (desc->acp_clkmux_sel)
snd_sof_dsp_write(sdev, ACP_DSP_BAR, desc->acp_clkmux_sel, ACP_CLOCK_ACLK);
if (desc->ext_intr_enb) if (desc->ext_intr_enb)
snd_sof_dsp_write(sdev, ACP_DSP_BAR, desc->ext_intr_enb, 0x01); snd_sof_dsp_write(sdev, ACP_DSP_BAR, desc->ext_intr_enb, 0x01);