Commit b9846a38 authored by Vijendar Mukunda's avatar Vijendar Mukunda Committed by Mark Brown

ASoC: SOF: amd: fix for false dsp interrupts

Before ACP firmware loading, DSP interrupts are not expected.
Sometimes after reboot, it's observed that before ACP firmware is loaded
false DSP interrupt is reported.
Registering the interrupt handler before acp initialization causing false
interrupts sometimes on reboot as ACP reset is not applied.
Correct the sequence by invoking acp initialization sequence prior to
registering interrupt handler.

Fixes: 738a2b5e ("ASoC: SOF: amd: Add IPC support for ACP IP block")
Signed-off-by: default avatarVijendar Mukunda <Vijendar.Mukunda@amd.com>
Link: https://msgid.link/r/20240404041717.430545-1-Vijendar.Mukunda@amd.comSigned-off-by: default avatarMark Brown <broonie@kernel.org>
parent 3f5eb325
...@@ -704,6 +704,10 @@ int amd_sof_acp_probe(struct snd_sof_dev *sdev) ...@@ -704,6 +704,10 @@ int amd_sof_acp_probe(struct snd_sof_dev *sdev)
goto unregister_dev; goto unregister_dev;
} }
ret = acp_init(sdev);
if (ret < 0)
goto free_smn_dev;
sdev->ipc_irq = pci->irq; sdev->ipc_irq = pci->irq;
ret = request_threaded_irq(sdev->ipc_irq, acp_irq_handler, acp_irq_thread, ret = request_threaded_irq(sdev->ipc_irq, acp_irq_handler, acp_irq_thread,
IRQF_SHARED, "AudioDSP", sdev); IRQF_SHARED, "AudioDSP", sdev);
...@@ -713,10 +717,6 @@ int amd_sof_acp_probe(struct snd_sof_dev *sdev) ...@@ -713,10 +717,6 @@ int amd_sof_acp_probe(struct snd_sof_dev *sdev)
goto free_smn_dev; goto free_smn_dev;
} }
ret = acp_init(sdev);
if (ret < 0)
goto free_ipc_irq;
/* scan SoundWire capabilities exposed by DSDT */ /* scan SoundWire capabilities exposed by DSDT */
ret = acp_sof_scan_sdw_devices(sdev, chip->sdw_acpi_dev_addr); ret = acp_sof_scan_sdw_devices(sdev, chip->sdw_acpi_dev_addr);
if (ret < 0) { if (ret < 0) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment