linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v5.3] ASoC: sgtl5000: add ADC mute control
@ 2019-10-16  9:13 Richard Leitner
  2019-10-16 21:16 ` Greg KH
  0 siblings, 1 reply; 2+ messages in thread
From: Richard Leitner @ 2019-10-16  9:13 UTC (permalink / raw)
  To: stable
  Cc: festevam, lgirdwood, broonie, perex, tiwai, alsa-devel,
	linux-kernel, Oleksandr Suvorov, Marcel Ziswiler, Igor Opaniuk,
	Richard Leitner

From: Oleksandr Suvorov <oleksandr.suvorov@toradex.com>

Upstream commit 631bc8f0134a ("ASoC: sgtl5000: Fix of unmute outputs on
probe"), which is e9f621efaebd in v5.3 replaced snd_soc_component_write
with snd_soc_component_update_bits and therefore no longer cleared the
MUTE_ADC flag. This caused the ADC to stay muted and recording doesn't
work any longer. This patch fixes this problem by adding a Switch control
for MUTE_ADC.

commit 694b14554d75 ("ASoC: sgtl5000: add ADC mute control") upstream

This control mute/unmute the ADC input of SGTL5000
using its CHIP_ANA_CTRL register.

Signed-off-by: Oleksandr Suvorov <oleksandr.suvorov@toradex.com>
Reviewed-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
Reviewed-by: Igor Opaniuk <igor.opaniuk@toradex.com>
Reviewed-by: Fabio Estevam <festevam@gmail.com>
Link: https://lore.kernel.org/r/20190719100524.23300-5-oleksandr.suvorov@toradex.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Richard Leitner <richard.leitner@skidata.com>
Fixes: e9f621efaebd ("ASoC: sgtl5000: Fix of unmute outputs on probe")
---
 sound/soc/codecs/sgtl5000.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/sound/soc/codecs/sgtl5000.c b/sound/soc/codecs/sgtl5000.c
index 3f28e7862b5b..b65232521ea8 100644
--- a/sound/soc/codecs/sgtl5000.c
+++ b/sound/soc/codecs/sgtl5000.c
@@ -720,6 +720,7 @@ static const struct snd_kcontrol_new sgtl5000_snd_controls[] = {
 			SGTL5000_CHIP_ANA_ADC_CTRL,
 			8, 1, 0, capture_6db_attenuate),
 	SOC_SINGLE("Capture ZC Switch", SGTL5000_CHIP_ANA_CTRL, 1, 1, 0),
+	SOC_SINGLE("Capture Switch", SGTL5000_CHIP_ANA_CTRL, 0, 1, 1),
 
 	SOC_DOUBLE_TLV("Headphone Playback Volume",
 			SGTL5000_CHIP_ANA_HP_CTRL,
-- 
2.21.0


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH v5.3] ASoC: sgtl5000: add ADC mute control
  2019-10-16  9:13 [PATCH v5.3] ASoC: sgtl5000: add ADC mute control Richard Leitner
@ 2019-10-16 21:16 ` Greg KH
  0 siblings, 0 replies; 2+ messages in thread
From: Greg KH @ 2019-10-16 21:16 UTC (permalink / raw)
  To: Richard Leitner
  Cc: stable, festevam, lgirdwood, broonie, perex, tiwai, alsa-devel,
	linux-kernel, Oleksandr Suvorov, Marcel Ziswiler, Igor Opaniuk

On Wed, Oct 16, 2019 at 11:13:04AM +0200, Richard Leitner wrote:
> From: Oleksandr Suvorov <oleksandr.suvorov@toradex.com>
> 
> Upstream commit 631bc8f0134a ("ASoC: sgtl5000: Fix of unmute outputs on
> probe"), which is e9f621efaebd in v5.3 replaced snd_soc_component_write
> with snd_soc_component_update_bits and therefore no longer cleared the
> MUTE_ADC flag. This caused the ADC to stay muted and recording doesn't
> work any longer. This patch fixes this problem by adding a Switch control
> for MUTE_ADC.
> 
> commit 694b14554d75 ("ASoC: sgtl5000: add ADC mute control") upstream
> 
> This control mute/unmute the ADC input of SGTL5000
> using its CHIP_ANA_CTRL register.
> 
> Signed-off-by: Oleksandr Suvorov <oleksandr.suvorov@toradex.com>
> Reviewed-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
> Reviewed-by: Igor Opaniuk <igor.opaniuk@toradex.com>
> Reviewed-by: Fabio Estevam <festevam@gmail.com>
> Link: https://lore.kernel.org/r/20190719100524.23300-5-oleksandr.suvorov@toradex.com
> Signed-off-by: Mark Brown <broonie@kernel.org>
> Signed-off-by: Richard Leitner <richard.leitner@skidata.com>
> Fixes: e9f621efaebd ("ASoC: sgtl5000: Fix of unmute outputs on probe")
> ---
>  sound/soc/codecs/sgtl5000.c | 1 +
>  1 file changed, 1 insertion(+)

Now applied, thanks.

greg k-h

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2019-10-16 21:17 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-10-16  9:13 [PATCH v5.3] ASoC: sgtl5000: add ADC mute control Richard Leitner
2019-10-16 21:16 ` Greg KH

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).