aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/sound/soc/sof/intel/hda-dai.c
diff options
context:
space:
mode:
authorPeter Ujfalusi <peter.ujfalusi@linux.intel.com>2022-07-12 16:16:20 +0300
committerMark Brown <broonie@kernel.org>2022-07-12 14:22:58 +0100
commitfbabebfb26a8130c10fd91cca687bac87944580d (patch)
tree2e3e8ace41bf0ba24f0ca908b811c607055fcfe3 /sound/soc/sof/intel/hda-dai.c
parentASoC: SOF: Intel: hda-dai: Drop misleading comment regarding dma_data (diff)
downloadwireguard-linux-fbabebfb26a8130c10fd91cca687bac87944580d.tar.xz
wireguard-linux-fbabebfb26a8130c10fd91cca687bac87944580d.zip
ASoC: SOF: Intel: hda-dai: Do snd_hdac_ext_stream_decouple() only once
Call snd_hdac_ext_stream_decouple_locked() unconditionally in hda_link_stream_assign(), the snd_hdac_ext_stream_decouple_locked() have internal checks to avoid re-configuring. There is no need to call snd_hdac_ext_stream_decouple() via hda_link_dma_params() as the stream must have been set to decoupled when it got assigned (even if it used local condition to call snd_hdac_ext_stream_decouple_locked()). Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com> Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Reviewed-by: Rander Wang <rander.wang@intel.com> Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com> Link: https://lore.kernel.org/r/20220712131620.13365-3-peter.ujfalusi@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound/soc/sof/intel/hda-dai.c')
-rw-r--r--sound/soc/sof/intel/hda-dai.c9
1 files changed, 2 insertions, 7 deletions
diff --git a/sound/soc/sof/intel/hda-dai.c b/sound/soc/sof/intel/hda-dai.c
index 9015ca2024bc..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,