aboutsummaryrefslogtreecommitdiffstats
path: root/sound
diff options
context:
space:
mode:
authorBrian Austin <brian.austin@cirrus.com>2014-03-19 11:40:02 -0400
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2014-05-06 10:55:26 -0400
commitc5ac6ad514fcec926a204051d8a66d7a78a8a737 (patch)
tree34be242fe741ee96b451bda54279b7c85cc2ad41 /sound
parent73e8697b71fa956642403304b96442fd4b57ce97 (diff)
ASoC: cs42l51: Fix SOC_DOUBLE_R_SX_TLV shift values for ADC, PCM, and Analog kcontrols
commit 7272e051157ccd5871b5d939548d0ba5a94a2965 upstream. The shift values for the ADC,PCM, and Analog kcontrols were wrong causing wrong values for the SOC_DOUBLE_R_SX_TLV macros Fixed the TLV for aout_tlv to show -102dB correctly Fixes: 1d99f2436d (ASoC: core: Rework SOC_DOUBLE_R_SX_TLV add SOC_SINGLE_SX_TLV) Reported-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com> Signed-off-by: Brian Austin <brian.austin@cirrus.com> Signed-off-by: Mark Brown <broonie@linaro.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'sound')
-rw-r--r--sound/soc/codecs/cs42l51.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/sound/soc/codecs/cs42l51.c b/sound/soc/codecs/cs42l51.c
index 1e0fa3b5f79a..e1dfebbea650 100644
--- a/sound/soc/codecs/cs42l51.c
+++ b/sound/soc/codecs/cs42l51.c
@@ -124,9 +124,8 @@ static int cs42l51_set_chan_mix(struct snd_kcontrol *kcontrol,
124 124
125static const DECLARE_TLV_DB_SCALE(adc_pcm_tlv, -5150, 50, 0); 125static const DECLARE_TLV_DB_SCALE(adc_pcm_tlv, -5150, 50, 0);
126static const DECLARE_TLV_DB_SCALE(tone_tlv, -1050, 150, 0); 126static const DECLARE_TLV_DB_SCALE(tone_tlv, -1050, 150, 0);
127/* This is a lie. after -102 db, it stays at -102 */ 127
128/* maybe a range would be better */ 128static const DECLARE_TLV_DB_SCALE(aout_tlv, -10200, 50, 0);
129static const DECLARE_TLV_DB_SCALE(aout_tlv, -11550, 50, 0);
130 129
131static const DECLARE_TLV_DB_SCALE(boost_tlv, 1600, 1600, 0); 130static const DECLARE_TLV_DB_SCALE(boost_tlv, 1600, 1600, 0);
132static const char *chan_mix[] = { 131static const char *chan_mix[] = {
@@ -141,7 +140,7 @@ static const struct soc_enum cs42l51_chan_mix =
141static const struct snd_kcontrol_new cs42l51_snd_controls[] = { 140static const struct snd_kcontrol_new cs42l51_snd_controls[] = {
142 SOC_DOUBLE_R_SX_TLV("PCM Playback Volume", 141 SOC_DOUBLE_R_SX_TLV("PCM Playback Volume",
143 CS42L51_PCMA_VOL, CS42L51_PCMB_VOL, 142 CS42L51_PCMA_VOL, CS42L51_PCMB_VOL,
144 6, 0x19, 0x7F, adc_pcm_tlv), 143 0, 0x19, 0x7F, adc_pcm_tlv),
145 SOC_DOUBLE_R("PCM Playback Switch", 144 SOC_DOUBLE_R("PCM Playback Switch",
146 CS42L51_PCMA_VOL, CS42L51_PCMB_VOL, 7, 1, 1), 145 CS42L51_PCMA_VOL, CS42L51_PCMB_VOL, 7, 1, 1),
147 SOC_DOUBLE_R_SX_TLV("Analog Playback Volume", 146 SOC_DOUBLE_R_SX_TLV("Analog Playback Volume",
@@ -149,7 +148,7 @@ static const struct snd_kcontrol_new cs42l51_snd_controls[] = {
149 0, 0x34, 0xE4, aout_tlv), 148 0, 0x34, 0xE4, aout_tlv),
150 SOC_DOUBLE_R_SX_TLV("ADC Mixer Volume", 149 SOC_DOUBLE_R_SX_TLV("ADC Mixer Volume",
151 CS42L51_ADCA_VOL, CS42L51_ADCB_VOL, 150 CS42L51_ADCA_VOL, CS42L51_ADCB_VOL,
152 6, 0x19, 0x7F, adc_pcm_tlv), 151 0, 0x19, 0x7F, adc_pcm_tlv),
153 SOC_DOUBLE_R("ADC Mixer Switch", 152 SOC_DOUBLE_R("ADC Mixer Switch",
154 CS42L51_ADCA_VOL, CS42L51_ADCB_VOL, 7, 1, 1), 153 CS42L51_ADCA_VOL, CS42L51_ADCB_VOL, 7, 1, 1),
155 SOC_SINGLE("Playback Deemphasis Switch", CS42L51_DAC_CTL, 3, 1, 0), 154 SOC_SINGLE("Playback Deemphasis Switch", CS42L51_DAC_CTL, 3, 1, 0),