aboutsummaryrefslogtreecommitdiffstats
path: root/sound/soc
diff options
context:
space:
mode:
Diffstat (limited to 'sound/soc')
-rw-r--r--sound/soc/codecs/ad1836.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/sound/soc/codecs/ad1836.c b/sound/soc/codecs/ad1836.c
index 78d38cb62c05..4390d4630de5 100644
--- a/sound/soc/codecs/ad1836.c
+++ b/sound/soc/codecs/ad1836.c
@@ -124,6 +124,13 @@ static const struct snd_soc_dapm_route ad183x_dapm_routes[] = {
124 { "ADC", NULL, "ADC_PWR" }, 124 { "ADC", NULL, "ADC_PWR" },
125}; 125};
126 126
127static const DECLARE_TLV_DB_SCALE(ad1836_in_tlv, 0, 300, 0);
128
129static const struct snd_kcontrol_new ad1836_controls[] = {
130 SOC_DOUBLE_TLV("ADC2 Capture Volume", AD183X_ADC_CTRL1, 3, 0, 4, 0,
131 ad1836_in_tlv),
132};
133
127/* 134/*
128 * DAI ops entries 135 * DAI ops entries
129 */ 136 */
@@ -280,6 +287,10 @@ static int ad1836_probe(struct snd_soc_codec *codec)
280 if (ad1836->type == AD1836) { 287 if (ad1836->type == AD1836) {
281 /* left/right diff:PGA/MUX */ 288 /* left/right diff:PGA/MUX */
282 snd_soc_write(codec, AD1836_ADC_CTRL3, 0x3A); 289 snd_soc_write(codec, AD1836_ADC_CTRL3, 0x3A);
290 ret = snd_soc_add_controls(codec, ad1836_controls,
291 ARRAY_SIZE(ad1836_controls));
292 if (ret)
293 return ret;
283 } else { 294 } else {
284 snd_soc_write(codec, AD1836_ADC_CTRL3, 0x00); 295 snd_soc_write(codec, AD1836_ADC_CTRL3, 0x00);
285 } 296 }