diff options
author | Brian Austin <brian.austin@cirrus.com> | 2014-07-17 14:16:55 -0400 |
---|---|---|
committer | Mark Brown <broonie@linaro.org> | 2014-07-17 14:59:20 -0400 |
commit | a046558719770f94d8660f77654ce9cc712ffe54 (patch) | |
tree | 4b522208a3db5a7bf1f47f41be250b24d21f3e00 /sound/soc/codecs | |
parent | 95b47f8de787214f7db88b26759d7edc7c64d74a (diff) |
ASoC: Fix SOC_DOUBLE_R_SX_TLV volume mixer arguments
Remove unnecessary bit shifts.
Correct min value to match datasheet.
Num steps = number of steps between min and max.
Reported-by: Ryan Harvey <ryan.harvey@cirrus.com>
Signed-off-by: Ryan Harvey <ryan.harvey@cirrus.com>
Signed-off-by: Brian Austin <brian.austin@cirrus.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
Diffstat (limited to 'sound/soc/codecs')
-rw-r--r-- | sound/soc/codecs/cs42l52.c | 14 | ||||
-rw-r--r-- | sound/soc/codecs/cs42l56.c | 12 | ||||
-rw-r--r-- | sound/soc/codecs/cs42l73.c | 2 |
3 files changed, 14 insertions, 14 deletions
diff --git a/sound/soc/codecs/cs42l52.c b/sound/soc/codecs/cs42l52.c index 071fc77f2f06..969167d8b71e 100644 --- a/sound/soc/codecs/cs42l52.c +++ b/sound/soc/codecs/cs42l52.c | |||
@@ -399,15 +399,15 @@ static const struct snd_kcontrol_new cs42l52_snd_controls[] = { | |||
399 | CS42L52_MASTERB_VOL, 0, 0x34, 0xE4, hl_tlv), | 399 | CS42L52_MASTERB_VOL, 0, 0x34, 0xE4, hl_tlv), |
400 | 400 | ||
401 | SOC_DOUBLE_R_SX_TLV("Headphone Volume", CS42L52_HPA_VOL, | 401 | SOC_DOUBLE_R_SX_TLV("Headphone Volume", CS42L52_HPA_VOL, |
402 | CS42L52_HPB_VOL, 0, 0x34, 0xCC, hpd_tlv), | 402 | CS42L52_HPB_VOL, 0, 0x34, 0xC0, hpd_tlv), |
403 | 403 | ||
404 | SOC_ENUM("Headphone Analog Gain", hp_gain_enum), | 404 | SOC_ENUM("Headphone Analog Gain", hp_gain_enum), |
405 | 405 | ||
406 | SOC_DOUBLE_R_SX_TLV("Speaker Volume", CS42L52_SPKA_VOL, | 406 | SOC_DOUBLE_R_SX_TLV("Speaker Volume", CS42L52_SPKA_VOL, |
407 | CS42L52_SPKB_VOL, 0, 0x1, 0xff, hl_tlv), | 407 | CS42L52_SPKB_VOL, 0, 0x40, 0xC0, hl_tlv), |
408 | 408 | ||
409 | SOC_DOUBLE_R_SX_TLV("Bypass Volume", CS42L52_PASSTHRUA_VOL, | 409 | SOC_DOUBLE_R_SX_TLV("Bypass Volume", CS42L52_PASSTHRUA_VOL, |
410 | CS42L52_PASSTHRUB_VOL, 6, 0x18, 0x90, pga_tlv), | 410 | CS42L52_PASSTHRUB_VOL, 0, 0x88, 0x90, pga_tlv), |
411 | 411 | ||
412 | SOC_DOUBLE("Bypass Mute", CS42L52_MISC_CTL, 4, 5, 1, 0), | 412 | SOC_DOUBLE("Bypass Mute", CS42L52_MISC_CTL, 4, 5, 1, 0), |
413 | 413 | ||
@@ -417,10 +417,10 @@ static const struct snd_kcontrol_new cs42l52_snd_controls[] = { | |||
417 | SOC_ENUM("MIC Bias Level", mic_bias_level_enum), | 417 | SOC_ENUM("MIC Bias Level", mic_bias_level_enum), |
418 | 418 | ||
419 | SOC_DOUBLE_R_SX_TLV("ADC Volume", CS42L52_ADCA_VOL, | 419 | SOC_DOUBLE_R_SX_TLV("ADC Volume", CS42L52_ADCA_VOL, |
420 | CS42L52_ADCB_VOL, 7, 0x80, 0xA0, ipd_tlv), | 420 | CS42L52_ADCB_VOL, 0, 0xA0, 0x78, ipd_tlv), |
421 | SOC_DOUBLE_R_SX_TLV("ADC Mixer Volume", | 421 | SOC_DOUBLE_R_SX_TLV("ADC Mixer Volume", |
422 | CS42L52_ADCA_MIXER_VOL, CS42L52_ADCB_MIXER_VOL, | 422 | CS42L52_ADCA_MIXER_VOL, CS42L52_ADCB_MIXER_VOL, |
423 | 6, 0x7f, 0x19, ipd_tlv), | 423 | 0, 0x19, 0x7F, ipd_tlv), |
424 | 424 | ||
425 | SOC_DOUBLE("ADC Switch", CS42L52_ADC_MISC_CTL, 0, 1, 1, 0), | 425 | SOC_DOUBLE("ADC Switch", CS42L52_ADC_MISC_CTL, 0, 1, 1, 0), |
426 | 426 | ||
@@ -428,11 +428,11 @@ static const struct snd_kcontrol_new cs42l52_snd_controls[] = { | |||
428 | CS42L52_ADCB_MIXER_VOL, 7, 1, 1), | 428 | CS42L52_ADCB_MIXER_VOL, 7, 1, 1), |
429 | 429 | ||
430 | SOC_DOUBLE_R_SX_TLV("PGA Volume", CS42L52_PGAA_CTL, | 430 | SOC_DOUBLE_R_SX_TLV("PGA Volume", CS42L52_PGAA_CTL, |
431 | CS42L52_PGAB_CTL, 0, 0x28, 0x30, pga_tlv), | 431 | CS42L52_PGAB_CTL, 0, 0x28, 0x24, pga_tlv), |
432 | 432 | ||
433 | SOC_DOUBLE_R_SX_TLV("PCM Mixer Volume", | 433 | SOC_DOUBLE_R_SX_TLV("PCM Mixer Volume", |
434 | CS42L52_PCMA_MIXER_VOL, CS42L52_PCMB_MIXER_VOL, | 434 | CS42L52_PCMA_MIXER_VOL, CS42L52_PCMB_MIXER_VOL, |
435 | 0, 0x7f, 0x19, mix_tlv), | 435 | 0, 0x19, 0x7f, mix_tlv), |
436 | SOC_DOUBLE_R("PCM Mixer Switch", | 436 | SOC_DOUBLE_R("PCM Mixer Switch", |
437 | CS42L52_PCMA_MIXER_VOL, CS42L52_PCMB_MIXER_VOL, 7, 1, 1), | 437 | CS42L52_PCMA_MIXER_VOL, CS42L52_PCMB_MIXER_VOL, 7, 1, 1), |
438 | 438 | ||
diff --git a/sound/soc/codecs/cs42l56.c b/sound/soc/codecs/cs42l56.c index 8e68ef5de849..24fbffee09ea 100644 --- a/sound/soc/codecs/cs42l56.c +++ b/sound/soc/codecs/cs42l56.c | |||
@@ -421,15 +421,15 @@ static const struct soc_enum ng_delay_enum = | |||
421 | static const struct snd_kcontrol_new cs42l56_snd_controls[] = { | 421 | static const struct snd_kcontrol_new cs42l56_snd_controls[] = { |
422 | 422 | ||
423 | SOC_DOUBLE_R_SX_TLV("Master Volume", CS42L56_MASTER_A_VOLUME, | 423 | SOC_DOUBLE_R_SX_TLV("Master Volume", CS42L56_MASTER_A_VOLUME, |
424 | CS42L56_MASTER_B_VOLUME, 0, 0x34, 0xfd, adv_tlv), | 424 | CS42L56_MASTER_B_VOLUME, 0, 0x34, 0xE4, adv_tlv), |
425 | SOC_DOUBLE("Master Mute Switch", CS42L56_DSP_MUTE_CTL, 0, 1, 1, 1), | 425 | SOC_DOUBLE("Master Mute Switch", CS42L56_DSP_MUTE_CTL, 0, 1, 1, 1), |
426 | 426 | ||
427 | SOC_DOUBLE_R_SX_TLV("ADC Mixer Volume", CS42L56_ADCA_MIX_VOLUME, | 427 | SOC_DOUBLE_R_SX_TLV("ADC Mixer Volume", CS42L56_ADCA_MIX_VOLUME, |
428 | CS42L56_ADCB_MIX_VOLUME, 0, 0x88, 0xa9, hl_tlv), | 428 | CS42L56_ADCB_MIX_VOLUME, 0, 0x88, 0x90, hl_tlv), |
429 | SOC_DOUBLE("ADC Mixer Mute Switch", CS42L56_DSP_MUTE_CTL, 6, 7, 1, 1), | 429 | SOC_DOUBLE("ADC Mixer Mute Switch", CS42L56_DSP_MUTE_CTL, 6, 7, 1, 1), |
430 | 430 | ||
431 | SOC_DOUBLE_R_SX_TLV("PCM Mixer Volume", CS42L56_PCMA_MIX_VOLUME, | 431 | SOC_DOUBLE_R_SX_TLV("PCM Mixer Volume", CS42L56_PCMA_MIX_VOLUME, |
432 | CS42L56_PCMB_MIX_VOLUME, 0, 0x88, 0xa9, hl_tlv), | 432 | CS42L56_PCMB_MIX_VOLUME, 0, 0x88, 0x90, hl_tlv), |
433 | SOC_DOUBLE("PCM Mixer Mute Switch", CS42L56_DSP_MUTE_CTL, 4, 5, 1, 1), | 433 | SOC_DOUBLE("PCM Mixer Mute Switch", CS42L56_DSP_MUTE_CTL, 4, 5, 1, 1), |
434 | 434 | ||
435 | SOC_SINGLE_TLV("Analog Advisory Volume", | 435 | SOC_SINGLE_TLV("Analog Advisory Volume", |
@@ -438,16 +438,16 @@ static const struct snd_kcontrol_new cs42l56_snd_controls[] = { | |||
438 | CS42L56_DIGINPUT_ADV_VOLUME, 0, 0x00, 1, adv_tlv), | 438 | CS42L56_DIGINPUT_ADV_VOLUME, 0, 0x00, 1, adv_tlv), |
439 | 439 | ||
440 | SOC_DOUBLE_R_SX_TLV("PGA Volume", CS42L56_PGAA_MUX_VOLUME, | 440 | SOC_DOUBLE_R_SX_TLV("PGA Volume", CS42L56_PGAA_MUX_VOLUME, |
441 | CS42L56_PGAB_MUX_VOLUME, 0, 0x34, 0xfd, pga_tlv), | 441 | CS42L56_PGAB_MUX_VOLUME, 0, 0x34, 0x24, pga_tlv), |
442 | SOC_DOUBLE_R_TLV("ADC Volume", CS42L56_ADCA_ATTENUATOR, | 442 | SOC_DOUBLE_R_TLV("ADC Volume", CS42L56_ADCA_ATTENUATOR, |
443 | CS42L56_ADCB_ATTENUATOR, 0, 0x00, 1, adc_tlv), | 443 | CS42L56_ADCB_ATTENUATOR, 0, 0x00, 1, adc_tlv), |
444 | SOC_DOUBLE("ADC Mute Switch", CS42L56_MISC_ADC_CTL, 2, 3, 1, 1), | 444 | SOC_DOUBLE("ADC Mute Switch", CS42L56_MISC_ADC_CTL, 2, 3, 1, 1), |
445 | SOC_DOUBLE("ADC Boost Switch", CS42L56_GAIN_BIAS_CTL, 3, 2, 1, 1), | 445 | SOC_DOUBLE("ADC Boost Switch", CS42L56_GAIN_BIAS_CTL, 3, 2, 1, 1), |
446 | 446 | ||
447 | SOC_DOUBLE_R_SX_TLV("Headphone Volume", CS42L56_HPA_VOLUME, | 447 | SOC_DOUBLE_R_SX_TLV("Headphone Volume", CS42L56_HPA_VOLUME, |
448 | CS42L56_HPB_VOLUME, 0, 0x44, 0x55, hl_tlv), | 448 | CS42L56_HPB_VOLUME, 0, 0x84, 0x48, hl_tlv), |
449 | SOC_DOUBLE_R_SX_TLV("LineOut Volume", CS42L56_LOA_VOLUME, | 449 | SOC_DOUBLE_R_SX_TLV("LineOut Volume", CS42L56_LOA_VOLUME, |
450 | CS42L56_LOB_VOLUME, 0, 0x44, 0x55, hl_tlv), | 450 | CS42L56_LOB_VOLUME, 0, 0x84, 0x48, hl_tlv), |
451 | 451 | ||
452 | SOC_SINGLE_TLV("Bass Shelving Volume", CS42L56_TONE_CTL, | 452 | SOC_SINGLE_TLV("Bass Shelving Volume", CS42L56_TONE_CTL, |
453 | 0, 0x00, 1, tone_tlv), | 453 | 0, 0x00, 1, tone_tlv), |
diff --git a/sound/soc/codecs/cs42l73.c b/sound/soc/codecs/cs42l73.c index ae3717992d56..8658194f50bf 100644 --- a/sound/soc/codecs/cs42l73.c +++ b/sound/soc/codecs/cs42l73.c | |||
@@ -401,7 +401,7 @@ static const struct snd_kcontrol_new cs42l73_snd_controls[] = { | |||
401 | CS42L73_LOBAVOL, 0, 0x41, 0x4B, hpaloa_tlv), | 401 | CS42L73_LOBAVOL, 0, 0x41, 0x4B, hpaloa_tlv), |
402 | 402 | ||
403 | SOC_DOUBLE_R_SX_TLV("Input PGA Analog Volume", CS42L73_MICAPREPGAAVOL, | 403 | SOC_DOUBLE_R_SX_TLV("Input PGA Analog Volume", CS42L73_MICAPREPGAAVOL, |
404 | CS42L73_MICBPREPGABVOL, 5, 0x34, | 404 | CS42L73_MICBPREPGABVOL, 0, 0x34, |
405 | 0x24, micpga_tlv), | 405 | 0x24, micpga_tlv), |
406 | 406 | ||
407 | SOC_DOUBLE_R("MIC Preamp Switch", CS42L73_MICAPREPGAAVOL, | 407 | SOC_DOUBLE_R("MIC Preamp Switch", CS42L73_MICAPREPGAAVOL, |