All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/2] ASoC: cs42l52: HP gain enum and PCM Mixer dB scale fixes.
@ 2013-05-29 18:01 Nicolas Schichan
  2013-05-29 18:01 ` [PATCH 1/2] ASoC: cs42l52: use correct PCM mixer TLV dB scale to match datasheet Nicolas Schichan
                   ` (4 more replies)
  0 siblings, 5 replies; 7+ messages in thread
From: Nicolas Schichan @ 2013-05-29 18:01 UTC (permalink / raw)
  To: alsa-devel, Brian Austin, Georgi Vlaev
  Cc: Takashi Iwai, Mark Brown, Liam Girdwood, Nicolas Schichan

Hi,

The two patches in the serie contains the following fixes:

- Use the correct shift value in hp_gain_enum, effectively allowing
  the higher gain values to be effective and the correct gain value to
  be reported to userland wrt what is written to the register.

- Fix the PCM Mixer dB scale so that userland can report the correct
  dB gain values. Note that in its current form, the PCM Mixer control
  will only allow the range [-0.5 dB (0x7f), +12 dB (0x18)] to be
  programmed to the hardware. I don't know if it is intentional or
  not.

Regards,

Nicolas Schichan (2):
  ASoC: cs42l52: use correct PCM mixer TLV dB scale to match datasheet.
  ASoC: cs42l52: fix hp_gain_enum shift value.

 sound/soc/codecs/cs42l52.c |    6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

-- 
1.7.10.4

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [PATCH 1/2] ASoC: cs42l52: use correct PCM mixer TLV dB scale to match datasheet.
  2013-05-29 18:01 [PATCH 0/2] ASoC: cs42l52: HP gain enum and PCM Mixer dB scale fixes Nicolas Schichan
@ 2013-05-29 18:01 ` Nicolas Schichan
  2013-05-29 18:01 ` [PATCH 2/2] ASoC: cs42l52: fix hp_gain_enum shift value Nicolas Schichan
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 7+ messages in thread
From: Nicolas Schichan @ 2013-05-29 18:01 UTC (permalink / raw)
  To: alsa-devel, Brian Austin, Georgi Vlaev
  Cc: Takashi Iwai, Mark Brown, Liam Girdwood, Nicolas Schichan


Signed-off-by: Nicolas Schichan <nschichan@freebox.fr>
---
 sound/soc/codecs/cs42l52.c |    4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/sound/soc/codecs/cs42l52.c b/sound/soc/codecs/cs42l52.c
index 030f53c..756c204 100644
--- a/sound/soc/codecs/cs42l52.c
+++ b/sound/soc/codecs/cs42l52.c
@@ -193,6 +193,8 @@ static DECLARE_TLV_DB_SCALE(mic_tlv, 1600, 100, 0);
 
 static DECLARE_TLV_DB_SCALE(pga_tlv, -600, 50, 0);
 
+static DECLARE_TLV_DB_SCALE(mix_tlv, -50, 50, 0);
+
 static const unsigned int limiter_tlv[] = {
 	TLV_DB_RANGE_HEAD(2),
 	0, 2, TLV_DB_SCALE_ITEM(-3000, 600, 0),
@@ -441,7 +443,7 @@ static const struct snd_kcontrol_new cs42l52_snd_controls[] = {
 
 	SOC_DOUBLE_R_SX_TLV("PCM Mixer Volume",
 			    CS42L52_PCMA_MIXER_VOL, CS42L52_PCMB_MIXER_VOL,
-				0, 0x7f, 0x19, hl_tlv),
+				0, 0x7f, 0x19, mix_tlv),
 	SOC_DOUBLE_R("PCM Mixer Switch",
 		     CS42L52_PCMA_MIXER_VOL, CS42L52_PCMB_MIXER_VOL, 7, 1, 1),
 
-- 
1.7.10.4

^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [PATCH 2/2] ASoC: cs42l52: fix hp_gain_enum shift value.
  2013-05-29 18:01 [PATCH 0/2] ASoC: cs42l52: HP gain enum and PCM Mixer dB scale fixes Nicolas Schichan
  2013-05-29 18:01 ` [PATCH 1/2] ASoC: cs42l52: use correct PCM mixer TLV dB scale to match datasheet Nicolas Schichan
@ 2013-05-29 18:01 ` Nicolas Schichan
  2013-05-29 18:03 ` [PATCH 0/2] ASoC: cs42l52: HP gain enum and PCM Mixer dB scale fixes Mark Brown
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 7+ messages in thread
From: Nicolas Schichan @ 2013-05-29 18:01 UTC (permalink / raw)
  To: alsa-devel, Brian Austin, Georgi Vlaev
  Cc: Takashi Iwai, Mark Brown, Liam Girdwood, Nicolas Schichan


Signed-off-by: Nicolas Schichan <nschichan@freebox.fr>
---
 sound/soc/codecs/cs42l52.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sound/soc/codecs/cs42l52.c b/sound/soc/codecs/cs42l52.c
index 756c204..987f728 100644
--- a/sound/soc/codecs/cs42l52.c
+++ b/sound/soc/codecs/cs42l52.c
@@ -262,7 +262,7 @@ static const char * const hp_gain_num_text[] = {
 };
 
 static const struct soc_enum hp_gain_enum =
-	SOC_ENUM_SINGLE(CS42L52_PB_CTL1, 4,
+	SOC_ENUM_SINGLE(CS42L52_PB_CTL1, 5,
 		ARRAY_SIZE(hp_gain_num_text), hp_gain_num_text);
 
 static const char * const beep_pitch_text[] = {
-- 
1.7.10.4

^ permalink raw reply related	[flat|nested] 7+ messages in thread

* Re: [PATCH 0/2] ASoC: cs42l52: HP gain enum and PCM Mixer dB scale fixes.
  2013-05-29 18:01 [PATCH 0/2] ASoC: cs42l52: HP gain enum and PCM Mixer dB scale fixes Nicolas Schichan
  2013-05-29 18:01 ` [PATCH 1/2] ASoC: cs42l52: use correct PCM mixer TLV dB scale to match datasheet Nicolas Schichan
  2013-05-29 18:01 ` [PATCH 2/2] ASoC: cs42l52: fix hp_gain_enum shift value Nicolas Schichan
@ 2013-05-29 18:03 ` Mark Brown
  2013-05-29 18:13   ` Nicolas Schichan
  2013-05-29 18:07 ` Brian Austin
  2013-05-29 18:25 ` Mark Brown
  4 siblings, 1 reply; 7+ messages in thread
From: Mark Brown @ 2013-05-29 18:03 UTC (permalink / raw)
  To: Nicolas Schichan
  Cc: Brian Austin, alsa-devel, Takashi Iwai, Liam Girdwood,
	Georgi Vlaev

On Wed, May 29, 2013 at 08:01:18PM +0200, Nicolas Schichan wrote:
> Hi,
> 
> The two patches in the serie contains the following fixes:
> 
> - Use the correct shift value in hp_gain_enum, effectively allowing
>   the higher gain values to be effective and the correct gain value to
>   be reported to userland wrt what is written to the register.

To repeat what I said last time you should use my current e-mail
address.

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH 0/2] ASoC: cs42l52: HP gain enum and PCM Mixer dB scale fixes.
  2013-05-29 18:01 [PATCH 0/2] ASoC: cs42l52: HP gain enum and PCM Mixer dB scale fixes Nicolas Schichan
                   ` (2 preceding siblings ...)
  2013-05-29 18:03 ` [PATCH 0/2] ASoC: cs42l52: HP gain enum and PCM Mixer dB scale fixes Mark Brown
@ 2013-05-29 18:07 ` Brian Austin
  2013-05-29 18:25 ` Mark Brown
  4 siblings, 0 replies; 7+ messages in thread
From: Brian Austin @ 2013-05-29 18:07 UTC (permalink / raw)
  To: Nicolas Schichan
  Cc: Brian Austin, alsa-devel, Takashi Iwai, Liam Girdwood, broonie,
	Georgi Vlaev


On Wed, 29 May 2013, Nicolas Schichan wrote:

> Hi,
>
> The two patches in the serie contains the following fixes:
>
> - Use the correct shift value in hp_gain_enum, effectively allowing
>  the higher gain values to be effective and the correct gain value to
>  be reported to userland wrt what is written to the register.
>
> - Fix the PCM Mixer dB scale so that userland can report the correct
>  dB gain values. Note that in its current form, the PCM Mixer control
>  will only allow the range [-0.5 dB (0x7f), +12 dB (0x18)] to be
>  programmed to the hardware. I don't know if it is intentional or
>  not.
>
> Regards,
>
> Nicolas Schichan (2):
>  ASoC: cs42l52: use correct PCM mixer TLV dB scale to match datasheet.
>  ASoC: cs42l52: fix hp_gain_enum shift value.
>
> sound/soc/codecs/cs42l52.c |    6 ++++--
> 1 file changed, 4 insertions(+), 2 deletions(-)
>
> -- 
> 1.7.10.4
>
>
>
Acked-by: Brian Austin <brian.austin@cirrus.com>

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH 0/2] ASoC: cs42l52: HP gain enum and PCM Mixer dB scale fixes.
  2013-05-29 18:03 ` [PATCH 0/2] ASoC: cs42l52: HP gain enum and PCM Mixer dB scale fixes Mark Brown
@ 2013-05-29 18:13   ` Nicolas Schichan
  0 siblings, 0 replies; 7+ messages in thread
From: Nicolas Schichan @ 2013-05-29 18:13 UTC (permalink / raw)
  To: Mark Brown
  Cc: Brian Austin, alsa-devel, Takashi Iwai, Liam Girdwood,
	Georgi Vlaev

On 05/29/2013 08:03 PM, Mark Brown wrote:
> On Wed, May 29, 2013 at 08:01:18PM +0200, Nicolas Schichan wrote:
>> Hi,
>>
>> The two patches in the serie contains the following fixes:
>>
>> - Use the correct shift value in hp_gain_enum, effectively allowing
>>    the higher gain values to be effective and the correct gain value to
>>    be reported to userland wrt what is written to the register.
>
> To repeat what I said last time you should use my current e-mail
> address.

Sorry about that, I had missed the message you send yesterday.

-- 
Nicolas Schichan
Freebox SAS

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH 0/2] ASoC: cs42l52: HP gain enum and PCM Mixer dB scale fixes.
  2013-05-29 18:01 [PATCH 0/2] ASoC: cs42l52: HP gain enum and PCM Mixer dB scale fixes Nicolas Schichan
                   ` (3 preceding siblings ...)
  2013-05-29 18:07 ` Brian Austin
@ 2013-05-29 18:25 ` Mark Brown
  4 siblings, 0 replies; 7+ messages in thread
From: Mark Brown @ 2013-05-29 18:25 UTC (permalink / raw)
  To: Nicolas Schichan
  Cc: Takashi Iwai, Liam Girdwood, alsa-devel, Brian Austin,
	Georgi Vlaev


[-- Attachment #1.1: Type: text/plain, Size: 165 bytes --]

On Wed, May 29, 2013 at 08:01:18PM +0200, Nicolas Schichan wrote:
> Hi,
> 
> The two patches in the serie contains the following fixes:

Applied both, thanks.

[-- 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] 7+ messages in thread

end of thread, other threads:[~2013-05-29 18:25 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-05-29 18:01 [PATCH 0/2] ASoC: cs42l52: HP gain enum and PCM Mixer dB scale fixes Nicolas Schichan
2013-05-29 18:01 ` [PATCH 1/2] ASoC: cs42l52: use correct PCM mixer TLV dB scale to match datasheet Nicolas Schichan
2013-05-29 18:01 ` [PATCH 2/2] ASoC: cs42l52: fix hp_gain_enum shift value Nicolas Schichan
2013-05-29 18:03 ` [PATCH 0/2] ASoC: cs42l52: HP gain enum and PCM Mixer dB scale fixes Mark Brown
2013-05-29 18:13   ` Nicolas Schichan
2013-05-29 18:07 ` Brian Austin
2013-05-29 18: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.