lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CAOMZO5DzNzyeP2C10Wr-atonsUBzMO-esokAkcQnj6hUDMf_cA@mail.gmail.com>
Date:	Fri, 25 Sep 2015 14:03:53 -0300
From:	Fabio Estevam <festevam@...il.com>
To:	Mark Brown <broonie@...nel.org>
Cc:	Gianluca Renzi <gianlucarenzi@...ekelettronica.it>,
	Fabio Estevam <fabio.estevam@...escale.com>,
	linux-kernel <linux-kernel@...r.kernel.org>,
	"alsa-devel@...a-project.org" <alsa-devel@...a-project.org>,
	Liam Girdwood <lgirdwood@...il.com>,
	Takashi Iwai <tiwai@...e.com>
Subject: Re: [alsa-devel] [PATCH] ASoC: sgtl5000: fix bad register
 MIC_BIAS_VOLTAGE setup on probe

On Fri, Sep 25, 2015 at 1:50 PM, Mark Brown <broonie@...nel.org> wrote:
> On Fri, Sep 25, 2015 at 04:21:27PM +0200, Gianluca Renzi wrote:
>
>>       snd_soc_update_bits(codec, SGTL5000_CHIP_MIC_CTRL,
>>                       SGTL5000_BIAS_R_MASK,
>> -                     sgtl5000->micbias_voltage << SGTL5000_BIAS_R_SHIFT);
>> +                     sgtl5000->micbias_voltage << SGTL5000_BIAS_VOLT_SHIFT);
>
> That doesn't look right...  I would expect _BIAS_R_SHIFT to shift a
> value into the register masked off by _BIAS_R_MASK and therefore that
> the above is saying that the definition of one of those two macros is
> wrong.  I would not expect something called _BIAS_VOLT_SHIFT here.

Yes, the correct fix should be:

--- a/sound/soc/codecs/sgtl5000.c
+++ b/sound/soc/codecs/sgtl5000.c
@@ -1376,8 +1376,8 @@ static int sgtl5000_probe(struct snd_soc_codec *codec)
                        sgtl5000->micbias_resistor << SGTL5000_BIAS_R_SHIFT);

        snd_soc_update_bits(codec, SGTL5000_CHIP_MIC_CTRL,
-                       SGTL5000_BIAS_R_MASK,
-                       sgtl5000->micbias_voltage << SGTL5000_BIAS_R_SHIFT);
+                       SGTL5000_BIAS_VOLT_MASK,
+                       sgtl5000->micbias_voltage << SGTL5000_BIAS_VOLT_SHIFT);
        /*
         * disable DAP
         * TODO:

Gianluca,

Care to send a v2 of the patch?

Regards,

Fabio Estevam
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ