diff options
author | Ranjani Sridharan <ranjani.sridharan@linux.intel.com> | 2021-11-25 13:15:13 +0300 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2021-11-26 16:24:18 +0300 |
commit | 4794601a52d40a425542be1b88f8f5614fcf45b4 (patch) | |
tree | ef82b4e063bc1cd326ac88ee03fec3765109ec6d /sound/soc/sof/intel/hda-stream.c | |
parent | 2b1acedccf36434924ae530410e008e7eb427cd3 (diff) | |
download | linux-4794601a52d40a425542be1b88f8f5614fcf45b4.tar.xz |
ASoC: SOF: Intel: hda: reset stream before coupling host and link DMA's
The recommended programming sequence for HD-Audio DMA is to reset the
stream before coupling the link and host DMA's.
Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
Link: https://lore.kernel.org/r/20211125101520.291581-4-kai.vehmanen@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound/soc/sof/intel/hda-stream.c')
-rw-r--r-- | sound/soc/sof/intel/hda-stream.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/sound/soc/sof/intel/hda-stream.c b/sound/soc/sof/intel/hda-stream.c index c2895bdd3f07..440827ce390d 100644 --- a/sound/soc/sof/intel/hda-stream.c +++ b/sound/soc/sof/intel/hda-stream.c @@ -659,6 +659,11 @@ int hda_dsp_stream_hw_free(struct snd_sof_dev *sdev, hstream); struct hdac_bus *bus = sof_to_bus(sdev); u32 mask = 0x1 << stream->index; + int ret; + + ret = hda_dsp_stream_reset(sdev, stream); + if (ret < 0) + return ret; spin_lock_irq(&bus->reg_lock); /* couple host and link DMA if link DMA channel is idle */ |