Skip to content

Commit

Permalink
ASoC: wm8994: Enabling VMID should take a runtime PM reference
Browse files Browse the repository at this point in the history
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
  • Loading branch information
Mark Brown committed Feb 6, 2012
1 parent 43b6cec commit db966f8
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions sound/soc/codecs/wm8994.c
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down Expand Up @@ -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,
Expand Down

0 comments on commit db966f8

Please sign in to comment.