Skip to content

Commit 9814c14

Browse files
kv2019ibroonie
authored andcommitted
ASoC: SOF: Intel: hda-loader: do not wait for HDaudio IOC
Commit 9ee3f0d ("ASOC: SOF: Intel: hda-loader: only wait for HDaudio IOC for IPC4 devices") removed DMA wait for IPC3 case. Proceed and remove the wait for IPC4 devices as well. There is no dependency to IPC version in the load logic and checking the firmware status is a sufficient check in case of errors. The removed code also had a bug in that -ETIMEDOUT is returned without stopping the DMA transfer. Cc: [email protected] Link: thesofproject#5135 Fixes: 9ee3f0d ("ASOC: SOF: Intel: hda-loader: only wait for HDaudio IOC for IPC4 devices") Suggested-by: Peter Ujfalusi <[email protected]> Signed-off-by: Kai Vehmanen <[email protected]> Reviewed-by: Péter Ujfalusi <[email protected]> Reviewed-by: Pierre-Louis Bossart <[email protected]> Reviewed-by: Ranjani Sridharan <[email protected]> Signed-off-by: Peter Ujfalusi <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Mark Brown <[email protected]>
1 parent 494ddac commit 9814c14

File tree

1 file changed

+0
-17
lines changed

1 file changed

+0
-17
lines changed

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

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -294,14 +294,9 @@ int hda_cl_copy_fw(struct snd_sof_dev *sdev, struct hdac_ext_stream *hext_stream
294294
{
295295
struct sof_intel_hda_dev *hda = sdev->pdata->hw_pdata;
296296
const struct sof_intel_dsp_desc *chip = hda->desc;
297-
struct sof_intel_hda_stream *hda_stream;
298-
unsigned long time_left;
299297
unsigned int reg;
300298
int ret, status;
301299

302-
hda_stream = container_of(hext_stream, struct sof_intel_hda_stream,
303-
hext_stream);
304-
305300
dev_dbg(sdev->dev, "Code loader DMA starting\n");
306301

307302
ret = hda_cl_trigger(sdev->dev, hext_stream, SNDRV_PCM_TRIGGER_START);
@@ -310,18 +305,6 @@ int hda_cl_copy_fw(struct snd_sof_dev *sdev, struct hdac_ext_stream *hext_stream
310305
return ret;
311306
}
312307

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");
323-
}
324-
325308
dev_dbg(sdev->dev, "waiting for FW_ENTERED status\n");
326309

327310
status = snd_sof_dsp_read_poll_timeout(sdev, HDA_DSP_BAR,

0 commit comments

Comments
 (0)