diff options
Diffstat (limited to 'sound/soc/codecs/wm8903.c')
-rw-r--r-- | sound/soc/codecs/wm8903.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/sound/soc/codecs/wm8903.c b/sound/soc/codecs/wm8903.c index 4ad8ebd290e3..4f418fc2c324 100644 --- a/sound/soc/codecs/wm8903.c +++ b/sound/soc/codecs/wm8903.c @@ -1761,6 +1761,11 @@ static struct snd_soc_dai_driver wm8903_dai = { static int wm8903_suspend(struct snd_soc_codec *codec, pm_message_t state) { + struct wm8903_priv *wm8903 = snd_soc_codec_get_drvdata(codec); + + if (wm8903->irq) + disable_irq(wm8903->irq); + wm8903_set_bias_level(codec, SND_SOC_BIAS_OFF); return 0; @@ -1768,11 +1773,15 @@ static int wm8903_suspend(struct snd_soc_codec *codec, pm_message_t state) static int wm8903_resume(struct snd_soc_codec *codec) { + struct wm8903_priv *wm8903 = snd_soc_codec_get_drvdata(codec); int i; u16 *reg_cache = codec->reg_cache; u16 *tmp_cache = kmemdup(reg_cache, sizeof(wm8903_reg_defaults), GFP_KERNEL); + if (wm8903->irq) + enable_irq(wm8903->irq); + /* Bring the codec back up to standby first to minimise pop/clicks */ wm8903_set_bias_level(codec, SND_SOC_BIAS_STANDBY); |