* [PATCH v2] ASoC: sgtl5000: Fix maximum value for microphone gain
@ 2012-12-23 17:45 Fabio Estevam
2012-12-24 15:31 ` Mark Brown
0 siblings, 1 reply; 2+ messages in thread
From: Fabio Estevam @ 2012-12-23 17:45 UTC (permalink / raw)
To: broonie; +Cc: Fabio Estevam, alsa-devel, dong.aisheng, eric.nelson
From: Fabio Estevam <fabio.estevam@freescale.com>
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>
---
Changes since v1:
- Add sgtl5000 into the Subject
sound/soc/codecs/sgtl5000.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/sound/soc/codecs/sgtl5000.c b/sound/soc/codecs/sgtl5000.c
index cb1675c..92bbfec 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[] = {
5, 1, 0),
SOC_SINGLE_TLV("Mic Volume", SGTL5000_CHIP_MIC_CTRL,
- 0, 4, 0, mic_gain_tlv),
+ 0, 3, 0, mic_gain_tlv),
};
/* mute the codec used by alsa core */
@@ -1344,7 +1344,7 @@ static int sgtl5000_probe(struct snd_soc_codec *codec)
SGTL5000_HP_ZCD_EN |
SGTL5000_ADC_ZCD_EN);
- snd_soc_write(codec, SGTL5000_CHIP_MIC_CTRL, 0);
+ snd_soc_write(codec, SGTL5000_CHIP_MIC_CTRL, 2);
/*
* disable DAP
--
1.7.9.5
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH v2] ASoC: sgtl5000: Fix maximum value for microphone gain
2012-12-23 17:45 [PATCH v2] ASoC: sgtl5000: Fix maximum value for microphone gain Fabio Estevam
@ 2012-12-24 15:31 ` Mark Brown
0 siblings, 0 replies; 2+ messages in thread
From: Mark Brown @ 2012-12-24 15:31 UTC (permalink / raw)
To: Fabio Estevam; +Cc: Fabio Estevam, alsa-devel, dong.aisheng, eric.nelson
[-- Attachment #1.1: Type: text/plain, Size: 423 bytes --]
On Sun, Dec 23, 2012 at 03:45:31PM -0200, Fabio Estevam wrote:
> - snd_soc_write(codec, SGTL5000_CHIP_MIC_CTRL, 0);
> + snd_soc_write(codec, SGTL5000_CHIP_MIC_CTRL, 2);
Hrm, on second thoughts I see we're already changing the default so I
applied this but we really should just change the driver to leave the
device with whatever setting it powers on with - this is an example of
the sort of thing we're trying to avoid.
[-- Attachment #1.2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]
[-- Attachment #2: Type: text/plain, Size: 0 bytes --]
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2012-12-24 15:31 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-12-23 17:45 [PATCH v2] ASoC: sgtl5000: Fix maximum value for microphone gain Fabio Estevam
2012-12-24 15:31 ` Mark Brown
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.