From 88b19968a247117d3cbf0d405d004c7fc0e7a42c Mon Sep 17 00:00:00 2001 From: "Subhransu S. Prusty" Date: Mon, 5 Oct 2015 15:09:48 +0100 Subject: ALSA: hdac: Fix incorrect update of stream id mapping Bits in LOSIDV need to be set to map the stream id for specific link. Fixing this by setting the required bits in the register. Signed-off-by: Subhransu S. Prusty Signed-off-by: Vinod Koul Signed-off-by: Takashi Iwai --- sound/hda/ext/hdac_ext_stream.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'sound/hda/ext/hdac_ext_stream.c') diff --git a/sound/hda/ext/hdac_ext_stream.c b/sound/hda/ext/hdac_ext_stream.c index 33ba77dd32f2..4bcebc8cde26 100644 --- a/sound/hda/ext/hdac_ext_stream.c +++ b/sound/hda/ext/hdac_ext_stream.c @@ -227,7 +227,7 @@ EXPORT_SYMBOL_GPL(snd_hdac_ext_link_stream_setup); void snd_hdac_ext_link_set_stream_id(struct hdac_ext_link *link, int stream) { - snd_hdac_updatew(link->ml_addr, AZX_REG_ML_LOSIDV, (1 << stream), 0); + snd_hdac_updatew(link->ml_addr, AZX_REG_ML_LOSIDV, (1 << stream), 1 << stream); } EXPORT_SYMBOL_GPL(snd_hdac_ext_link_set_stream_id); -- cgit v1.2.3 From a04267fd87b62cd03d2a2ebb05a5b38d272e8d11 Mon Sep 17 00:00:00 2001 From: Jeeja KP Date: Mon, 5 Oct 2015 15:09:49 +0100 Subject: 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 Signed-off-by: Vinod Koul Signed-off-by: Takashi Iwai --- sound/hda/ext/hdac_ext_stream.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'sound/hda/ext/hdac_ext_stream.c') diff --git a/sound/hda/ext/hdac_ext_stream.c b/sound/hda/ext/hdac_ext_stream.c index 4bcebc8cde26..cb89ec7c8147 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; -- cgit v1.2.3