diff options
author | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2011-12-14 11:40:59 +0800 |
---|---|---|
committer | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2011-12-14 17:07:51 +0800 |
commit | d0616bbed18884cb2475ca0abb5a596105444b96 (patch) | |
tree | 9c93f0364408f52f1b811b917a9595c4a5ff6f77 /sound/soc | |
parent | f6a9336879caeed63e77bc10097966fa3a6ba20c (diff) | |
download | op-kernel-dev-d0616bbed18884cb2475ca0abb5a596105444b96.zip op-kernel-dev-d0616bbed18884cb2475ca0abb5a596105444b96.tar.gz |
ASoC: Use standard register cache sync in wm8993
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Diffstat (limited to 'sound/soc')
-rw-r--r-- | sound/soc/codecs/wm8993.c | 24 |
1 files changed, 1 insertions, 23 deletions
diff --git a/sound/soc/codecs/wm8993.c b/sound/soc/codecs/wm8993.c index b966f69..2835e7d 100644 --- a/sound/soc/codecs/wm8993.c +++ b/sound/soc/codecs/wm8993.c @@ -934,28 +934,6 @@ static const struct snd_soc_dapm_route routes[] = { { "Right Headphone Mux", "DAC", "DACR" }, }; -static void wm8993_cache_restore(struct snd_soc_codec *codec) -{ - u16 *cache = codec->reg_cache; - int i; - - if (!codec->cache_sync) - return; - - /* Reenable hardware writes */ - codec->cache_only = 0; - - /* Restore the register settings */ - for (i = 1; i < WM8993_MAX_REGISTER; i++) { - if (cache[i] == wm8993_reg_defaults[i]) - continue; - snd_soc_write(codec, i, cache[i]); - } - - /* We're in sync again */ - codec->cache_sync = 0; -} - static int wm8993_set_bias_level(struct snd_soc_codec *codec, enum snd_soc_bias_level level) { @@ -979,7 +957,7 @@ static int wm8993_set_bias_level(struct snd_soc_codec *codec, if (ret != 0) return ret; - wm8993_cache_restore(codec); + snd_soc_cache_sync(codec); /* Tune DC servo configuration */ snd_soc_write(codec, 0x44, 3); |