ASoC: cs42l52: HP gain enum and PCM Mixer dB scale fixes.
Subsystems (3)
cover ASoC: cs42l52: HP gain enum and PCM Mixer dB scale fixes.
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(-)
Signature · 1 line
1.7.10.4
PATCH 1/2 ASoC: cs42l52: use correct PCM mixer TLV dB scale to match datasheet.
--- sound/soc/codecs/cs42l52.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
sound/soc/codecs/cs42l52.c +3 -1
@@ -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),
Signature · 1 line
1.7.10.4
PATCH 2/2 ASoC: cs42l52: fix hp_gain_enum shift value.
In reply to Nicolas Schichan--- sound/soc/codecs/cs42l52.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
sound/soc/codecs/cs42l52.c +1 -1
@@ -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[] = {
Signature · 1 line
1.7.10.4
Mark Brown
maintainerQuoted 7 lines · 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.
To repeat what I said last time you should use my current e-mail address.
Quoted 11 lines · Mark Brown
Quoted 7 lines · 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.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.
Signature · 2 lines
Nicolas Schichan Freebox SAS
Quoted 14 lines · 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.
Quoted 14 lines
Regards,
Nicolas Schichan (2):
ASoC: cs42l52: use correct PCM mixer TLV dB scale to match datasheet.
ASoC: cs42l52: fixhp_gain_enumshift value.
sound/soc/codecs/cs42l52.c| 6 ++++--1 file changed, 4 insertions(+), 2 deletions(-)Signature · 1 line
1.7.10.4
Quoted 3 lines · Nicolas Schichan
Hi,
The two patches in the serie contains the following fixes:
Applied both, thanks.