Commit fbabebfb authored by Peter Ujfalusi's avatar Peter Ujfalusi Committed by Mark Brown

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: default avatarPeter Ujfalusi <peter.ujfalusi@linux.intel.com>
Reviewed-by: default avatarPierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: default avatarRander Wang <rander.wang@intel.com>
Reviewed-by: default avatarRanjani Sridharan <ranjani.sridharan@linux.intel.com>
Link: https://lore.kernel.org/r/20220712131620.13365-3-peter.ujfalusi@linux.intel.comSigned-off-by: default avatarMark Brown <broonie@kernel.org>
parent 402355e6
...@@ -126,12 +126,8 @@ hda_link_stream_assign(struct hdac_bus *bus, ...@@ -126,12 +126,8 @@ hda_link_stream_assign(struct hdac_bus *bus,
} }
if (res) { if (res) {
/* /* Make sure that host and link DMA is decoupled. */
* Decouple host and link DMA. The decoupled flag snd_hdac_ext_stream_decouple_locked(bus, res, true);
* is updated in snd_hdac_ext_stream_decouple().
*/
if (!res->decoupled)
snd_hdac_ext_stream_decouple_locked(bus, res, true);
res->link_locked = 1; res->link_locked = 1;
res->link_substream = substream; res->link_substream = substream;
...@@ -184,7 +180,6 @@ static int hda_link_dma_params(struct hdac_ext_stream *hext_stream, ...@@ -184,7 +180,6 @@ static int hda_link_dma_params(struct hdac_ext_stream *hext_stream,
struct hdac_ext_link *link; struct hdac_ext_link *link;
unsigned int format_val; unsigned int format_val;
snd_hdac_ext_stream_decouple(bus, hext_stream, true);
snd_hdac_ext_link_stream_reset(hext_stream); snd_hdac_ext_link_stream_reset(hext_stream);
format_val = snd_hdac_calc_stream_format(params->s_freq, params->ch, format_val = snd_hdac_calc_stream_format(params->s_freq, params->ch,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment