Skip to content

Commit e68262d

Browse files
plbossartgregkh
authored andcommitted
ASOC: SOF: Intel: hda-loader: only wait for HDaudio IOC for IPC4 devices
[ Upstream commit 9ee3f0d ] 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#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 <krinkin.m.u@gmail.com> Tested-by: Todd Brandt <todd.e.brandt@linux.intel.com> Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com> Link: https://patch.msgid.link/20240716084530.300829-1-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org> Signed-off-by: Sasha Levin <sashal@kernel.org>
1 parent 4c61ee9 commit e68262d

1 file changed

Lines changed: 12 additions & 8 deletions

File tree

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)