* [PATCH] ASoC: lm49453: Fix analog and digital volume ranges
@ 2012-12-05 10:48 MR.Swami.Reddy
2012-12-05 19:29 ` Vinod Koul
0 siblings, 1 reply; 6+ messages in thread
From: MR.Swami.Reddy @ 2012-12-05 10:48 UTC (permalink / raw)
To: broonie, lrg; +Cc: vishwas.a.deshpande, alsa-devel, M R Swami Reddy
From: MR Swami Reddy <MR.Swami.Reddy@ti.com>
[PATCH] ASoC: lm49453: Fix analog and digital volume ranges
Signed-off-by: M R Swami Reddy <mr.swami.reddy@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..afbefa2 100644
--- a/sound/soc/codecs/lm49453.c
+++ b/sound/soc/codecs/lm49453.c
@@ -495,7 +495,8 @@ SOC_DAPM_SINGLE("Port2_2 Switch", LM49453_P0_PORT2_TX2_REG, 7, 1, 0),
/* TLV Declarations */
static const DECLARE_TLV_DB_SCALE(digital_tlv, -7650, 150, 1);
-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),
^ permalink raw reply related [flat|nested] 6+ messages in thread* Re: [PATCH] ASoC: lm49453: Fix analog and digital volume ranges
2012-12-05 10:48 [PATCH] ASoC: lm49453: Fix analog and digital volume ranges MR.Swami.Reddy
@ 2012-12-05 19:29 ` Vinod Koul
2012-12-06 8:07 ` Reddy, M.R. Swami
0 siblings, 1 reply; 6+ messages in thread
From: Vinod Koul @ 2012-12-05 19:29 UTC (permalink / raw)
To: MR.Swami.Reddy; +Cc: vishwas.a.deshpande, broonie, lrg, alsa-devel
On Wed, 2012-12-05 at 16:18 +0530, MR.Swami.Reddy@ti.com wrote:
> /* TLV Declarations */
> static const DECLARE_TLV_DB_SCALE(digital_tlv, -7650, 150, 1);
> -static const DECLARE_TLV_DB_SCALE(port_tlv, 0, 600, 0);
> +static const DECLARE_TLV_DB_SCALE(analog_tlv, 0, 200, 1);
The spec says your analog gain are 0 to 30dB in steps of 2dB, this
doesnt sound right to me.
> +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),
now i see a problem.
You have hidden the MIC gains and exposed only ADC gains. The name is
wrong causing the confusion. Please make this ADC gain and add new
control for MIC gain!
Your ADC gain is -76 to 18db, with 0.5dB steps, how does this reflect
that?
> SOC_SINGLE_TLV("Mic2 Volume", LM49453_P0_ADC_LEVELR_REG, 0, 6,
> - 0, digital_tlv),
> + 0, analog_tlv),
Ditto.....
>
> SOC_DOUBLE_R_TLV("DMIC1 Volume", LM49453_P0_DMIC1_LEVELL_REG,
> LM49453_P0_DMIC1_LEVELR_REG, 0, 6, 0, digital_tlv),
> _______________________________________________
> Alsa-devel mailing list
> Alsa-devel@alsa-project.org
> http://mailman.alsa-project.org/mailman/listinfo/alsa-devel
--
~Vinod
^ permalink raw reply [flat|nested] 6+ messages in thread* Re: [PATCH] ASoC: lm49453: Fix analog and digital volume ranges
2012-12-05 19:29 ` Vinod Koul
@ 2012-12-06 8:07 ` Reddy, M.R. Swami
2012-12-06 14:48 ` Peter Ujfalusi
0 siblings, 1 reply; 6+ messages in thread
From: Reddy, M.R. Swami @ 2012-12-06 8:07 UTC (permalink / raw)
To: Vinod Koul
Cc: Deshpande A, Vishwas, broonie@opensource.wolfsonmicro.com,
Girdwood, Liam, alsa-devel@alsa-project.org
Thanks Vinod. Yes, the ADC tlvs missed... I will update the patch.
Thanks
Swami
-----Original Message-----
From: Vinod Koul [mailto:vinod.koul@linux.intel.com]
Sent: Thursday, December 06, 2012 12:59 AM
To: Reddy, M.R. Swami
Cc: broonie@opensource.wolfsonmicro.com; Girdwood, Liam; Deshpande A, Vishwas; alsa-devel@alsa-project.org
Subject: Re: [alsa-devel] [PATCH] ASoC: lm49453: Fix analog and digital volume ranges
On Wed, 2012-12-05 at 16:18 +0530, MR.Swami.Reddy@ti.com wrote:
> /* TLV Declarations */
> static const DECLARE_TLV_DB_SCALE(digital_tlv, -7650, 150, 1);
> -static const DECLARE_TLV_DB_SCALE(port_tlv, 0, 600, 0);
> +static const DECLARE_TLV_DB_SCALE(analog_tlv, 0, 200, 1);
The spec says your analog gain are 0 to 30dB in steps of 2dB, this doesnt sound right to me.
> +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),
now i see a problem.
You have hidden the MIC gains and exposed only ADC gains. The name is wrong causing the confusion. Please make this ADC gain and add new control for MIC gain!
Your ADC gain is -76 to 18db, with 0.5dB steps, how does this reflect that?
> SOC_SINGLE_TLV("Mic2 Volume", LM49453_P0_ADC_LEVELR_REG, 0, 6,
> - 0, digital_tlv),
> + 0, analog_tlv),
Ditto.....
>
> SOC_DOUBLE_R_TLV("DMIC1 Volume", LM49453_P0_DMIC1_LEVELL_REG,
> LM49453_P0_DMIC1_LEVELR_REG, 0, 6, 0, digital_tlv),
> _______________________________________________
> Alsa-devel mailing list
> Alsa-devel@alsa-project.org
> http://mailman.alsa-project.org/mailman/listinfo/alsa-devel
--
~Vinod
^ permalink raw reply [flat|nested] 6+ messages in thread* Re: [PATCH] ASoC: lm49453: Fix analog and digital volume ranges
2012-12-06 8:07 ` Reddy, M.R. Swami
@ 2012-12-06 14:48 ` Peter Ujfalusi
0 siblings, 0 replies; 6+ messages in thread
From: Peter Ujfalusi @ 2012-12-06 14:48 UTC (permalink / raw)
To: Reddy, M.R. Swami
Cc: Vinod Koul, broonie@opensource.wolfsonmicro.com,
Deshpande A, Vishwas, alsa-devel@alsa-project.org, Girdwood, Liam
Hi Swami,
On 12/06/2012 09:07 AM, Reddy, M.R. Swami wrote:
> Thanks Vinod. Yes, the ADC tlvs missed... I will update the patch.
and while you are there, please fix the commit message as well.
>
> Thanks
> Swami
>
> -----Original Message-----
> From: Vinod Koul [mailto:vinod.koul@linux.intel.com]
> Sent: Thursday, December 06, 2012 12:59 AM
> To: Reddy, M.R. Swami
> Cc: broonie@opensource.wolfsonmicro.com; Girdwood, Liam; Deshpande A, Vishwas; alsa-devel@alsa-project.org
> Subject: Re: [alsa-devel] [PATCH] ASoC: lm49453: Fix analog and digital volume ranges
>
> On Wed, 2012-12-05 at 16:18 +0530, MR.Swami.Reddy@ti.com wrote:
>
>> /* TLV Declarations */
>> static const DECLARE_TLV_DB_SCALE(digital_tlv, -7650, 150, 1);
>> -static const DECLARE_TLV_DB_SCALE(port_tlv, 0, 600, 0);
>> +static const DECLARE_TLV_DB_SCALE(analog_tlv, 0, 200, 1);
> The spec says your analog gain are 0 to 30dB in steps of 2dB, this doesnt sound right to me.
>> +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),
> now i see a problem.
> You have hidden the MIC gains and exposed only ADC gains. The name is wrong causing the confusion. Please make this ADC gain and add new control for MIC gain!
> Your ADC gain is -76 to 18db, with 0.5dB steps, how does this reflect that?
>
>> SOC_SINGLE_TLV("Mic2 Volume", LM49453_P0_ADC_LEVELR_REG, 0, 6,
>> - 0, digital_tlv),
>> + 0, analog_tlv),
> Ditto.....
>>
>> SOC_DOUBLE_R_TLV("DMIC1 Volume", LM49453_P0_DMIC1_LEVELL_REG,
>> LM49453_P0_DMIC1_LEVELR_REG, 0, 6, 0, digital_tlv),
>> _______________________________________________
>> Alsa-devel mailing list
>> Alsa-devel@alsa-project.org
>> http://mailman.alsa-project.org/mailman/listinfo/alsa-devel
>
>
> --
> ~Vinod
>
> _______________________________________________
> Alsa-devel mailing list
> Alsa-devel@alsa-project.org
> http://mailman.alsa-project.org/mailman/listinfo/alsa-devel
>
--
Péter
^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH] ASoC: lm49453: Fix analog and digital volume ranges
@ 2012-12-05 7:59 MR.Swami.Reddy
2012-12-05 8:25 ` Mark Brown
0 siblings, 1 reply; 6+ messages in thread
From: MR.Swami.Reddy @ 2012-12-05 7:59 UTC (permalink / raw)
To: broonie, lrg; +Cc: alsa-devel, M R Swami Reddy
From: MR Swami Reddy <MR.Swami.Reddy@ti.com>
[PATCH] ASoC: lm49453: Fix analog and digital volume ranges"
Signed-off-by: M R Swami Reddy <mr.swami.reddy@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),
^ permalink raw reply related [flat|nested] 6+ messages in thread* Re: [PATCH] ASoC: lm49453: Fix analog and digital volume ranges
2012-12-05 7:59 MR.Swami.Reddy
@ 2012-12-05 8:25 ` Mark Brown
0 siblings, 0 replies; 6+ messages in thread
From: Mark Brown @ 2012-12-05 8:25 UTC (permalink / raw)
To: MR.Swami.Reddy; +Cc: alsa-devel, lrg
On Wed, Dec 05, 2012 at 01:29:53PM +0530, MR.Swami.Reddy@ti.com wrote:
> From: MR Swami Reddy <MR.Swami.Reddy@ti.com>
>
> [PATCH] ASoC: lm49453: Fix analog and digital volume ranges"
>
> Signed-off-by: M R Swami Reddy <mr.swami.reddy@ti.com>
>
> --
> sound/soc/codecs/lm49453.c | 7 +++++----
> 1 files changed, 4 insertions(+), 3 deletions(-)
This doesn't apply due to whitespace damange, please check and resend.
Please also fix the changelog entry.
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2012-12-06 14:48 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-12-05 10:48 [PATCH] ASoC: lm49453: Fix analog and digital volume ranges MR.Swami.Reddy
2012-12-05 19:29 ` Vinod Koul
2012-12-06 8:07 ` Reddy, M.R. Swami
2012-12-06 14:48 ` Peter Ujfalusi
-- strict thread matches above, loose matches on Subject: below --
2012-12-05 7:59 MR.Swami.Reddy
2012-12-05 8:25 ` 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.