ASoC: dsp: Avoid soc-dsp power widget function call for CODEC widgets

It was found that application process is not able to return
from ALSA mixer control command upon termination of ALSA PCM
recording session. The problem is due to multiple threads grab
two mutexs in reverse order. As playback thread issues mixer
command which in terms grabs codec mutex and attempts to lock on
dsp mutex, pcm recording session is terminating running in record
thread.  In shutdown function, recording session grabs dsp mutex
then attempts to lock on codec mutex. Hence, deadlock occurs when
two threads lock on the mutexes that are needed next by other thread.
However, for playback thread, it is not necessary to acquire dsp_mutex
as the widget associated with given mixer control command is for CODEC
routing. Add the check not to call soc-dsp power widget function
unless command is really for platform routing

CRs-Fixed: 302395
Signed-off-by: Patrick Lai <plai@codeaurora.org>
diff --git a/sound/soc/soc-dapm.c b/sound/soc/soc-dapm.c
index dd9b661..01252ab 100644
--- a/sound/soc/soc-dapm.c
+++ b/sound/soc/soc-dapm.c
@@ -1816,7 +1816,8 @@
 
 	if (found) {
 		dapm_power_widgets(widget->dapm, SND_SOC_DAPM_STREAM_NOP);
-		soc_dsp_runtime_update(widget);
+		if (widget->platform)
+			soc_dsp_runtime_update(widget);
 	}
 
 	return 0;
@@ -1848,7 +1849,8 @@
 
 	if (found) {
 		dapm_power_widgets(widget->dapm, SND_SOC_DAPM_STREAM_NOP);
-		soc_dsp_runtime_update(widget);
+		if (widget->platform)
+			soc_dsp_runtime_update(widget);
 	}
 
 	return 0;