summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMark Brown <broonie@opensource.wolfsonmicro.com>2012-01-25 17:57:16 +0000
committerMark Brown <broonie@opensource.wolfsonmicro.com>2012-01-25 18:20:21 +0000
commita188fcba73837f83a78dc90a44998a978f50ac83 (patch)
tree9486eda682d326fa800b7ad775fd0550fd9ab947
parent9fb83526a898f14adbd3f6f52fa7126f528f15ac (diff)
downloadlinux-3.10-a188fcba73837f83a78dc90a44998a978f50ac83.tar.gz
linux-3.10-a188fcba73837f83a78dc90a44998a978f50ac83.tar.bz2
linux-3.10-a188fcba73837f83a78dc90a44998a978f50ac83.zip
ASoC: wm5100: Fix microphone configuration
We need to write the configuration for each microphone to a different register. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Cc: stable@vger.kernel.org
-rw-r--r--sound/soc/codecs/wm5100.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/sound/soc/codecs/wm5100.c b/sound/soc/codecs/wm5100.c
index 3f8fd3ca945..fb757af1936 100644
--- a/sound/soc/codecs/wm5100.c
+++ b/sound/soc/codecs/wm5100.c
@@ -2612,6 +2612,13 @@ static const struct regmap_config wm5100_regmap = {
.cache_type = REGCACHE_RBTREE,
};
+static const unsigned int wm5100_mic_ctrl_reg[] = {
+ WM5100_IN1L_CONTROL,
+ WM5100_IN2L_CONTROL,
+ WM5100_IN3L_CONTROL,
+ WM5100_IN4L_CONTROL,
+};
+
static __devinit int wm5100_i2c_probe(struct i2c_client *i2c,
const struct i2c_device_id *id)
{
@@ -2744,7 +2751,7 @@ static __devinit int wm5100_i2c_probe(struct i2c_client *i2c,
}
for (i = 0; i < ARRAY_SIZE(wm5100->pdata.in_mode); i++) {
- regmap_update_bits(wm5100->regmap, WM5100_IN1L_CONTROL,
+ regmap_update_bits(wm5100->regmap, wm5100_mic_ctrl_reg[i],
WM5100_IN1_MODE_MASK |
WM5100_IN1_DMIC_SUP_MASK,
(wm5100->pdata.in_mode[i] <<