diff options
Diffstat (limited to 'sound/soc/codecs/wm8994.c')
-rw-r--r-- | sound/soc/codecs/wm8994.c | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/sound/soc/codecs/wm8994.c b/sound/soc/codecs/wm8994.c index 93d27b660257..ec69a6c152fe 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) | |||
770 | { | 770 | { |
771 | struct wm8994_priv *wm8994 = snd_soc_codec_get_drvdata(codec); | 771 | struct wm8994_priv *wm8994 = snd_soc_codec_get_drvdata(codec); |
772 | 772 | ||
773 | pm_runtime_get_sync(codec->dev); | ||
774 | |||
773 | wm8994->vmid_refcount++; | 775 | wm8994->vmid_refcount++; |
774 | 776 | ||
775 | dev_dbg(codec->dev, "Referencing VMID, refcount is now %d\n", | 777 | dev_dbg(codec->dev, "Referencing VMID, refcount is now %d\n", |
@@ -783,7 +785,12 @@ static void vmid_reference(struct snd_soc_codec *codec) | |||
783 | WM8994_VMID_RAMP_MASK, | 785 | WM8994_VMID_RAMP_MASK, |
784 | WM8994_STARTUP_BIAS_ENA | | 786 | WM8994_STARTUP_BIAS_ENA | |
785 | WM8994_VMID_BUF_ENA | | 787 | WM8994_VMID_BUF_ENA | |
786 | (0x11 << WM8994_VMID_RAMP_SHIFT)); | 788 | (0x3 << WM8994_VMID_RAMP_SHIFT)); |
789 | |||
790 | /* Remove discharge for line out */ | ||
791 | snd_soc_update_bits(codec, WM8994_ANTIPOP_1, | ||
792 | WM8994_LINEOUT1_DISCH | | ||
793 | WM8994_LINEOUT2_DISCH, 0); | ||
787 | 794 | ||
788 | /* Main bias enable, VMID=2x40k */ | 795 | /* Main bias enable, VMID=2x40k */ |
789 | snd_soc_update_bits(codec, WM8994_POWER_MANAGEMENT_1, | 796 | snd_soc_update_bits(codec, WM8994_POWER_MANAGEMENT_1, |
@@ -837,6 +844,8 @@ static void vmid_dereference(struct snd_soc_codec *codec) | |||
837 | WM8994_VMID_BUF_ENA | | 844 | WM8994_VMID_BUF_ENA | |
838 | WM8994_VMID_RAMP_MASK, 0); | 845 | WM8994_VMID_RAMP_MASK, 0); |
839 | } | 846 | } |
847 | |||
848 | pm_runtime_put(codec->dev); | ||
840 | } | 849 | } |
841 | 850 | ||
842 | static int vmid_event(struct snd_soc_dapm_widget *w, | 851 | static int vmid_event(struct snd_soc_dapm_widget *w, |
@@ -2753,11 +2762,6 @@ static int wm8994_resume(struct snd_soc_codec *codec) | |||
2753 | codec->cache_only = 0; | 2762 | codec->cache_only = 0; |
2754 | } | 2763 | } |
2755 | 2764 | ||
2756 | /* Restore the registers */ | ||
2757 | ret = snd_soc_cache_sync(codec); | ||
2758 | if (ret != 0) | ||
2759 | dev_err(codec->dev, "Failed to sync cache: %d\n", ret); | ||
2760 | |||
2761 | wm8994_set_bias_level(codec, SND_SOC_BIAS_STANDBY); | 2765 | wm8994_set_bias_level(codec, SND_SOC_BIAS_STANDBY); |
2762 | 2766 | ||
2763 | for (i = 0; i < ARRAY_SIZE(wm8994->fll); i++) { | 2767 | for (i = 0; i < ARRAY_SIZE(wm8994->fll); i++) { |