Skip to contentSkip to conversation

ASoC: Cache connected input and output recursions

PATCH New Mark Brown 1 participant 1 message Oct 9, 2011

Subsystems (2)
lore
Share & tools
lore

Mark Brown

author
#0 lore raw

PATCH 1/1 ASoC: Cache connected input and output recursions

The number of connected input and output endpoints for a given widgets can't change during a DAPM run so there is no need to redo the recursion through branches of the tree we've already visited. Doing this on one of my test systems gives an improvement of:

         Power    Path   Neighbour
Before:  63       607    731
After:   63       141    181

which scales up well as more widgets are involved in paths.

---
 include/sound/soc-dapm.h |    2 +
 sound/soc/soc-dapm.c     |   60 ++++++++++++++++++++++++++++++++++-----------
 2 files changed, 47 insertions(+), 15 deletions(-)
include/sound/soc-dapm.h +2 -0
index 5b2202f..17a4c17 100644
@@ -498,6 +498,8 @@ struct snd_soc_dapm_widget {
 	/* used during DAPM updates */
 	struct list_head power_list;
 	struct list_head dirty;
+	int inputs;
+	int outputs;
 };
 
 struct snd_soc_dapm_update {
sound/soc/soc-dapm.c +45 -15

121 lines not on this page · raw message

Signature · 1 line
1.7.6.3