Hi. I came across some bugs in sound/soc/codecs/tlv320aic3x.c, wherein it writes non-zero values to reserved registers on the tlv320aic3104 (I found it in 4.1.4, but it's still in 4.3-rc3). I have an untested proposed patch. But I don't know anything about how to report it or offer it.
What should I do? Thanks.
For reference:
$ git diff -- sound/soc/codecs/tlv320aic3x.c diff --git a/sound/soc/codecs/tlv320aic3x.c b/sound/soc/codecs/tlv320aic3x.c index 51c4713..79c0ca0 100644 --- a/sound/soc/codecs/tlv320aic3x.c +++ b/sound/soc/codecs/tlv320aic3x.c @@ -1509,14 +1509,24 @@ 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); + if (aic3x->model == AIC3X_MODEL_3104) { + /* On tlv320aic3014, these registers are reserved and must be written 0 */ + snd_soc_write(codec, LINE2L_2_HPLOUT_VOL, 0); + snd_soc_write(codec, LINE2R_2_HPROUT_VOL, 0); + snd_soc_write(codec, LINE2L_2_HPLCOM_VOL, 0); + snd_soc_write(codec, LINE2R_2_HPRCOM_VOL, 0); + snd_soc_write(codec, LINE2L_2_LLOPM_VOL, 0); + snd_soc_write(codec, LINE2R_2_RLOPM_VOL, 0); + } else { + /* 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: