All of lore.kernel.org
 help / color / mirror / Atom feed
From: Rick Mann <rmann@latencyzero.com>
To: alsa-devel@alsa-project.org
Subject: Found bugs in tlv320aic3x.c driver, how do I report them?
Date: Tue, 29 Sep 2015 03:38:02 -0700	[thread overview]
Message-ID: <B9E728AE-223C-4BA7-961A-ED107AF03407@latencyzero.com> (raw)

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:


-- 
Rick Mann
rmann@latencyzero.com

             reply	other threads:[~2015-09-29 10:38 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-09-29 10:38 Rick Mann [this message]
2015-09-29 18:47 ` Found bugs in tlv320aic3x.c driver, how do I report them? Benoît Thébaudeau
2015-09-29 19:21   ` Rick Mann
2015-09-29 19:31     ` Benoît Thébaudeau
2015-09-30  1:27   ` Rick Mann
2015-09-30 18:55     ` Benoît Thébaudeau

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=B9E728AE-223C-4BA7-961A-ED107AF03407@latencyzero.com \
    --to=rmann@latencyzero.com \
    --cc=alsa-devel@alsa-project.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.