Commit d0616bbe authored by Mark Brown's avatar Mark Brown

ASoC: Use standard register cache sync in wm8993

Signed-off-by: default avatarMark Brown <broonie@opensource.wolfsonmicro.com>
parent f6a93368
...@@ -934,28 +934,6 @@ static const struct snd_soc_dapm_route routes[] = { ...@@ -934,28 +934,6 @@ static const struct snd_soc_dapm_route routes[] = {
{ "Right Headphone Mux", "DAC", "DACR" }, { "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, static int wm8993_set_bias_level(struct snd_soc_codec *codec,
enum snd_soc_bias_level level) enum snd_soc_bias_level level)
{ {
...@@ -979,7 +957,7 @@ static int wm8993_set_bias_level(struct snd_soc_codec *codec, ...@@ -979,7 +957,7 @@ static int wm8993_set_bias_level(struct snd_soc_codec *codec,
if (ret != 0) if (ret != 0)
return ret; return ret;
wm8993_cache_restore(codec); snd_soc_cache_sync(codec);
/* Tune DC servo configuration */ /* Tune DC servo configuration */
snd_soc_write(codec, 0x44, 3); snd_soc_write(codec, 0x44, 3);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment