aboutsummaryrefslogtreecommitdiffstats
path: root/sound
diff options
context:
space:
mode:
authorBard Liao <bardliao@realtek.com>2015-04-08 23:20:32 -0400
committerMark Brown <broonie@kernel.org>2015-04-09 06:31:22 -0400
commitd53d59ecad74f3e90c6eefedd2186abbadd64d7c (patch)
treec077ea3e27c0d85f072745d7ed9782d406dbe631 /sound
parent143526ee94a295ed33b9cc19e9532ab6d14a1cc0 (diff)
ASoC: rt286: Restore default in probe
RT286 can't do register reset. If the hardware power is still existing in power off, rt286 will keep the register settings. So, we need to restore the default register value in probe to make sure the cache value is the same as the real register value. Signed-off-by: Bard Liao <bardliao@realtek.com> Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound')
-rw-r--r--sound/soc/codecs/rt286.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/sound/soc/codecs/rt286.c b/sound/soc/codecs/rt286.c
index 842cfb9fa191..87af81b9e971 100644
--- a/sound/soc/codecs/rt286.c
+++ b/sound/soc/codecs/rt286.c
@@ -1250,6 +1250,14 @@ static int rt286_i2c_probe(struct i2c_client *i2c,
1250 rt286->i2c = i2c; 1250 rt286->i2c = i2c;
1251 i2c_set_clientdata(i2c, rt286); 1251 i2c_set_clientdata(i2c, rt286);
1252 1252
1253 /* restore codec default */
1254 for (i = 0; i < INDEX_CACHE_SIZE; i++)
1255 regmap_write(rt286->regmap, rt286->index_cache[i].reg,
1256 rt286->index_cache[i].def);
1257 for (i = 0; i < ARRAY_SIZE(rt286_reg); i++)
1258 regmap_write(rt286->regmap, rt286_reg[i].reg,
1259 rt286_reg[i].def);
1260
1253 if (pdata) 1261 if (pdata)
1254 rt286->pdata = *pdata; 1262 rt286->pdata = *pdata;
1255 1263