[alsa-devel] [PATCH] ASoC: lm49453: Fix analog and digital volume ranges

MR.Swami.Reddy at ti.com MR.Swami.Reddy at ti.com
Wed Dec 5 08:59:53 CET 2012


From: MR Swami Reddy <MR.Swami.Reddy at ti.com>

[PATCH] ASoC: lm49453: Fix analog and digital volume ranges"

Signed-off-by: M R Swami Reddy <mr.swami.reddy at ti.com>

--
 sound/soc/codecs/lm49453.c |    7 +++++----
 1 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/sound/soc/codecs/lm49453.c b/sound/soc/codecs/lm49453.c
index 808e50a..ba1aec4 100644
--- a/sound/soc/codecs/lm49453.c
+++ b/sound/soc/codecs/lm49453.c
@@ -494,8 +494,9 @@ SOC_DAPM_SINGLE("Port2_2 Switch", LM49453_P0_PORT2_TX2_REG, 7, 1, 0),
 };
 
 /* TLV Declarations */
-static const DECLARE_TLV_DB_SCALE(port_tlv, 0, 600, 0);
+static const DECLARE_TLV_DB_SCALE(analog_tlv, 0, 200, 1);
+static const DECLARE_TLV_DB_SCALE(port_tlv, -1800, 600, 0);
 
 static const struct snd_kcontrol_new lm49453_sidetone_mixer_controls[] = {
 /* Sidetone supports mono only */
@@ -516,9 +517,9 @@ SOC_DAPM_SINGLE_TLV("Sidetone DMIC2R Volume", LM49453_P0_STN_VOL_DMIC2R_REG,
 static const struct snd_kcontrol_new lm49453_snd_controls[] = {
 	/* mic1 and mic2 supports mono only */
 	SOC_SINGLE_TLV("Mic1 Volume", LM49453_P0_ADC_LEVELL_REG, 0, 6,
-			0, digital_tlv),
+			0, analog_tlv),
 	SOC_SINGLE_TLV("Mic2 Volume", LM49453_P0_ADC_LEVELR_REG, 0, 6,
-			0, digital_tlv),
+			0, analog_tlv),
 
 	SOC_DOUBLE_R_TLV("DMIC1 Volume", LM49453_P0_DMIC1_LEVELL_REG,
 			  LM49453_P0_DMIC1_LEVELR_REG, 0, 6, 0, digital_tlv),


More information about the Alsa-devel mailing list