Merge "ASoC: Don't close shared back end dailink" into msm-4.8
diff --git a/sound/soc/soc-pcm.c b/sound/soc/soc-pcm.c
index 21c3ef0..ab07789 100644
--- a/sound/soc/soc-pcm.c
+++ b/sound/soc/soc-pcm.c
@@ -180,7 +180,11 @@
 
 		dev_dbg(be->dev, "ASoC: BE %s event %d dir %d\n",
 				be->dai_link->name, event, dir);
-
+		if ((event == SND_SOC_DAPM_STREAM_STOP) &&
+		    (be->dpcm[dir].users >= 1)) {
+			pr_debug("%s Don't close BE\n", __func__);
+			continue;
+		}
 		snd_soc_dapm_stream_event(be, dir, event);
 	}