aboutsummaryrefslogtreecommitdiffstats
path: root/sound
diff options
context:
space:
mode:
authorFabio Estevam <fabio.estevam@freescale.com>2012-12-23 12:45:31 -0500
committerMark Brown <broonie@opensource.wolfsonmicro.com>2012-12-24 10:31:25 -0500
commitb50684da6cd5a9ec47ea5556bc9f5461c1d7017c (patch)
tree046c57ee9055d6d2e022d977795f2dbd1648e0d0 /sound
parenta49f0d1ea3ec94fc7cf33a7c36a16343b74bd565 (diff)
ASoC: sgtl5000: Fix maximum value for microphone gain
sgtl5000 microphone gain only has 2 bits of resolution, so maximum value is 3. From Eric Nelson: "We also found that for the microphones we have here (commodity PC boom mics) a default value of 2 for the gain gives the best results." So change the default microphone gain as well. Signed-off-by: Eric Nelson <eric.nelson@boundarydevices.com> Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Diffstat (limited to 'sound')
-rw-r--r--sound/soc/codecs/sgtl5000.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sound/soc/codecs/sgtl5000.c b/sound/soc/codecs/sgtl5000.c
index cb1675cd8e1c..92bbfec9b107 100644
--- a/sound/soc/codecs/sgtl5000.c
+++ b/sound/soc/codecs/sgtl5000.c
@@ -401,7 +401,7 @@ static const struct snd_kcontrol_new sgtl5000_snd_controls[] = {
401 5, 1, 0), 401 5, 1, 0),
402 402
403 SOC_SINGLE_TLV("Mic Volume", SGTL5000_CHIP_MIC_CTRL, 403 SOC_SINGLE_TLV("Mic Volume", SGTL5000_CHIP_MIC_CTRL,
404 0, 4, 0, mic_gain_tlv), 404 0, 3, 0, mic_gain_tlv),
405}; 405};
406 406
407/* mute the codec used by alsa core */ 407/* mute the codec used by alsa core */
@@ -1344,7 +1344,7 @@ static int sgtl5000_probe(struct snd_soc_codec *codec)
1344 SGTL5000_HP_ZCD_EN | 1344 SGTL5000_HP_ZCD_EN |
1345 SGTL5000_ADC_ZCD_EN); 1345 SGTL5000_ADC_ZCD_EN);
1346 1346
1347 snd_soc_write(codec, SGTL5000_CHIP_MIC_CTRL, 0); 1347 snd_soc_write(codec, SGTL5000_CHIP_MIC_CTRL, 2);
1348 1348
1349 /* 1349 /*
1350 * disable DAP 1350 * disable DAP