summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEmil Svendsen <emas@bang-olufsen.dk>2026-01-13 13:58:53 +0300
committerMark Brown <broonie@kernel.org>2026-01-14 16:35:38 +0300
commit8a98e7f55f975360975083166e21982ef307b8fd (patch)
tree29fa9ef34c2c8674d932a6423f3a7cc1d8d427db
parent2219823f7d6ac01c8eb55b90e954b4466146c397 (diff)
downloadlinux-8a98e7f55f975360975083166e21982ef307b8fd.tar.xz
ASoC: tlv320adcx140: add channel sum control
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@bang-olufsen.dk> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de> Link: https://patch.msgid.link/20260113-sound-soc-codecs-tvl320adcx140-v4-10-8f7ecec525c8@pengutronix.de Signed-off-by: Mark Brown <broonie@kernel.org>
-rw-r--r--sound/soc/codecs/tlv320adcx140.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/sound/soc/codecs/tlv320adcx140.c b/sound/soc/codecs/tlv320adcx140.c
index e7c607af642f..ac6aab8d7224 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"
};
@@ -711,6 +718,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)