aboutsummaryrefslogtreecommitdiffstats
path: root/include/sound
diff options
context:
space:
mode:
authorMark Brown <broonie@opensource.wolfsonmicro.com>2011-10-04 17:15:59 -0400
committerMark Brown <broonie@opensource.wolfsonmicro.com>2011-10-05 06:22:22 -0400
commit9b8a83b205bd07b06784028effd94515fe9278c3 (patch)
tree82e015462cf5e36769c2da61d3bf49f6d2873e63 /include/sound
parent75c1f891b4c394c607532fdcea294c2556e410c4 (diff)
ASoC: Only run power_check() on a widget once per run
Some widgets will get power_check() run on them more than once during a DAPM run, most commonly due to supply widgets checking to see if their consumers are powered up. It's wasteful to do this so cache the result of power_check() during a run. For one system I tested this on I got an improvement of: Power Path Neighbour Before: 106 970 1186 After: 69 727 905 from this. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Diffstat (limited to 'include/sound')
-rw-r--r--include/sound/soc-dapm.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/include/sound/soc-dapm.h b/include/sound/soc-dapm.h
index c080635b3c35..e2853daf802c 100644
--- a/include/sound/soc-dapm.h
+++ b/include/sound/soc-dapm.h
@@ -473,6 +473,8 @@ struct snd_soc_dapm_widget {
473 unsigned char ext:1; /* has external widgets */ 473 unsigned char ext:1; /* has external widgets */
474 unsigned char force:1; /* force state */ 474 unsigned char force:1; /* force state */
475 unsigned char ignore_suspend:1; /* kept enabled over suspend */ 475 unsigned char ignore_suspend:1; /* kept enabled over suspend */
476 unsigned char new_power:1; /* power from this run */
477 unsigned char power_checked:1; /* power checked this run */
476 int subseq; /* sort within widget type */ 478 int subseq; /* sort within widget type */
477 479
478 int (*power_check)(struct snd_soc_dapm_widget *w); 480 int (*power_check)(struct snd_soc_dapm_widget *w);