Skip to content

Commit 0946497

Browse files
kpjeejabroonie
authored andcommitted
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: 6742064('ASoC: dapm: support user-defined stop condition in dai_get_connected_widgets') Signed-off-by: Jeeja KP <[email protected]> Signed-off-by: Vinod Koul <[email protected]> Signed-off-by: Mark Brown <[email protected]>
1 parent 5fdd022 commit 0946497

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

sound/soc/soc-dapm.c

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1092,8 +1092,10 @@ static __always_inline int is_connected_ep(struct snd_soc_dapm_widget *widget,
10921092
if (list)
10931093
list_add_tail(&widget->work_list, list);
10941094

1095-
if (custom_stop_condition && custom_stop_condition(widget, dir))
1096-
return con;
1095+
if (custom_stop_condition && custom_stop_condition(widget, dir)) {
1096+
widget->endpoints[dir] = 1;
1097+
return widget->endpoints[dir];
1098+
}
10971099

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

0 commit comments

Comments
 (0)