aboutsummaryrefslogtreecommitdiffstats
path: root/include/sound/soc-dapm.h
diff options
context:
space:
mode:
authorMark Brown <broonie@opensource.wolfsonmicro.com>2010-12-14 11:13:57 -0500
committerMark Brown <broonie@opensource.wolfsonmicro.com>2010-12-17 06:18:04 -0500
commit97404f2e0386ac147cec00fc5d89ea475b04bd78 (patch)
treec84f883afed54cb7d20e74818302a6f960c59317 /include/sound/soc-dapm.h
parent7be31be880ee00c6f8d38184368e8a834923b469 (diff)
ASoC: Do DAPM control updates in the middle of DAPM sequences
Attempt to minimise audible effects from mixer and mux updates by implementing the actual register changes between powering down widgets that have become unused and powering up widgets that are newly used. This means that we're making the change with the minimum set of widgets powered, that the input path is connected when we're powering up widgets (so things like DC offset correction can run with their signal active) and that we bring things down to cold before switching away. Since hardware tends to be designed for the power on/off case more than for dynamic reconfiguration this should minimise pops and clicks during reconfiguration while active. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Acked-by: Peter Ujfalusi <peter.ujfalusi@nokia.com> Tested-by: Peter Ujfalusi <peter.ujfalusi@nokia.com> Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Diffstat (limited to 'include/sound/soc-dapm.h')
-rw-r--r--include/sound/soc-dapm.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/include/sound/soc-dapm.h b/include/sound/soc-dapm.h
index 98783510d2f1..540872fc1390 100644
--- a/include/sound/soc-dapm.h
+++ b/include/sound/soc-dapm.h
@@ -460,6 +460,14 @@ struct snd_soc_dapm_widget {
460 struct list_head power_list; 460 struct list_head power_list;
461}; 461};
462 462
463struct snd_soc_dapm_update {
464 struct snd_soc_dapm_widget *widget;
465 struct snd_kcontrol *kcontrol;
466 int reg;
467 int mask;
468 int val;
469};
470
463/* DAPM context */ 471/* DAPM context */
464struct snd_soc_dapm_context { 472struct snd_soc_dapm_context {
465 int n_widgets; /* number of widgets in this context */ 473 int n_widgets; /* number of widgets in this context */
@@ -468,6 +476,8 @@ struct snd_soc_dapm_context {
468 struct delayed_work delayed_work; 476 struct delayed_work delayed_work;
469 unsigned int idle_bias_off:1; /* Use BIAS_OFF instead of STANDBY */ 477 unsigned int idle_bias_off:1; /* Use BIAS_OFF instead of STANDBY */
470 478
479 struct snd_soc_dapm_update *update;
480
471 struct device *dev; /* from parent - for debug */ 481 struct device *dev; /* from parent - for debug */
472 struct snd_soc_codec *codec; /* parent codec */ 482 struct snd_soc_codec *codec; /* parent codec */
473 struct snd_soc_card *card; /* parent card */ 483 struct snd_soc_card *card; /* parent card */