From 0453caba99c315c7ef6c786c61c07ef3c71373e2 Mon Sep 17 00:00:00 2001 From: Lars-Peter Clausen Date: Mon, 6 Jun 2011 13:38:40 +0200 Subject: [PATCH] --- yaml --- r: 257505 b: refs/heads/master c: f97d0c6d5f947a96a6d3957eff3da6d9ca246e54 h: refs/heads/master i: 257503: 6d3bdc687daad6aaec9c32fc6a741ff8578eadec v: v3 --- [refs] | 2 +- trunk/sound/soc/codecs/ad1836.c | 11 +++++++++++ 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/[refs] b/[refs] index 08a569c022b8..0b12b261276a 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 583eadab21779c4301f01a11bf3d0d49b643aa80 +refs/heads/master: f97d0c6d5f947a96a6d3957eff3da6d9ca246e54 diff --git a/trunk/sound/soc/codecs/ad1836.c b/trunk/sound/soc/codecs/ad1836.c index 78d38cb62c05..4390d4630de5 100644 --- a/trunk/sound/soc/codecs/ad1836.c +++ b/trunk/sound/soc/codecs/ad1836.c @@ -124,6 +124,13 @@ static const struct snd_soc_dapm_route ad183x_dapm_routes[] = { { "ADC", NULL, "ADC_PWR" }, }; +static const DECLARE_TLV_DB_SCALE(ad1836_in_tlv, 0, 300, 0); + +static const struct snd_kcontrol_new ad1836_controls[] = { + SOC_DOUBLE_TLV("ADC2 Capture Volume", AD183X_ADC_CTRL1, 3, 0, 4, 0, + ad1836_in_tlv), +}; + /* * DAI ops entries */ @@ -280,6 +287,10 @@ static int ad1836_probe(struct snd_soc_codec *codec) if (ad1836->type == AD1836) { /* left/right diff:PGA/MUX */ snd_soc_write(codec, AD1836_ADC_CTRL3, 0x3A); + ret = snd_soc_add_controls(codec, ad1836_controls, + ARRAY_SIZE(ad1836_controls)); + if (ret) + return ret; } else { snd_soc_write(codec, AD1836_ADC_CTRL3, 0x00); }