diff --git a/sound/soc/soc-dapm.c b/sound/soc/soc-dapm.c
index 214a709..e6a0882 100644
--- a/sound/soc/soc-dapm.c
+++ b/sound/soc/soc-dapm.c
@@ -124,10 +124,13 @@
 	return !list_empty(&w->dirty);
 }
 
-static void dapm_mark_dirty(struct snd_soc_dapm_widget *w)
+static void dapm_mark_dirty(struct snd_soc_dapm_widget *w, const char *reason)
 {
-	if (!dapm_dirty_widget(w))
+	if (!dapm_dirty_widget(w)) {
+		dev_vdbg(w->dapm->dev, "Marking %s dirty due to %s\n",
+			 w->name, reason);
 		list_add_tail(&w->dirty, &w->dapm->card->dapm_dirty);
+	}
 }
 
 /* create a new dapm widget */
@@ -1227,7 +1230,7 @@
 	/* If the peer is already in the state we're moving to then we
 	 * won't have an impact on it. */
 	if (power != peer->power)
-		dapm_mark_dirty(peer);
+		dapm_mark_dirty(peer, "peer state change");
 }
 
 static void dapm_widget_set_power(struct snd_soc_dapm_widget *w, bool power,
@@ -1624,16 +1627,17 @@
 		/* we now need to match the string in the enum to the path */
 		if (!(strcmp(path->name, e->texts[mux]))) {
 			path->connect = 1; /* new connection */
-			dapm_mark_dirty(path->source);
+			dapm_mark_dirty(path->source, "mux connection");
 		} else {
 			if (path->connect)
-				dapm_mark_dirty(path->source);
+				dapm_mark_dirty(path->source,
+						"mux disconnection");
 			path->connect = 0; /* old connection must be powered down */
 		}
 	}
 
 	if (found) {
-		dapm_mark_dirty(widget);
+		dapm_mark_dirty(widget, "mux change");
 		dapm_power_widgets(widget->dapm, SND_SOC_DAPM_STREAM_NOP);
 	}
 
@@ -1660,11 +1664,11 @@
 		/* found, now check type */
 		found = 1;
 		path->connect = connect;
-		dapm_mark_dirty(path->source);
+		dapm_mark_dirty(path->source, "mixer connection");
 	}
 
 	if (found) {
-		dapm_mark_dirty(widget);
+		dapm_mark_dirty(widget, "mixer update");
 		dapm_power_widgets(widget->dapm, SND_SOC_DAPM_STREAM_NOP);
 	}
 
@@ -1810,7 +1814,7 @@
 	w->connected = status;
 	if (status == 0)
 		w->force = 0;
-	dapm_mark_dirty(w);
+	dapm_mark_dirty(w, "pin configuration");
 
 	return 0;
 }
@@ -2699,7 +2703,7 @@
 		dev_vdbg(w->dapm->dev, "widget %s\n %s stream %s event %d\n",
 			w->name, w->sname, stream, event);
 		if (strstr(w->sname, stream)) {
-			dapm_mark_dirty(w);
+			dapm_mark_dirty(w, "stream event");
 			switch(event) {
 			case SND_SOC_DAPM_STREAM_START:
 				w->active = 1;
@@ -2789,7 +2793,7 @@
 	dev_dbg(w->dapm->dev, "dapm: force enable pin %s\n", pin);
 	w->connected = 1;
 	w->force = 1;
-	dapm_mark_dirty(w);
+	dapm_mark_dirty(w, "force enable");
 
 	return 0;
 }
