diff options
author | Dimitris Papastamos <dp@opensource.wolfsonmicro.com> | 2011-01-19 09:53:37 -0500 |
---|---|---|
committer | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2011-01-20 08:41:01 -0500 |
commit | 9978007befa5efdc16dc940631c594f420f96b09 (patch) | |
tree | 10af07e9e32ed471299a5250fe870938ea3eeff3 | |
parent | dad8e7aeeb83a26d267e757e4c1cf69591850477 (diff) |
ASoC: soc-cache: Apply the cache_bypass option
Incorporate the use of the cache_bypass functionality in the
syncing functions. The snd_soc_flat_cache_sync() need not be
hooked as there is no performance benefit from using the
cache_bypass option.
Signed-off-by: Dimitris Papastamos <dp@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
-rw-r--r-- | sound/soc/soc-cache.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/sound/soc/soc-cache.c b/sound/soc/soc-cache.c index 1ebff9f12b4e..f83483963791 100644 --- a/sound/soc/soc-cache.c +++ b/sound/soc/soc-cache.c | |||
@@ -890,7 +890,9 @@ static int snd_soc_rbtree_cache_sync(struct snd_soc_codec *codec) | |||
890 | ret = snd_soc_cache_read(codec, rbnode->reg, &val); | 890 | ret = snd_soc_cache_read(codec, rbnode->reg, &val); |
891 | if (ret) | 891 | if (ret) |
892 | return ret; | 892 | return ret; |
893 | codec->cache_bypass = 1; | ||
893 | ret = snd_soc_write(codec, rbnode->reg, val); | 894 | ret = snd_soc_write(codec, rbnode->reg, val); |
895 | codec->cache_bypass = 0; | ||
894 | if (ret) | 896 | if (ret) |
895 | return ret; | 897 | return ret; |
896 | dev_dbg(codec->dev, "Synced register %#x, value = %#x\n", | 898 | dev_dbg(codec->dev, "Synced register %#x, value = %#x\n", |
@@ -1148,7 +1150,9 @@ static int snd_soc_lzo_cache_sync(struct snd_soc_codec *codec) | |||
1148 | ret = snd_soc_cache_read(codec, i, &val); | 1150 | ret = snd_soc_cache_read(codec, i, &val); |
1149 | if (ret) | 1151 | if (ret) |
1150 | return ret; | 1152 | return ret; |
1153 | codec->cache_bypass = 1; | ||
1151 | ret = snd_soc_write(codec, i, val); | 1154 | ret = snd_soc_write(codec, i, val); |
1155 | codec->cache_bypass = 0; | ||
1152 | if (ret) | 1156 | if (ret) |
1153 | return ret; | 1157 | return ret; |
1154 | dev_dbg(codec->dev, "Synced register %#x, value = %#x\n", | 1158 | dev_dbg(codec->dev, "Synced register %#x, value = %#x\n", |