Skip to contentSkip to conversation

ASoC: tas5086: Reinit register values in probe function

PATCH New [email protected] 1 participant 1 message Jan 22, 2015

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ASoC: tas5086: Reinit register values in probe function

From: Pascal Huerst <[email protected]>

If the machine driver has been un/reloaded, the register values of the tas5086 codec have to be reinitialized, in order to work properly.

sound/soc/codecs/tas5086.c +6 -0
index 249ef5c..cd19171 100644
@@ -851,10 +851,16 @@ static int tas5086_probe(struct snd_soc_codec *codec)
 	}
 
 	tas5086_reset(priv);
+	regcache_mark_dirty(priv->regmap);
+
 	ret = tas5086_init(codec->dev, priv);
 	if (ret < 0)
 		goto exit_disable_regulators;
 
+	ret = regcache_sync(priv->regmap);
+	if (ret < 0)
+		goto exit_disable_regulators;
+
 	/* set master volume to 0 dB */
 	ret = regmap_write(priv->regmap, TAS5086_MASTER_VOL, 0x30);
 	if (ret < 0)
Signature · 1 line
1.9.3