diff options
author | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2012-03-19 18:32:06 +0100 |
---|---|---|
committer | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2012-03-19 20:08:17 +0100 |
commit | 22f8d055350066b4a87de4adea8c5213cac54534 (patch) | |
tree | 229a761bb0e5c4a9ee27db3d327bbd11905b9c96 /sound/soc/codecs/wm8994.h | |
parent | ASoC: wm8994: Add missing break in resume (diff) | |
download | linux-22f8d055350066b4a87de4adea8c5213cac54534.tar.xz linux-22f8d055350066b4a87de4adea8c5213cac54534.zip |
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 @@ #define WM8994_FLL_SRC_LRCLK 3 #define WM8994_FLL_SRC_BCLK 4 +enum wm8994_vmid_mode { + WM8994_VMID_NORMAL, + WM8994_VMID_FORCE, +}; + typedef void (*wm8958_micdet_cb)(u16 status, void *data); 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, int wm8958_mic_detect(struct snd_soc_codec *codec, struct snd_soc_jack *jack, wm8958_micdet_cb cb, void *cb_data); +int wm8994_vmid_mode(struct snd_soc_codec *codec, enum wm8994_vmid_mode mode); + int wm8958_aif_ev(struct snd_soc_dapm_widget *w, struct snd_kcontrol *kcontrol, int event); @@ -75,6 +82,7 @@ struct wm8994_priv { int vmid_refcount; int active_refcount; + enum wm8994_vmid_mode vmid_mode; int dac_rates[2]; int lrclk_shared[2]; |