Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1236853 > unrolled thread

[PATCH] Prevent writing reserved registers on tlv320aic3104 CODECs

Started byRick Mann <rmann@latencyzero.com>
First post2015-10-01 01:30 +0200
Last post2015-10-01 12:20 +0200
Articles 2 — 2 participants

Back to article view | Back to linux.kernel


Contents

  [PATCH] Prevent writing reserved registers on tlv320aic3104 CODECs Rick Mann <rmann@latencyzero.com> - 2015-10-01 01:30 +0200
    Re: [PATCH] Prevent writing reserved registers on tlv320aic3104  CODECs Mark Brown <broonie@kernel.org> - 2015-10-01 12:20 +0200

#1236853 — [PATCH] Prevent writing reserved registers on tlv320aic3104 CODECs

FromRick Mann <rmann@latencyzero.com>
Date2015-10-01 01:30 +0200
Subject[PATCH] Prevent writing reserved registers on tlv320aic3104 CODECs
Message-ID<qeyYW-2TK-1@gated-at.bofh.it>
The current code writes a set of registers that are reserved on the tlc320aic3104. The change skips those registers for that IC.

Signed-off-by: Rick Mann <rmann@latencyzero.com>
---
 sound/soc/codecs/tlv320aic3x.c | 19 +++++++++++--------
 1 file changed, 11 insertions(+), 8 deletions(-)

diff --git a/sound/soc/codecs/tlv320aic3x.c b/sound/soc/codecs/tlv320aic3x.c
index f1c9fffcd3a6..8d893e94e78d 100644
--- a/sound/soc/codecs/tlv320aic3x.c
+++ b/sound/soc/codecs/tlv320aic3x.c
@@ -1531,14 +1531,17 @@ static int aic3x_init(struct snd_soc_codec *codec)
 	snd_soc_write(codec, PGAL_2_LLOPM_VOL, DEFAULT_VOL);
 	snd_soc_write(codec, PGAR_2_RLOPM_VOL, DEFAULT_VOL);
 
-	/* Line2 to HP Bypass default volume, disconnect from Output Mixer */
-	snd_soc_write(codec, LINE2L_2_HPLOUT_VOL, DEFAULT_VOL);
-	snd_soc_write(codec, LINE2R_2_HPROUT_VOL, DEFAULT_VOL);
-	snd_soc_write(codec, LINE2L_2_HPLCOM_VOL, DEFAULT_VOL);
-	snd_soc_write(codec, LINE2R_2_HPRCOM_VOL, DEFAULT_VOL);
-	/* Line2 Line Out default volume, disconnect from Output Mixer */
-	snd_soc_write(codec, LINE2L_2_LLOPM_VOL, DEFAULT_VOL);
-	snd_soc_write(codec, LINE2R_2_RLOPM_VOL, DEFAULT_VOL);
+	/* On tlv320aic3104, these registers are reserved and must not be written */
+	if (aic3x->model != AIC3X_MODEL_3104) {
+		/* Line2 to HP Bypass default volume, disconnect from Output Mixer */
+		snd_soc_write(codec, LINE2L_2_HPLOUT_VOL, DEFAULT_VOL);
+		snd_soc_write(codec, LINE2R_2_HPROUT_VOL, DEFAULT_VOL);
+		snd_soc_write(codec, LINE2L_2_HPLCOM_VOL, DEFAULT_VOL);
+		snd_soc_write(codec, LINE2R_2_HPRCOM_VOL, DEFAULT_VOL);
+		/* Line2 Line Out default volume, disconnect from Output Mixer */
+		snd_soc_write(codec, LINE2L_2_LLOPM_VOL, DEFAULT_VOL);
+		snd_soc_write(codec, LINE2R_2_RLOPM_VOL, DEFAULT_VOL);
+	}
 
 	switch (aic3x->model) {
 	case AIC3X_MODEL_3X:
-- 
1.9.1

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [next] | [standalone]


#1237247 — Re: [PATCH] Prevent writing reserved registers on tlv320aic3104 CODECs

FromMark Brown <broonie@kernel.org>
Date2015-10-01 12:20 +0200
SubjectRe: [PATCH] Prevent writing reserved registers on tlv320aic3104 CODECs
Message-ID<qeJ7X-13Z-1@gated-at.bofh.it>
In reply to#1236853

[Multipart message — attachments visible in raw view] — view raw

On Wed, Sep 30, 2015 at 04:24:53PM -0700, Rick Mann wrote:
> The current code writes a set of registers that are reserved on the tlc320aic3104. The change skips those registers for that IC.

I'll apply this but please keep your commit logs wrapped at
considerably less than 80 columns and use subject lines reflecting the
style for the subsystem - see SubmittingPatches for details.

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web