ALT Linux kernel packages development
 help / color / mirror / Atom feed
* [d-kernel] [PATCH c10f2/c10f1 6.1.y] ASoC: codecs: ES8326: set ADC_SRC registers in es8326_init()
@ 2024-07-30 17:47 kovalev
  2024-08-02  9:09 ` Vitaly Chikunov
  0 siblings, 1 reply; 2+ messages in thread
From: kovalev @ 2024-07-30 17:47 UTC (permalink / raw)
  To: devel-kernel

From: Vasiliy Kovalev <kovalev@altlinux.org>

ES8326_ADC1_SRC and ES8326_ADC2_SRC registers is used to select analog
microphone and headset microphone.

Set the values in the registers similar to the hp remove event.
By default, the analog microphone does not work properly, but if you
connect and disconnect the headset, the specified ADC codec registers
are set to correct values.

Thanks to Aquarius developers for providing a working version of
the driver source code, which helped identify the problem in the
upstream driver during debugging and comparison.

The problem has been passed on to the driver developers, and soon a
more informative patch will appear in the upstream.

Signed-off-by: Vasiliy Kovalev <kovalev@altlinux.org>
---
 sound/soc/codecs/es8326.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/sound/soc/codecs/es8326.c b/sound/soc/codecs/es8326.c
index 873082dce133f..2ca4f213715c1 100644
--- a/sound/soc/codecs/es8326.c
+++ b/sound/soc/codecs/es8326.c
@@ -1068,6 +1068,8 @@ static void es8326_init(struct snd_soc_component *component)
 
 	regmap_write(es8326->regmap, ES8326_ADC_MUTE, 0x0f);
 	regmap_write(es8326->regmap, ES8326_CLK_DIV_LRCK, 0xff);
+	regmap_write(es8326->regmap, ES8326_ADC1_SRC, 0x44);
+	regmap_write(es8326->regmap, ES8326_ADC2_SRC, 0x66);
 	es8326_disable_micbias(es8326->component);
 
 	msleep(200);
-- 
2.33.8



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

* Re: [d-kernel] [PATCH c10f2/c10f1 6.1.y] ASoC: codecs: ES8326: set ADC_SRC registers in es8326_init()
  2024-07-30 17:47 [d-kernel] [PATCH c10f2/c10f1 6.1.y] ASoC: codecs: ES8326: set ADC_SRC registers in es8326_init() kovalev
@ 2024-08-02  9:09 ` Vitaly Chikunov
  0 siblings, 0 replies; 2+ messages in thread
From: Vitaly Chikunov @ 2024-08-02  9:09 UTC (permalink / raw)
  To: ALT Linux kernel packages development

On Tue, Jul 30, 2024 at 08:47:58PM +0300, kovalev@altlinux.org wrote:
> From: Vasiliy Kovalev <kovalev@altlinux.org>
> 
> ES8326_ADC1_SRC and ES8326_ADC2_SRC registers is used to select analog
> microphone and headset microphone.
> 
> Set the values in the registers similar to the hp remove event.
> By default, the analog microphone does not work properly, but if you
> connect and disconnect the headset, the specified ADC codec registers
> are set to correct values.
> 
> Thanks to Aquarius developers for providing a working version of
> the driver source code, which helped identify the problem in the
> upstream driver during debugging and comparison.
> 
> The problem has been passed on to the driver developers, and soon a
> more informative patch will appear in the upstream.
> 
> Signed-off-by: Vasiliy Kovalev <kovalev@altlinux.org>

Applied, thanks

> ---
>  sound/soc/codecs/es8326.c | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/sound/soc/codecs/es8326.c b/sound/soc/codecs/es8326.c
> index 873082dce133f..2ca4f213715c1 100644
> --- a/sound/soc/codecs/es8326.c
> +++ b/sound/soc/codecs/es8326.c
> @@ -1068,6 +1068,8 @@ static void es8326_init(struct snd_soc_component *component)
>  
>  	regmap_write(es8326->regmap, ES8326_ADC_MUTE, 0x0f);
>  	regmap_write(es8326->regmap, ES8326_CLK_DIV_LRCK, 0xff);
> +	regmap_write(es8326->regmap, ES8326_ADC1_SRC, 0x44);
> +	regmap_write(es8326->regmap, ES8326_ADC2_SRC, 0x66);
>  	es8326_disable_micbias(es8326->component);
>  
>  	msleep(200);
> -- 
> 2.33.8
> 
> _______________________________________________
> devel-kernel mailing list
> devel-kernel@lists.altlinux.org
> https://lists.altlinux.org/mailman/listinfo/devel-kernel


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

end of thread, other threads:[~2024-08-02  9:09 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-07-30 17:47 [d-kernel] [PATCH c10f2/c10f1 6.1.y] ASoC: codecs: ES8326: set ADC_SRC registers in es8326_init() kovalev
2024-08-02  9:09 ` Vitaly Chikunov

ALT Linux kernel packages development

This inbox may be cloned and mirrored by anyone:

	git clone --mirror http://lore.altlinux.org/devel-kernel/0 devel-kernel/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 devel-kernel devel-kernel/ http://lore.altlinux.org/devel-kernel \
		devel-kernel@altlinux.org devel-kernel@altlinux.ru devel-kernel@altlinux.com
	public-inbox-index devel-kernel

Example config snippet for mirrors.
Newsgroup available over NNTP:
	nntp://lore.altlinux.org/org.altlinux.lists.devel-kernel


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git