Skip to contentSkip to conversation

ASoC: es8323: power and mixer controls cleanup and revision

PATCH In review Shimrra Shai 2 participants 5 messages Aug 15, 2025 – Aug 19, 2025

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

cover ASoC: es8323: power and mixer controls cleanup and revision

This is a revision of a previous patch submission of mine wherein one part was accepted and one part was not. It was originally phrased for a particular device using the ES8323 CODEC, and I was advised to make the mixer controls user-selectable so it was not tied to the needs of any specific device. This submission brings the DAC and mixer controls for basic audio playback on this CODEC into line with the DAPM infrastructure and enables their operation through the standard mixer interface.

Shimrra Shai (3):
ASoC: es8323: remove DAC enablement write from es8323_probe
ASoC: es8323: add proper left/right mixer controls via DAPM
ASoC: es8323: enable DAPM power widgets for playback DAC

 sound/soc/codecs/es8323.c | 17 ++++++++---------
 1 file changed, 8 insertions(+), 9 deletions(-)
Signature · 1 line
2.48.1
#1 lore raw

PATCH 1/3 ASoC: es8323: remove DAC enablement write from es8323_probe

Remove initialization of the DAC and mixer enablement bits from the es8323_probe routine. This really should be handled by the DAPM subsystem.

---
 sound/soc/codecs/es8323.c | 1 -
 1 file changed, 1 deletion(-)
sound/soc/codecs/es8323.c +0 -1
index a98229981..194720e4d 100644
@@ -632,7 +632,6 @@ static int es8323_probe(struct snd_soc_component *component)
 
 	snd_soc_component_write(component, ES8323_CONTROL2, 0x60);
 	snd_soc_component_write(component, ES8323_CHIPPOWER, 0x00);
-	snd_soc_component_write(component, ES8323_DACCONTROL17, 0xB8);
 
 	return 0;
 }
Signature · 1 line
2.48.1
#2 lore raw

PATCH 2/3 ASoC: es8323: add proper left/right mixer controls via DAPM

In reply to Shimrra Shai

Add proper DAC and mixer controls to DAPM; no initialization in es8323_probe.

---
 sound/soc/codecs/es8323.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
sound/soc/codecs/es8323.c +2 -2
index 194720e4d..79f1fa967 100644
@@ -182,13 +182,13 @@ static const struct snd_kcontrol_new es8323_mono_adc_mux_controls =
 
 /* Left Mixer */
 static const struct snd_kcontrol_new es8323_left_mixer_controls[] = {
-	SOC_DAPM_SINGLE("Left Playback Switch", SND_SOC_NOPM, 7, 1, 1),
+	SOC_DAPM_SINGLE("Left Playback Switch", ES8323_DACCONTROL17, 7, 1, 0),
 	SOC_DAPM_SINGLE("Left Bypass Switch", ES8323_DACCONTROL17, 6, 1, 0),
 };
 
 /* Right Mixer */
 static const struct snd_kcontrol_new es8323_right_mixer_controls[] = {
-	SOC_DAPM_SINGLE("Right Playback Switch", SND_SOC_NOPM, 6, 1, 1),
+	SOC_DAPM_SINGLE("Right Playback Switch", ES8323_DACCONTROL20, 7, 1, 0),
 	SOC_DAPM_SINGLE("Right Bypass Switch", ES8323_DACCONTROL20, 6, 1, 0),
 };
 
Signature · 1 line
2.48.1
#3 lore raw

PATCH 3/3 ASoC: es8323: enable DAPM power widgets for playback DAC

In reply to Shimrra Shai

This part might not be needed for resubmission as it was already accepted on the previous submission of this patch, but since the whole series was not accepted due to that I had retained and expanded the initialization in the probe routine I'm not sure if I should submit it again.

---
 sound/soc/codecs/es8323.c | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)
sound/soc/codecs/es8323.c +6 -6
index 79f1fa967..eb85b71e8 100644
@@ -211,8 +211,8 @@ static const struct snd_soc_dapm_widget es8323_dapm_widgets[] = {
 
 	SND_SOC_DAPM_ADC("Right ADC", "Right Capture", SND_SOC_NOPM, 4, 1),
 	SND_SOC_DAPM_ADC("Left ADC", "Left Capture", SND_SOC_NOPM, 5, 1),
-	SND_SOC_DAPM_DAC("Right DAC", "Right Playback", SND_SOC_NOPM, 6, 1),
-	SND_SOC_DAPM_DAC("Left DAC", "Left Playback", SND_SOC_NOPM, 7, 1),
+	SND_SOC_DAPM_DAC("Right DAC", "Right Playback", ES8323_DACPOWER, 6, 1),
+	SND_SOC_DAPM_DAC("Left DAC", "Left Playback", ES8323_DACPOWER, 7, 1),
 
 	SND_SOC_DAPM_MIXER("Left Mixer", SND_SOC_NOPM, 0, 0,
 			   &es8323_left_mixer_controls[0],
@@ -223,10 +223,10 @@ static const struct snd_soc_dapm_widget es8323_dapm_widgets[] = {
 
 	SND_SOC_DAPM_PGA("Right ADC Power", SND_SOC_NOPM, 6, 1, NULL, 0),
 	SND_SOC_DAPM_PGA("Left ADC Power", SND_SOC_NOPM, 7, 1, NULL, 0),
-	SND_SOC_DAPM_PGA("Right Out 2", SND_SOC_NOPM, 2, 0, NULL, 0),
-	SND_SOC_DAPM_PGA("Left Out 2", SND_SOC_NOPM, 3, 0, NULL, 0),
-	SND_SOC_DAPM_PGA("Right Out 1", SND_SOC_NOPM, 4, 0, NULL, 0),
-	SND_SOC_DAPM_PGA("Left Out 1", SND_SOC_NOPM, 5, 0, NULL, 0),
+	SND_SOC_DAPM_PGA("Right Out 2", ES8323_DACPOWER, 2, 0, NULL, 0),
+	SND_SOC_DAPM_PGA("Left Out 2", ES8323_DACPOWER, 3, 0, NULL, 0),
+	SND_SOC_DAPM_PGA("Right Out 1", ES8323_DACPOWER, 4, 0, NULL, 0),
+	SND_SOC_DAPM_PGA("Left Out 1", ES8323_DACPOWER, 5, 0, NULL, 0),
 	SND_SOC_DAPM_PGA("LAMP", ES8323_ADCCONTROL1, 4, 0, NULL, 0),
 	SND_SOC_DAPM_PGA("RAMP", ES8323_ADCCONTROL1, 0, 0, NULL, 0),
 
Signature · 1 line
2.48.1
maintainer
#4 lore raw
In reply to Shimrra Shai
Quoted 10 lines · Shimrra Shai

This is a revision of a previous patch submission of mine wherein one part was accepted and one part was not. It was originally phrased for a particular device using the ES8323 CODEC, and I was advised to make the mixer controls user-selectable so it was not tied to the needs of any specific device. This submission brings the DAC and mixer controls for basic audio playback on this CODEC into line with the DAPM infrastructure and enables their operation through the standard mixer interface.

[...]

Applied to

https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-next

Thanks!

[1/3] ASoC: es8323: remove DAC enablement write from es8323_probe

      commit: 33bc29123d26f7caa7d11f139e153e39104afc6c
[2/3] ASoC: es8323: add proper left/right mixer controls via DAPM
      commit: 7e39ca4056d11fef6b90aedd9eeeb3e070d3ce9f

[3/3] ASoC: es8323: enable DAPM power widgets for playback DAC
(no commit info)

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