aboutsummaryrefslogtreecommitdiffstats
path: root/include/sound/soc-dapm.h
diff options
context:
space:
mode:
authorLars-Peter Clausen <lars@metafoo.de>2013-07-29 11:14:00 -0400
committerMark Brown <broonie@linaro.org>2013-07-29 13:41:00 -0400
commit5106b92f80a2cd37c52cffed80b4f5acfb77ccfd (patch)
tree609669cf0003ada313400b64be82feaa37b317ec /include/sound/soc-dapm.h
parentcf7c1de20c576477d42deae255cbc6e439bb5dc0 (diff)
ASoC: dapm: Keep a list of paths per kcontrol
Currently we store for each path which control (if any at all) is associated with that control. But we are only ever interested in the reverse relationship, i.e. we want to know all the paths a certain control is associated with. This is currently implemented by always iterating over all paths. This patch updates the code to keep a list for each control which contains all the paths that are associated with that control. This improves the run time of e.g. soc_dapm_mixer_update_power() and soc_dapm_mux_update_power() from O(n) (with n being the number of paths for the card) to O(1). Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Mark Brown <broonie@linaro.org>
Diffstat (limited to 'include/sound/soc-dapm.h')
-rw-r--r--include/sound/soc-dapm.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/include/sound/soc-dapm.h b/include/sound/soc-dapm.h
index d7d26cc8e3fc..693c75bbd5d1 100644
--- a/include/sound/soc-dapm.h
+++ b/include/sound/soc-dapm.h
@@ -490,7 +490,6 @@ struct snd_soc_dapm_path {
490 /* source (input) and sink (output) widgets */ 490 /* source (input) and sink (output) widgets */
491 struct snd_soc_dapm_widget *source; 491 struct snd_soc_dapm_widget *source;
492 struct snd_soc_dapm_widget *sink; 492 struct snd_soc_dapm_widget *sink;
493 struct snd_kcontrol *kcontrol;
494 493
495 /* status */ 494 /* status */
496 u32 connect:1; /* source and sink widgets are connected */ 495 u32 connect:1; /* source and sink widgets are connected */
@@ -503,6 +502,7 @@ struct snd_soc_dapm_path {
503 502
504 struct list_head list_source; 503 struct list_head list_source;
505 struct list_head list_sink; 504 struct list_head list_sink;
505 struct list_head list_kcontrol;
506 struct list_head list; 506 struct list_head list;
507}; 507};
508 508