aboutsummaryrefslogtreecommitdiffstats
path: root/sound/soc/codecs/wm8994.h
diff options
context:
space:
mode:
authorMark Brown <broonie@opensource.wolfsonmicro.com>2012-03-19 17:32:06 +0000
committerAndreas Blaesius <skate4life@gmx.de>2016-04-30 11:03:55 +0200
commit7ff0e1aaf3004c97f237a60b8cdd58be45e7cd84 (patch)
tree2e2bfe0cc73b3e2c0d44892107e587902efafc56 /sound/soc/codecs/wm8994.h
parent057a0ef7843689d78c7dc0704e59bd95b80ce212 (diff)
downloadkernel_samsung_espresso10-7ff0e1aaf3004c97f237a60b8cdd58be45e7cd84.tar.gz
kernel_samsung_espresso10-7ff0e1aaf3004c97f237a60b8cdd58be45e7cd84.tar.bz2
kernel_samsung_espresso10-7ff0e1aaf3004c97f237a60b8cdd58be45e7cd84.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.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/sound/soc/codecs/wm8994.h b/sound/soc/codecs/wm8994.h
index 1b432b19403..20a6073357f 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,
@@ -49,6 +54,8 @@ struct wm8994_access_mask {
extern const struct wm8994_access_mask wm8994_access_masks[WM8994_CACHE_SIZE];
extern const u16 wm8994_reg_defaults[WM8994_CACHE_SIZE];
+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);
@@ -85,6 +92,7 @@ struct wm8994_priv {
int vmid_refcount;
int active_refcount;
+ enum wm8994_vmid_mode vmid_mode;
int dac_rates[2];
int lrclk_shared[2];