Merge remote-tracking branch 'asoc/fix/dapm' into asoc-next
authorMark Brown <broonie@opensource.wolfsonmicro.com>
Tue, 26 Mar 2013 14:07:58 +0000 (14:07 +0000)
committerMark Brown <broonie@opensource.wolfsonmicro.com>
Tue, 26 Mar 2013 14:07:58 +0000 (14:07 +0000)
1  2 
sound/soc/soc-dapm.c

diff --combined sound/soc/soc-dapm.c
@@@ -831,6 -831,9 +831,9 @@@ static int is_connected_output_ep(struc
                if (path->weak)
                        continue;
  
+               if (path->walking)
+                       return 1;
                if (path->walked)
                        continue;
  
  
                if (path->sink && path->connect) {
                        path->walked = 1;
+                       path->walking = 1;
  
                        /* do we need to add this widget to the list ? */
                        if (list) {
                                        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;
                }
        }
  
@@@ -931,6 -938,9 +938,9 @@@ static int is_connected_input_ep(struc
                if (path->weak)
                        continue;
  
+               if (path->walking)
+                       return 1;
                if (path->walked)
                        continue;
  
  
                if (path->source && path->connect) {
                        path->walked = 1;
+                       path->walking = 1;
  
                        /* do we need to add this widget to the list ? */
                        if (list) {
                                        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;
                }
        }
  
@@@ -3255,16 -3269,14 +3269,16 @@@ static int snd_soc_dai_link_event(struc
                break;
  
        case SND_SOC_DAPM_POST_PMU:
 -              ret = snd_soc_dai_digital_mute(sink, 0);
 +              ret = snd_soc_dai_digital_mute(sink, 0,
 +                                             SNDRV_PCM_STREAM_PLAYBACK);
                if (ret != 0 && ret != -ENOTSUPP)
                        dev_warn(sink->dev, "ASoC: Failed to unmute: %d\n", ret);
                ret = 0;
                break;
  
        case SND_SOC_DAPM_PRE_PMD:
 -              ret = snd_soc_dai_digital_mute(sink, 1);
 +              ret = snd_soc_dai_digital_mute(sink, 1,
 +                                             SNDRV_PCM_STREAM_PLAYBACK);
                if (ret != 0 && ret != -ENOTSUPP)
                        dev_warn(sink->dev, "ASoC: Failed to mute: %d\n", ret);
                ret = 0;