Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 2d1180e3 authored by Rick Mann's avatar Rick Mann Committed by Mark Brown
Browse files

ASoC: tlv320aic3x: Prevent writing reserved registers on tlv320aic3104 CODECs



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: default avatarRick Mann <rmann@latencyzero.com>
Signed-off-by: default avatarMark Brown <broonie@kernel.org>
parent 6ff33f39
Loading
Loading
Loading
Loading
+11 −8
Original line number Diff line number Diff line
@@ -1509,6 +1509,8 @@ 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);

	/* 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);
@@ -1517,6 +1519,7 @@ static int aic3x_init(struct snd_soc_codec *codec)
		/* 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: