[PATCH 1/4] ASoC: cs35l56: Remove SDW1 TX source controls and widgets

From: Richard Fitzgerald

Date: Fri Nov 20 2026 - 06:05:49 EST


Remove the ALSA controls and mux widgets for the SDW1 capture DAI.
Connect this DAI to a dummy siggen source like the OT25 DAI. This is to
allow DP3 to be used for its intended purpose as the SDCA companion amp
output.

The implementation of this DAI was incorrect. It provided a capture DAI
for the SoundWire DP3 port. But DP4 (OT25 DAI) is the port for feedback
to the host.

The DP3 port is used for SDCA companion amp (OT127) and the mixer source
registers are owned by the firmware. The driver should not be writing to
them.

Nothing has ever used these ALSA controls so they can safely be removed.
The incorrect use of DP3 as the feedback to the host has already been
fixed in these commits:

commit 86c8360c97f6 ("ASoC: cs35l56: Add DAI for SDCA OT25 stream")
commit 4b7f393a01f8 ("ASoC: sdw_utils: Switch CS35L56/57/62/63 to use
OT25 DAI")

Signed-off-by: Richard Fitzgerald <rf@xxxxxxxxxxxxxxxxxxxxx>
---
sound/soc/codecs/cs35l56-shared.c | 16 ----------
sound/soc/codecs/cs35l56.c | 51 ++-----------------------------
2 files changed, 2 insertions(+), 65 deletions(-)

diff --git a/sound/soc/codecs/cs35l56-shared.c b/sound/soc/codecs/cs35l56-shared.c
index 4d76f1777927..073f7bdd3b0d 100644
--- a/sound/soc/codecs/cs35l56-shared.c
+++ b/sound/soc/codecs/cs35l56-shared.c
@@ -49,14 +49,6 @@ int cs35l56_set_asp_defaults(struct cs35l56_base *cs35l56_base)
EXPORT_SYMBOL_NS_GPL(cs35l56_set_asp_defaults, "SND_SOC_CS35L56_SHARED");

static const struct reg_sequence cs35l56_patch[] = {
- /*
- * Firmware can change these to non-defaults to satisfy SDCA.
- * Ensure that they are at known defaults.
- */
- { CS35L56_SWIRE_DP3_CH1_INPUT, 0x00000018 },
- { CS35L56_SWIRE_DP3_CH2_INPUT, 0x00000019 },
- { CS35L56_SWIRE_DP3_CH3_INPUT, 0x00000029 },
- { CS35L56_SWIRE_DP3_CH4_INPUT, 0x00000028 },
{ CS35L56_IRQ1_MASK_18, 0x1f7df0ff },
};

@@ -105,10 +97,6 @@ int cs35l56_set_patch(struct cs35l56_base *cs35l56_base)
EXPORT_SYMBOL_NS_GPL(cs35l56_set_patch, "SND_SOC_CS35L56_SHARED");

static const struct reg_default cs35l56_reg_defaults[] = {
- { CS35L56_SWIRE_DP3_CH1_INPUT, 0x00000018 },
- { CS35L56_SWIRE_DP3_CH2_INPUT, 0x00000019 },
- { CS35L56_SWIRE_DP3_CH3_INPUT, 0x00000029 },
- { CS35L56_SWIRE_DP3_CH4_INPUT, 0x00000028 },
{ CS35L56_IRQ1_MASK_1, 0x83ffffff },
{ CS35L56_IRQ1_MASK_2, 0xffff7fff },
{ CS35L56_IRQ1_MASK_4, 0xe0ffffff },
@@ -121,10 +109,6 @@ static const struct reg_default cs35l56_reg_defaults[] = {
};

static const struct reg_default cs35l63_reg_defaults[] = {
- { CS35L56_SWIRE_DP3_CH1_INPUT, 0x00000018 },
- { CS35L56_SWIRE_DP3_CH2_INPUT, 0x00000019 },
- { CS35L56_SWIRE_DP3_CH3_INPUT, 0x00000029 },
- { CS35L56_SWIRE_DP3_CH4_INPUT, 0x00000028 },
{ CS35L56_IRQ1_MASK_1, 0x8003ffff },
{ CS35L56_IRQ1_MASK_2, 0xffff7fff },
{ CS35L56_IRQ1_MASK_4, 0xe0ffffff },
diff --git a/sound/soc/codecs/cs35l56.c b/sound/soc/codecs/cs35l56.c
index 30835dc56006..acb202559dff 100644
--- a/sound/soc/codecs/cs35l56.c
+++ b/sound/soc/codecs/cs35l56.c
@@ -267,42 +267,6 @@ static const struct snd_kcontrol_new asp1_tx4_mux =
SOC_DAPM_ENUM_EXT("ASP1TX4 SRC", cs35l56_asp1tx4_enum,
cs35l56_asp_tx_get, cs35l56_asp_tx_put);

-static SOC_VALUE_ENUM_SINGLE_DECL(cs35l56_sdw1tx1_enum,
- CS35L56_SWIRE_DP3_CH1_INPUT,
- 0, CS35L56_SWIRETXn_SRC_MASK,
- cs35l56_tx_input_texts,
- cs35l56_tx_input_values);
-
-static const struct snd_kcontrol_new sdw1_tx1_mux =
- SOC_DAPM_ENUM("SDW1TX1 SRC", cs35l56_sdw1tx1_enum);
-
-static SOC_VALUE_ENUM_SINGLE_DECL(cs35l56_sdw1tx2_enum,
- CS35L56_SWIRE_DP3_CH2_INPUT,
- 0, CS35L56_SWIRETXn_SRC_MASK,
- cs35l56_tx_input_texts,
- cs35l56_tx_input_values);
-
-static const struct snd_kcontrol_new sdw1_tx2_mux =
- SOC_DAPM_ENUM("SDW1TX2 SRC", cs35l56_sdw1tx2_enum);
-
-static SOC_VALUE_ENUM_SINGLE_DECL(cs35l56_sdw1tx3_enum,
- CS35L56_SWIRE_DP3_CH3_INPUT,
- 0, CS35L56_SWIRETXn_SRC_MASK,
- cs35l56_tx_input_texts,
- cs35l56_tx_input_values);
-
-static const struct snd_kcontrol_new sdw1_tx3_mux =
- SOC_DAPM_ENUM("SDW1TX3 SRC", cs35l56_sdw1tx3_enum);
-
-static SOC_VALUE_ENUM_SINGLE_DECL(cs35l56_sdw1tx4_enum,
- CS35L56_SWIRE_DP3_CH4_INPUT,
- 0, CS35L56_SWIRETXn_SRC_MASK,
- cs35l56_tx_input_texts,
- cs35l56_tx_input_values);
-
-static const struct snd_kcontrol_new sdw1_tx4_mux =
- SOC_DAPM_ENUM("SDW1TX4 SRC", cs35l56_sdw1tx4_enum);
-
static int cs35l56_play_event(struct snd_soc_dapm_widget *w,
struct snd_kcontrol *kcontrol, int event)
{
@@ -407,11 +371,6 @@ static const struct snd_soc_dapm_widget cs35l56_dapm_widgets[] = {
SND_SOC_DAPM_MUX("ASP1 TX3 Source", SND_SOC_NOPM, 0, 0, &asp1_tx3_mux),
SND_SOC_DAPM_MUX("ASP1 TX4 Source", SND_SOC_NOPM, 0, 0, &asp1_tx4_mux),

- SND_SOC_DAPM_MUX("SDW1 TX1 Source", SND_SOC_NOPM, 0, 0, &sdw1_tx1_mux),
- SND_SOC_DAPM_MUX("SDW1 TX2 Source", SND_SOC_NOPM, 0, 0, &sdw1_tx2_mux),
- SND_SOC_DAPM_MUX("SDW1 TX3 Source", SND_SOC_NOPM, 0, 0, &sdw1_tx3_mux),
- SND_SOC_DAPM_MUX("SDW1 TX4 Source", SND_SOC_NOPM, 0, 0, &sdw1_tx4_mux),
-
SND_SOC_DAPM_SIGGEN("VMON ADC"),
SND_SOC_DAPM_SIGGEN("IMON ADC"),
SND_SOC_DAPM_SIGGEN("ERRVOL ADC"),
@@ -420,6 +379,7 @@ static const struct snd_soc_dapm_widget cs35l56_dapm_widgets[] = {
SND_SOC_DAPM_SIGGEN("VBSTMON ADC"),
SND_SOC_DAPM_SIGGEN("TEMPMON ADC"),
SND_SOC_DAPM_SIGGEN("OT25 Reference"),
+ SND_SOC_DAPM_SIGGEN("OT127 Source"),

SND_SOC_DAPM_INPUT("Calibrate"),
};
@@ -476,14 +436,7 @@ static const struct snd_soc_dapm_route cs35l56_audio_map[] = {
{ "ASP1 Capture", NULL, "ASP1TX3" },
{ "ASP1 Capture", NULL, "ASP1TX4" },

- CS35L56_SRC_ROUTE("SDW1 TX1")
- CS35L56_SRC_ROUTE("SDW1 TX2")
- CS35L56_SRC_ROUTE("SDW1 TX3")
- CS35L56_SRC_ROUTE("SDW1 TX4")
- { "SDW1 Capture", NULL, "SDW1 TX1 Source" },
- { "SDW1 Capture", NULL, "SDW1 TX2 Source" },
- { "SDW1 Capture", NULL, "SDW1 TX3 Source" },
- { "SDW1 Capture", NULL, "SDW1 TX4 Source" },
+ { "SDW1 Capture", NULL, "OT127 Source" },

{ "OT25", NULL, "OT25 Reference" },
};
--
2.47.3