summaryrefslogtreecommitdiffstats
path: root/sound/soc/codecs/wm8994.c
diff options
context:
space:
mode:
authorMark Brown <broonie@opensource.wolfsonmicro.com>2011-02-21 17:11:59 -0800
committerMark Brown <broonie@opensource.wolfsonmicro.com>2011-02-22 10:42:06 -0800
commit48e028eccabc9c246bfad175262582a1ce34a316 (patch)
tree765ecba628ca9af23f695cba2e32ede7eb7da062 /sound/soc/codecs/wm8994.c
parent9b7c525dfaa9a1b5f01db1f3a1edc50bbb6eb739 (diff)
downloadblackbird-op-linux-48e028eccabc9c246bfad175262582a1ce34a316.tar.gz
blackbird-op-linux-48e028eccabc9c246bfad175262582a1ce34a316.zip
ASoC: Support configuration of WM8958 microphone bias analogue parameters
The WM8958 has a different microphone bias architecture to WM8994 so needs different configuration to WM8994. Support this in platform data. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Diffstat (limited to 'sound/soc/codecs/wm8994.c')
-rw-r--r--sound/soc/codecs/wm8994.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/sound/soc/codecs/wm8994.c b/sound/soc/codecs/wm8994.c
index 1ad6e3db7804..9b9c15ffb7d2 100644
--- a/sound/soc/codecs/wm8994.c
+++ b/sound/soc/codecs/wm8994.c
@@ -2855,6 +2855,13 @@ static void wm8994_handle_pdata(struct wm8994_priv *wm8994)
else
snd_soc_add_controls(wm8994->codec, wm8994_eq_controls,
ARRAY_SIZE(wm8994_eq_controls));
+
+ for (i = 0; i < ARRAY_SIZE(pdata->micbias); i++) {
+ if (pdata->micbias[i]) {
+ snd_soc_write(codec, WM8958_MICBIAS1 + i,
+ pdata->micbias[i] & 0xffff);
+ }
+ }
}
/**
OpenPOWER on IntegriCloud