diff options
author | Lars-Peter Clausen <lars@metafoo.de> | 2011-11-28 11:28:07 -0500 |
---|---|---|
committer | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2011-11-28 13:57:41 -0500 |
commit | 591c034a32a8e3034c447308ad7a4ef19e7ca617 (patch) | |
tree | 8ec707335bb974b5501fbafd636f02f63fb6e1f4 /sound/soc/codecs/ad193x.c | |
parent | b90d4183f70e8a922db781b7ecfc823d37a3202a (diff) |
ASoC: ad193x: Provide dB ranges for the volume controls
Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Diffstat (limited to 'sound/soc/codecs/ad193x.c')
-rw-r--r-- | sound/soc/codecs/ad193x.c | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/sound/soc/codecs/ad193x.c b/sound/soc/codecs/ad193x.c index 1dfda5ca2789..7da7e29753b6 100644 --- a/sound/soc/codecs/ad193x.c +++ b/sound/soc/codecs/ad193x.c | |||
@@ -35,16 +35,18 @@ static const char *ad193x_deemp[] = {"None", "48kHz", "44.1kHz", "32kHz"}; | |||
35 | static const struct soc_enum ad193x_deemp_enum = | 35 | static const struct soc_enum ad193x_deemp_enum = |
36 | SOC_ENUM_SINGLE(AD193X_DAC_CTRL2, 1, 4, ad193x_deemp); | 36 | SOC_ENUM_SINGLE(AD193X_DAC_CTRL2, 1, 4, ad193x_deemp); |
37 | 37 | ||
38 | static const DECLARE_TLV_DB_MINMAX(adau193x_tlv, -9563, 0); | ||
39 | |||
38 | static const struct snd_kcontrol_new ad193x_snd_controls[] = { | 40 | static const struct snd_kcontrol_new ad193x_snd_controls[] = { |
39 | /* DAC volume control */ | 41 | /* DAC volume control */ |
40 | SOC_DOUBLE_R("DAC1 Volume", AD193X_DAC_L1_VOL, | 42 | SOC_DOUBLE_R_TLV("DAC1 Volume", AD193X_DAC_L1_VOL, |
41 | AD193X_DAC_R1_VOL, 0, 0xFF, 1), | 43 | AD193X_DAC_R1_VOL, 0, 0xFF, 1, adau193x_tlv), |
42 | SOC_DOUBLE_R("DAC2 Volume", AD193X_DAC_L2_VOL, | 44 | SOC_DOUBLE_R_TLV("DAC2 Volume", AD193X_DAC_L2_VOL, |
43 | AD193X_DAC_R2_VOL, 0, 0xFF, 1), | 45 | AD193X_DAC_R2_VOL, 0, 0xFF, 1, adau193x_tlv), |
44 | SOC_DOUBLE_R("DAC3 Volume", AD193X_DAC_L3_VOL, | 46 | SOC_DOUBLE_R_TLV("DAC3 Volume", AD193X_DAC_L3_VOL, |
45 | AD193X_DAC_R3_VOL, 0, 0xFF, 1), | 47 | AD193X_DAC_R3_VOL, 0, 0xFF, 1, adau193x_tlv), |
46 | SOC_DOUBLE_R("DAC4 Volume", AD193X_DAC_L4_VOL, | 48 | SOC_DOUBLE_R_TLV("DAC4 Volume", AD193X_DAC_L4_VOL, |
47 | AD193X_DAC_R4_VOL, 0, 0xFF, 1), | 49 | AD193X_DAC_R4_VOL, 0, 0xFF, 1, adau193x_tlv), |
48 | 50 | ||
49 | /* ADC switch control */ | 51 | /* ADC switch control */ |
50 | SOC_DOUBLE("ADC1 Switch", AD193X_ADC_CTRL0, AD193X_ADCL1_MUTE, | 52 | SOC_DOUBLE("ADC1 Switch", AD193X_ADC_CTRL0, AD193X_ADCL1_MUTE, |