aboutsummaryrefslogtreecommitdiffstats
path: root/sound
diff options
context:
space:
mode:
authorMark Brown <broonie@opensource.wolfsonmicro.com>2012-02-06 12:07:08 +0000
committerAndreas Blaesius <skate4life@gmx.de>2016-04-30 11:03:48 +0200
commitd9fdaa450a24078a8fbbcb700974f26b6236e397 (patch)
tree7223ffedb0b3cb7f3024b68fe5784c6e02af379d /sound
parent739a98d7ae6375e74904d970558f71d5074baf7f (diff)
downloadkernel_samsung_espresso10-d9fdaa450a24078a8fbbcb700974f26b6236e397.zip
kernel_samsung_espresso10-d9fdaa450a24078a8fbbcb700974f26b6236e397.tar.gz
kernel_samsung_espresso10-d9fdaa450a24078a8fbbcb700974f26b6236e397.tar.bz2
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
Diffstat (limited to 'sound')
-rw-r--r--sound/soc/codecs/wm8994.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/sound/soc/codecs/wm8994.c b/sound/soc/codecs/wm8994.c
index 9a40990..8639143 100644
--- a/sound/soc/codecs/wm8994.c
+++ b/sound/soc/codecs/wm8994.c
@@ -869,6 +869,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",
@@ -936,6 +938,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,