Commit e9ee45b8 authored by Mark Brown's avatar Mark Brown Committed by Greg Kroah-Hartman

ASoC: wm8994: Enabling VMID should take a runtime PM reference

commit db966f8a upstream.

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: default avatarMark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent ef7dcc8c
......@@ -729,6 +729,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",
......@@ -796,6 +798,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,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment