aboutsummaryrefslogtreecommitdiffstats
path: root/sound/soc/codecs
diff options
context:
space:
mode:
Diffstat (limited to 'sound/soc/codecs')
-rw-r--r--sound/soc/codecs/wm8988.c17
1 files changed, 2 insertions, 15 deletions
diff --git a/sound/soc/codecs/wm8988.c b/sound/soc/codecs/wm8988.c
index 1c6f8bfbf94a..2e9eba717d1a 100644
--- a/sound/soc/codecs/wm8988.c
+++ b/sound/soc/codecs/wm8988.c
@@ -55,7 +55,6 @@ struct wm8988_priv {
55 struct snd_pcm_hw_constraint_list *sysclk_constraints; 55 struct snd_pcm_hw_constraint_list *sysclk_constraints;
56}; 56};
57 57
58
59#define wm8988_reset(c) snd_soc_write(c, WM8988_RESET, 0) 58#define wm8988_reset(c) snd_soc_write(c, WM8988_RESET, 0)
60 59
61/* 60/*
@@ -676,6 +675,8 @@ static int wm8988_set_bias_level(struct snd_soc_codec *codec,
676 675
677 case SND_SOC_BIAS_STANDBY: 676 case SND_SOC_BIAS_STANDBY:
678 if (codec->dapm.bias_level == SND_SOC_BIAS_OFF) { 677 if (codec->dapm.bias_level == SND_SOC_BIAS_OFF) {
678 snd_soc_cache_sync(codec);
679
679 /* VREF, VMID=2x5k */ 680 /* VREF, VMID=2x5k */
680 snd_soc_write(codec, WM8988_PWR1, pwr_reg | 0x1c1); 681 snd_soc_write(codec, WM8988_PWR1, pwr_reg | 0x1c1);
681 682
@@ -736,21 +737,7 @@ static int wm8988_suspend(struct snd_soc_codec *codec, pm_message_t state)
736 737
737static int wm8988_resume(struct snd_soc_codec *codec) 738static int wm8988_resume(struct snd_soc_codec *codec)
738{ 739{
739 int i;
740 u8 data[2];
741 u16 *cache = codec->reg_cache;
742
743 /* Sync reg_cache with the hardware */
744 for (i = 0; i < WM8988_NUM_REG; i++) {
745 if (i == WM8988_RESET)
746 continue;
747 data[0] = (i << 1) | ((cache[i] >> 8) & 0x0001);
748 data[1] = cache[i] & 0x00ff;
749 codec->hw_write(codec->control_data, data, 2);
750 }
751
752 wm8988_set_bias_level(codec, SND_SOC_BIAS_STANDBY); 740 wm8988_set_bias_level(codec, SND_SOC_BIAS_STANDBY);
753
754 return 0; 741 return 0;
755} 742}
756 743