summaryrefslogtreecommitdiff
path: root/sound/soc/sof/intel
diff options
context:
space:
mode:
authorMark Brown <broonie@kernel.org>2022-07-12 21:21:41 +0300
committerMark Brown <broonie@kernel.org>2022-07-12 21:21:41 +0300
commit274a3e6f98682ccad508a108312cfb5fb7c7553a (patch)
tree6a9ffab111d6105b625d475a447134fa8673ab82 /sound/soc/sof/intel
parentd5bd47f3ca124058a8e87eae4508afeda2132611 (diff)
parentfbabebfb26a8130c10fd91cca687bac87944580d (diff)
downloadlinux-274a3e6f98682ccad508a108312cfb5fb7c7553a.tar.xz
ASoC: SOF: Intel: hda-dai: No need to decouple host/link DMA twice
Merge series from Peter Ujfalusi <peter.ujfalusi@linux.intel.com>: There is no need to decouple a decoupled stream twice. Keep the decoupling in hda_link_stream_assign() only as it is going to be executed in all cases. Drop the outdated comment from hda_link_dma_hw_params() as well since the code has changed around it.
Diffstat (limited to 'sound/soc/sof/intel')
-rw-r--r--sound/soc/sof/intel/hda-dai.c10
1 files changed, 2 insertions, 8 deletions
diff --git a/sound/soc/sof/intel/hda-dai.c b/sound/soc/sof/intel/hda-dai.c
index ed74a1f264e8..c5b65e4a06be 100644
--- a/sound/soc/sof/intel/hda-dai.c
+++ b/sound/soc/sof/intel/hda-dai.c
@@ -126,12 +126,8 @@ hda_link_stream_assign(struct hdac_bus *bus,
}
if (res) {
- /*
- * Decouple host and link DMA. The decoupled flag
- * is updated in snd_hdac_ext_stream_decouple().
- */
- if (!res->decoupled)
- snd_hdac_ext_stream_decouple_locked(bus, res, true);
+ /* Make sure that host and link DMA is decoupled. */
+ snd_hdac_ext_stream_decouple_locked(bus, res, true);
res->link_locked = 1;
res->link_substream = substream;
@@ -184,7 +180,6 @@ static int hda_link_dma_params(struct hdac_ext_stream *hext_stream,
struct hdac_ext_link *link;
unsigned int format_val;
- snd_hdac_ext_stream_decouple(bus, hext_stream, true);
snd_hdac_ext_link_stream_reset(hext_stream);
format_val = snd_hdac_calc_stream_format(params->s_freq, params->ch,
@@ -221,7 +216,6 @@ static int hda_link_dma_hw_params(struct snd_pcm_substream *substream,
struct hdac_bus *bus = hstream->bus;
struct hdac_ext_link *link;
- /* get stored dma data if resuming from system suspend */
hext_stream = snd_soc_dai_get_dma_data(cpu_dai, substream);
if (!hext_stream) {
hext_stream = hda_link_stream_assign(bus, substream);