ASoC: wm2000: Expose ANC gain adjustment
authorMark Brown <broonie@opensource.wolfsonmicro.com>
Wed, 30 Jan 2013 13:35:44 +0000 (21:35 +0800)
committerMark Brown <broonie@opensource.wolfsonmicro.com>
Thu, 31 Jan 2013 04:32:54 +0000 (12:32 +0800)
No TLV information since it's not actually a direct gain control.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
sound/soc/codecs/wm2000.c

index 627c45499392386874d04b547e287dd64ad7e5d3..cb7fa3c78675617dcf542ed9c8acde8dd37dc41e 100644 (file)
@@ -650,6 +650,7 @@ static int wm2000_speaker_put(struct snd_kcontrol *kcontrol,
 }
 
 static const struct snd_kcontrol_new wm2000_controls[] = {
+       SOC_SINGLE("ANC Volume", WM2000_REG_ANC_GAIN_CTRL, 0, 255, 0),
        SOC_SINGLE_BOOL_EXT("WM2000 ANC Switch", 0,
                            wm2000_anc_mode_get,
                            wm2000_anc_mode_put),
@@ -755,6 +756,8 @@ static int wm2000_probe(struct snd_soc_codec *codec)
 {
        struct wm2000_priv *wm2000 = dev_get_drvdata(codec->dev);
 
+       snd_soc_codec_set_cache_io(codec, 16, 8, SND_SOC_REGMAP);
+
        /* This will trigger a transition to standby mode by default */
        wm2000_anc_set_mode(wm2000);