summaryrefslogtreecommitdiffstats
path: root/sound/hda
diff options
context:
space:
mode:
authorPierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>2022-09-19 14:10:41 +0200
committerTakashi Iwai <tiwai@suse.de>2022-09-20 08:08:14 +0200
commitc6fe6be65aeaa03c7cdfc807b47c1e59b9c9ea71 (patch)
tree69ec925717cf1171828b3262d054ffc017d7ce90 /sound/hda
parentac3467ad7f8734a21b65fa1852316a9b1b8c1fad (diff)
downloadlinux-stable-c6fe6be65aeaa03c7cdfc807b47c1e59b9c9ea71.tar.gz
linux-stable-c6fe6be65aeaa03c7cdfc807b47c1e59b9c9ea71.tar.bz2
linux-stable-c6fe6be65aeaa03c7cdfc807b47c1e59b9c9ea71.zip
ALSA: hda: ext: remove always-true conditions on host and link release
By construction a host and link DMA are always decoupled. This decoupling happens in the assign() phase. There's no point in checking if the two parts are decoupled, this is by-design always-true. Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com> Reviewed-by: Péter Ujfalusi <peter.ujfalusi@linux.intel.com> Reviewed-by: Kai Vehmanen <kai.vehmanen@linux.intel.com> Link: https://lore.kernel.org/r/20220919121041.43463-9-pierre-louis.bossart@linux.intel.com Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/hda')
-rw-r--r--sound/hda/ext/hdac_ext_stream.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/sound/hda/ext/hdac_ext_stream.c b/sound/hda/ext/hdac_ext_stream.c
index 9a2bc7e803dd..70f3ad71aaf0 100644
--- a/sound/hda/ext/hdac_ext_stream.c
+++ b/sound/hda/ext/hdac_ext_stream.c
@@ -382,7 +382,8 @@ void snd_hdac_ext_stream_release(struct hdac_ext_stream *hext_stream, int type)
case HDAC_EXT_STREAM_TYPE_HOST:
spin_lock_irq(&bus->reg_lock);
- if (hext_stream->decoupled && !hext_stream->link_locked)
+ /* couple link only if not in use */
+ if (!hext_stream->link_locked)
snd_hdac_ext_stream_decouple_locked(bus, hext_stream, false);
snd_hdac_stream_release_locked(&hext_stream->hstream);
spin_unlock_irq(&bus->reg_lock);
@@ -390,7 +391,8 @@ void snd_hdac_ext_stream_release(struct hdac_ext_stream *hext_stream, int type)
case HDAC_EXT_STREAM_TYPE_LINK:
spin_lock_irq(&bus->reg_lock);
- if (hext_stream->decoupled && !hext_stream->hstream.opened)
+ /* couple host only if not in use */
+ if (!hext_stream->hstream.opened)
snd_hdac_ext_stream_decouple_locked(bus, hext_stream, false);
hext_stream->link_locked = 0;
hext_stream->link_substream = NULL;