diff options
author | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2011-07-06 00:08:43 -0700 |
---|---|---|
committer | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2011-07-09 23:16:48 +0900 |
commit | 5b7396709e0b2d43527024316e0bc4630759bcf3 (patch) | |
tree | 535b9f3cc61a98d653f8a8ee24398b4654618a69 | |
parent | 3db1bbfd4aa231e67d39fb451d4c6f0423a6ba11 (diff) |
ASoC: Conditionalize the enable of WM8994 ADC TDM mode
Future devices will not benefit from this.
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@ti.com>
-rw-r--r-- | sound/soc/codecs/wm8994.c | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/sound/soc/codecs/wm8994.c b/sound/soc/codecs/wm8994.c index 70a68fd96c4..0cd36f08f9d 100644 --- a/sound/soc/codecs/wm8994.c +++ b/sound/soc/codecs/wm8994.c @@ -3051,10 +3051,18 @@ static int wm8994_codec_probe(struct snd_soc_codec *codec) 1 << WM8994_AIF2DAC_3D_GAIN_SHIFT, 1 << WM8994_AIF2DAC_3D_GAIN_SHIFT); - /* Unconditionally enable AIF1 ADC TDM mode; it only affects - * behaviour on idle TDM clock cycles. */ - snd_soc_update_bits(codec, WM8994_AIF1_CONTROL_1, - WM8994_AIF1ADC_TDM, WM8994_AIF1ADC_TDM); + /* Unconditionally enable AIF1 ADC TDM mode on chips which can + * use this; it only affects behaviour on idle TDM clock + * cycles. */ + switch (control->type) { + case WM8994: + case WM8958: + snd_soc_update_bits(codec, WM8994_AIF1_CONTROL_1, + WM8994_AIF1ADC_TDM, WM8994_AIF1ADC_TDM); + break; + default: + break; + } wm8994_update_class_w(codec); |