diff options
Diffstat (limited to 'sound')
-rw-r--r-- | sound/soc/soc-dapm.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/sound/soc/soc-dapm.c b/sound/soc/soc-dapm.c index 1d6a9b3ceb27..d6d9ba2e6916 100644 --- a/sound/soc/soc-dapm.c +++ b/sound/soc/soc-dapm.c | |||
@@ -831,6 +831,9 @@ static int is_connected_output_ep(struct snd_soc_dapm_widget *widget, | |||
831 | if (path->weak) | 831 | if (path->weak) |
832 | continue; | 832 | continue; |
833 | 833 | ||
834 | if (path->walking) | ||
835 | return 1; | ||
836 | |||
834 | if (path->walked) | 837 | if (path->walked) |
835 | continue; | 838 | continue; |
836 | 839 | ||
@@ -838,6 +841,7 @@ static int is_connected_output_ep(struct snd_soc_dapm_widget *widget, | |||
838 | 841 | ||
839 | if (path->sink && path->connect) { | 842 | if (path->sink && path->connect) { |
840 | path->walked = 1; | 843 | path->walked = 1; |
844 | path->walking = 1; | ||
841 | 845 | ||
842 | /* do we need to add this widget to the list ? */ | 846 | /* do we need to add this widget to the list ? */ |
843 | if (list) { | 847 | if (list) { |
@@ -847,11 +851,14 @@ static int is_connected_output_ep(struct snd_soc_dapm_widget *widget, | |||
847 | dev_err(widget->dapm->dev, | 851 | dev_err(widget->dapm->dev, |
848 | "ASoC: could not add widget %s\n", | 852 | "ASoC: could not add widget %s\n", |
849 | widget->name); | 853 | widget->name); |
854 | path->walking = 0; | ||
850 | return con; | 855 | return con; |
851 | } | 856 | } |
852 | } | 857 | } |
853 | 858 | ||
854 | con += is_connected_output_ep(path->sink, list); | 859 | con += is_connected_output_ep(path->sink, list); |
860 | |||
861 | path->walking = 0; | ||
855 | } | 862 | } |
856 | } | 863 | } |
857 | 864 | ||
@@ -931,6 +938,9 @@ static int is_connected_input_ep(struct snd_soc_dapm_widget *widget, | |||
931 | if (path->weak) | 938 | if (path->weak) |
932 | continue; | 939 | continue; |
933 | 940 | ||
941 | if (path->walking) | ||
942 | return 1; | ||
943 | |||
934 | if (path->walked) | 944 | if (path->walked) |
935 | continue; | 945 | continue; |
936 | 946 | ||
@@ -938,6 +948,7 @@ static int is_connected_input_ep(struct snd_soc_dapm_widget *widget, | |||
938 | 948 | ||
939 | if (path->source && path->connect) { | 949 | if (path->source && path->connect) { |
940 | path->walked = 1; | 950 | path->walked = 1; |
951 | path->walking = 1; | ||
941 | 952 | ||
942 | /* do we need to add this widget to the list ? */ | 953 | /* do we need to add this widget to the list ? */ |
943 | if (list) { | 954 | if (list) { |
@@ -947,11 +958,14 @@ static int is_connected_input_ep(struct snd_soc_dapm_widget *widget, | |||
947 | dev_err(widget->dapm->dev, | 958 | dev_err(widget->dapm->dev, |
948 | "ASoC: could not add widget %s\n", | 959 | "ASoC: could not add widget %s\n", |
949 | widget->name); | 960 | widget->name); |
961 | path->walking = 0; | ||
950 | return con; | 962 | return con; |
951 | } | 963 | } |
952 | } | 964 | } |
953 | 965 | ||
954 | con += is_connected_input_ep(path->source, list); | 966 | con += is_connected_input_ep(path->source, list); |
967 | |||
968 | path->walking = 0; | ||
955 | } | 969 | } |
956 | } | 970 | } |
957 | 971 | ||