Skip to content

Commit 9ee3f0d

Browse files
plbossartbroonie
authored andcommitted
ASOC: SOF: Intel: hda-loader: only wait for HDaudio IOC for IPC4 devices
Multiple users report a regression bisected to commit d5263db ("ASoC: SOF: Intel: don't ignore IOC interrupts for non-audio transfers"). The firmware version is the likely suspect, as these users relied on SOF 2.0 while Intel only tested with the 2.2 release. Rather than completely disable the wait_for_completion(), which can help us gather timing information on the different stages of the boot process, the simplest course of action is to just disable it for older IPC versions which are no longer under active development. Closes: thesofproject/linux#5072 Closes: https://bugzilla.kernel.org/show_bug.cgi?id=218961 Fixes: d5263db ("ASoC: SOF: Intel: don't ignore IOC interrupts for non-audio transfers") Tested-by: Mike Krinkin <[email protected]> Tested-by: Todd Brandt <[email protected]> Signed-off-by: Pierre-Louis Bossart <[email protected]> Reviewed-by: Bard Liao <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Mark Brown <[email protected]>
1 parent 2634f74 commit 9ee3f0d

File tree

1 file changed

+12
-8
lines changed

1 file changed

+12
-8
lines changed

sound/soc/sof/intel/hda-loader.c

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -310,15 +310,19 @@ int hda_cl_copy_fw(struct snd_sof_dev *sdev, struct hdac_ext_stream *hext_stream
310310
return ret;
311311
}
312312

313-
/* Wait for completion of transfer */
314-
time_left = wait_for_completion_timeout(&hda_stream->ioc,
315-
msecs_to_jiffies(HDA_CL_DMA_IOC_TIMEOUT_MS));
316-
317-
if (!time_left) {
318-
dev_err(sdev->dev, "Code loader DMA did not complete\n");
319-
return -ETIMEDOUT;
313+
if (sdev->pdata->ipc_type == SOF_IPC_TYPE_4) {
314+
/* Wait for completion of transfer */
315+
time_left = wait_for_completion_timeout(&hda_stream->ioc,
316+
msecs_to_jiffies(HDA_CL_DMA_IOC_TIMEOUT_MS));
317+
318+
if (!time_left) {
319+
dev_err(sdev->dev, "Code loader DMA did not complete\n");
320+
return -ETIMEDOUT;
321+
}
322+
dev_dbg(sdev->dev, "Code loader DMA done\n");
320323
}
321-
dev_dbg(sdev->dev, "Code loader DMA done, waiting for FW_ENTERED status\n");
324+
325+
dev_dbg(sdev->dev, "waiting for FW_ENTERED status\n");
322326

323327
status = snd_sof_dsp_read_poll_timeout(sdev, HDA_DSP_BAR,
324328
chip->rom_status_reg, reg,

0 commit comments

Comments
 (0)