diff options
author | Bard Liao <bardliao@realtek.com> | 2014-09-25 23:06:40 -0400 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2014-09-26 04:14:27 -0400 |
commit | 66d627d554a4284dad00b2039efd18e1c129cc2f (patch) | |
tree | f5c43d3f5ff914dba949b4d0818cc16f3a0954b1 /sound | |
parent | b7a297677540789b8fb35a6ce66c500739fb4bf9 (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.c | 2 |
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) | |||
191 | /*handle index registers*/ | 191 | /*handle index registers*/ |
192 | if (reg <= 0xff) { | 192 | if (reg <= 0xff) { |
193 | rt286_hw_write(client, RT286_COEF_INDEX, reg); | 193 | rt286_hw_write(client, RT286_COEF_INDEX, reg); |
194 | reg = RT286_PROC_COEF; | ||
195 | for (i = 0; i < INDEX_CACHE_SIZE; i++) { | 194 | for (i = 0; i < INDEX_CACHE_SIZE; i++) { |
196 | if (reg == rt286->index_cache[i].reg) { | 195 | if (reg == rt286->index_cache[i].reg) { |
197 | rt286->index_cache[i].def = value; | 196 | rt286->index_cache[i].def = value; |
@@ -199,6 +198,7 @@ static int rt286_hw_write(void *context, unsigned int reg, unsigned int value) | |||
199 | } | 198 | } |
200 | 199 | ||
201 | } | 200 | } |
201 | reg = RT286_PROC_COEF; | ||
202 | } | 202 | } |
203 | 203 | ||
204 | data[0] = (reg >> 24) & 0xff; | 204 | data[0] = (reg >> 24) & 0xff; |