提交 9978007b 编写于 作者: D Dimitris Papastamos 提交者: Mark Brown

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: NDimitris Papastamos <dp@opensource.wolfsonmicro.com>
Acked-by: NLiam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: NMark Brown <broonie@opensource.wolfsonmicro.com>
上级 dad8e7ae
......@@ -890,7 +890,9 @@ static int snd_soc_rbtree_cache_sync(struct snd_soc_codec *codec)
ret = snd_soc_cache_read(codec, rbnode->reg, &val);
if (ret)
return ret;
codec->cache_bypass = 1;
ret = snd_soc_write(codec, rbnode->reg, val);
codec->cache_bypass = 0;
if (ret)
return ret;
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)
ret = snd_soc_cache_read(codec, i, &val);
if (ret)
return ret;
codec->cache_bypass = 1;
ret = snd_soc_write(codec, i, val);
codec->cache_bypass = 0;
if (ret)
return ret;
dev_dbg(codec->dev, "Synced register %#x, value = %#x\n",
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册