Alsa-Devel Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Pascal Huerst <pascal.huerst@gmail.com>
To: zonque@gmail.com
Cc: alsa-devel@alsa-project.org, lars@metafoo.de, tiwai@suse.de,
	lgirdwood@gmail.com, broonie@kernel.org,
	ckeepax@opensource.wolfsonmicro.com,
	Pascal Huerst <pascal.huerst@gmail.com>
Subject: [PATCH] ASoC: snd_soc_tas5086: Reinit register values on probe
Date: Wed, 25 Mar 2015 16:29:39 +0100	[thread overview]
Message-ID: <1427297379-17736-1-git-send-email-pascal.huerst@gmail.com> (raw)

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

             reply	other threads:[~2015-03-25 15:30 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-03-25 15:29 Pascal Huerst [this message]
2015-03-25 16:20 ` [PATCH] ASoC: snd_soc_tas5086: Reinit register values on probe Mark Brown
2015-03-25 17:29   ` Pascal Huerst
2015-03-25 17:48     ` Mark Brown
2015-03-26 12:17       ` Pascal Huerst

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1427297379-17736-1-git-send-email-pascal.huerst@gmail.com \
    --to=pascal.huerst@gmail.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=broonie@kernel.org \
    --cc=ckeepax@opensource.wolfsonmicro.com \
    --cc=lars@metafoo.de \
    --cc=lgirdwood@gmail.com \
    --cc=tiwai@suse.de \
    --cc=zonque@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox