Alsa-Devel Archive mirror
 help / color / mirror / Atom feed
* [PATCH] ASoC: snd_soc_tas5086: Reinit register values on probe
@ 2015-03-25 15:29 Pascal Huerst
  2015-03-25 16:20 ` Mark Brown
  0 siblings, 1 reply; 5+ messages in thread
From: Pascal Huerst @ 2015-03-25 15:29 UTC (permalink / raw
  To: zonque; +Cc: alsa-devel, lars, tiwai, lgirdwood, broonie, ckeepax,
	Pascal Huerst

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

Signed-off-by: Pascal Huerst <pascal.huerst@gmail.com>
---
 sound/soc/codecs/tas5086.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/sound/soc/codecs/tas5086.c b/sound/soc/codecs/tas5086.c
index 249ef5c..cd19171 100644
--- a/sound/soc/codecs/tas5086.c
+++ b/sound/soc/codecs/tas5086.c
@@ -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)
-- 
1.9.3

^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2015-03-26 12:17 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-03-25 15:29 [PATCH] ASoC: snd_soc_tas5086: Reinit register values on probe Pascal Huerst
2015-03-25 16:20 ` Mark Brown
2015-03-25 17:29   ` Pascal Huerst
2015-03-25 17:48     ` Mark Brown
2015-03-26 12:17       ` Pascal Huerst

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).