Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 283852
b: refs/heads/master
c: 45e9675
h: refs/heads/master
v: v3
  • Loading branch information
Mark Brown committed Dec 3, 2011
1 parent 82d0cff commit 8e1879a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 16 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 88a1b12b9c70d1b2ea4d11bdfa6ae65c9570909b
refs/heads/master: 45e967553f3466f773ecd418c09fe92b753f18b0
18 changes: 3 additions & 15 deletions trunk/sound/soc/codecs/wm8903.c
Original file line number Diff line number Diff line change
Expand Up @@ -1767,23 +1767,11 @@ static int wm8903_suspend(struct snd_soc_codec *codec)

static int wm8903_resume(struct snd_soc_codec *codec)
{
int i;
u16 *reg_cache = codec->reg_cache;
u16 *tmp_cache = kmemdup(reg_cache, sizeof(wm8903_reg_defaults),
GFP_KERNEL);
struct wm8903_priv *wm8903 = snd_soc_codec_get_drvdata(codec);

/* Bring the codec back up to standby first to minimise pop/clicks */
wm8903_set_bias_level(codec, SND_SOC_BIAS_STANDBY);
snd_soc_cache_sync(codec);

/* Sync back everything else */
if (tmp_cache) {
for (i = 2; i < ARRAY_SIZE(wm8903_reg_defaults); i++)
if (tmp_cache[i] != reg_cache[i])
snd_soc_write(codec, i, tmp_cache[i]);
kfree(tmp_cache);
} else {
dev_err(codec->dev, "Failed to allocate temporary cache\n");
}
wm8903_set_bias_level(codec, SND_SOC_BIAS_STANDBY);

return 0;
}
Expand Down

0 comments on commit 8e1879a

Please sign in to comment.