aboutsummaryrefslogtreecommitdiffstats
path: root/sound/soc/soc-dapm.c
diff options
context:
space:
mode:
authorMark Brown <broonie@opensource.wolfsonmicro.com>2011-02-09 17:52:08 -0500
committerMark Brown <broonie@opensource.wolfsonmicro.com>2011-02-09 17:52:08 -0500
commit866fd9366a5b2c7d17eb10f7e7b1c17393ed0beb (patch)
tree51b384c53fdb6c89c09efafeaeec701c25444572 /sound/soc/soc-dapm.c
parente12adab00222817213fcdc68c5fd6ee2e5dfb247 (diff)
parentb66a70d5e9929f3b0df5a7177bba75652d2f4c3e (diff)
Merge branch 'for-2.6.38' into for-2.6.39
Diffstat (limited to 'sound/soc/soc-dapm.c')
-rw-r--r--sound/soc/soc-dapm.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/sound/soc/soc-dapm.c b/sound/soc/soc-dapm.c
index d0342aab2c15..b30eda6cc960 100644
--- a/sound/soc/soc-dapm.c
+++ b/sound/soc/soc-dapm.c
@@ -1664,6 +1664,7 @@ EXPORT_SYMBOL_GPL(snd_soc_dapm_add_routes);
1664int snd_soc_dapm_new_widgets(struct snd_soc_dapm_context *dapm) 1664int snd_soc_dapm_new_widgets(struct snd_soc_dapm_context *dapm)
1665{ 1665{
1666 struct snd_soc_dapm_widget *w; 1666 struct snd_soc_dapm_widget *w;
1667 unsigned int val;
1667 1668
1668 list_for_each_entry(w, &dapm->card->widgets, list) 1669 list_for_each_entry(w, &dapm->card->widgets, list)
1669 { 1670 {
@@ -1712,6 +1713,18 @@ int snd_soc_dapm_new_widgets(struct snd_soc_dapm_context *dapm)
1712 case snd_soc_dapm_post: 1713 case snd_soc_dapm_post:
1713 break; 1714 break;
1714 } 1715 }
1716
1717 /* Read the initial power state from the device */
1718 if (w->reg >= 0) {
1719 val = snd_soc_read(w->codec, w->reg);
1720 val &= 1 << w->shift;
1721 if (w->invert)
1722 val = !val;
1723
1724 if (val)
1725 w->power = 1;
1726 }
1727
1715 w->new = 1; 1728 w->new = 1;
1716 } 1729 }
1717 1730