ASoC: Cache connected input and output recursions
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.
Signed-off-by Mark Brown <[email protected]>
--- 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
@@ -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