aboutsummaryrefslogtreecommitdiffstats
path: root/sound/soc/codecs/wm8994.c
diff options
context:
space:
mode:
authorMark Brown <broonie@opensource.wolfsonmicro.com>2010-10-27 16:48:36 -0400
committerMark Brown <broonie@opensource.wolfsonmicro.com>2010-10-28 14:34:03 -0400
commitfec6dd833e733b5d9588a1f1e4d81118b79b5774 (patch)
treefd321d8252fa61dd6df15166c41e262f4c8955ae /sound/soc/codecs/wm8994.c
parentd906401114861585c990ff0290c002b5d22fc71a (diff)
ASoC: Store DC offset correction for wm_hubs devices in class W mode
Providing the analogue configuration of the output path remains the same the DC offset corrected by the DC servo will remain identical so we can skip the callibration, reducing the startup time for the headphone output. Implement this for the wm_hubs devices as has been done for several other CODECs. Don't do this if we have any analogue paths enabled since offsets may be being introduced by the analogue paths which could vary outside the control of the driver. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Diffstat (limited to 'sound/soc/codecs/wm8994.c')
-rw-r--r--sound/soc/codecs/wm8994.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/sound/soc/codecs/wm8994.c b/sound/soc/codecs/wm8994.c
index 0db59c3aa5d4..3f70dee048b0 100644
--- a/sound/soc/codecs/wm8994.c
+++ b/sound/soc/codecs/wm8994.c
@@ -2228,6 +2228,7 @@ static int clk_sys_event(struct snd_soc_dapm_widget *w,
2228 2228
2229static void wm8994_update_class_w(struct snd_soc_codec *codec) 2229static void wm8994_update_class_w(struct snd_soc_codec *codec)
2230{ 2230{
2231 struct wm8994_priv *wm8994 = snd_soc_codec_get_drvdata(codec);
2231 int enable = 1; 2232 int enable = 1;
2232 int source = 0; /* GCC flow analysis can't track enable */ 2233 int source = 0; /* GCC flow analysis can't track enable */
2233 int reg, reg_r; 2234 int reg, reg_r;
@@ -2278,11 +2279,13 @@ static void wm8994_update_class_w(struct snd_soc_codec *codec)
2278 WM8994_CP_DYN_PWR | 2279 WM8994_CP_DYN_PWR |
2279 WM8994_CP_DYN_SRC_SEL_MASK, 2280 WM8994_CP_DYN_SRC_SEL_MASK,
2280 source | WM8994_CP_DYN_PWR); 2281 source | WM8994_CP_DYN_PWR);
2282 wm8994->hubs.class_w = true;
2281 2283
2282 } else { 2284 } else {
2283 dev_dbg(codec->dev, "Class W disabled\n"); 2285 dev_dbg(codec->dev, "Class W disabled\n");
2284 snd_soc_update_bits(codec, WM8994_CLASS_W_1, 2286 snd_soc_update_bits(codec, WM8994_CLASS_W_1,
2285 WM8994_CP_DYN_PWR, 0); 2287 WM8994_CP_DYN_PWR, 0);
2288 wm8994->hubs.class_w = false;
2286 } 2289 }
2287} 2290}
2288 2291