diff mbox

[v4,4/9] ASoC: Intel: Skylake: Add supply widget as non DSP widget

Message ID 1483341277-14475-5-git-send-email-jeeja.kp@intel.com (mailing list archive)
State New, archived
Headers show

Commit Message

Jeeja KP Jan. 2, 2017, 7:14 a.m. UTC
From: Jeeja KP <jeeja.kp@intel.com>

Supply widgets to model clock supplies for SSP and add this widget type
dapm supply widget as non DSP widget to bypass while parsing the source
and sink dapm widget list.

Signed-off-by: Jeeja KP <jeeja.kp@intel.com>
---
 sound/soc/intel/skylake/skl-topology.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)
diff mbox

Patch

diff --git a/sound/soc/intel/skylake/skl-topology.c b/sound/soc/intel/skylake/skl-topology.c
index 9cf8c51..edd0c60 100644
--- a/sound/soc/intel/skylake/skl-topology.c
+++ b/sound/soc/intel/skylake/skl-topology.c
@@ -87,6 +87,7 @@  static int is_skl_dsp_widget_type(struct snd_soc_dapm_widget *w)
 	case snd_soc_dapm_aif_out:
 	case snd_soc_dapm_dai_out:
 	case snd_soc_dapm_switch:
+	case snd_soc_dapm_supply:
 		return false;
 	default:
 		return true;
@@ -1484,12 +1485,13 @@  static int skl_tplg_be_set_src_pipe_params(struct snd_soc_dai *dai,
 	snd_soc_dapm_widget_for_each_source_path(w, p) {
 		if (p->connect && is_skl_dsp_widget_type(p->source) &&
 						p->source->priv) {
-
 			ret = skl_tplg_be_fill_pipe_params(dai,
 						p->source->priv, params);
 			if (ret < 0)
 				return ret;
 		} else {
+			if (p->source->id == snd_soc_dapm_supply)
+				continue;
 			ret = skl_tplg_be_set_src_pipe_params(dai,
 						p->source, params);
 			if (ret < 0)
@@ -1515,6 +1517,8 @@  static int skl_tplg_be_set_sink_pipe_params(struct snd_soc_dai *dai,
 			if (ret < 0)
 				return ret;
 		} else {
+			if (p->sink->id == snd_soc_dapm_supply)
+				continue;
 			ret = skl_tplg_be_set_sink_pipe_params(
 						dai, p->sink, params);
 			if (ret < 0)