Message ID | 1443190887-18080-1-git-send-email-gianlucarenzi@eurekelettronica.it (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
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.
diff -up a/sound/soc/codecs/sgtl5000.c b/sound/soc/codecs/sgtl5000.c --- a/sound/soc/codecs/sgtl5000.c 2015-09-25 15:24:10.597051191 +0200 +++ b/sound/soc/codecs/sgtl5000.c 2015-09-25 15:24:21.000000000 +0200 @@ -1377,7 +1377,7 @@ static int sgtl5000_probe(struct snd_soc 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); /* * disable DAP * TODO: @@ -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"); } } else { sgtl5000->micbias_voltage = 0;
Cc: Liam Girdwood <lgirdwood@gmail.com> Cc: Takashi Iwai <tiwai@suse.com> Cc: Fabio Estevam <fabio.estevam@freescale.com> Cc: alsa-devel@alsa-project.org Cc: linux-kernel@vger.kernel.org Signed-off-by: Gianluca Renzi <gianlucarenzi@eurekelettronica.it> --- sound/soc/codecs/sgtl5000.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)