Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 263855
b: refs/heads/master
c: 6c5b756
h: refs/heads/master
i:
  263853: d44a018
  263851: 9b9df38
  263847: f974ee2
  263839: eb03ccd
v: v3
  • Loading branch information
Lars-Peter Clausen authored and Mark Brown committed Aug 31, 2011
1 parent 31761e8 commit 754fb13
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 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: 63fa0a288cfedca681175fe13cf15677e944cdb2
refs/heads/master: 6c5b756aaa3e4a20c8d4b47b9dc4799b9cfdfcb8
12 changes: 6 additions & 6 deletions trunk/sound/soc/soc-cache.c
Original file line number Diff line number Diff line change
Expand Up @@ -203,14 +203,14 @@ static int snd_soc_rbtree_cache_sync(struct snd_soc_codec *codec)
rbnode = rb_entry(node, struct snd_soc_rbtree_node, node);
for (i = 0; i < rbnode->blklen; ++i) {
regtmp = rbnode->base_reg + i;
WARN_ON(codec->writable_register &&
codec->writable_register(codec, regtmp));
val = snd_soc_rbtree_get_register(rbnode, i);
def = snd_soc_get_cache_val(codec->reg_def_copy, i,
rbnode->word_size);
if (val == def)
continue;

WARN_ON(!snd_soc_codec_writable_register(codec, regtmp));

codec->cache_bypass = 1;
ret = snd_soc_write(codec, regtmp, val);
codec->cache_bypass = 0;
Expand Down Expand Up @@ -563,8 +563,7 @@ static int snd_soc_lzo_cache_sync(struct snd_soc_codec *codec)

lzo_blocks = codec->reg_cache;
for_each_set_bit(i, lzo_blocks[0]->sync_bmp, lzo_blocks[0]->sync_bmp_nbits) {
WARN_ON(codec->writable_register &&
codec->writable_register(codec, i));
WARN_ON(!snd_soc_codec_writable_register(codec, i));
ret = snd_soc_cache_read(codec, i, &val);
if (ret)
return ret;
Expand Down Expand Up @@ -823,15 +822,16 @@ static int snd_soc_flat_cache_sync(struct snd_soc_codec *codec)

codec_drv = codec->driver;
for (i = 0; i < codec_drv->reg_cache_size; ++i) {
WARN_ON(codec->writable_register &&
codec->writable_register(codec, i));
ret = snd_soc_cache_read(codec, i, &val);
if (ret)
return ret;
if (codec->reg_def_copy)
if (snd_soc_get_cache_val(codec->reg_def_copy,
i, codec_drv->reg_word_size) == val)
continue;

WARN_ON(!snd_soc_codec_writable_register(codec, i));

ret = snd_soc_write(codec, i, val);
if (ret)
return ret;
Expand Down

0 comments on commit 754fb13

Please sign in to comment.