diff options
author | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2012-03-19 13:32:06 -0400 |
---|---|---|
committer | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2012-03-19 15:08:17 -0400 |
commit | 22f8d055350066b4a87de4adea8c5213cac54534 (patch) | |
tree | 229a761bb0e5c4a9ee27db3d327bbd11905b9c96 /sound/soc/codecs/wm8994.h | |
parent | 6f8270cc9a43d767676c97df5773fdcede312a88 (diff) |
ASoC: wm8994: Provide VMID mode control and fix default sequence
The optimal management of VMID depends on a number of factors which vary
dynamically at runtime, for example the connection to a system docking
station. In some circumstances it is desirable to keep VMID enabled all
the time, in others it is desirable to aggressively power it up and down.
Provide a callback allowing machine driver to configure either the normal
power up/down mode (WM8994_VMID_MODE_NORMAL) or to maintain VMID even
when idle (WM8994_VMID_MODE_FORCE). This callback, wm8994_vmid_mode(),
should be called with the CODEC lock.
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Diffstat (limited to 'sound/soc/codecs/wm8994.h')
-rw-r--r-- | sound/soc/codecs/wm8994.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/sound/soc/codecs/wm8994.h b/sound/soc/codecs/wm8994.h index 2f4d2d12a452..c724112998d8 100644 --- a/sound/soc/codecs/wm8994.h +++ b/sound/soc/codecs/wm8994.h | |||
@@ -32,6 +32,11 @@ | |||
32 | #define WM8994_FLL_SRC_LRCLK 3 | 32 | #define WM8994_FLL_SRC_LRCLK 3 |
33 | #define WM8994_FLL_SRC_BCLK 4 | 33 | #define WM8994_FLL_SRC_BCLK 4 |
34 | 34 | ||
35 | enum wm8994_vmid_mode { | ||
36 | WM8994_VMID_NORMAL, | ||
37 | WM8994_VMID_FORCE, | ||
38 | }; | ||
39 | |||
35 | typedef void (*wm8958_micdet_cb)(u16 status, void *data); | 40 | typedef void (*wm8958_micdet_cb)(u16 status, void *data); |
36 | 41 | ||
37 | int wm8994_mic_detect(struct snd_soc_codec *codec, struct snd_soc_jack *jack, | 42 | int wm8994_mic_detect(struct snd_soc_codec *codec, struct snd_soc_jack *jack, |
@@ -39,6 +44,8 @@ int wm8994_mic_detect(struct snd_soc_codec *codec, struct snd_soc_jack *jack, | |||
39 | int wm8958_mic_detect(struct snd_soc_codec *codec, struct snd_soc_jack *jack, | 44 | int wm8958_mic_detect(struct snd_soc_codec *codec, struct snd_soc_jack *jack, |
40 | wm8958_micdet_cb cb, void *cb_data); | 45 | wm8958_micdet_cb cb, void *cb_data); |
41 | 46 | ||
47 | int wm8994_vmid_mode(struct snd_soc_codec *codec, enum wm8994_vmid_mode mode); | ||
48 | |||
42 | int wm8958_aif_ev(struct snd_soc_dapm_widget *w, | 49 | int wm8958_aif_ev(struct snd_soc_dapm_widget *w, |
43 | struct snd_kcontrol *kcontrol, int event); | 50 | struct snd_kcontrol *kcontrol, int event); |
44 | 51 | ||
@@ -75,6 +82,7 @@ struct wm8994_priv { | |||
75 | 82 | ||
76 | int vmid_refcount; | 83 | int vmid_refcount; |
77 | int active_refcount; | 84 | int active_refcount; |
85 | enum wm8994_vmid_mode vmid_mode; | ||
78 | 86 | ||
79 | int dac_rates[2]; | 87 | int dac_rates[2]; |
80 | int lrclk_shared[2]; | 88 | int lrclk_shared[2]; |