From nobody Mon Feb 9 19:10:17 2026 Received: from metis.whiteo.stw.pengutronix.de (metis.whiteo.stw.pengutronix.de [185.203.201.7]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 401DA325702 for ; Tue, 13 Jan 2026 10:59:40 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=185.203.201.7 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1768301983; cv=none; b=b41g+5qz3HJ7lL524PzUKGIlCptfUdzNn22G2vcrwm8gaHkxKNQ9Eqkve4+uKifb8s98j+o5Pgq6GVyFlIYB/ULJeK6lZDP0Ripm3vqAVvXq3tsw6gDewZ3dAsjR4mEfF90EWC+WPwRX0ZuFph8xQxsIaY6zoZ4HCHjUm5Q7frI= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1768301983; c=relaxed/simple; bh=uI48RSG+a+nSuEyywiQ6swM+axk120OhOUA8CnTh+yk=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=gyIwo6jQMnJ+wQeJUfI5QB62K70U/6hG1UJKvHpBSHJ1KPPaySoYeVpgSpnXyLKXIVO2aLSJhN0nQiHGtJuW8sKALYt5UtXy/8e2gGpxU2/sV3wMVJ6DbMOFTqjYZpra3KZfD3XPqrgudK7T7BBjT2vgmWCSMecTSDzBeMl9Hko= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=pengutronix.de; spf=pass smtp.mailfrom=pengutronix.de; arc=none smtp.client-ip=185.203.201.7 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=pengutronix.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=pengutronix.de Received: from drehscheibe.grey.stw.pengutronix.de ([2a0a:edc0:0:c01:1d::a2]) by metis.whiteo.stw.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1vfc78-0008DF-Al; Tue, 13 Jan 2026 11:59:06 +0100 Received: from dude02.red.stw.pengutronix.de ([2a0a:edc0:0:1101:1d::28]) by drehscheibe.grey.stw.pengutronix.de with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1vfc74-000PMC-2b; Tue, 13 Jan 2026 11:59:02 +0100 Received: from localhost ([::1] helo=dude02.red.stw.pengutronix.de) by dude02.red.stw.pengutronix.de with esmtp (Exim 4.98.2) (envelope-from ) id 1vfc73-00000004mJf-3p0Q; Tue, 13 Jan 2026 11:59:01 +0100 From: Sascha Hauer Date: Tue, 13 Jan 2026 11:58:44 +0100 Subject: [PATCH v4 01/10] ASoC: tlv320adcx140: invert DRE_ENABLE Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20260113-sound-soc-codecs-tvl320adcx140-v4-1-8f7ecec525c8@pengutronix.de> References: <20260113-sound-soc-codecs-tvl320adcx140-v4-0-8f7ecec525c8@pengutronix.de> In-Reply-To: <20260113-sound-soc-codecs-tvl320adcx140-v4-0-8f7ecec525c8@pengutronix.de> To: Shenghao Ding , Kevin Lu , Baojun Xu , Liam Girdwood , Mark Brown , Jaroslav Kysela , Takashi Iwai , Sebastian Andrzej Siewior , Clark Williams , Steven Rostedt , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Andrew Davis , Dan Murphy Cc: linux-sound@vger.kernel.org, linux-kernel@vger.kernel.org, Kevin Lu , linux-rt-devel@lists.linux.dev, devicetree@vger.kernel.org, Sascha Hauer , Emil Svendsen X-Mailer: b4 0.14.2 X-Developer-Signature: v=1; a=ed25519-sha256; t=1768301941; l=1278; i=s.hauer@pengutronix.de; s=20230412; h=from:subject:message-id; bh=WfOW2anrTgz/4XEyF51/kruoQkV8SVMulwmjlAzpc1c=; b=n9FTliga4EaJE1x7pWFw0Upb2MjvXIEiJw5Rf7Mx4Zjb3UN+jtqCTUADByhNGV4RZORIBDIrU xDcyIuVNUjKCBlAsIfiy9IUv8D0/DJHb8MLl7S8QyFFadNusYWYRs0c X-Developer-Key: i=s.hauer@pengutronix.de; a=ed25519; pk=4kuc9ocmECiBJKWxYgqyhtZOHj5AWi7+d0n/UjhkwTg= X-SA-Exim-Connect-IP: 2a0a:edc0:0:c01:1d::a2 X-SA-Exim-Mail-From: s.hauer@pengutronix.de X-SA-Exim-Scanned: No (on metis.whiteo.stw.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: linux-kernel@vger.kernel.org From: Emil Svendsen Looking at section 8.6.1.1.69 in datasheets for both 5140 and 6140 (3140 doesn't support DRE). REG ADCX140_DSP_CFG1 BIT 3 field "DRE_AGC_SEL" it select either DRE or AGC. It states: * 0 =3D DRE * 1 =3D AGC The control is called "DRE_ENABLE" and for it to be true it has to be active low. This commit will invert the control so "DRE_ENABLE" is active low. Signed-off-by: Emil Svendsen Signed-off-by: Sascha Hauer --- sound/soc/codecs/tlv320adcx140.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sound/soc/codecs/tlv320adcx140.c b/sound/soc/codecs/tlv320adcx= 140.c index 443cf59cb71ab3e70f47c4395159752a0331b1ef..75e1007012a48a569586bc28964= 00e79ddce1c71 100644 --- a/sound/soc/codecs/tlv320adcx140.c +++ b/sound/soc/codecs/tlv320adcx140.c @@ -338,7 +338,7 @@ static const struct snd_kcontrol_new adcx140_dapm_ch4_d= re_en_switch =3D SOC_DAPM_SINGLE("Switch", ADCX140_CH4_CFG0, 0, 1, 0); =20 static const struct snd_kcontrol_new adcx140_dapm_dre_en_switch =3D - SOC_DAPM_SINGLE("Switch", ADCX140_DSP_CFG1, 3, 1, 0); + SOC_DAPM_SINGLE("Switch", ADCX140_DSP_CFG1, 3, 1, 1); =20 /* Output Mixer */ static const struct snd_kcontrol_new adcx140_output_mixer_controls[] =3D { --=20 2.47.3 From nobody Mon Feb 9 19:10:17 2026 Received: from metis.whiteo.stw.pengutronix.de (metis.whiteo.stw.pengutronix.de [185.203.201.7]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 44A12364E9E for ; Tue, 13 Jan 2026 10:59:33 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=185.203.201.7 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1768301980; cv=none; b=nDM9+DhfbcTutHawFy09LWRTfUzt2HKjKs4KyYB2BrAXbLKtxA1Xpl+Z5i5yGWnVnbGtLx2kaYoK5Mr46pr1PIsZyQEk8JpxYbBa8VL4Og1nf1w7jtlnt4ViEiPs5h9qd81TgkeKqQoIR6ax9KoCXJ3ASxLhh4ODp59JkXo5G9M= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1768301980; c=relaxed/simple; bh=41flRPH4TSGsnCvQyNzqSTUzQqo/QHTY/SRkQLuvrVs=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=p1xdghgNtrO5V5/lBOej3QInzK2yNzEXu1xaR3OiDp0RobpsgoD7Y56HywVTvAeuz+GJyRhg04zyZ3j/NJ2XtNkJnT3ZV1scQmsWYMZAD/p2IiiLMlvAAARfKfn8qxtY0bb2KLjdEng464wqPna5+m0BqeZ3kGWngvrNqmg0BtY= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=pengutronix.de; spf=pass smtp.mailfrom=pengutronix.de; arc=none smtp.client-ip=185.203.201.7 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=pengutronix.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=pengutronix.de Received: from drehscheibe.grey.stw.pengutronix.de ([2a0a:edc0:0:c01:1d::a2]) by metis.whiteo.stw.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1vfc78-0008DE-Al; Tue, 13 Jan 2026 11:59:06 +0100 Received: from dude02.red.stw.pengutronix.de ([2a0a:edc0:0:1101:1d::28]) by drehscheibe.grey.stw.pengutronix.de with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1vfc74-000PMA-2X; Tue, 13 Jan 2026 11:59:02 +0100 Received: from localhost ([::1] helo=dude02.red.stw.pengutronix.de) by dude02.red.stw.pengutronix.de with esmtp (Exim 4.98.2) (envelope-from ) id 1vfc73-00000004mJf-3r1u; Tue, 13 Jan 2026 11:59:01 +0100 From: Sascha Hauer Date: Tue, 13 Jan 2026 11:58:45 +0100 Subject: [PATCH v4 02/10] ASoC: tlv320adcx140: fix null pointer Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20260113-sound-soc-codecs-tvl320adcx140-v4-2-8f7ecec525c8@pengutronix.de> References: <20260113-sound-soc-codecs-tvl320adcx140-v4-0-8f7ecec525c8@pengutronix.de> In-Reply-To: <20260113-sound-soc-codecs-tvl320adcx140-v4-0-8f7ecec525c8@pengutronix.de> To: Shenghao Ding , Kevin Lu , Baojun Xu , Liam Girdwood , Mark Brown , Jaroslav Kysela , Takashi Iwai , Sebastian Andrzej Siewior , Clark Williams , Steven Rostedt , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Andrew Davis , Dan Murphy Cc: linux-sound@vger.kernel.org, linux-kernel@vger.kernel.org, Kevin Lu , linux-rt-devel@lists.linux.dev, devicetree@vger.kernel.org, Sascha Hauer , Emil Svendsen X-Mailer: b4 0.14.2 X-Developer-Signature: v=1; a=ed25519-sha256; t=1768301941; l=1573; i=s.hauer@pengutronix.de; s=20230412; h=from:subject:message-id; bh=Rp2iiRNuVwV+taJffar+hJiVimp4OjAE0fMMm0vIwyQ=; b=0qNVGH6hCvH+R0LFN+H8JaR2PCgvIvjjz9ls4EplufBemqpH7D2u/zyLEXoshQrAlp/OXD4x1 3im3rBi+Y5hBtBHaAbQaRRJZhx0m1/9rjTMbALl6AJ8dA0fjVkl+eXt X-Developer-Key: i=s.hauer@pengutronix.de; a=ed25519; pk=4kuc9ocmECiBJKWxYgqyhtZOHj5AWi7+d0n/UjhkwTg= X-SA-Exim-Connect-IP: 2a0a:edc0:0:c01:1d::a2 X-SA-Exim-Mail-From: s.hauer@pengutronix.de X-SA-Exim-Scanned: No (on metis.whiteo.stw.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: linux-kernel@vger.kernel.org From: Emil Svendsen The "snd_soc_component" in "adcx140_priv" was only used once but never set. It was only used for reaching "dev" which is already present in "adcx140_priv". Fixes: 4e82971f7b55 ("ASoC: tlv320adcx140: Add a new kcontrol") Signed-off-by: Emil Svendsen Signed-off-by: Sascha Hauer --- sound/soc/codecs/tlv320adcx140.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/sound/soc/codecs/tlv320adcx140.c b/sound/soc/codecs/tlv320adcx= 140.c index 75e1007012a48a569586bc2896400e79ddce1c71..3fb1b6251e6f8b361e8f82ce638= 1a7e8cfcd1935 100644 --- a/sound/soc/codecs/tlv320adcx140.c +++ b/sound/soc/codecs/tlv320adcx140.c @@ -23,7 +23,6 @@ #include "tlv320adcx140.h" =20 struct adcx140_priv { - struct snd_soc_component *component; struct regulator *supply_areg; struct gpio_desc *gpio_reset; struct regmap *regmap; @@ -699,7 +698,6 @@ static void adcx140_pwr_ctrl(struct adcx140_priv *adcx1= 40, bool power_state) { int pwr_ctrl =3D 0; int ret =3D 0; - struct snd_soc_component *component =3D adcx140->component; =20 if (power_state) pwr_ctrl =3D ADCX140_PWR_CFG_ADC_PDZ | ADCX140_PWR_CFG_PLL_PDZ; @@ -711,7 +709,7 @@ static void adcx140_pwr_ctrl(struct adcx140_priv *adcx1= 40, bool power_state) ret =3D regmap_write(adcx140->regmap, ADCX140_PHASE_CALIB, adcx140->phase_calib_on ? 0x00 : 0x40); if (ret) - dev_err(component->dev, "%s: register write error %d\n", + dev_err(adcx140->dev, "%s: register write error %d\n", __func__, ret); } =20 --=20 2.47.3 From nobody Mon Feb 9 19:10:17 2026 Received: from metis.whiteo.stw.pengutronix.de (metis.whiteo.stw.pengutronix.de [185.203.201.7]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id B5CE538A714 for ; Tue, 13 Jan 2026 10:59:46 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=185.203.201.7 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1768301989; cv=none; b=RCl/rk+iw7ZidYVyYmaCWBJtKIeBc5chLXEqrFcOyTgv4vMg+SHbxaRlREn4PPk+0WoYCMF4xh1mimiPM4PbuqdnfSp6vDSARZlbZ6rz7ZcKli/fzVa0/E94IDKKCG6jlqjcrgDZUQ5YvYwdO0iBUuLZgci4qwBQ8vENqT7sd0o= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1768301989; c=relaxed/simple; bh=KIVZf9eQsEe24xzKqF2imdi5YUmFlNEbdV3+FMOkKwE=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=c2QUAAcKIBoRQiKRDy7SkYSWBLyzmqNXHzif++3YjB/95DOLsLlRaXT/XI/zAfveSEzPUfhvzyqwy45XIqjoeT+Srhe+7v29IXRYm/J90daAXi6rgX/PcDCIPKL+9dvoHwmRPQ0F236Wq7XnTnYWTSKchkhXbj6UFfIW547b8nY= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=pengutronix.de; spf=pass smtp.mailfrom=pengutronix.de; arc=none smtp.client-ip=185.203.201.7 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=pengutronix.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=pengutronix.de Received: from drehscheibe.grey.stw.pengutronix.de ([2a0a:edc0:0:c01:1d::a2]) by metis.whiteo.stw.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1vfc78-0008DD-Al; Tue, 13 Jan 2026 11:59:06 +0100 Received: from dude02.red.stw.pengutronix.de ([2a0a:edc0:0:1101:1d::28]) by drehscheibe.grey.stw.pengutronix.de with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1vfc74-000PMB-2V; Tue, 13 Jan 2026 11:59:02 +0100 Received: from localhost ([::1] helo=dude02.red.stw.pengutronix.de) by dude02.red.stw.pengutronix.de with esmtp (Exim 4.98.2) (envelope-from ) id 1vfc73-00000004mJf-3sVx; Tue, 13 Jan 2026 11:59:01 +0100 From: Sascha Hauer Date: Tue, 13 Jan 2026 11:58:46 +0100 Subject: [PATCH v4 03/10] ASoC: tlv320adcx140: Propagate error codes during probe Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20260113-sound-soc-codecs-tvl320adcx140-v4-3-8f7ecec525c8@pengutronix.de> References: <20260113-sound-soc-codecs-tvl320adcx140-v4-0-8f7ecec525c8@pengutronix.de> In-Reply-To: <20260113-sound-soc-codecs-tvl320adcx140-v4-0-8f7ecec525c8@pengutronix.de> To: Shenghao Ding , Kevin Lu , Baojun Xu , Liam Girdwood , Mark Brown , Jaroslav Kysela , Takashi Iwai , Sebastian Andrzej Siewior , Clark Williams , Steven Rostedt , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Andrew Davis , Dan Murphy Cc: linux-sound@vger.kernel.org, linux-kernel@vger.kernel.org, Kevin Lu , linux-rt-devel@lists.linux.dev, devicetree@vger.kernel.org, Sascha Hauer , Dimitrios Katsaros X-Mailer: b4 0.14.2 X-Developer-Signature: v=1; a=ed25519-sha256; t=1768301941; l=1285; i=s.hauer@pengutronix.de; s=20230412; h=from:subject:message-id; bh=PpAmR8wKqRTX1YV1R8fVM7vj/FkNO/cKPTJr6ncyO00=; b=lk9pE9Jz6dF0lHuvppUqckzKGu3lcyQ2JhAoDASt/AiCejXAgd5O1WSnaxQbS5MuCxEHIvVP6 bj2F/dE8bT1DP8APyzRBOoKGU/g/d+RqSDBMvZmafW5/vNQZbI8pGfV X-Developer-Key: i=s.hauer@pengutronix.de; a=ed25519; pk=4kuc9ocmECiBJKWxYgqyhtZOHj5AWi7+d0n/UjhkwTg= X-SA-Exim-Connect-IP: 2a0a:edc0:0:c01:1d::a2 X-SA-Exim-Mail-From: s.hauer@pengutronix.de X-SA-Exim-Scanned: No (on metis.whiteo.stw.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: linux-kernel@vger.kernel.org From: Dimitrios Katsaros When scanning for the reset pin, we could get an -EPROBE_DEFER. The driver would assume that no reset pin had been defined, which would mean that the chip would never be powered. Now we both respect any error we get from devm_gpiod_get_optional. We also now properly report the missing GPIO definition when 'gpio_reset' is NULL. Signed-off-by: Dimitrios Katsaros Signed-off-by: Sascha Hauer --- sound/soc/codecs/tlv320adcx140.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/sound/soc/codecs/tlv320adcx140.c b/sound/soc/codecs/tlv320adcx= 140.c index 3fb1b6251e6f8b361e8f82ce6381a7e8cfcd1935..58a6dfa228cc326d18b3c3f1267= 32033749c8e49 100644 --- a/sound/soc/codecs/tlv320adcx140.c +++ b/sound/soc/codecs/tlv320adcx140.c @@ -1154,6 +1154,9 @@ static int adcx140_i2c_probe(struct i2c_client *i2c) adcx140->gpio_reset =3D devm_gpiod_get_optional(adcx140->dev, "reset", GPIOD_OUT_LOW); if (IS_ERR(adcx140->gpio_reset)) + return dev_err_probe(&i2c->dev, PTR_ERR(adcx140->gpio_reset), + "Failed to get Reset GPIO\n"); + if (!adcx140->gpio_reset) dev_info(&i2c->dev, "Reset GPIO not defined\n"); =20 adcx140->supply_areg =3D devm_regulator_get_optional(adcx140->dev, --=20 2.47.3 From nobody Mon Feb 9 19:10:17 2026 Received: from metis.whiteo.stw.pengutronix.de (metis.whiteo.stw.pengutronix.de [185.203.201.7]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 0C5562C0F89 for ; Tue, 13 Jan 2026 10:59:31 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=185.203.201.7 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1768301973; cv=none; b=r6bHLjx9nnw57WtYastnGFAGLFLhUHCpa9NGgwE+4pmGr8BMQB4fD/54pGL+rUutlWGFEzE9JaiRqZ1DnrYQDmYX5JRPbkMSt41xJru1Df4oE6oh3FwwPgndHs20yIEeUc9A73L2Yba6ojhxmC7TIPj69gwLOy1OXUqO4qvGCpk= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1768301973; c=relaxed/simple; bh=VZx0u1LV4OE/RGQRohcWYqHEcQkYI+lNdynE0cp27ZQ=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=kD2weHyo4K7I4VbEhiU837PTZR8M2x5AbXRERiHJY+sFphWlnMXI7CgbYWJc/FtKsCWDXljPgAFFkMJv/Kgxgkhs8+5wX779KG73rbCiA08tQXR61qVdbU5JUOVT73dIfndWib6MpE7Uzz25JyhQw3Lh4rrLvprs+9xiYI/6mWc= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=pengutronix.de; spf=pass smtp.mailfrom=pengutronix.de; arc=none smtp.client-ip=185.203.201.7 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=pengutronix.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=pengutronix.de Received: from drehscheibe.grey.stw.pengutronix.de ([2a0a:edc0:0:c01:1d::a2]) by metis.whiteo.stw.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1vfc78-0008DG-Al; Tue, 13 Jan 2026 11:59:06 +0100 Received: from dude02.red.stw.pengutronix.de ([2a0a:edc0:0:1101:1d::28]) by drehscheibe.grey.stw.pengutronix.de with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1vfc74-000PME-2e; Tue, 13 Jan 2026 11:59:02 +0100 Received: from localhost ([::1] helo=dude02.red.stw.pengutronix.de) by dude02.red.stw.pengutronix.de with esmtp (Exim 4.98.2) (envelope-from ) id 1vfc73-00000004mJf-3wJr; Tue, 13 Jan 2026 11:59:01 +0100 From: Sascha Hauer Date: Tue, 13 Jan 2026 11:58:47 +0100 Subject: [PATCH v4 04/10] ASoC: tlv320adcx140: fix word length Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20260113-sound-soc-codecs-tvl320adcx140-v4-4-8f7ecec525c8@pengutronix.de> References: <20260113-sound-soc-codecs-tvl320adcx140-v4-0-8f7ecec525c8@pengutronix.de> In-Reply-To: <20260113-sound-soc-codecs-tvl320adcx140-v4-0-8f7ecec525c8@pengutronix.de> To: Shenghao Ding , Kevin Lu , Baojun Xu , Liam Girdwood , Mark Brown , Jaroslav Kysela , Takashi Iwai , Sebastian Andrzej Siewior , Clark Williams , Steven Rostedt , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Andrew Davis , Dan Murphy Cc: linux-sound@vger.kernel.org, linux-kernel@vger.kernel.org, Kevin Lu , linux-rt-devel@lists.linux.dev, devicetree@vger.kernel.org, Sascha Hauer , Emil Svendsen X-Mailer: b4 0.14.2 X-Developer-Signature: v=1; a=ed25519-sha256; t=1768301941; l=1458; i=s.hauer@pengutronix.de; s=20230412; h=from:subject:message-id; bh=v43nJHLbOeXsx5JJSDE5Vevx6RwD4qkqiA+EJyAWPpo=; b=eYZWxZZyC+4MaDN9ffemKsnFovArbxNxfeyj9XfzFbm0qUpWn+/U45E9veNPZEP3r7sb8ZO5q w11NremxVzQBjBIswzztinOJlFzRY3vmFzotqyKoJMQtJRhoBeoliTr X-Developer-Key: i=s.hauer@pengutronix.de; a=ed25519; pk=4kuc9ocmECiBJKWxYgqyhtZOHj5AWi7+d0n/UjhkwTg= X-SA-Exim-Connect-IP: 2a0a:edc0:0:c01:1d::a2 X-SA-Exim-Mail-From: s.hauer@pengutronix.de X-SA-Exim-Scanned: No (on metis.whiteo.stw.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: linux-kernel@vger.kernel.org From: Emil Svendsen The word length is the physical width of the channel slots. So the hw_params would misconfigure when format width and physical width doesn't match. Like S24_LE which has data width of 24 bits but physical width of 32 bits. So if using asymmetric formats you will get a lot of noise. Fixes: 689c7655b50c5 ("ASoC: tlv320adcx140: Add the tlv320adcx140 codec dri= ver family") Signed-off-by: Emil Svendsen Signed-off-by: Sascha Hauer --- sound/soc/codecs/tlv320adcx140.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sound/soc/codecs/tlv320adcx140.c b/sound/soc/codecs/tlv320adcx= 140.c index 58a6dfa228cc326d18b3c3f126732033749c8e49..fdf4a9add852deb5e879dba5c8a= 09458fc6e709d 100644 --- a/sound/soc/codecs/tlv320adcx140.c +++ b/sound/soc/codecs/tlv320adcx140.c @@ -725,7 +725,7 @@ static int adcx140_hw_params(struct snd_pcm_substream *= substream, struct adcx140_priv *adcx140 =3D snd_soc_component_get_drvdata(component); u8 data =3D 0; =20 - switch (params_width(params)) { + switch (params_physical_width(params)) { case 16: data =3D ADCX140_16_BIT_WORD; break; @@ -740,7 +740,7 @@ static int adcx140_hw_params(struct snd_pcm_substream *= substream, break; default: dev_err(component->dev, "%s: Unsupported width %d\n", - __func__, params_width(params)); + __func__, params_physical_width(params)); return -EINVAL; } =20 --=20 2.47.3 From nobody Mon Feb 9 19:10:17 2026 Received: from metis.whiteo.stw.pengutronix.de (metis.whiteo.stw.pengutronix.de [185.203.201.7]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id C80E83803FC for ; Tue, 13 Jan 2026 10:59:36 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=185.203.201.7 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1768301981; cv=none; b=tqBCzUcEuh1MYaiK99zEYSdAr1+DRbYVzJWQivns6TtK62Uz5TxAu3JKy9nlUpf8ApAp/uD2Z7UuScvkhZdTFYmJ1bzWqf90V6T3M1nruflSfDMAzFk+5JIAUVc2+Te41K1fqNLbQvj0yN2Mqt195hylLa2RMCPrJvYXP/IJX5o= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1768301981; c=relaxed/simple; bh=gdrzL2hpuvE/T85VvevHoKJTMlwTxRECaR7H6qpVTv4=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=l5t4vLPWA5YbN3OpPWPSztPuFrmZkJH/cxpyxk5XLysmNdspLgfNKMg6UJoqYieEw+ub+kXrWLFxcgZtfv+cBntZfgeOKr1GZxNrW0F0BTrzTRAvvEBuVSpJUVDXSuNrdCRUOotbAUfOVmoApKziqwWc4oYVrFyeD0b58OnNwGI= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=pengutronix.de; spf=pass smtp.mailfrom=pengutronix.de; arc=none smtp.client-ip=185.203.201.7 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=pengutronix.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=pengutronix.de Received: from drehscheibe.grey.stw.pengutronix.de ([2a0a:edc0:0:c01:1d::a2]) by metis.whiteo.stw.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1vfc78-0008DK-Ak; Tue, 13 Jan 2026 11:59:06 +0100 Received: from dude02.red.stw.pengutronix.de ([2a0a:edc0:0:1101:1d::28]) by drehscheibe.grey.stw.pengutronix.de with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1vfc74-000PMF-2n; Tue, 13 Jan 2026 11:59:02 +0100 Received: from localhost ([::1] helo=dude02.red.stw.pengutronix.de) by dude02.red.stw.pengutronix.de with esmtp (Exim 4.98.2) (envelope-from ) id 1vfc73-00000004mJf-3zOc; Tue, 13 Jan 2026 11:59:01 +0100 From: Sascha Hauer Date: Tue, 13 Jan 2026 11:58:48 +0100 Subject: [PATCH v4 05/10] ASoC: tlv320adcx140: power on/off the device on demand Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20260113-sound-soc-codecs-tvl320adcx140-v4-5-8f7ecec525c8@pengutronix.de> References: <20260113-sound-soc-codecs-tvl320adcx140-v4-0-8f7ecec525c8@pengutronix.de> In-Reply-To: <20260113-sound-soc-codecs-tvl320adcx140-v4-0-8f7ecec525c8@pengutronix.de> To: Shenghao Ding , Kevin Lu , Baojun Xu , Liam Girdwood , Mark Brown , Jaroslav Kysela , Takashi Iwai , Sebastian Andrzej Siewior , Clark Williams , Steven Rostedt , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Andrew Davis , Dan Murphy Cc: linux-sound@vger.kernel.org, linux-kernel@vger.kernel.org, Kevin Lu , linux-rt-devel@lists.linux.dev, devicetree@vger.kernel.org, Sascha Hauer , Emil-Juhl X-Mailer: b4 0.14.2 X-Developer-Signature: v=1; a=ed25519-sha256; t=1768301941; l=4932; i=s.hauer@pengutronix.de; s=20230412; h=from:subject:message-id; bh=0JjyB3wIqRORtMOOqEPcPC785mmT9Gy0HFJXKq2Y3dY=; b=mjN49dq5OgG4ouzHuGBbRNY4l3fJlUF3H8MRwT4LOjYgjzYYFXqwGTtrnYBgVMzOtzRQ+fijM OkRBQkOa3BdB69sjDIaG5+Pl3bCcRNxXCgSb+ZOPIq+y5qAiJmaySMV X-Developer-Key: i=s.hauer@pengutronix.de; a=ed25519; pk=4kuc9ocmECiBJKWxYgqyhtZOHj5AWi7+d0n/UjhkwTg= X-SA-Exim-Connect-IP: 2a0a:edc0:0:c01:1d::a2 X-SA-Exim-Mail-From: s.hauer@pengutronix.de X-SA-Exim-Scanned: No (on metis.whiteo.stw.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: linux-kernel@vger.kernel.org From: Emil-Juhl The tlv320adcx140 can be connected to controllable AVDD/IOVDD regulators which when disabled will reset the registers to their default. In preparation for that switch to register writes to cache only when powered off and sync the cached values to the registers when powered back on. Signed-off-by: Emil-Juhl Signed-off-by: Sascha Hauer --- sound/soc/codecs/tlv320adcx140.c | 89 ++++++++++++++++++++++++++++++++++++= +++- 1 file changed, 87 insertions(+), 2 deletions(-) diff --git a/sound/soc/codecs/tlv320adcx140.c b/sound/soc/codecs/tlv320adcx= 140.c index fdf4a9add852deb5e879dba5c8a09458fc6e709d..444c0e80f0907de201ed1818b56= 12164a48b0fca 100644 --- a/sound/soc/codecs/tlv320adcx140.c +++ b/sound/soc/codecs/tlv320adcx140.c @@ -121,6 +121,34 @@ static const struct reg_default adcx140_reg_defaults[]= =3D { { ADCX140_DEV_STS1, 0x80 }, }; =20 +static const struct regmap_range adcx140_wr_ranges[] =3D { + regmap_reg_range(ADCX140_PAGE_SELECT, ADCX140_SLEEP_CFG), + regmap_reg_range(ADCX140_SHDN_CFG, ADCX140_SHDN_CFG), + regmap_reg_range(ADCX140_ASI_CFG0, ADCX140_ASI_CFG2), + regmap_reg_range(ADCX140_ASI_CH1, ADCX140_MST_CFG1), + regmap_reg_range(ADCX140_CLK_SRC, ADCX140_CLK_SRC), + regmap_reg_range(ADCX140_PDMCLK_CFG, ADCX140_GPO_CFG3), + regmap_reg_range(ADCX140_GPO_VAL, ADCX140_GPO_VAL), + regmap_reg_range(ADCX140_GPI_CFG0, ADCX140_GPI_CFG1), + regmap_reg_range(ADCX140_GPI_MON, ADCX140_GPI_MON), + regmap_reg_range(ADCX140_INT_CFG, ADCX140_INT_MASK0), + regmap_reg_range(ADCX140_BIAS_CFG, ADCX140_CH4_CFG4), + regmap_reg_range(ADCX140_CH5_CFG2, ADCX140_CH5_CFG4), + regmap_reg_range(ADCX140_CH6_CFG2, ADCX140_CH6_CFG4), + regmap_reg_range(ADCX140_CH7_CFG2, ADCX140_CH7_CFG4), + regmap_reg_range(ADCX140_CH8_CFG2, ADCX140_CH8_CFG4), + regmap_reg_range(ADCX140_DSP_CFG0, ADCX140_DRE_CFG0), + regmap_reg_range(ADCX140_AGC_CFG0, ADCX140_AGC_CFG0), + regmap_reg_range(ADCX140_IN_CH_EN, ADCX140_PWR_CFG), + regmap_reg_range(ADCX140_PHASE_CALIB, ADCX140_PHASE_CALIB), + regmap_reg_range(0x7e, 0x7e), +}; + +static const struct regmap_access_table adcx140_wr_table =3D { + .yes_ranges =3D adcx140_wr_ranges, + .n_yes_ranges =3D ARRAY_SIZE(adcx140_wr_ranges), +}; + static const struct regmap_range_cfg adcx140_ranges[] =3D { { .range_min =3D 0, @@ -156,6 +184,7 @@ static const struct regmap_config adcx140_i2c_regmap = =3D { .num_ranges =3D ARRAY_SIZE(adcx140_ranges), .max_register =3D 12 * 128, .volatile_reg =3D adcx140_volatile, + .wr_table =3D &adcx140_wr_table, }; =20 /* Digital Volume control. From -100 to 27 dB in 0.5 dB steps */ @@ -1073,19 +1102,73 @@ static int adcx140_codec_probe(struct snd_soc_compo= nent *component) return ret; } =20 +static int adcx140_pwr_off(struct adcx140_priv *adcx140) +{ + regcache_cache_only(adcx140->regmap, true); + regcache_mark_dirty(adcx140->regmap); + + /* Assert the reset GPIO */ + gpiod_set_value_cansleep(adcx140->gpio_reset, 0); + + /* + * Datasheet - TLV320ADC3140 Rev. B, TLV320ADC5140 Rev. A, + * TLV320ADC6140 Rev. A 8.4.1: + * wait for hw shutdown (25ms) + >=3D 1ms + */ + usleep_range(30000, 100000); + + return 0; +} + +static int adcx140_pwr_on(struct adcx140_priv *adcx140) +{ + int ret; + + /* De-assert the reset GPIO */ + gpiod_set_value_cansleep(adcx140->gpio_reset, 1); + + /* + * Datasheet - TLV320ADC3140 Rev. B, TLV320ADC5140 Rev. A, + * TLV320ADC6140 Rev. A 8.4.2: + * wait >=3D 10 ms after entering sleep mode. + */ + usleep_range(10000, 100000); + + regcache_cache_only(adcx140->regmap, false); + + /* Flush the regcache */ + ret =3D regcache_sync(adcx140->regmap); + if (ret) { + dev_err(adcx140->dev, "Failed to restore register map: %d\n", + ret); + return ret; + } + + return 0; +} + static int adcx140_set_bias_level(struct snd_soc_component *component, enum snd_soc_bias_level level) { struct adcx140_priv *adcx140 =3D snd_soc_component_get_drvdata(component); + enum snd_soc_bias_level prev_level + =3D snd_soc_component_get_bias_level(component); =20 switch (level) { case SND_SOC_BIAS_ON: case SND_SOC_BIAS_PREPARE: + if (prev_level =3D=3D SND_SOC_BIAS_STANDBY) + adcx140_pwr_ctrl(adcx140, true); + break; case SND_SOC_BIAS_STANDBY: - adcx140_pwr_ctrl(adcx140, true); + if (prev_level =3D=3D SND_SOC_BIAS_PREPARE) + adcx140_pwr_ctrl(adcx140, false); + if (prev_level =3D=3D SND_SOC_BIAS_OFF) + return adcx140_pwr_on(adcx140); break; case SND_SOC_BIAS_OFF: - adcx140_pwr_ctrl(adcx140, false); + if (prev_level =3D=3D SND_SOC_BIAS_STANDBY) + return adcx140_pwr_off(adcx140); break; } =20 @@ -1186,6 +1269,8 @@ static int adcx140_i2c_probe(struct i2c_client *i2c) return ret; } =20 + regcache_cache_only(adcx140->regmap, true); + i2c_set_clientdata(i2c, adcx140); =20 return devm_snd_soc_register_component(&i2c->dev, --=20 2.47.3 From nobody Mon Feb 9 19:10:17 2026 Received: from metis.whiteo.stw.pengutronix.de (metis.whiteo.stw.pengutronix.de [185.203.201.7]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 98E0F3816EE for ; Tue, 13 Jan 2026 10:59:33 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=185.203.201.7 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1768301979; cv=none; b=cWWDi3t3ZwOJeL9pB4AHHORXrBzrdaYBRw2SXhxhCYljcVmdL4ex2F/Alt3Kpa5KmzWC8mNpzdPIRZohGoGqpT8A2WLLOHnZFbm43EZrVFD9gGLTEY7CbS/97pKwiWS4FszcDSWIg0KfBNCAs8uldyzFZu3OK3ZiE041ws6upjU= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1768301979; c=relaxed/simple; bh=uiStrhAEZdmOxCwCYfF8DOPBHOR/dQ2/Q2UFYc8U8tI=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=XwCuO03Ur7PVWLvSfFBHFspo55GFpf+7Zkb+vd4mwevLFlc/Qwdk8Lzw7EU7hymepgUZzWHvbHnZcaI9LMIFqcYYLRB5PJ3qUyg1x2l96rNlXqxMZ5GxfykaBysrvEHdiVIM2u51rTl8OglBtRvZNjqlov5ET6FcMBfcJepuGH0= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=pengutronix.de; spf=pass smtp.mailfrom=pengutronix.de; arc=none smtp.client-ip=185.203.201.7 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=pengutronix.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=pengutronix.de Received: from drehscheibe.grey.stw.pengutronix.de ([2a0a:edc0:0:c01:1d::a2]) by metis.whiteo.stw.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1vfc78-0008DN-Al; Tue, 13 Jan 2026 11:59:06 +0100 Received: from dude02.red.stw.pengutronix.de ([2a0a:edc0:0:1101:1d::28]) by drehscheibe.grey.stw.pengutronix.de with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1vfc74-000PMG-2m; Tue, 13 Jan 2026 11:59:02 +0100 Received: from localhost ([::1] helo=dude02.red.stw.pengutronix.de) by dude02.red.stw.pengutronix.de with esmtp (Exim 4.98.2) (envelope-from ) id 1vfc73-00000004mJf-40rQ; Tue, 13 Jan 2026 11:59:01 +0100 From: Sascha Hauer Date: Tue, 13 Jan 2026 11:58:49 +0100 Subject: [PATCH v4 06/10] ASoC: tlv320adcx140: add avdd and iovdd supply Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20260113-sound-soc-codecs-tvl320adcx140-v4-6-8f7ecec525c8@pengutronix.de> References: <20260113-sound-soc-codecs-tvl320adcx140-v4-0-8f7ecec525c8@pengutronix.de> In-Reply-To: <20260113-sound-soc-codecs-tvl320adcx140-v4-0-8f7ecec525c8@pengutronix.de> To: Shenghao Ding , Kevin Lu , Baojun Xu , Liam Girdwood , Mark Brown , Jaroslav Kysela , Takashi Iwai , Sebastian Andrzej Siewior , Clark Williams , Steven Rostedt , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Andrew Davis , Dan Murphy Cc: linux-sound@vger.kernel.org, linux-kernel@vger.kernel.org, Kevin Lu , linux-rt-devel@lists.linux.dev, devicetree@vger.kernel.org, Sascha Hauer , Emil-Juhl X-Mailer: b4 0.14.2 X-Developer-Signature: v=1; a=ed25519-sha256; t=1768301941; l=3062; i=s.hauer@pengutronix.de; s=20230412; h=from:subject:message-id; bh=O/aJfQS58lHdzjkzWpckHiUhyDbcXaaLEfqrqhEcuH4=; b=oszZrkFa0AJJT8Ur2BwoDJZnhmm/gu348P2mzWMUUh0n1ikk8PdcEpEqVtskHUeWrDjRThWak /l9LQn3MRHqDu8oS3c+RJPPTlboqwrDEQu++9vE7gQhefZKmDKNZHJs X-Developer-Key: i=s.hauer@pengutronix.de; a=ed25519; pk=4kuc9ocmECiBJKWxYgqyhtZOHj5AWi7+d0n/UjhkwTg= X-SA-Exim-Connect-IP: 2a0a:edc0:0:c01:1d::a2 X-SA-Exim-Mail-From: s.hauer@pengutronix.de X-SA-Exim-Scanned: No (on metis.whiteo.stw.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: linux-kernel@vger.kernel.org From: Emil-Juhl The datasheet, under "10 Power Supply Recommendations" section, specifies that both the AVDD and IOVDD supplies must be up and stable for at least 100us before the SHDNZ can be released. After that, the chip is ready to receive commands after another 2ms. Currently the driver doesn't contain any options to bind AVDD and IOVDD supplies to the tlv320adcx140. This commit adds bindings for AVDD and IOVDD supplies which the driver will enable when used. Signed-off-by: Emil-Juhl Signed-off-by: Sascha Hauer --- sound/soc/codecs/tlv320adcx140.c | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) diff --git a/sound/soc/codecs/tlv320adcx140.c b/sound/soc/codecs/tlv320adcx= 140.c index 444c0e80f0907de201ed1818b5612164a48b0fca..a7200e149e5f40ddd61e3c0455b= 796c81f55e2e8 100644 --- a/sound/soc/codecs/tlv320adcx140.c +++ b/sound/soc/codecs/tlv320adcx140.c @@ -22,8 +22,16 @@ =20 #include "tlv320adcx140.h" =20 +static const char *const adcx140_supply_names[] =3D { + "avdd", + "iovdd", +}; + +#define ADCX140_NUM_SUPPLIES ARRAY_SIZE(adcx140_supply_names) + struct adcx140_priv { struct regulator *supply_areg; + struct regulator_bulk_data supplies[ADCX140_NUM_SUPPLIES]; struct gpio_desc *gpio_reset; struct regmap *regmap; struct device *dev; @@ -1104,6 +1112,8 @@ static int adcx140_codec_probe(struct snd_soc_compone= nt *component) =20 static int adcx140_pwr_off(struct adcx140_priv *adcx140) { + int ret; + regcache_cache_only(adcx140->regmap, true); regcache_mark_dirty(adcx140->regmap); =20 @@ -1117,6 +1127,14 @@ static int adcx140_pwr_off(struct adcx140_priv *adcx= 140) */ usleep_range(30000, 100000); =20 + /* Power off the regulators, `avdd` and `iovdd` */ + ret =3D regulator_bulk_disable(ARRAY_SIZE(adcx140->supplies), + adcx140->supplies); + if (ret) { + dev_err(adcx140->dev, "Failed to disable supplies: %d\n", ret); + return ret; + } + return 0; } =20 @@ -1124,6 +1142,14 @@ static int adcx140_pwr_on(struct adcx140_priv *adcx1= 40) { int ret; =20 + /* Power on the regulators, `avdd` and `iovdd` */ + ret =3D regulator_bulk_enable(ARRAY_SIZE(adcx140->supplies), + adcx140->supplies); + if (ret) { + dev_err(adcx140->dev, "Failed to enable supplies: %d\n", ret); + return ret; + } + /* De-assert the reset GPIO */ gpiod_set_value_cansleep(adcx140->gpio_reset, 1); =20 @@ -1234,6 +1260,16 @@ static int adcx140_i2c_probe(struct i2c_client *i2c) adcx140->phase_calib_on =3D false; adcx140->dev =3D &i2c->dev; =20 + for (int i =3D 0; i < ADCX140_NUM_SUPPLIES; i++) + adcx140->supplies[i].supply =3D adcx140_supply_names[i]; + + ret =3D devm_regulator_bulk_get(&i2c->dev, ADCX140_NUM_SUPPLIES, + adcx140->supplies); + if (ret) { + dev_err_probe(&i2c->dev, ret, "Failed to request supplies\n"); + return ret; + } + adcx140->gpio_reset =3D devm_gpiod_get_optional(adcx140->dev, "reset", GPIOD_OUT_LOW); if (IS_ERR(adcx140->gpio_reset)) --=20 2.47.3 From nobody Mon Feb 9 19:10:17 2026 Received: from metis.whiteo.stw.pengutronix.de (metis.whiteo.stw.pengutronix.de [185.203.201.7]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 8A52D38BDD8 for ; Tue, 13 Jan 2026 10:59:46 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=185.203.201.7 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1768301988; cv=none; b=UFddRXwOAGmidDll+WHWp0g6dKP0TRx2k7BEZDEr/SPtWeEcd6jXBMtxhTwkIsuXnPR1g39sM7HbaJPG328Bg7e/NXtSobDgL/iGmFa6Mt4PXW7D51l92UtSKB2Zst7nTji4pbWyZ9KNRGgPg6mkbDe4lyMrlyj0IQtHnaZuSuw= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1768301988; c=relaxed/simple; bh=7TG8ChsmEKxx4/BuNL3tSZPzlIU0WQm6MqDGP2DlTJw=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=jk4QDdl5IAcE4DjooXosO12qrvm9Rk0QYmMm5+M5jNpNcrDccfKBNeeskTYi0XPkjaH6F8rmmks+bJSIuR/DCbZ+IzPe3XdZgsFclKztqwtsJ9iZojannuLQVW4J4Ubmh+6Ya4N7ZhdOZVOb96rJkO0x0IH3nDKsjE2edfjjCLU= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=pengutronix.de; spf=pass smtp.mailfrom=pengutronix.de; arc=none smtp.client-ip=185.203.201.7 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=pengutronix.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=pengutronix.de Received: from drehscheibe.grey.stw.pengutronix.de ([2a0a:edc0:0:c01:1d::a2]) by metis.whiteo.stw.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1vfc78-0008DM-Al; Tue, 13 Jan 2026 11:59:06 +0100 Received: from dude02.red.stw.pengutronix.de ([2a0a:edc0:0:1101:1d::28]) by drehscheibe.grey.stw.pengutronix.de with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1vfc74-000PMH-2j; Tue, 13 Jan 2026 11:59:02 +0100 Received: from localhost ([::1] helo=dude02.red.stw.pengutronix.de) by dude02.red.stw.pengutronix.de with esmtp (Exim 4.98.2) (envelope-from ) id 1vfc73-00000004mJf-43P4; Tue, 13 Jan 2026 11:59:01 +0100 From: Sascha Hauer Date: Tue, 13 Jan 2026 11:58:50 +0100 Subject: [PATCH v4 07/10] ASoC: dt-bindings: clarify areg-supply documentation Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20260113-sound-soc-codecs-tvl320adcx140-v4-7-8f7ecec525c8@pengutronix.de> References: <20260113-sound-soc-codecs-tvl320adcx140-v4-0-8f7ecec525c8@pengutronix.de> In-Reply-To: <20260113-sound-soc-codecs-tvl320adcx140-v4-0-8f7ecec525c8@pengutronix.de> To: Shenghao Ding , Kevin Lu , Baojun Xu , Liam Girdwood , Mark Brown , Jaroslav Kysela , Takashi Iwai , Sebastian Andrzej Siewior , Clark Williams , Steven Rostedt , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Andrew Davis , Dan Murphy Cc: linux-sound@vger.kernel.org, linux-kernel@vger.kernel.org, Kevin Lu , linux-rt-devel@lists.linux.dev, devicetree@vger.kernel.org, Sascha Hauer , Emil-Juhl X-Mailer: b4 0.14.2 X-Developer-Signature: v=1; a=ed25519-sha256; t=1768301941; l=1285; i=s.hauer@pengutronix.de; s=20230412; h=from:subject:message-id; bh=7RfFbFyTNGaSY6avmnHjxprtJDzNzxIoQg0ZhbFwspg=; b=UBHlJ/236Ziodfh+SzYNxLFSl0PVrHj9nCxIZcNe4js09atVM98k6bbIjGkiXUhCK1rGh+WIB Hlwn4fF/VHEA+PhZvuJB692JtlfjeOpS4UVDyrnVOJST2F/YJMjfnBm X-Developer-Key: i=s.hauer@pengutronix.de; a=ed25519; pk=4kuc9ocmECiBJKWxYgqyhtZOHj5AWi7+d0n/UjhkwTg= X-SA-Exim-Connect-IP: 2a0a:edc0:0:c01:1d::a2 X-SA-Exim-Mail-From: s.hauer@pengutronix.de X-SA-Exim-Scanned: No (on metis.whiteo.stw.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: linux-kernel@vger.kernel.org From: Emil-Juhl The documentation for areg-supply could cause confusion mainly in terms of the relationship between AREG and AVDD. According to the datasheet[1] the AREG can be one of two cases: 1) an external 1.8V supply 2) generated by an internal regulator (hence a 1.8V output) [1] https://www.ti.com/lit/ds/symlink/tlv320adc5140.pdf Signed-off-by: Emil-Juhl Signed-off-by: Sascha Hauer Acked-by: Krzysztof Kozlowski --- Documentation/devicetree/bindings/sound/ti,tlv320adcx140.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Documentation/devicetree/bindings/sound/ti,tlv320adcx140.yaml = b/Documentation/devicetree/bindings/sound/ti,tlv320adcx140.yaml index 876fa97bfbcdd3b9450aa6ff57de42f1faed350d..b34ea7824360310434d8b826392= 864dbfa5fc369 100644 --- a/Documentation/devicetree/bindings/sound/ti,tlv320adcx140.yaml +++ b/Documentation/devicetree/bindings/sound/ti,tlv320adcx140.yaml @@ -41,8 +41,8 @@ properties: =20 areg-supply: description: | - Regulator with AVDD at 3.3V. If not defined then the internal regul= ator - is enabled. + External supply of 1.8V. If not defined then the internal regulator = is + enabled instead. =20 ti,mic-bias-source: description: | --=20 2.47.3 From nobody Mon Feb 9 19:10:17 2026 Received: from metis.whiteo.stw.pengutronix.de (metis.whiteo.stw.pengutronix.de [185.203.201.7]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id C81D738946A for ; Tue, 13 Jan 2026 10:59:35 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=185.203.201.7 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1768301981; cv=none; b=hTrkXYhtPYVo51oLpLNZWNCj7HgLzgQ4cRMtUHBviXuLcxIF0pz0kYJSnaVJgEhSJRScQpl176p+NWLOfsm8mbE58qfqp6UEigepH8dfjrYrv3OI9d9Nf/0rzDcS7drzh5bderygGO2n/Tb5MAa4sfUnH22s8NoaTn5u9/aLdks= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1768301981; c=relaxed/simple; bh=bWlAzt0P6LRMId2/rhlsH78d9IkGsugNdtTEQyxu0AY=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=BXHFOrJqqBnWjZbRm4pVR8cxV7X986wVab1OMSe4IQXOS10fQNOywkpTcrY1dYxA51irM/ylJjQ5ctw6TPYQP2svk2SModlQs0KLQs9HHtGD+0xPEu6J3/ltIwtLxdA0EV5595Cl6yY9czGOaKBe57Ugg1ZqF5DubE6p1bbYO6Q= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=pengutronix.de; spf=pass smtp.mailfrom=pengutronix.de; arc=none smtp.client-ip=185.203.201.7 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=pengutronix.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=pengutronix.de Received: from drehscheibe.grey.stw.pengutronix.de ([2a0a:edc0:0:c01:1d::a2]) by metis.whiteo.stw.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1vfc78-0008DJ-Al; Tue, 13 Jan 2026 11:59:06 +0100 Received: from dude02.red.stw.pengutronix.de ([2a0a:edc0:0:1101:1d::28]) by drehscheibe.grey.stw.pengutronix.de with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1vfc74-000PMI-2j; Tue, 13 Jan 2026 11:59:02 +0100 Received: from localhost ([::1] helo=dude02.red.stw.pengutronix.de) by dude02.red.stw.pengutronix.de with esmtp (Exim 4.98.2) (envelope-from ) id 1vfc73-00000004mJf-44vq; Tue, 13 Jan 2026 11:59:01 +0100 From: Sascha Hauer Date: Tue, 13 Jan 2026 11:58:51 +0100 Subject: [PATCH v4 08/10] ASoC: dt-bindings: add avdd and iovdd supply Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20260113-sound-soc-codecs-tvl320adcx140-v4-8-8f7ecec525c8@pengutronix.de> References: <20260113-sound-soc-codecs-tvl320adcx140-v4-0-8f7ecec525c8@pengutronix.de> In-Reply-To: <20260113-sound-soc-codecs-tvl320adcx140-v4-0-8f7ecec525c8@pengutronix.de> To: Shenghao Ding , Kevin Lu , Baojun Xu , Liam Girdwood , Mark Brown , Jaroslav Kysela , Takashi Iwai , Sebastian Andrzej Siewior , Clark Williams , Steven Rostedt , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Andrew Davis , Dan Murphy Cc: linux-sound@vger.kernel.org, linux-kernel@vger.kernel.org, Kevin Lu , linux-rt-devel@lists.linux.dev, devicetree@vger.kernel.org, Sascha Hauer , Krzysztof Kozlowski X-Mailer: b4 0.14.2 X-Developer-Signature: v=1; a=ed25519-sha256; t=1768301941; l=1028; i=s.hauer@pengutronix.de; s=20230412; h=from:subject:message-id; bh=bWlAzt0P6LRMId2/rhlsH78d9IkGsugNdtTEQyxu0AY=; b=z9/h8LxMekobiOM8Xojfefnxi1miRWaIjjCsOR+N+c2ucIdB0wSfcfJGCb7FpEXaY6B9Y0iTW SDRJFMYOTMXCSDgVXhs9dP8B5fIixTZuc+e2yuKEUx/V+SFhdDOmORs X-Developer-Key: i=s.hauer@pengutronix.de; a=ed25519; pk=4kuc9ocmECiBJKWxYgqyhtZOHj5AWi7+d0n/UjhkwTg= X-SA-Exim-Connect-IP: 2a0a:edc0:0:c01:1d::a2 X-SA-Exim-Mail-From: s.hauer@pengutronix.de X-SA-Exim-Scanned: No (on metis.whiteo.stw.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: linux-kernel@vger.kernel.org Add bindings for the avdd-supply and iovdd-supply which are named after the corresponding pins on the tlv320adcx140 chips. Acked-by: Krzysztof Kozlowski Signed-off-by: Sascha Hauer --- Documentation/devicetree/bindings/sound/ti,tlv320adcx140.yaml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Documentation/devicetree/bindings/sound/ti,tlv320adcx140.yaml = b/Documentation/devicetree/bindings/sound/ti,tlv320adcx140.yaml index b34ea7824360310434d8b826392864dbfa5fc369..a93de2debbb45a3daebb0e24397= e4893262e3a11 100644 --- a/Documentation/devicetree/bindings/sound/ti,tlv320adcx140.yaml +++ b/Documentation/devicetree/bindings/sound/ti,tlv320adcx140.yaml @@ -44,6 +44,9 @@ properties: External supply of 1.8V. If not defined then the internal regulator = is enabled instead. =20 + avdd-supply: true + iovdd-supply: true + ti,mic-bias-source: description: | Indicates the source for MIC Bias. --=20 2.47.3 From nobody Mon Feb 9 19:10:17 2026 Received: from metis.whiteo.stw.pengutronix.de (metis.whiteo.stw.pengutronix.de [185.203.201.7]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id B7DBA3806B8 for ; Tue, 13 Jan 2026 10:59:32 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=185.203.201.7 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1768301974; cv=none; b=Rg8603qjMHfOxv4/C3aVHmvlJJOC7UF5bOnANA7I+E1Q6iS39A2K7pQebnv680Cp/p2UWgXLAhMXMw/nyYRcHMVWhCOAudvbQOV8FbnzAfbw9UUp+E0w7lBAhpzi1XKakMrhezl4DxiiwpJh3M2YKHVlgNCm9WptPEKlefq6uTA= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1768301974; c=relaxed/simple; bh=GMmXlHBjFf0Xdy6Kc2aDI2qKFJNMDm44ufSzcK3vwmo=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=b7yr+HR2dv3nQV/z/TXLoPHbm1uhrrrQt6N4nzIFMaqVdjDQXxTcZVAAvN2Juo0xNtd8UGUoiqSbf5uBabP3G1w4b4hjMLZ+r0O1vME8nQaw9RoJ9lEJmVWuAyN3ledCtJOBDpDvDi04LRL3XQ4lAbB/Oadw62OR9H9mIA5zmKo= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=pengutronix.de; spf=pass smtp.mailfrom=pengutronix.de; arc=none smtp.client-ip=185.203.201.7 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=pengutronix.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=pengutronix.de Received: from drehscheibe.grey.stw.pengutronix.de ([2a0a:edc0:0:c01:1d::a2]) by metis.whiteo.stw.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1vfc78-0008DH-Al; Tue, 13 Jan 2026 11:59:06 +0100 Received: from dude02.red.stw.pengutronix.de ([2a0a:edc0:0:1101:1d::28]) by drehscheibe.grey.stw.pengutronix.de with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1vfc74-000PMJ-2e; Tue, 13 Jan 2026 11:59:02 +0100 Received: from localhost ([::1] helo=dude02.red.stw.pengutronix.de) by dude02.red.stw.pengutronix.de with esmtp (Exim 4.98.2) (envelope-from ) id 1vfc73-00000004mJf-46Bf; Tue, 13 Jan 2026 11:59:01 +0100 From: Sascha Hauer Date: Tue, 13 Jan 2026 11:58:52 +0100 Subject: [PATCH v4 09/10] ASoC: tlv320adcx140: add kcontrol for num biquads Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20260113-sound-soc-codecs-tvl320adcx140-v4-9-8f7ecec525c8@pengutronix.de> References: <20260113-sound-soc-codecs-tvl320adcx140-v4-0-8f7ecec525c8@pengutronix.de> In-Reply-To: <20260113-sound-soc-codecs-tvl320adcx140-v4-0-8f7ecec525c8@pengutronix.de> To: Shenghao Ding , Kevin Lu , Baojun Xu , Liam Girdwood , Mark Brown , Jaroslav Kysela , Takashi Iwai , Sebastian Andrzej Siewior , Clark Williams , Steven Rostedt , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Andrew Davis , Dan Murphy Cc: linux-sound@vger.kernel.org, linux-kernel@vger.kernel.org, Kevin Lu , linux-rt-devel@lists.linux.dev, devicetree@vger.kernel.org, Sascha Hauer , Emil-Juhl X-Mailer: b4 0.14.2 X-Developer-Signature: v=1; a=ed25519-sha256; t=1768301941; l=1192; i=s.hauer@pengutronix.de; s=20230412; h=from:subject:message-id; bh=B80SPpYYrd928XmCKz0MrXxcbEz/wYnv66aoOR2XOes=; b=P9LavGAcfo+Ds9DjMu9rqkoXRC9UkqsKaS1ircmFCnmVNj2oY2foZKwT52w/7VfaOg/2oy8Pp wPVjZw+3+SUDJZpJNcNM45jRQb0xkjYyAGsULA07BLtQqkyC5GHB2Y1 X-Developer-Key: i=s.hauer@pengutronix.de; a=ed25519; pk=4kuc9ocmECiBJKWxYgqyhtZOHj5AWi7+d0n/UjhkwTg= X-SA-Exim-Connect-IP: 2a0a:edc0:0:c01:1d::a2 X-SA-Exim-Mail-From: s.hauer@pengutronix.de X-SA-Exim-Scanned: No (on metis.whiteo.stw.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: linux-kernel@vger.kernel.org From: Emil-Juhl The tlv320adcx140 chips have a configurable amount of biquad filters enabled per input channel. Currently this number is always left at the default value of 2 biquads per channel. This commit adds a kcontrol to allow runtime configuration of the amount of biquads per channel. The configuration is controlled by bits [5-6] in the DSP_CFG1 register. Signed-off-by: Emil-Juhl Signed-off-by: Sascha Hauer --- sound/soc/codecs/tlv320adcx140.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sound/soc/codecs/tlv320adcx140.c b/sound/soc/codecs/tlv320adcx= 140.c index a7200e149e5f40ddd61e3c0455b796c81f55e2e8..e7c607af642f43b2b783597f3cb= a3a8cbb31de4a 100644 --- a/sound/soc/codecs/tlv320adcx140.c +++ b/sound/soc/codecs/tlv320adcx140.c @@ -709,6 +709,8 @@ static const struct snd_kcontrol_new adcx140_snd_contro= ls[] =3D { SOC_SINGLE_TLV("Digital CH8 Out Volume", ADCX140_CH8_CFG2, 0, 0xff, 0, dig_vol_tlv), ADCX140_PHASE_CALIB_SWITCH("Phase Calibration Switch"), + + SOC_SINGLE("Biquads Per Channel", ADCX140_DSP_CFG1, 5, 3, 0), }; =20 static int adcx140_reset(struct adcx140_priv *adcx140) --=20 2.47.3 From nobody Mon Feb 9 19:10:17 2026 Received: from metis.whiteo.stw.pengutronix.de (metis.whiteo.stw.pengutronix.de [185.203.201.7]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 3BB712FF150 for ; Tue, 13 Jan 2026 11:01:47 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=185.203.201.7 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1768302108; cv=none; b=Vd5P3IZQEmKNMqN/APP1/GCCbarbjEXvCbp7UvzR6mgJskIgtqoAMFplEYq6i3DOj1nuTuN3z8mmt6Olm1UY5IxRTeM2Q1q8cVP31I5MEj72PqKYn2wacV2MN87AKJrrmg/oy9VtHmu3TJAks4v98ZMIwtFG1gcQZ2jdQPxq474= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1768302108; c=relaxed/simple; bh=zIzI+RWN8I+PPp7gM10QfdwWfky+ttRAA/4WGgQBPSs=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=PuX8WQIfcmVIMyelm2zzZUs/QktR9Uv/VwlMqGGTOObUp7UEoVjsslTq9bCF1bzfhhp9+dK4YM0TfQJNdTt8+nVKjw2s5XaJmeR2lW5oZllijl+AW5g89dBNdyxpWw9oNdZMC57bul6xTel5WIlbmOGMq7m1SvTwrKV83S8Xsjo= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=pengutronix.de; spf=pass smtp.mailfrom=pengutronix.de; arc=none smtp.client-ip=185.203.201.7 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=pengutronix.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=pengutronix.de Received: from drehscheibe.grey.stw.pengutronix.de ([2a0a:edc0:0:c01:1d::a2]) by metis.whiteo.stw.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1vfc9T-0000pd-4l; Tue, 13 Jan 2026 12:01:31 +0100 Received: from dude02.red.stw.pengutronix.de ([2a0a:edc0:0:1101:1d::28]) by drehscheibe.grey.stw.pengutronix.de with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1vfc9R-000PMy-33; Tue, 13 Jan 2026 12:01:29 +0100 Received: from localhost ([::1] helo=dude02.red.stw.pengutronix.de) by dude02.red.stw.pengutronix.de with esmtp (Exim 4.98.2) (envelope-from ) id 1vfc73-00000004mJf-47l9; Tue, 13 Jan 2026 11:59:01 +0100 From: Sascha Hauer Date: Tue, 13 Jan 2026 11:58:53 +0100 Subject: [PATCH v4 10/10] ASoC: tlv320adcx140: add channel sum control Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20260113-sound-soc-codecs-tvl320adcx140-v4-10-8f7ecec525c8@pengutronix.de> References: <20260113-sound-soc-codecs-tvl320adcx140-v4-0-8f7ecec525c8@pengutronix.de> In-Reply-To: <20260113-sound-soc-codecs-tvl320adcx140-v4-0-8f7ecec525c8@pengutronix.de> To: Shenghao Ding , Kevin Lu , Baojun Xu , Liam Girdwood , Mark Brown , Jaroslav Kysela , Takashi Iwai , Sebastian Andrzej Siewior , Clark Williams , Steven Rostedt , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Andrew Davis , Dan Murphy Cc: linux-sound@vger.kernel.org, linux-kernel@vger.kernel.org, Kevin Lu , linux-rt-devel@lists.linux.dev, devicetree@vger.kernel.org, Sascha Hauer , Emil Svendsen X-Mailer: b4 0.14.2 X-Developer-Signature: v=1; a=ed25519-sha256; t=1768301941; l=1805; i=s.hauer@pengutronix.de; s=20230412; h=from:subject:message-id; bh=0KnIM+Y4QBq/N0NnDfRAKNRfpAubDFVWi/5K2Fijr9k=; b=Bj+rKRk752Qpv5Rmpdax53pKUfFD5uWTAI35FT9QJzqWtNuxyZNRJueGdpjSTYrTgWYC6TTqK 9xXTbBBb4UDAdWRTEbH4YiLVUdPzRDIYhnBnRDc38L3uVZrnrc8H74I X-Developer-Key: i=s.hauer@pengutronix.de; a=ed25519; pk=4kuc9ocmECiBJKWxYgqyhtZOHj5AWi7+d0n/UjhkwTg= X-SA-Exim-Connect-IP: 2a0a:edc0:0:c01:1d::a2 X-SA-Exim-Mail-From: s.hauer@pengutronix.de X-SA-Exim-Scanned: No (on metis.whiteo.stw.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: linux-kernel@vger.kernel.org From: Emil Svendsen 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 Signed-off-by: Sascha Hauer --- sound/soc/codecs/tlv320adcx140.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/sound/soc/codecs/tlv320adcx140.c b/sound/soc/codecs/tlv320adcx= 140.c index e7c607af642f43b2b783597f3cba3a8cbb31de4a..ac6aab8d722409b2c47b4e1df2a= 23760bebe795b 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[] =3D { SOC_DAPM_ENUM("Decimation Filter", decimation_filter_enum), }; =20 +static const char * const channel_summation_text[] =3D { + "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[] =3D { "2.8224 MHz", "1.4112 MHz", "705.6 kHz", "5.6448 MHz" }; @@ -711,6 +718,8 @@ static const struct snd_kcontrol_new adcx140_snd_contro= ls[] =3D { ADCX140_PHASE_CALIB_SWITCH("Phase Calibration Switch"), =20 SOC_SINGLE("Biquads Per Channel", ADCX140_DSP_CFG1, 5, 3, 0), + + SOC_ENUM("Channel Summation", channel_summation_enum), }; =20 static int adcx140_reset(struct adcx140_priv *adcx140) --=20 2.47.3