Skip to contentSkip to conversation

SoC/Codecs/SGTL5000 - Non working MIC_BIAS Voltage settings

PATCH gianluca 4 participants 6 messages Jun 12, 2015 – Sep 30, 2015

Subsystems (4)
lore
Share & tools
lore

gianluca

author
#0 lore raw

Hello,
in attachment there is a small patch to ensure the correct register value for MIC BIAS Voltage.

Best regards

Signature · 4 lines
Eurek s.r.l.                          |
Electronic Engineering                | http://www.eurek.it
via Celletta 8/B, 40026 Imola, Italy  | Phone: +39-(0)542-609120
p.iva 00690621206 - c.f. 04020030377  | Fax:   +39-(0)542-609212
sound/soc/codecs/sgtl5000.c +2 -2
diff -Nru linux-4.0.5.orig/sound/soc/codecs/sgtl5000.c linux-4.0.5/sound/soc/codecs/sgtl5000.c
@@ -1339,8 +1339,8 @@
 			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:
author
#1 lore raw

Hello,
I didn't receive any feedback about this posting...

Quoted 3 lines · gianluca

Hello,
in attachment there is a small patch to ensure the correct register value for MIC BIAS Voltage.

sound/soc/codecs/sgtl5000.c +2 -2
diff -Nru linux-4.0.5.orig/sound/soc/codecs/sgtl5000.c linux-4.0.5/sound/soc/codecs/sgtl5000.c
@@ -1339,8 +1339,8 @@
 			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:
Signature · 4 lines
Eurek s.r.l.                          |
Electronic Engineering                | http://www.eurek.it
via Celletta 8/B, 40026 Imola, Italy  | Phone: +39-(0)542-609120
p.iva 00690621206 - c.f. 04020030377  | Fax:   +39-(0)542-609212
#2 lore raw

Hi Gianluca

Quoted 17 lines · gianluca

Hello,
I didn't receive any feedback about this posting...

Quoted 4 lines · gianluca

Hello,
in attachment there is a small patch to ensure the correct register value for MIC BIAS Voltage.

diff -Nru linux-4.0.5.orig/sound/soc/codecs/sgtl5000.c linux-4.0.5/sound/soc/codecs/sgtl5000.c
--- linux-4.0.5.orig/sound/soc/codecs/sgtl5000.c 2015-06-06
17:21:22.000000000 +0200
+++ linux-4.0.5/sound/soc/codecs/sgtl5000.c 2015-06-12
18:09:38.363381087 +0200

sound/soc/codecs/sgtl5000.c line 1346

Quoted 10 lines
sound/soc/codecs/sgtl5000.c +2 -2
@@ -1339,8 +1339,8 @@
                        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);
        /*

According to what I see look fine. Fabio will comment on it. You should adjust the subject like:
ASoC: sgtl5000: <description here>

Michael

Quoted 4 lines

* disable DAP
* TODO:

maintainer
#3 lore raw
In reply to gianluca

Hi Gianluca,

Quoted 2 lines · gianluca

Hello,
I didn't receive any feedback about this posting...

Thanks for your patch.

Please don't post patches as attachments. Better send them with 'git send-email'.
Documentation/SubmittingPatches has the information you need.

You also need to provide a commit log, proper Subject and your Signed-off-by.

Then Cc the maintainer: ./scripts/get_maintainer.pl <yourpatch> can help you listing the appropriate folks.

Regards,

Fabio Estevam

#4 lore raw

Hi

Quoted 8 lines · Fabio Estevam

Hi Gianluca,

Quoted 2 lines · gianluca

Hello,
I didn't receive any feedback about this posting...

Quoted 7 lines

Thanks for your patch.

Please don't post patches as attachments. Better send them with 'git send-email'.
Documentation/SubmittingPatches has the information you need.

You also need to provide a commit log, proper Subject and your

Signed-off-by.

Quoted 4 lines

Then Cc the maintainer: ./scripts/get_maintainer.pl <yourpatch> can help you listing the appropriate folks.

Already inform him about rule ;)

He should send up a new one

Michael

Quoted 7 lines

Regards,

Fabio Estevam
_______________________________________________
Alsa-devel mailing list
[email protected]
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel

maintainer
#5 lore raw

Applied "ASoC: sgtl5000: fix wrong register MIC_BIAS_VOLTAGE setup on probe" to the asoc tree

In reply to gianluca

The patch

ASoC: sgtl5000: fix wrong register MIC_BIAS_VOLTAGE setup on probe

has been applied to the asoc tree at

git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git

All being well this means that it will be integrated into the linux-next tree (usually sometime in the next 24 hours) and sent to Linus during the next merge window (or sooner if it is a bug fix), however if problems are discovered then the patch may be dropped or reverted.

You may get further e-mails resulting from automated or manual testing and review of the tree, please engage with people reporting problems and send followup patches addressing any issues that are reported if needed.

If any updates are required or you are submitting further changes they should be sent as incremental updates against current git, existing patches will not be replaced.

Please add any relevant lists and maintainers to the CCs when replying to this mail.

Thanks,
Mark

Quoted 1 line

From e256da84a04ea31c3c215997c847609af224e8f4 Mon Sep 17 00:00:00 2001

From: Gianluca Renzi <[email protected]>
Date: Fri, 25 Sep 2015 21:33:41 +0200
Subject: [PATCH] ASoC: sgtl5000: fix wrong register MIC_BIAS_VOLTAGE setup on
probe

---
 sound/soc/codecs/sgtl5000.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
sound/soc/codecs/sgtl5000.c +2 -2
index 6e7843e..f540f82 100644
@@ -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:
Signature · 1 line
2.5.0