Prevent writing reserved registers on tlv320aic3104 CODECs
Subsystems (3)
PATCH 1/1 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.
--- sound/soc/codecs/tlv320aic3x.c | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-)
sound/soc/codecs/tlv320aic3x.c +11 -8
@@ -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 :
Signature · 1 line
1.9.1
Mark Brown
maintainerQuoted 1 line · Rick Mann
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.
Mark Brown
maintainerApplied "ASoC: tlv320aic3x: Prevent writing reserved registers on tlv320aic3104 CODECs" to the asoc tree
In reply to Rick MannThe patch
ASoC: tlv320aic3x: Prevent writing reserved registers on tlv320aic3104 CODECs
has been applied to the asoc tree at
git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git
All being well this means that it will be integrated into the linux-next tree (usually sometime in the next 24 hours) and sent to Linus during the next merge window (or sooner if it is a bug fix), however if problems are discovered then the patch may be dropped or reverted.
You may get further e-mails resulting from automated or manual testing and review of the tree, please engage with people reporting problems and send followup patches addressing any issues that are reported if needed.
If any updates are required or you are submitting further changes they should be sent as incremental updates against current git, existing patches will not be replaced.
Please add any relevant lists and maintainers to the CCs when replying to this mail.
Thanks,
Mark
Quoted 1 line
From
2d1180e36905bf92892e265c662e5e597be01505Mon Sep 17 00:00:00 2001
From: Rick Mann <[email protected]>
Date: Wed, 30 Sep 2015 16:24:53 -0700
Subject: [PATCH] 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.
--- sound/soc/codecs/tlv320aic3x.c | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-)
sound/soc/codecs/tlv320aic3x.c +11 -8
@@ -1509,14 +1509,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 :
Signature · 1 line
2.5.0