summaryrefslogtreecommitdiffstats
path: root/sound/hda/ext
diff options
context:
space:
mode:
authorJeeja KP <jeeja.kp@intel.com>2015-10-05 15:09:49 +0100
committerTakashi Iwai <tiwai@suse.de>2015-10-05 17:18:56 +0200
commita04267fd87b62cd03d2a2ebb05a5b38d272e8d11 (patch)
tree50c1c1d778d4a4431fe6af63f2bcb93831f93651 /sound/hda/ext
parent88b19968a247117d3cbf0d405d004c7fc0e7a42c (diff)
downloadop-kernel-dev-a04267fd87b62cd03d2a2ebb05a5b38d272e8d11.zip
op-kernel-dev-a04267fd87b62cd03d2a2ebb05a5b38d272e8d11.tar.gz
ALSA: hdac: Fix to check if stream not in use in release
if the stream is decoupled and both link and host are used, while releasing the stream, need to check if link and host stream are not in use. This patch adds fix to check if the host/link stream is in used before coupling it back when releasing the stream. Signed-off-by: Jeeja KP <jeeja.kp@intel.com> Signed-off-by: Vinod Koul <vinod.koul@intel.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/hda/ext')
-rw-r--r--sound/hda/ext/hdac_ext_stream.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/sound/hda/ext/hdac_ext_stream.c b/sound/hda/ext/hdac_ext_stream.c
index 4bcebc8..cb89ec7 100644
--- a/sound/hda/ext/hdac_ext_stream.c
+++ b/sound/hda/ext/hdac_ext_stream.c
@@ -385,14 +385,13 @@ void snd_hdac_ext_stream_release(struct hdac_ext_stream *stream, int type)
break;
case HDAC_EXT_STREAM_TYPE_HOST:
- if (stream->decoupled) {
+ if (stream->decoupled && !stream->link_locked)
snd_hdac_ext_stream_decouple(ebus, stream, false);
- snd_hdac_stream_release(&stream->hstream);
- }
+ snd_hdac_stream_release(&stream->hstream);
break;
case HDAC_EXT_STREAM_TYPE_LINK:
- if (stream->decoupled)
+ if (stream->decoupled && !stream->hstream.opened)
snd_hdac_ext_stream_decouple(ebus, stream, false);
spin_lock_irq(&bus->reg_lock);
stream->link_locked = 0;
OpenPOWER on IntegriCloud