Skip to content

Commit

Permalink
ASoC: dapm: Fix to return correct path list in is_connected_ep.
Browse files Browse the repository at this point in the history
In is_connected_ep, when custom_stop_condition is true, need to
return the correct paths instead of con which is 0.

Fixes: 6742064('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>
  • Loading branch information
Jeeja KP authored and Mark Brown committed Jun 15, 2016
1 parent 5fdd022 commit 0946497
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions sound/soc/soc-dapm.c
Original file line number Diff line number Diff line change
Expand Up @@ -1092,8 +1092,10 @@ static __always_inline int is_connected_ep(struct snd_soc_dapm_widget *widget,
if (list)
list_add_tail(&widget->work_list, list);

if (custom_stop_condition && custom_stop_condition(widget, dir))
return con;
if (custom_stop_condition && custom_stop_condition(widget, dir)) {
widget->endpoints[dir] = 1;
return widget->endpoints[dir];
}

if ((widget->is_ep & SND_SOC_DAPM_DIR_TO_EP(dir)) && widget->connected) {
widget->endpoints[dir] = snd_soc_dapm_suspend_check(widget);
Expand Down

0 comments on commit 0946497

Please sign in to comment.