* Re: [PATCH] ASoC: sgtl5000: fix bad register MIC_BIAS_VOLTAGE setup on probe
[not found] <1443190887-18080-1-git-send-email-gianlucarenzi@eurekelettronica.it>
@ 2015-09-25 16:50 ` Mark Brown
2015-09-25 17:03 ` [alsa-devel] " Fabio Estevam
0 siblings, 1 reply; 2+ messages in thread
From: Mark Brown @ 2015-09-25 16:50 UTC (permalink / raw)
To: Gianluca Renzi
Cc: Liam Girdwood, Takashi Iwai, Fabio Estevam, alsa-devel, linux-kernel
[-- Attachment #1: Type: text/plain, Size: 888 bytes --]
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.
What's going on here?
> @@ -1549,7 +1549,7 @@ static int sgtl5000_i2c_probe(struct i2c
> else {
> sgtl5000->micbias_voltage = 0;
> dev_err(&client->dev,
> - "Unsuitable MicBias resistor\n");
> + "Unsuitable MicBias voltage\n");
> }
This looks like a reasonable but unrelated fix and should be in a
separate patch.
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 473 bytes --]
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [alsa-devel] [PATCH] ASoC: sgtl5000: fix bad register MIC_BIAS_VOLTAGE setup on probe
2015-09-25 16:50 ` [PATCH] ASoC: sgtl5000: fix bad register MIC_BIAS_VOLTAGE setup on probe Mark Brown
@ 2015-09-25 17:03 ` Fabio Estevam
0 siblings, 0 replies; 2+ messages in thread
From: Fabio Estevam @ 2015-09-25 17:03 UTC (permalink / raw)
To: Mark Brown
Cc: Gianluca Renzi, Fabio Estevam, linux-kernel, alsa-devel,
Liam Girdwood, Takashi Iwai
On Fri, Sep 25, 2015 at 1:50 PM, Mark Brown <broonie@kernel.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
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2015-09-25 17:03 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <1443190887-18080-1-git-send-email-gianlucarenzi@eurekelettronica.it>
2015-09-25 16:50 ` [PATCH] ASoC: sgtl5000: fix bad register MIC_BIAS_VOLTAGE setup on probe Mark Brown
2015-09-25 17:03 ` [alsa-devel] " Fabio Estevam
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®