From: Mark Brown <broonie@kernel.org>
To: Adam Thomson <Adam.Thomson@diasemi.com>,
Michal Hajduk <Michal.Hajduk@diasemi.com>,
Liam Girdwood <lgirdwood@gmail.com>
Cc: alsa-devel@alsa-project.org, linaro-kernel@lists.linaro.org,
stable@vger.kernel.org, Mark Brown <broonie@linaro.org>
Subject: [PATCH] ASoC: da732x: Mark DC offset control registers volatile
Date: Mon, 24 Feb 2014 12:00:53 +0900 [thread overview]
Message-ID: <1393210853-32246-1-git-send-email-broonie@kernel.org> (raw)
From: Mark Brown <broonie@linaro.org>
The driver reads from the DC offset control registers during callibration
but since the registers are marked as volatile and there is a register
cache the values will not be read from the hardware after the first reading
rendering the callibration ineffective.
It appears that the driver was originally written for the ASoC level
register I/O code but converted to regmap prior to merge and this issue
was missed during the conversion as the framework level volatile register
functionality was not being used.
Signed-off-by: Mark Brown <broonie@linaro.org>
Cc: stable@vger.kernel.org
---
sound/soc/codecs/da732x.c | 12 ++++++++++++
1 file changed, 12 insertions(+)
diff --git a/sound/soc/codecs/da732x.c b/sound/soc/codecs/da732x.c
index 8e2c74d..798eb43 100644
--- a/sound/soc/codecs/da732x.c
+++ b/sound/soc/codecs/da732x.c
@@ -1268,11 +1268,23 @@ static struct snd_soc_dai_driver da732x_dai[] = {
},
};
+static bool da732x_volatile(struct device *dev, unsigned int reg)
+{
+ switch (reg) {
+ case DA732X_REG_HPL_DAC_OFF_CNTL:
+ case DA732X_REG_HPR_DAC_OFF_CNTL:
+ return true;
+ default:
+ return false;
+ }
+}
+
static const struct regmap_config da732x_regmap = {
.reg_bits = 8,
.val_bits = 8,
.max_register = DA732X_MAX_REG,
+ .volatile_reg = da732x_volatile,
.reg_defaults = da732x_reg_cache,
.num_reg_defaults = ARRAY_SIZE(da732x_reg_cache),
.cache_type = REGCACHE_RBTREE,
--
1.9.0.rc3
next reply other threads:[~2014-02-24 5:34 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-02-24 3:00 Mark Brown [this message]
2014-02-24 11:31 ` [PATCH] ASoC: da732x: Mark DC offset control registers volatile Opensource [Adam Thomson]
2014-02-24 12:42 ` Mark Brown
2014-02-24 13:57 ` Opensource [Adam Thomson]
2014-02-25 1:21 ` Mark Brown
2014-02-25 16:13 ` Opensource [Adam Thomson]
2014-02-25 23:54 ` Mark Brown
2014-02-26 9:39 ` Opensource [Adam Thomson]
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=1393210853-32246-1-git-send-email-broonie@kernel.org \
--to=broonie@kernel.org \
--cc=Adam.Thomson@diasemi.com \
--cc=Michal.Hajduk@diasemi.com \
--cc=alsa-devel@alsa-project.org \
--cc=broonie@linaro.org \
--cc=lgirdwood@gmail.com \
--cc=linaro-kernel@lists.linaro.org \
--cc=stable@vger.kernel.org \
/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