From: Jiada Wang <jiada_wang@mentor.com>
To: <lgirdwood@gmail.com>, <broonie@kernel.org>, <perex@perex.cz>,
<tiwai@suse.com>, <patches@opensource.wolfsonmicro.com>,
<alsa-devel@alsa-project.org>, <linux-kernel@vger.kernel.org>
Cc: <jiada_wang@mentor.com>
Subject: [PATCH 2/2] ASoC: Codec: wm8962: declare ALC Coefficients as 4 separate registers
Date: Tue, 6 Oct 2015 16:06:55 +0900 [thread overview]
Message-ID: <1444115215-4388-3-git-send-email-jiada_wang@mentor.com> (raw)
In-Reply-To: <1444115215-4388-1-git-send-email-jiada_wang@mentor.com>
As ALC2 register is volatile, declare it as one of ALC Coefficients
register together with other non-volatile registers will cause issue,
in case wm8962 has enter suspend mode, and cache_only flag is set,
any attempt to read from ALC2 will fail.
Instead of declaring one ALC Coefficients register which contains
ALC1 ~ ALC3 and Noise Gate, this patch declares 4 separate registers,
so that regmap can handle these registers differently based on their
classification.
Signed-off-by: Jiada Wang <jiada_wang@mentor.com>
---
sound/soc/codecs/wm8962.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/sound/soc/codecs/wm8962.c b/sound/soc/codecs/wm8962.c
index 319ee38..1201efd 100644
--- a/sound/soc/codecs/wm8962.c
+++ b/sound/soc/codecs/wm8962.c
@@ -1782,8 +1782,11 @@ SND_SOC_BYTES("HD Bass Coefficients", WM8962_HDBASS_AI_1, 30),
SOC_DOUBLE("ALC Switch", WM8962_ALC1, WM8962_ALCL_ENA_SHIFT,
WM8962_ALCR_ENA_SHIFT, 1, 0),
-SND_SOC_BYTES_MASK("ALC Coefficients", WM8962_ALC1, 4,
+SND_SOC_BYTES_MASK("ALC1", WM8962_ALC1, 1,
WM8962_ALCL_ENA_MASK | WM8962_ALCR_ENA_MASK),
+SND_SOC_BYTES("ALC2", WM8962_ALC2, 1),
+SND_SOC_BYTES("ALC3", WM8962_ALC3, 1),
+SND_SOC_BYTES("Noise Gate", WM8962_NOISE_GATE, 1),
};
static const struct snd_kcontrol_new wm8962_spk_mono_controls[] = {
--
2.4.5
next prev parent reply other threads:[~2015-10-06 7:08 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-10-06 7:06 [PATCH 0/2] *** wm8962 regmap related fix *** Jiada Wang
2015-10-06 7:06 ` [PATCH 1/2] ASoC: WM8962: mark cache_dirty flag after software reset in pm_resume Jiada Wang
2015-10-06 10:59 ` Mark Brown
2015-10-08 1:34 ` Jiada Wang
2015-10-06 7:06 ` Jiada Wang [this message]
2015-10-06 11:01 ` [PATCH 2/2] ASoC: Codec: wm8962: declare ALC Coefficients as 4 separate registers Mark Brown
2015-10-08 3:11 ` Jiada Wang
2015-10-20 2:47 [PATCH v2 0/2] *** wm8962 regmap related fix *** Jiada Wang
2015-10-20 2:47 ` [PATCH 2/2] ASoC: Codec: wm8962: declare ALC Coefficients as 4 separate registers Jiada Wang
2015-10-20 8:59 ` Charles Keepax
2015-10-22 12:38 ` Mark Brown
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=1444115215-4388-3-git-send-email-jiada_wang@mentor.com \
--to=jiada_wang@mentor.com \
--cc=alsa-devel@alsa-project.org \
--cc=broonie@kernel.org \
--cc=lgirdwood@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=patches@opensource.wolfsonmicro.com \
--cc=perex@perex.cz \
--cc=tiwai@suse.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;
as well as URLs for NNTP newsgroup(s).