Skip to content

Commit dee8049

Browse files
ASoC: SOF: amd: fix for ipc flags check
Firmware will set dsp_ack to 1 when firmware sends response for the IPC command issued by host. Similarly dsp_msg flag will be updated to 1. During ACP D0 entry sequence, during firmware run sequence, Once the firmware sends the FW_READY message in the acp irq thread, dsp_ack_write register relative offset read from scratch memory points to garbage value. In this case, fw_state is SOF_FW_BOOT_READY_OK results in else condition execution printing below dmesg log. "IPC reply before FW_BOOT_COMPLETE". This is not an expected sequence. Fix the condition checks for ipc flags. Fixes: 738a2b5 ("ASoC: SOF: amd: Add IPC support for ACP IP block") Signed-off-by: Vijendar Mukunda <Vijendar.Mukunda@amd.com> Tested-by: Umang Jain <uajain@igalia.com>
1 parent 482c345 commit dee8049

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

sound/soc/sof/amd/acp-ipc.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -181,14 +181,14 @@ irqreturn_t acp_sof_ipc_irq_thread(int irq, void *context)
181181
}
182182

183183
dsp_msg = snd_sof_dsp_read(sdev, ACP_DSP_BAR, ACP_SCRATCH_REG_0 + dsp_msg_write);
184-
if (dsp_msg) {
184+
if (dsp_msg == 1) {
185185
snd_sof_ipc_msgs_rx(sdev);
186186
acp_dsp_ipc_host_done(sdev);
187187
ipc_irq = true;
188188
}
189189

190190
dsp_ack = snd_sof_dsp_read(sdev, ACP_DSP_BAR, ACP_SCRATCH_REG_0 + dsp_ack_write);
191-
if (dsp_ack) {
191+
if (dsp_ack == 1) {
192192
if (likely(sdev->fw_state == SOF_FW_BOOT_COMPLETE)) {
193193
guard(spinlock_irq)(&sdev->ipc_lock);
194194

0 commit comments

Comments
 (0)