diff mbox series

[V1] Add debug print in soc-dapm

Message ID 1614927242-19251-1-git-send-email-lkasam@codeaurora.org
State New
Headers show
Series [V1] Add debug print in soc-dapm | expand

Commit Message

Laxminath Kasam March 5, 2021, 6:54 a.m. UTC
Add debug print useful for issue analysis in soc-dapm.
This print for dapm widgets useful for debugging to find
widgets powering up and down.

Signed-off-by: Laxminath Kasam <lkasam@codeaurora.org>
---
 sound/soc/soc-dapm.c | 7 +++++++
 1 file changed, 7 insertions(+)
diff mbox series

Patch

diff --git a/sound/soc/soc-dapm.c b/sound/soc/soc-dapm.c
index b005f9e..09d35df 100644
--- a/sound/soc/soc-dapm.c
+++ b/sound/soc/soc-dapm.c
@@ -1717,6 +1717,13 @@  static void dapm_seq_run(struct snd_soc_card *card,
 			break;
 		}
 
+		/*
+		 * Add this debug log to keep track of widgets being
+		 * powered-up and powered-down.
+		 */
+		dev_dbg(w->dapm->dev, "dapm: powering %s widget %s\n",
+			power_up ? "up" : "down", w->name);
+
 		if (ret < 0)
 			dev_err(w->dapm->dev,
 				"ASoC: Failed to apply widget power: %d\n", ret);