aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJeeja KP <jeeja.kp@intel.com>2016-06-15 01:46:55 -0400
committerMark Brown <broonie@kernel.org>2016-06-15 05:19:27 -0400
commit09464974eaa8325c4cd22c3cab743a110644fb31 (patch)
treeb7e7dc1758ed2479de0a32f5efd344b12165b173
parent5fdd022c20264791310b188ec4a080bcb8647d23 (diff)
ASoC: dapm: Fix to return correct path list in is_connected_ep.
In is_connected_ep, when custom_stop_condition is true, need to return the correct paths instead of con which is 0. Fixes: 6742064aef7f('ASoC: dapm: support user-defined stop condition in dai_get_connected_widgets') Signed-off-by: Jeeja KP <jeeja.kp@intel.com> Signed-off-by: Vinod Koul <vinod.koul@intel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
-rw-r--r--sound/soc/soc-dapm.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/sound/soc/soc-dapm.c b/sound/soc/soc-dapm.c
index db781f6faaec..3c3f027d21bd 100644
--- a/sound/soc/soc-dapm.c
+++ b/sound/soc/soc-dapm.c
@@ -1092,8 +1092,10 @@ static __always_inline int is_connected_ep(struct snd_soc_dapm_widget *widget,
1092 if (list) 1092 if (list)
1093 list_add_tail(&widget->work_list, list); 1093 list_add_tail(&widget->work_list, list);
1094 1094
1095 if (custom_stop_condition && custom_stop_condition(widget, dir)) 1095 if (custom_stop_condition && custom_stop_condition(widget, dir)) {
1096 return con; 1096 widget->endpoints[dir] = 1;
1097 return widget->endpoints[dir];
1098 }
1097 1099
1098 if ((widget->is_ep & SND_SOC_DAPM_DIR_TO_EP(dir)) && widget->connected) { 1100 if ((widget->is_ep & SND_SOC_DAPM_DIR_TO_EP(dir)) && widget->connected) {
1099 widget->endpoints[dir] = snd_soc_dapm_suspend_check(widget); 1101 widget->endpoints[dir] = snd_soc_dapm_suspend_check(widget);