Skip to content

Commit

Permalink
Merge remote-tracking branch 'asoc/fix/dapm' into asoc-next
Browse files Browse the repository at this point in the history
  • Loading branch information
broonie committed Mar 26, 2013
2 parents 23af7b0 + 7f08a89 commit a36b324
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 0 deletions.
1 change: 1 addition & 0 deletions include/sound/soc-dapm.h
Original file line number Diff line number Diff line change
Expand Up @@ -488,6 +488,7 @@ struct snd_soc_dapm_path {
/* status */
u32 connect:1; /* source and sink widgets are connected */
u32 walked:1; /* path has been walked */
u32 walking:1; /* path is in the process of being walked */
u32 weak:1; /* path ignored for power management */

int (*connected)(struct snd_soc_dapm_widget *source,
Expand Down
14 changes: 14 additions & 0 deletions sound/soc/soc-dapm.c
Original file line number Diff line number Diff line change
Expand Up @@ -831,13 +831,17 @@ static int is_connected_output_ep(struct snd_soc_dapm_widget *widget,
if (path->weak)
continue;

if (path->walking)
return 1;

if (path->walked)
continue;

trace_snd_soc_dapm_output_path(widget, path);

if (path->sink && path->connect) {
path->walked = 1;
path->walking = 1;

/* do we need to add this widget to the list ? */
if (list) {
Expand All @@ -847,11 +851,14 @@ static int is_connected_output_ep(struct snd_soc_dapm_widget *widget,
dev_err(widget->dapm->dev,
"ASoC: could not add widget %s\n",
widget->name);
path->walking = 0;
return con;
}
}

con += is_connected_output_ep(path->sink, list);

path->walking = 0;
}
}

Expand Down Expand Up @@ -931,13 +938,17 @@ static int is_connected_input_ep(struct snd_soc_dapm_widget *widget,
if (path->weak)
continue;

if (path->walking)
return 1;

if (path->walked)
continue;

trace_snd_soc_dapm_input_path(widget, path);

if (path->source && path->connect) {
path->walked = 1;
path->walking = 1;

/* do we need to add this widget to the list ? */
if (list) {
Expand All @@ -947,11 +958,14 @@ static int is_connected_input_ep(struct snd_soc_dapm_widget *widget,
dev_err(widget->dapm->dev,
"ASoC: could not add widget %s\n",
widget->name);
path->walking = 0;
return con;
}
}

con += is_connected_input_ep(path->source, list);

path->walking = 0;
}
}

Expand Down

0 comments on commit a36b324

Please sign in to comment.