[alsa-devel] Found bugs in tlv320aic3x.c driver, how do I report them?

Rick Mann rmann at latencyzero.com
Wed Sep 30 03:27:33 CEST 2015


Against what repo/branch should I submit this patch? broonie/sound/asoc-v4.3-rc2?

> On Sep 29, 2015, at 11:47 , Benoît Thébaudeau <benoit.thebaudeau.dev at gmail.com> wrote:
> 
> Dear Rick Mann,
> 
> On Tue, Sep 29, 2015 at 12:38 PM, Rick Mann <rmann at latencyzero.com> wrote:
>> 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.
> 
> Follow this:
> https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/tree/Documentation/SubmittingPatches?id=refs/tags/v4.3-rc3
> 
>> 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);
> 
> Nothing should be done for these registers on 3104, not even setting
> them to 0. The datasheet says "Do not write to this register.".
> 
>> +       } 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);
>> +       }
> 
> Correct.
> 
>> 
>>        switch (aic3x->model) {
>>        case AIC3X_MODEL_3X:
>> 
>> 
> 
> Best regards,
> Benoît
> _______________________________________________
> Alsa-devel mailing list
> Alsa-devel at alsa-project.org
> http://mailman.alsa-project.org/mailman/listinfo/alsa-devel


-- 
Rick Mann
rmann at latencyzero.com




More information about the Alsa-devel mailing list