summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJarkko Nikula <jarkko.nikula@linux.intel.com>2014-05-16 16:55:24 +0300
committerMark Brown <broonie@linaro.org>2014-05-16 19:59:26 +0100
commita735d992c2e71e230b798518b7fe954fdbc2dc8c (patch)
treecf2d6295dde1b81ed99f4f005be0aff617e565e8
parent541423dde415e9cecdb0bf17657b3bd7e1666dd2 (diff)
downloadop-kernel-dev-a735d992c2e71e230b798518b7fe954fdbc2dc8c.zip
op-kernel-dev-a735d992c2e71e230b798518b7fe954fdbc2dc8c.tar.gz
ASoC: max98090: Move microphone bias voltage setting to probe function
Microphone bias level configuration register can configure voltage between 2.2 V and 2.8 V but doesn't manage is voltage on or off. Microphone bias on/off state is controlled by "MICBIAS" DAPM widget. Therefore there is no need to update bias voltage conditionally depending on jack state each time when codec goes to SND_SOC_BIAS_ON state and setting can be moved to max98090_probe() as driver currently doesn't support other levels than 2.8 V. Signed-off-by: Jarkko Nikula <jarkko.nikula@linux.intel.com> Signed-off-by: Mark Brown <broonie@linaro.org>
-rw-r--r--sound/soc/codecs/max98090.c10
1 files changed, 3 insertions, 7 deletions
diff --git a/sound/soc/codecs/max98090.c b/sound/soc/codecs/max98090.c
index d36cd15..c88bf82 100644
--- a/sound/soc/codecs/max98090.c
+++ b/sound/soc/codecs/max98090.c
@@ -1795,13 +1795,6 @@ static int max98090_set_bias_level(struct snd_soc_codec *codec,
switch (level) {
case SND_SOC_BIAS_ON:
- if (max98090->jack_state == M98090_JACK_STATE_HEADSET) {
- /*
- * Set to normal bias level.
- */
- snd_soc_update_bits(codec, M98090_REG_MIC_BIAS_VOLTAGE,
- M98090_MBVSEL_MASK, M98090_MBVSEL_2V8);
- }
break;
case SND_SOC_BIAS_PREPARE:
@@ -2296,6 +2289,9 @@ static int max98090_probe(struct snd_soc_codec *codec)
snd_soc_write(codec, M98090_REG_BIAS_CONTROL,
M98090_VCM_MODE_MASK);
+ snd_soc_update_bits(codec, M98090_REG_MIC_BIAS_VOLTAGE,
+ M98090_MBVSEL_MASK, M98090_MBVSEL_2V8);
+
max98090_handle_pdata(codec);
max98090_add_widgets(codec);
OpenPOWER on IntegriCloud