aboutsummaryrefslogtreecommitdiff
path: root/sound
diff options
context:
space:
mode:
authorBard Liao2014-09-26 11:06:40 +0800
committerMark Brown2014-09-26 09:14:27 +0100
commit66d627d554a4284dad00b2039efd18e1c129cc2f (patch)
treef5c43d3f5ff914dba949b4d0818cc16f3a0954b1 /sound
parentb7a297677540789b8fb35a6ce66c500739fb4bf9 (diff)
ASoC: rt286: Fix sync function
We try to write index registers into cache when we write an index register, but we change the reg value before updating the cache. As a result, the cache is never be updated. This patch will fix this issue. Signed-off-by: Bard Liao <bardliao@realtek.com> Signed-off-by: Mark Brown <broonie@kernel.org> Cc: stable@vger.kernel.org
Diffstat (limited to 'sound')
-rw-r--r--sound/soc/codecs/rt286.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sound/soc/codecs/rt286.c b/sound/soc/codecs/rt286.c
index 7a6608404d04..b86b426f159d 100644
--- a/sound/soc/codecs/rt286.c
+++ b/sound/soc/codecs/rt286.c
@@ -191,7 +191,6 @@ static int rt286_hw_write(void *context, unsigned int reg, unsigned int value)
/*handle index registers*/
if (reg <= 0xff) {
rt286_hw_write(client, RT286_COEF_INDEX, reg);
- reg = RT286_PROC_COEF;
for (i = 0; i < INDEX_CACHE_SIZE; i++) {
if (reg == rt286->index_cache[i].reg) {
rt286->index_cache[i].def = value;
@@ -199,6 +198,7 @@ static int rt286_hw_write(void *context, unsigned int reg, unsigned int value)
}
}
+ reg = RT286_PROC_COEF;
}
data[0] = (reg >> 24) & 0xff;