All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Cormier, Jonathan" <jcormier@criticallink.com>
To: Liam Girdwood <lgirdwood@gmail.com>
Cc: Bob Duke <bduke@criticallink.com>,
	Mike Williamson <michael.williamson@criticallink.com>,
	Greg Gluszek <greg.gluszek@criticallink.com>,
	Mark Brown <broonie@linaro.org>, Jaroslav Kysela <perex@perex.cz>,
	Takashi Iwai <tiwai@suse.com>,
	Peter Ujfalusi <peter.ujfalusi@ti.com>,
	Jyri Sarha <jsarha@ti.com>,
	Misael Lopez Cruz <misael.lopez@ti.com>,
	alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org,
	"Cormier, Jonathan" <jcormier@criticallink.com>
Subject: [PATCH  V1 4/6] ASoC: tlv320aic26: Fix regmap by setting reg_defaults and reg_stride
Date: Fri, 25 Sep 2015 14:30:07 -0400	[thread overview]
Message-ID: <1443205809-27549-5-git-send-email-jcormier@criticallink.com> (raw)
In-Reply-To: <1443205809-27549-1-git-send-email-jcormier@criticallink.com>

tlv320aic26 codec wasn't being setup correctly on bootup due to misconfigured regmap cache.

Fixes: b7e9f3973279 "ASoC: tlv320aic26: Convert to direct regmap API usage"
Signed-off-by: Cormier, Jonathan <jcormier@criticallink.com>
---
 sound/soc/codecs/tlv320aic26.c | 28 ++++++++++++++++++++++++++++
 1 file changed, 28 insertions(+)

diff --git a/sound/soc/codecs/tlv320aic26.c b/sound/soc/codecs/tlv320aic26.c
index bf3a9ec40e1e..8355f379d45d 100644
--- a/sound/soc/codecs/tlv320aic26.c
+++ b/sound/soc/codecs/tlv320aic26.c
@@ -41,6 +41,27 @@ struct aic26 {
 	int keyclick_len;
 };
 
+static const struct reg_default aic26_reg[] = {
+	/* Page 0 */
+	{ 0x00A0, 0x0000 }, { 0x00C0, 0x0000 }, { 0x00E0, 0x0000 },
+	{ 0x0120, 0x0000 }, { 0x0140, 0x0000 },
+	/* Page 1 */
+	{ 0x0800, 0x0000 }, { 0x0820, 0x8000 }, { 0x0860, 0x0002 },
+	{ 0x0880, 0xFFFF },
+	/* Page 2 */
+	{ 0x1000, 0x0000 }, { 0x1020, 0x8000 }, { 0x1040, 0xFFFF },
+	{ 0x1060, 0xC580 }, { 0x1080, 0x4410 }, { 0x10A0, 0xAFC0 },
+	{ 0x10C0, 0x0000 }, { 0x10E0,  27619 }, { 0x1100, -27034 },
+	{ 0x1120,  26461 }, { 0x1140,  27619 }, { 0x1160, -27034 },
+	{ 0x1180,  26461 }, { 0x11A0,  32131 }, { 0x11C0, -31506 },
+	{ 0x11E0,  32131 }, { 0x1200, -31506 }, { 0x1220,  27619 },
+	{ 0x1240, -27034 }, { 0x1260,  26461 }, { 0x1280,  27619 },
+	{ 0x12A0, -27034 }, { 0x12C0,  26461 }, { 0x12E0,  32131 },
+	{ 0x1300, -31506 }, { 0x1320,  32131 }, { 0x1340, -31506 },
+	{ 0x1360, 0x1004 }, { 0x1380, 0x0000 }, { 0x13A0, 0x0000 },
+	{ 0x13C0, 0xFE00 },
+};
+
 static const struct snd_soc_dapm_widget tlv320aic26_dapm_widgets[] = {
 SND_SOC_DAPM_INPUT("MICIN"),
 SND_SOC_DAPM_INPUT("AUX"),
@@ -332,6 +353,13 @@ static struct snd_soc_codec_driver aic26_soc_codec_dev = {
 static const struct regmap_config aic26_regmap = {
 	.reg_bits = 16,
 	.val_bits = 16,
+	/* AIC26_PAGE_ADDR(0, 0x01) */
+	.reg_stride = 0x20,
+
+	.max_register = AIC26_REG_AUDIO_CTRL5,
+	.reg_defaults = aic26_reg,
+	.num_reg_defaults = ARRAY_SIZE(aic26_reg),
+	.cache_type = REGCACHE_RBTREE,
 };
 
 /* ---------------------------------------------------------------------
-- 
1.9.1


  parent reply	other threads:[~2015-09-25 18:31 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-09-18 20:11 [PATCH RFC 0/7] ASoC: tlv320aic26: Add device tree support and bug fixes Cormier, Jonathan
2015-09-18 20:11 ` [PATCH RFC 1/7] ASoC: tlv320aic26: Add device tree binding Cormier, Jonathan
2015-09-21  8:38   ` [alsa-devel] " Peter Ujfalusi
2015-09-21  8:38     ` Peter Ujfalusi
2015-09-21 13:01     ` Jon Cormier
2015-09-18 20:11 ` [PATCH RFC 2/7] ASoC: tlv320aic26: Fix module autoload Cormier, Jonathan
2015-09-18 20:11   ` Cormier, Jonathan
2015-09-18 20:11 ` [PATCH RFC 3/7] ASoC: tlv320aic26: Make SND_SOC_TLV320AIC26 user-visible Cormier, Jonathan
2015-09-18 20:11 ` [PATCH RFC 4/7] ASoC: tlv320aic26: Fix regmap by setting reg_defaults and reg_stride Cormier, Jonathan
2015-09-18 20:11 ` [PATCH RFC 5/7] ASoC: tlv320aic26: hw_params was unintentionally clearing AIC26 master mode Cormier, Jonathan
2015-09-18 20:11 ` [PATCH RFC 6/7] ASoC: tlv320aic26: Add support for DSP_B data format Cormier, Jonathan
2015-09-21  6:19   ` Peter Ujfalusi
2015-09-21  6:19     ` Peter Ujfalusi
2015-09-21 13:05     ` Jon Cormier
2015-09-18 20:11 ` [PATCH RFC 7/7] ASoC: tlv320aic26: Change Capture Mute to Capture Switch to match alsa documentation Cormier, Jonathan
2015-09-25 18:30 ` [PATCH V1 0/6] ASoC: tlv320aic26: Add device tree support and bug fixes Cormier, Jonathan
2015-09-25 18:30   ` [PATCH V1 1/6] ASoC: tlv320aic26: Add device tree binding Cormier, Jonathan
2015-09-25 18:30   ` [PATCH V1 2/6] ASoC: tlv320aic26: Fix module autoload Cormier, Jonathan
2015-09-25 18:30     ` Cormier, Jonathan
2015-09-25 18:30   ` [PATCH V1 3/6] ASoC: tlv320aic26: Make SND_SOC_TLV320AIC26 user-visible Cormier, Jonathan
2015-09-25 18:30   ` Cormier, Jonathan [this message]
2015-09-25 18:30   ` [PATCH V1 5/6] ASoC: tlv320aic26: hw_params was unintentionally clearing AIC26 master mode Cormier, Jonathan
2015-09-25 18:30   ` [PATCH V1 6/6] ASoC: tlv320aic26: Change Capture Mute to Capture Switch to match alsa documentation Cormier, Jonathan
2015-09-30 10:43   ` [PATCH V1 0/6] ASoC: tlv320aic26: Add device tree support and bug fixes Peter Ujfalusi
2015-09-30 10:43     ` Peter Ujfalusi

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=1443205809-27549-5-git-send-email-jcormier@criticallink.com \
    --to=jcormier@criticallink.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=bduke@criticallink.com \
    --cc=broonie@linaro.org \
    --cc=greg.gluszek@criticallink.com \
    --cc=jsarha@ti.com \
    --cc=lgirdwood@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=michael.williamson@criticallink.com \
    --cc=misael.lopez@ti.com \
    --cc=perex@perex.cz \
    --cc=peter.ujfalusi@ti.com \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.