Skip to content

Commit 3e94369

Browse files
ranj063broonie
authored andcommitted
ASoC: SOF: Intel: hda: Do not stop/start DMA during pause/release
The FW does not pause/stop the host DMA during pause and stopping the host DMA from the driver could result in an unknown behaviour. So, skip triggering the HD-Audio host DMA during pause/release. Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com> Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Reviewed-by: Péter Ujfalusi <peter.ujfalusi@linux.intel.com> Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com> Link: https://lore.kernel.org/r/20230420114137.27613-2-peter.ujfalusi@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
1 parent 09cda70 commit 3e94369

1 file changed

Lines changed: 10 additions & 1 deletion

File tree

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

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -337,7 +337,13 @@ int hda_dsp_stream_trigger(struct snd_sof_dev *sdev,
337337
/* cmd must be for audio stream */
338338
switch (cmd) {
339339
case SNDRV_PCM_TRIGGER_PAUSE_RELEASE:
340+
if (!sdev->dspless_mode_selected)
341+
break;
342+
fallthrough;
340343
case SNDRV_PCM_TRIGGER_START:
344+
if (hstream->running)
345+
break;
346+
341347
snd_sof_dsp_update_bits(sdev, HDA_DSP_HDA_BAR, SOF_HDA_INTCTL,
342348
1 << hstream->index,
343349
1 << hstream->index);
@@ -360,8 +366,11 @@ int hda_dsp_stream_trigger(struct snd_sof_dev *sdev,
360366
hstream->running = true;
361367

362368
break;
363-
case SNDRV_PCM_TRIGGER_SUSPEND:
364369
case SNDRV_PCM_TRIGGER_PAUSE_PUSH:
370+
if (!sdev->dspless_mode_selected)
371+
break;
372+
fallthrough;
373+
case SNDRV_PCM_TRIGGER_SUSPEND:
365374
case SNDRV_PCM_TRIGGER_STOP:
366375
snd_sof_dsp_update_bits(sdev, HDA_DSP_HDA_BAR,
367376
sd_offset,

0 commit comments

Comments
 (0)