[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20251217-sound-soc-codecs-tvl320adcx140-v1-11-293dea149d7b@pengutronix.de>
Date: Wed, 17 Dec 2025 14:55:01 +0100
From: Sascha Hauer <s.hauer@...gutronix.de>
To: Shenghao Ding <shenghao-ding@...com>, Kevin Lu <kevin-lu@...com>,
Baojun Xu <baojun.xu@...com>, Liam Girdwood <lgirdwood@...il.com>,
Mark Brown <broonie@...nel.org>, Jaroslav Kysela <perex@...ex.cz>,
Takashi Iwai <tiwai@...e.com>,
Sebastian Andrzej Siewior <bigeasy@...utronix.de>,
Clark Williams <clrkwllms@...nel.org>, Steven Rostedt <rostedt@...dmis.org>,
Rob Herring <robh@...nel.org>, Krzysztof Kozlowski <krzk+dt@...nel.org>,
Conor Dooley <conor+dt@...nel.org>, Andrew Davis <afd@...com>,
Dan Murphy <dmurphy@...com>
Cc: linux-sound@...r.kernel.org, linux-kernel@...r.kernel.org,
Kevin Lu <luminlong@....com>, linux-rt-devel@...ts.linux.dev,
devicetree@...r.kernel.org, Sascha Hauer <s.hauer@...gutronix.de>,
Emil Svendsen <emas@...g-olufsen.dk>
Subject: [PATCH 11/11] ASoC: tlv320adcx140: add channel sum control
From: Emil Svendsen <emas@...g-olufsen.dk>
Add control for channel summation.
3 modes are supported:
1. "Disabled": Normal operation
2. "2 Channel": Every two channels are summed and divided by 2
Out 1 <- (CH1 + CH2) / 2
Out 2 <- (CH1 + CH2) / 2
Out 3 <- (CH3 + CH4) / 2
Out 4 <- (CH3 + CH4) / 2
3. "4 Channel": Every four channels are summed and divided by 4
Out 1 <- (CH1 + CH2 + CH3 + CH4) / 4
Out 2 <- (CH1 + CH2 + CH3 + CH4) / 4
Out 3 <- (CH1 + CH2 + CH3 + CH4) / 4
Out 4 <- (CH1 + CH2 + CH3 + CH4) / 4
Signed-off-by: Emil Svendsen <emas@...g-olufsen.dk>
Signed-off-by: Sascha Hauer <s.hauer@...gutronix.de>
---
sound/soc/codecs/tlv320adcx140.c | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/sound/soc/codecs/tlv320adcx140.c b/sound/soc/codecs/tlv320adcx140.c
index d8b6e6fafb68bc48ce9be01e2435bfecdb5bafc8..4f7d2a771a272a23050616a3a6db473f69ee752e 100644
--- a/sound/soc/codecs/tlv320adcx140.c
+++ b/sound/soc/codecs/tlv320adcx140.c
@@ -222,6 +222,13 @@ static const struct snd_kcontrol_new decimation_filter_controls[] = {
SOC_DAPM_ENUM("Decimation Filter", decimation_filter_enum),
};
+static const char * const channel_summation_text[] = {
+ "Disabled", "2 Channel", "4 Channel"
+};
+
+static SOC_ENUM_SINGLE_DECL(channel_summation_enum, ADCX140_DSP_CFG0, 2,
+ channel_summation_text);
+
static const char * const pdmclk_text[] = {
"2.8224 MHz", "1.4112 MHz", "705.6 kHz", "5.6448 MHz"
};
@@ -721,6 +728,8 @@ static const struct snd_kcontrol_new adcx140_snd_controls[] = {
ADCX140_PHASE_CALIB_SWITCH("Phase Calibration Switch"),
SOC_SINGLE("Biquads Per Channel", ADCX140_DSP_CFG1, 5, 3, 0),
+
+ SOC_ENUM("Channel Summation", channel_summation_enum),
};
static int adcx140_reset(struct adcx140_priv *adcx140)
--
2.47.3
Powered by blists - more mailing lists