diff options
author | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2012-02-06 12:07:08 (GMT) |
---|---|---|
committer | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2012-02-06 12:08:33 (GMT) |
commit | db966f8abb9ba74f7d5a7230f51572f52c31c4e5 (patch) | |
tree | 4e164a29e7913cdfd9c1a34780cfb39cc24eca19 | |
parent | 43b6cec27e1e50a1de3eff47e66e502f3fe7e66e (diff) | |
download | linux-fsl-qoriq-db966f8abb9ba74f7d5a7230f51572f52c31c4e5.tar.xz |
ASoC: wm8994: Enabling VMID should take a runtime PM reference
We can enable VMID independently of the bias in some use cases so we need
to ensure that the core device is powered up.
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Cc: stable@vger.kernel.org
-rw-r--r-- | sound/soc/codecs/wm8994.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/sound/soc/codecs/wm8994.c b/sound/soc/codecs/wm8994.c index 8623950..81795eb 100644 --- a/sound/soc/codecs/wm8994.c +++ b/sound/soc/codecs/wm8994.c @@ -770,6 +770,8 @@ static void vmid_reference(struct snd_soc_codec *codec) { struct wm8994_priv *wm8994 = snd_soc_codec_get_drvdata(codec); + pm_runtime_get_sync(codec->dev); + wm8994->vmid_refcount++; dev_dbg(codec->dev, "Referencing VMID, refcount is now %d\n", @@ -837,6 +839,8 @@ static void vmid_dereference(struct snd_soc_codec *codec) WM8994_VMID_BUF_ENA | WM8994_VMID_RAMP_MASK, 0); } + + pm_runtime_put(codec->dev); } static int vmid_event(struct snd_soc_dapm_widget *w, |