diff options
author | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2012-06-26 06:06:53 -0400 |
---|---|---|
committer | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2012-07-03 15:11:16 -0400 |
commit | 2974d6b1aa5261d8db1b614437cc6bafd3ddf0f2 (patch) | |
tree | 1ded058254776a6caca252c5c352df4c8bb9cc72 | |
parent | 38cbf9598feba97de9f9b43efa9153fd7c1a2ec9 (diff) |
ASoC: wm8994: Don't suspend accessory detection
Leave it up to the machine driver to disable accessory detection if
desired, the common pattern is to have accessory detection be a wake
source.
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
-rw-r--r-- | sound/soc/codecs/wm8994.c | 37 |
1 files changed, 0 insertions, 37 deletions
diff --git a/sound/soc/codecs/wm8994.c b/sound/soc/codecs/wm8994.c index a6e82d0a8e37..7bb875230dc0 100644 --- a/sound/soc/codecs/wm8994.c +++ b/sound/soc/codecs/wm8994.c | |||
@@ -2970,23 +2970,8 @@ static struct snd_soc_dai_driver wm8994_dai[] = { | |||
2970 | static int wm8994_codec_suspend(struct snd_soc_codec *codec) | 2970 | static int wm8994_codec_suspend(struct snd_soc_codec *codec) |
2971 | { | 2971 | { |
2972 | struct wm8994_priv *wm8994 = snd_soc_codec_get_drvdata(codec); | 2972 | struct wm8994_priv *wm8994 = snd_soc_codec_get_drvdata(codec); |
2973 | struct wm8994 *control = wm8994->wm8994; | ||
2974 | int i, ret; | 2973 | int i, ret; |
2975 | 2974 | ||
2976 | switch (control->type) { | ||
2977 | case WM8994: | ||
2978 | snd_soc_update_bits(codec, WM8994_MICBIAS, WM8994_MICD_ENA, 0); | ||
2979 | break; | ||
2980 | case WM1811: | ||
2981 | snd_soc_update_bits(codec, WM8994_ANTIPOP_2, | ||
2982 | WM1811_JACKDET_MODE_MASK, 0); | ||
2983 | /* Fall through */ | ||
2984 | case WM8958: | ||
2985 | snd_soc_update_bits(codec, WM8958_MIC_DETECT_1, | ||
2986 | WM8958_MICD_ENA, 0); | ||
2987 | break; | ||
2988 | } | ||
2989 | |||
2990 | for (i = 0; i < ARRAY_SIZE(wm8994->fll); i++) { | 2975 | for (i = 0; i < ARRAY_SIZE(wm8994->fll); i++) { |
2991 | memcpy(&wm8994->fll_suspend[i], &wm8994->fll[i], | 2976 | memcpy(&wm8994->fll_suspend[i], &wm8994->fll[i], |
2992 | sizeof(struct wm8994_fll_config)); | 2977 | sizeof(struct wm8994_fll_config)); |
@@ -3036,28 +3021,6 @@ static int wm8994_codec_resume(struct snd_soc_codec *codec) | |||
3036 | i + 1, ret); | 3021 | i + 1, ret); |
3037 | } | 3022 | } |
3038 | 3023 | ||
3039 | switch (control->type) { | ||
3040 | case WM8994: | ||
3041 | if (wm8994->micdet[0].jack || wm8994->micdet[1].jack) | ||
3042 | snd_soc_update_bits(codec, WM8994_MICBIAS, | ||
3043 | WM8994_MICD_ENA, WM8994_MICD_ENA); | ||
3044 | break; | ||
3045 | case WM1811: | ||
3046 | if (wm8994->jackdet && wm8994->jack_cb) { | ||
3047 | /* Restart from idle */ | ||
3048 | snd_soc_update_bits(codec, WM8994_ANTIPOP_2, | ||
3049 | WM1811_JACKDET_MODE_MASK, | ||
3050 | WM1811_JACKDET_MODE_JACK); | ||
3051 | break; | ||
3052 | } | ||
3053 | break; | ||
3054 | case WM8958: | ||
3055 | if (wm8994->jack_cb) | ||
3056 | snd_soc_update_bits(codec, WM8958_MIC_DETECT_1, | ||
3057 | WM8958_MICD_ENA, WM8958_MICD_ENA); | ||
3058 | break; | ||
3059 | } | ||
3060 | |||
3061 | return 0; | 3024 | return 0; |
3062 | } | 3025 | } |
3063 | #else | 3026 | #else |