diff options
author | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2012-01-25 12:57:16 -0500 |
---|---|---|
committer | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2012-01-25 13:20:21 -0500 |
commit | a188fcba73837f83a78dc90a44998a978f50ac83 (patch) | |
tree | 9486eda682d326fa800b7ad775fd0550fd9ab947 /sound | |
parent | 9fb83526a898f14adbd3f6f52fa7126f528f15ac (diff) |
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
Diffstat (limited to 'sound')
-rw-r--r-- | sound/soc/codecs/wm5100.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/sound/soc/codecs/wm5100.c b/sound/soc/codecs/wm5100.c index 3f8fd3ca9454..fb757af19363 100644 --- a/sound/soc/codecs/wm5100.c +++ b/sound/soc/codecs/wm5100.c | |||
@@ -2612,6 +2612,13 @@ static const struct regmap_config wm5100_regmap = { | |||
2612 | .cache_type = REGCACHE_RBTREE, | 2612 | .cache_type = REGCACHE_RBTREE, |
2613 | }; | 2613 | }; |
2614 | 2614 | ||
2615 | static const unsigned int wm5100_mic_ctrl_reg[] = { | ||
2616 | WM5100_IN1L_CONTROL, | ||
2617 | WM5100_IN2L_CONTROL, | ||
2618 | WM5100_IN3L_CONTROL, | ||
2619 | WM5100_IN4L_CONTROL, | ||
2620 | }; | ||
2621 | |||
2615 | static __devinit int wm5100_i2c_probe(struct i2c_client *i2c, | 2622 | static __devinit int wm5100_i2c_probe(struct i2c_client *i2c, |
2616 | const struct i2c_device_id *id) | 2623 | const struct i2c_device_id *id) |
2617 | { | 2624 | { |
@@ -2744,7 +2751,7 @@ static __devinit int wm5100_i2c_probe(struct i2c_client *i2c, | |||
2744 | } | 2751 | } |
2745 | 2752 | ||
2746 | for (i = 0; i < ARRAY_SIZE(wm5100->pdata.in_mode); i++) { | 2753 | for (i = 0; i < ARRAY_SIZE(wm5100->pdata.in_mode); i++) { |
2747 | regmap_update_bits(wm5100->regmap, WM5100_IN1L_CONTROL, | 2754 | regmap_update_bits(wm5100->regmap, wm5100_mic_ctrl_reg[i], |
2748 | WM5100_IN1_MODE_MASK | | 2755 | WM5100_IN1_MODE_MASK | |
2749 | WM5100_IN1_DMIC_SUP_MASK, | 2756 | WM5100_IN1_DMIC_SUP_MASK, |
2750 | (wm5100->pdata.in_mode[i] << | 2757 | (wm5100->pdata.in_mode[i] << |