Devicetree
 help / color / mirror / Atom feed
* [PATCH RFC 0/2] Correctly use TX macro v9.4 for SC7280 / Kodiak
@ 2026-05-26 15:29 Luca Weiss
  2026-05-26 15:29 ` [PATCH RFC 1/2] ASoC: codecs: lpass-tx-macro: Use correct config for sc7280 Luca Weiss
                   ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: Luca Weiss @ 2026-05-26 15:29 UTC (permalink / raw)
  To: Srinivas Kandagatla, Liam Girdwood, Mark Brown, Jaroslav Kysela,
	Takashi Iwai, Bjorn Andersson, Konrad Dybcio, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley, cros-qcom-dts-watchers
  Cc: ~postmarketos/upstreaming, phone-devel, linux-sound,
	linux-arm-msm, linux-kernel, devicetree, Luca Weiss

With the v9 data, that sc7280 is mistakenly using, the controls will
have completely wrong names and using wrong code paths that do not apply
to TX macro v9.4.

This is an RFC to get some feedback how to continue.

1. We update the "qcom,sc7280-lpass-tx-macro" compatible to 9.4, break
   unchanged dtbs (the sources are updated in this series) and break UCM
   until it's updated.

2. We add a new compatible "qcom,sc7280-lpass-tx-macro-fixed" - name is
   just a suggestion ;) - and make sure existing boards with audio keep
   using the old "broken" compatible. This should be completely
   backwards compatible, since we keep the existing compatible working
   as-is.

3. We add some dt flag "qcom,use-correct-tx-macro-version;" and handle
   the rest similar to option 2, by opting in boards to the updated
   behavior.

4. We keep everything the same. We know it's wrong, both the
   audio-routing in dtb and the controls in UCM have incorrect names,
   but it's working apparently.

Please let me know your thoughts.

As a bit of a note where I'm coming from, I'm working on microphone
bringup for qcm6490-fairphone-fp5 where so far we've been using
qcom,sm8450-lpass-tx-macro to get the correct control names. I've tried
reverting to sc7280-lpass-tx-macro, updating audio-routing in dts and
UCM to the v9.0 names and it does seem that microphone (AMIC1) is
working with that, but I'm not particularly happy about leaving the
wrong control names everywhere, so I'm happy to try and untangle this
situation.

I'm also not sure where this v9.x actually comes from, maybe I'm lacking
some documentation, downstream kernel only refers to Bolero v1.x and
v2.x so these seems to be a completely different versioning system.

Signed-off-by: Luca Weiss <luca.weiss@fairphone.com>
---
Luca Weiss (2):
      ASoC: codecs: lpass-tx-macro: Use correct config for sc7280
      arm64: dts: qcom: kodiak: Fix up LPASS TX macro v9.4 control names

 arch/arm64/boot/dts/qcom/qcm6490-idp.dts           |  2 +-
 .../boot/dts/qcom/qcs6490-radxa-dragon-q6a.dts     |  2 +-
 arch/arm64/boot/dts/qcom/sc7280-crd-r3.dts         | 22 +++++++++++-----------
 .../dts/qcom/sc7280-herobrine-audio-wcd9385.dtsi   | 22 +++++++++++-----------
 .../dts/qcom/sc7280-herobrine-villager-r1.dtsi     | 22 +++++++++++-----------
 arch/arm64/boot/dts/qcom/sc7280-idp.dtsi           | 22 +++++++++++-----------
 sound/soc/codecs/lpass-tx-macro.c                  |  9 ++-------
 7 files changed, 48 insertions(+), 53 deletions(-)
---
base-commit: 550604d6c9b9efc8d068aff94dc301694a7afdee
change-id: 20260526-sc7280-tx-macro-1179d786af1f

Best regards,
--  
Luca Weiss <luca.weiss@fairphone.com>


^ permalink raw reply	[flat|nested] 7+ messages in thread

* [PATCH RFC 1/2] ASoC: codecs: lpass-tx-macro: Use correct config for sc7280
  2026-05-26 15:29 [PATCH RFC 0/2] Correctly use TX macro v9.4 for SC7280 / Kodiak Luca Weiss
@ 2026-05-26 15:29 ` Luca Weiss
  2026-05-26 15:58   ` sashiko-bot
  2026-07-03 23:55   ` Dmitry Baryshkov
  2026-05-26 15:29 ` [PATCH RFC 2/2] arm64: dts: qcom: kodiak: Fix up LPASS TX macro v9.4 control names Luca Weiss
  2026-07-03  9:40 ` [PATCH RFC 0/2] Correctly use TX macro v9.4 for SC7280 / Kodiak Luca Weiss
  2 siblings, 2 replies; 7+ messages in thread
From: Luca Weiss @ 2026-05-26 15:29 UTC (permalink / raw)
  To: Srinivas Kandagatla, Liam Girdwood, Mark Brown, Jaroslav Kysela,
	Takashi Iwai, Bjorn Andersson, Konrad Dybcio, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley, cros-qcom-dts-watchers
  Cc: ~postmarketos/upstreaming, phone-devel, linux-sound,
	linux-arm-msm, linux-kernel, devicetree, Luca Weiss

With the v9 data, the controls will have completely wrong names and
using wrong code paths that do not apply to v9.4.

Note, that this will change control names so it's a breaking change.

Signed-off-by: Luca Weiss <luca.weiss@fairphone.com>
---
 sound/soc/codecs/lpass-tx-macro.c | 9 ++-------
 1 file changed, 2 insertions(+), 7 deletions(-)

diff --git a/sound/soc/codecs/lpass-tx-macro.c b/sound/soc/codecs/lpass-tx-macro.c
index f7d168f557dd..7f93ab0c3872 100644
--- a/sound/soc/codecs/lpass-tx-macro.c
+++ b/sound/soc/codecs/lpass-tx-macro.c
@@ -2493,14 +2493,9 @@ static const struct tx_macro_data lpass_ver_11 = {
 
 static const struct of_device_id tx_macro_dt_match[] = {
 	{
-		/*
-		 * The block is actually LPASS v9.4, but keep LPASS v9 match
-		 * data and audio widgets, due to compatibility reasons.
-		 * Microphones are working on SC7280 fine, so apparently the fix
-		 * is not necessary.
-		 */
 		.compatible = "qcom,sc7280-lpass-tx-macro",
-		.data = &lpass_ver_9,
+		/* LPASS v9.4 */
+		.data = &lpass_ver_9_2,
 	}, {
 		.compatible = "qcom,sm6115-lpass-tx-macro",
 		.data = &lpass_ver_10_sm6115,

-- 
2.54.0


^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [PATCH RFC 2/2] arm64: dts: qcom: kodiak: Fix up LPASS TX macro v9.4 control names
  2026-05-26 15:29 [PATCH RFC 0/2] Correctly use TX macro v9.4 for SC7280 / Kodiak Luca Weiss
  2026-05-26 15:29 ` [PATCH RFC 1/2] ASoC: codecs: lpass-tx-macro: Use correct config for sc7280 Luca Weiss
@ 2026-05-26 15:29 ` Luca Weiss
  2026-05-26 16:16   ` sashiko-bot
  2026-07-03  9:40 ` [PATCH RFC 0/2] Correctly use TX macro v9.4 for SC7280 / Kodiak Luca Weiss
  2 siblings, 1 reply; 7+ messages in thread
From: Luca Weiss @ 2026-05-26 15:29 UTC (permalink / raw)
  To: Srinivas Kandagatla, Liam Girdwood, Mark Brown, Jaroslav Kysela,
	Takashi Iwai, Bjorn Andersson, Konrad Dybcio, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley, cros-qcom-dts-watchers
  Cc: ~postmarketos/upstreaming, phone-devel, linux-sound,
	linux-arm-msm, linux-kernel, devicetree, Luca Weiss

After fixing to the lpass-tx-macro driver to use the correct v9.4
configuration, some control names have changed and therefore need to be
updated.

* "TX SWR_ADC" 0-3 becomes "TX SWR_INPUT" 0-3
* "TX SWR_DMIC" 0-7 becomes "TX SWR_INPUT" 4-11

Update all usages in dts.

Signed-off-by: Luca Weiss <luca.weiss@fairphone.com>
---
 arch/arm64/boot/dts/qcom/qcm6490-idp.dts           |  2 +-
 .../boot/dts/qcom/qcs6490-radxa-dragon-q6a.dts     |  2 +-
 arch/arm64/boot/dts/qcom/sc7280-crd-r3.dts         | 22 +++++++++++-----------
 .../dts/qcom/sc7280-herobrine-audio-wcd9385.dtsi   | 22 +++++++++++-----------
 .../dts/qcom/sc7280-herobrine-villager-r1.dtsi     | 22 +++++++++++-----------
 arch/arm64/boot/dts/qcom/sc7280-idp.dtsi           | 22 +++++++++++-----------
 6 files changed, 46 insertions(+), 46 deletions(-)

diff --git a/arch/arm64/boot/dts/qcom/qcm6490-idp.dts b/arch/arm64/boot/dts/qcom/qcm6490-idp.dts
index bdc02260f902..565f7db91e77 100644
--- a/arch/arm64/boot/dts/qcom/qcm6490-idp.dts
+++ b/arch/arm64/boot/dts/qcom/qcm6490-idp.dts
@@ -860,7 +860,7 @@ &sound {
 			"TX DMIC0", "MIC BIAS1",
 			"TX DMIC1", "MIC BIAS2",
 			"TX DMIC2", "MIC BIAS3",
-			"TX SWR_ADC1", "ADC2_OUTPUT",
+			"TX SWR_INPUT1", "ADC2_OUTPUT",
 			"VA DMIC0", "VA MIC BIAS3",
 			"VA DMIC1", "VA MIC BIAS3",
 			"VA DMIC2", "VA MIC BIAS1",
diff --git a/arch/arm64/boot/dts/qcom/qcs6490-radxa-dragon-q6a.dts b/arch/arm64/boot/dts/qcom/qcs6490-radxa-dragon-q6a.dts
index bb5a42b038f1..a36bd6120ea2 100644
--- a/arch/arm64/boot/dts/qcom/qcs6490-radxa-dragon-q6a.dts
+++ b/arch/arm64/boot/dts/qcom/qcs6490-radxa-dragon-q6a.dts
@@ -736,7 +736,7 @@ &sound {
 	audio-routing = "IN1_HPHL", "HPHL_OUT",
 			"IN2_HPHR", "HPHR_OUT",
 			"AMIC2", "MIC BIAS2",
-			"TX SWR_ADC1", "ADC2_OUTPUT";
+			"TX SWR_INPUT1", "ADC2_OUTPUT";
 
 	wcd-playback-dai-link {
 		link-name = "WCD Playback";
diff --git a/arch/arm64/boot/dts/qcom/sc7280-crd-r3.dts b/arch/arm64/boot/dts/qcom/sc7280-crd-r3.dts
index c2cba9d7179b..ffe028bd0c72 100644
--- a/arch/arm64/boot/dts/qcom/sc7280-crd-r3.dts
+++ b/arch/arm64/boot/dts/qcom/sc7280-crd-r3.dts
@@ -101,17 +101,17 @@ &sound {
 		"VA DMIC1", "MIC BIAS1",
 		"VA DMIC2", "MIC BIAS3",
 		"VA DMIC3", "MIC BIAS3",
-		"TX SWR_ADC0", "ADC1_OUTPUT",
-		"TX SWR_ADC1", "ADC2_OUTPUT",
-		"TX SWR_ADC2", "ADC3_OUTPUT",
-		"TX SWR_DMIC0", "DMIC1_OUTPUT",
-		"TX SWR_DMIC1", "DMIC2_OUTPUT",
-		"TX SWR_DMIC2", "DMIC3_OUTPUT",
-		"TX SWR_DMIC3", "DMIC4_OUTPUT",
-		"TX SWR_DMIC4", "DMIC5_OUTPUT",
-		"TX SWR_DMIC5", "DMIC6_OUTPUT",
-		"TX SWR_DMIC6", "DMIC7_OUTPUT",
-		"TX SWR_DMIC7", "DMIC8_OUTPUT";
+		"TX SWR_INPUT0", "ADC1_OUTPUT",
+		"TX SWR_INPUT1", "ADC2_OUTPUT",
+		"TX SWR_INPUT2", "ADC3_OUTPUT",
+		"TX SWR_INPUT4", "DMIC1_OUTPUT",
+		"TX SWR_INPUT5", "DMIC2_OUTPUT",
+		"TX SWR_INPUT6", "DMIC3_OUTPUT",
+		"TX SWR_INPUT7", "DMIC4_OUTPUT",
+		"TX SWR_INPUT8", "DMIC5_OUTPUT",
+		"TX SWR_INPUT9", "DMIC6_OUTPUT",
+		"TX SWR_INPUT10", "DMIC7_OUTPUT",
+		"TX SWR_INPUT11", "DMIC8_OUTPUT";
 };
 
 &wcd9385 {
diff --git a/arch/arm64/boot/dts/qcom/sc7280-herobrine-audio-wcd9385.dtsi b/arch/arm64/boot/dts/qcom/sc7280-herobrine-audio-wcd9385.dtsi
index ce48e4cda170..bc492346f7dc 100644
--- a/arch/arm64/boot/dts/qcom/sc7280-herobrine-audio-wcd9385.dtsi
+++ b/arch/arm64/boot/dts/qcom/sc7280-herobrine-audio-wcd9385.dtsi
@@ -20,17 +20,17 @@ sound: sound {
 			"VA DMIC1", "MIC BIAS1",
 			"VA DMIC2", "MIC BIAS3",
 			"VA DMIC3", "MIC BIAS3",
-			"TX SWR_ADC0", "ADC1_OUTPUT",
-			"TX SWR_ADC1", "ADC2_OUTPUT",
-			"TX SWR_ADC2", "ADC3_OUTPUT",
-			"TX SWR_DMIC0", "DMIC1_OUTPUT",
-			"TX SWR_DMIC1", "DMIC2_OUTPUT",
-			"TX SWR_DMIC2", "DMIC3_OUTPUT",
-			"TX SWR_DMIC3", "DMIC4_OUTPUT",
-			"TX SWR_DMIC4", "DMIC5_OUTPUT",
-			"TX SWR_DMIC5", "DMIC6_OUTPUT",
-			"TX SWR_DMIC6", "DMIC7_OUTPUT",
-			"TX SWR_DMIC7", "DMIC8_OUTPUT";
+			"TX SWR_INPUT0", "ADC1_OUTPUT",
+			"TX SWR_INPUT1", "ADC2_OUTPUT",
+			"TX SWR_INPUT2", "ADC3_OUTPUT",
+			"TX SWR_INPUT4", "DMIC1_OUTPUT",
+			"TX SWR_INPUT5", "DMIC2_OUTPUT",
+			"TX SWR_INPUT6", "DMIC3_OUTPUT",
+			"TX SWR_INPUT7", "DMIC4_OUTPUT",
+			"TX SWR_INPUT8", "DMIC5_OUTPUT",
+			"TX SWR_INPUT9", "DMIC6_OUTPUT",
+			"TX SWR_INPUT10", "DMIC7_OUTPUT",
+			"TX SWR_INPUT11", "DMIC8_OUTPUT";
 
 		#address-cells = <1>;
 		#size-cells = <0>;
diff --git a/arch/arm64/boot/dts/qcom/sc7280-herobrine-villager-r1.dtsi b/arch/arm64/boot/dts/qcom/sc7280-herobrine-villager-r1.dtsi
index b25df5a99161..c6606b1eb71c 100644
--- a/arch/arm64/boot/dts/qcom/sc7280-herobrine-villager-r1.dtsi
+++ b/arch/arm64/boot/dts/qcom/sc7280-herobrine-villager-r1.dtsi
@@ -23,15 +23,15 @@ &sound {
 			"VA DMIC1", "vdd-micb",
 			"VA DMIC2", "vdd-micb",
 			"VA DMIC3", "vdd-micb",
-			"TX SWR_ADC0", "ADC1_OUTPUT",
-			"TX SWR_ADC1", "ADC2_OUTPUT",
-			"TX SWR_ADC2", "ADC3_OUTPUT",
-			"TX SWR_DMIC0", "DMIC1_OUTPUT",
-			"TX SWR_DMIC1", "DMIC2_OUTPUT",
-			"TX SWR_DMIC2", "DMIC3_OUTPUT",
-			"TX SWR_DMIC3", "DMIC4_OUTPUT",
-			"TX SWR_DMIC4", "DMIC5_OUTPUT",
-			"TX SWR_DMIC5", "DMIC6_OUTPUT",
-			"TX SWR_DMIC6", "DMIC7_OUTPUT",
-			"TX SWR_DMIC7", "DMIC8_OUTPUT";
+			"TX SWR_INPUT0", "ADC1_OUTPUT",
+			"TX SWR_INPUT1", "ADC2_OUTPUT",
+			"TX SWR_INPUT2", "ADC3_OUTPUT",
+			"TX SWR_INPUT4", "DMIC1_OUTPUT",
+			"TX SWR_INPUT5", "DMIC2_OUTPUT",
+			"TX SWR_INPUT6", "DMIC3_OUTPUT",
+			"TX SWR_INPUT7", "DMIC4_OUTPUT",
+			"TX SWR_INPUT8", "DMIC5_OUTPUT",
+			"TX SWR_INPUT9", "DMIC6_OUTPUT",
+			"TX SWR_INPUT10", "DMIC7_OUTPUT",
+			"TX SWR_INPUT11", "DMIC8_OUTPUT";
 };
diff --git a/arch/arm64/boot/dts/qcom/sc7280-idp.dtsi b/arch/arm64/boot/dts/qcom/sc7280-idp.dtsi
index 8cac4ce9c851..e54379147d2b 100644
--- a/arch/arm64/boot/dts/qcom/sc7280-idp.dtsi
+++ b/arch/arm64/boot/dts/qcom/sc7280-idp.dtsi
@@ -101,17 +101,17 @@ sound: sound {
 			"VA DMIC1", "MIC BIAS3",
 			"VA DMIC2", "MIC BIAS1",
 			"VA DMIC3", "MIC BIAS1",
-			"TX SWR_ADC0", "ADC1_OUTPUT",
-			"TX SWR_ADC1", "ADC2_OUTPUT",
-			"TX SWR_ADC2", "ADC3_OUTPUT",
-			"TX SWR_DMIC0", "DMIC1_OUTPUT",
-			"TX SWR_DMIC1", "DMIC2_OUTPUT",
-			"TX SWR_DMIC2", "DMIC3_OUTPUT",
-			"TX SWR_DMIC3", "DMIC4_OUTPUT",
-			"TX SWR_DMIC4", "DMIC5_OUTPUT",
-			"TX SWR_DMIC5", "DMIC6_OUTPUT",
-			"TX SWR_DMIC6", "DMIC7_OUTPUT",
-			"TX SWR_DMIC7", "DMIC8_OUTPUT";
+			"TX SWR_INPUT0", "ADC1_OUTPUT",
+			"TX SWR_INPUT1", "ADC2_OUTPUT",
+			"TX SWR_INPUT2", "ADC3_OUTPUT",
+			"TX SWR_INPUT4", "DMIC1_OUTPUT",
+			"TX SWR_INPUT5", "DMIC2_OUTPUT",
+			"TX SWR_INPUT6", "DMIC3_OUTPUT",
+			"TX SWR_INPUT7", "DMIC4_OUTPUT",
+			"TX SWR_INPUT8", "DMIC5_OUTPUT",
+			"TX SWR_INPUT9", "DMIC6_OUTPUT",
+			"TX SWR_INPUT10", "DMIC7_OUTPUT",
+			"TX SWR_INPUT11", "DMIC8_OUTPUT";
 
 		#address-cells = <1>;
 		#size-cells = <0>;

-- 
2.54.0


^ permalink raw reply related	[flat|nested] 7+ messages in thread

* Re: [PATCH RFC 1/2] ASoC: codecs: lpass-tx-macro: Use correct config for sc7280
  2026-05-26 15:29 ` [PATCH RFC 1/2] ASoC: codecs: lpass-tx-macro: Use correct config for sc7280 Luca Weiss
@ 2026-05-26 15:58   ` sashiko-bot
  2026-07-03 23:55   ` Dmitry Baryshkov
  1 sibling, 0 replies; 7+ messages in thread
From: sashiko-bot @ 2026-05-26 15:58 UTC (permalink / raw)
  To: Luca Weiss; +Cc: robh, conor+dt, devicetree

Thank you for your contribution! Sashiko AI review found 2 potential issue(s) to consider:

New issues:
- [High] Changing the match data for qcom,sc7280-lpass-tx-macro breaks userspace ALSA ABI and in-kernel DTS routing.

Pre-existing issues:
- [High] The v9.2 SMIC selection logic contains dead code and fails to initialize DMIC clocks.
--

commit 75eb73d3fec8fc578947e66030a2b59ca6333c91
Author: Luca Weiss <luca.weiss@fairphone.com>

ASoC: codecs: lpass-tx-macro: Use correct config for sc7280

This commit updates the match data for the qcom,sc7280-lpass-tx-macro
compatible string to use lpass_ver_9_2 instead of lpass_ver_9. The commit
message notes this will change control names and warns it is a breaking
change.

> Note, that this will change control names so it's a breaking change.

[Severity: High]
Does this violate the kernel's policy against breaking userspace ABI?

Changing the match data to lpass_ver_9_2 alters the names of DAPM widgets
and ALSA controls. This will break existing ALSA UCM configurations that
rely on the old names. 

Additionally, will this break in-kernel DTS routing for other SC7280 boards?

Multiple in-tree SC7280 device tree files (like sc7280-herobrine and
sc7280-idp) hardcode the old routing names (TX SWR_ADCn and TX SWR_DMICn).

Since these DTS files aren't updated, could the sound card fail to
instantiate on those boards due to missing audio routes?

> diff --git a/sound/soc/codecs/lpass-tx-macro.c b/sound/soc/codecs/lpass-tx-macro.c
> index f7d168f557dd8..7f93ab0c38723 100644
> --- a/sound/soc/codecs/lpass-tx-macro.c
> +++ b/sound/soc/codecs/lpass-tx-macro.c
> @@ -2493,14 +2493,9 @@ static const struct tx_macro_data lpass_ver_11 = {
>  
>  static const struct of_device_id tx_macro_dt_match[] = {
>  	{
> -		/*
> -		 * The block is actually LPASS v9.4, but keep LPASS v9 match
> -		 * data and audio widgets, due to compatibility reasons.
> -		 * Microphones are working on SC7280 fine, so apparently the fix
> -		 * is not necessary.
> -		 */
>  		.compatible = "qcom,sc7280-lpass-tx-macro",
> -		.data = &lpass_ver_9,
> +		/* LPASS v9.4 */
> +		.data = &lpass_ver_9_2,

[Severity: High]
This is a pre-existing issue, but by forcing SC7280 to use the v9.2 code paths,
does this expose the device to a broken DMIC clock initialization logic?

In tx_macro_put_dec_enum(), tx_macro_update_smic_sel_v9_2() is exclusively
called in the else branch when widget->shift is 0:

sound/soc/codecs/lpass-tx-macro.c:tx_macro_put_dec_enum() {
	...
	if (val != 0) {
		if (widget->shift) /* MSM DMIC */
			snd_soc_component_write_field(...);
		else if (tx->data->ver <= LPASS_VER_9_0_0)
			tx_macro_update_smic_sel_v9(...);
		else
			tx_macro_update_smic_sel_v9_2(component, widget, tx,
						      mic_sel_reg, val);
	}
	...
}

However, inside tx_macro_update_smic_sel_v9_2(), there is an if block intended
to initialize the DMIC clocks:

sound/soc/codecs/lpass-tx-macro.c:tx_macro_update_smic_sel_v9_2() {
	...
	if (widget->shift) {
		/* MSM DMIC */
		snd_soc_component_write_field(component, mic_sel_reg,
					      CDC_TXn_ADC_DMIC_SEL_MASK, 1);
		...
		snd_soc_component_write_field(component, dmic_clk_reg,
					      CDC_TX_SWR_DMIC_CLK_SEL_MASK,
					      CDC_TX_SWR_MIC_CLK_DEFAULT);
	}
}

Because widget->shift is always 0 when this function is called, this block
appears to be dead code and structurally impossible to reach.

Consequently, are DMIC clocks failing to initialize for v9.2 hardware?

>  	}, {
>  		.compatible = "qcom,sm6115-lpass-tx-macro",
>  		.data = &lpass_ver_10_sm6115,

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20260526-sc7280-tx-macro-v1-0-1aad6900fec0@fairphone.com?part=1

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH RFC 2/2] arm64: dts: qcom: kodiak: Fix up LPASS TX macro v9.4 control names
  2026-05-26 15:29 ` [PATCH RFC 2/2] arm64: dts: qcom: kodiak: Fix up LPASS TX macro v9.4 control names Luca Weiss
@ 2026-05-26 16:16   ` sashiko-bot
  0 siblings, 0 replies; 7+ messages in thread
From: sashiko-bot @ 2026-05-26 16:16 UTC (permalink / raw)
  To: Luca Weiss; +Cc: conor+dt, devicetree, robh

Thank you for your contribution! Sashiko AI review found 2 potential issue(s) to consider:
- [Critical] Critical ABI Breakage: Unilateral ALSA control rename breaks userspace UCM and DT backward/forward compatibility.
- [Low] Binding Schema Consistency: YAML device tree binding example retains obsolete audio routing strings.
--

commit e8146d6a5dc9b62baace794be0e79e57fb705798
Author: Luca Weiss <luca.weiss@fairphone.com>

arm64: dts: qcom: kodiak: Fix up LPASS TX macro v9.4 control names

This commit updates the audio routing properties in several Qualcomm device
trees to reflect changes in the LPASS TX macro v9.4 control names.
Specifically, it renames "TX SWR_ADC" and "TX SWR_DMIC" to "TX SWR_INPUT".

> diff --git a/arch/arm64/boot/dts/qcom/qcm6490-idp.dts b/arch/arm64/boot/dts/qcom/qcm6490-idp.dts
> index bdc02260f902b..565f7db91e77c 100644
> --- a/arch/arm64/boot/dts/qcom/qcm6490-idp.dts
> +++ b/arch/arm64/boot/dts/qcom/qcm6490-idp.dts
> @@ -860,7 +860,7 @@ &sound {
>  			"TX DMIC0", "MIC BIAS1",
>  			"TX DMIC1", "MIC BIAS2",
>  			"TX DMIC2", "MIC BIAS3",
> -			"TX SWR_ADC1", "ADC2_OUTPUT",
> +			"TX SWR_INPUT1", "ADC2_OUTPUT",

[Severity: Critical]
Does changing these control names without providing an alias break existing
userspace ALSA UCM configurations?

Since older device trees and userspace setups might still expect the
"TX SWR_ADC" and "TX SWR_DMIC" routing strings, does this unilateral rename
cause backward and forward compatibility regressions for systems relying on
the previous names?

[ ... ]

> diff --git a/arch/arm64/boot/dts/qcom/sc7280-herobrine-audio-wcd9385.dtsi b/arch/arm64/boot/dts/qcom/sc7280-herobrine-audio-wcd9385.dtsi
> index ce48e4cda1708..bc492346f7dc2 100644
> --- a/arch/arm64/boot/dts/qcom/sc7280-herobrine-audio-wcd9385.dtsi
> +++ b/arch/arm64/boot/dts/qcom/sc7280-herobrine-audio-wcd9385.dtsi
> @@ -20,17 +20,17 @@ sound: sound {
>  			"VA DMIC1", "MIC BIAS1",
>  			"VA DMIC2", "MIC BIAS3",
>  			"VA DMIC3", "MIC BIAS3",
> -			"TX SWR_ADC0", "ADC1_OUTPUT",
> -			"TX SWR_ADC1", "ADC2_OUTPUT",
> -			"TX SWR_ADC2", "ADC3_OUTPUT",
> -			"TX SWR_DMIC0", "DMIC1_OUTPUT",
> -			"TX SWR_DMIC1", "DMIC2_OUTPUT",
> +			"TX SWR_INPUT0", "ADC1_OUTPUT",
> +			"TX SWR_INPUT1", "ADC2_OUTPUT",
> +			"TX SWR_INPUT2", "ADC3_OUTPUT",
> +			"TX SWR_INPUT4", "DMIC1_OUTPUT",
> +			"TX SWR_INPUT5", "DMIC2_OUTPUT",

[Severity: Low]
Does the device tree binding example for this hardware also need updating?

The schema at Documentation/devicetree/bindings/sound/google,sc7280-herobrine.yaml
still contains the obsolete "TX SWR_ADC" and "TX SWR_DMIC" audio routing
strings in its example section, which might now be out of sync with these
driver updates.

[ ... ]

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20260526-sc7280-tx-macro-v1-0-1aad6900fec0@fairphone.com?part=2

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH RFC 0/2] Correctly use TX macro v9.4 for SC7280 / Kodiak
  2026-05-26 15:29 [PATCH RFC 0/2] Correctly use TX macro v9.4 for SC7280 / Kodiak Luca Weiss
  2026-05-26 15:29 ` [PATCH RFC 1/2] ASoC: codecs: lpass-tx-macro: Use correct config for sc7280 Luca Weiss
  2026-05-26 15:29 ` [PATCH RFC 2/2] arm64: dts: qcom: kodiak: Fix up LPASS TX macro v9.4 control names Luca Weiss
@ 2026-07-03  9:40 ` Luca Weiss
  2 siblings, 0 replies; 7+ messages in thread
From: Luca Weiss @ 2026-07-03  9:40 UTC (permalink / raw)
  To: Luca Weiss, Srinivas Kandagatla, Liam Girdwood, Mark Brown,
	Jaroslav Kysela, Takashi Iwai, Bjorn Andersson, Konrad Dybcio,
	Rob Herring, Krzysztof Kozlowski, Conor Dooley,
	cros-qcom-dts-watchers
  Cc: ~postmarketos/upstreaming, phone-devel, linux-sound,
	linux-arm-msm, linux-kernel, devicetree

Hi all,

On Tue May 26, 2026 at 5:29 PM CEST, Luca Weiss wrote:
> With the v9 data, that sc7280 is mistakenly using, the controls will
> have completely wrong names and using wrong code paths that do not apply
> to TX macro v9.4.
>
> This is an RFC to get some feedback how to continue.
>
> 1. We update the "qcom,sc7280-lpass-tx-macro" compatible to 9.4, break
>    unchanged dtbs (the sources are updated in this series) and break UCM
>    until it's updated.
>
> 2. We add a new compatible "qcom,sc7280-lpass-tx-macro-fixed" - name is
>    just a suggestion ;) - and make sure existing boards with audio keep
>    using the old "broken" compatible. This should be completely
>    backwards compatible, since we keep the existing compatible working
>    as-is.
>
> 3. We add some dt flag "qcom,use-correct-tx-macro-version;" and handle
>    the rest similar to option 2, by opting in boards to the updated
>    behavior.
>
> 4. We keep everything the same. We know it's wrong, both the
>    audio-routing in dtb and the controls in UCM have incorrect names,
>    but it's working apparently.
>
> Please let me know your thoughts.

Any feedback on this series? I'd appreciate it!

Regards
Luca

>
> As a bit of a note where I'm coming from, I'm working on microphone
> bringup for qcm6490-fairphone-fp5 where so far we've been using
> qcom,sm8450-lpass-tx-macro to get the correct control names. I've tried
> reverting to sc7280-lpass-tx-macro, updating audio-routing in dts and
> UCM to the v9.0 names and it does seem that microphone (AMIC1) is
> working with that, but I'm not particularly happy about leaving the
> wrong control names everywhere, so I'm happy to try and untangle this
> situation.
>
> I'm also not sure where this v9.x actually comes from, maybe I'm lacking
> some documentation, downstream kernel only refers to Bolero v1.x and
> v2.x so these seems to be a completely different versioning system.
>
> Signed-off-by: Luca Weiss <luca.weiss@fairphone.com>
> ---
> Luca Weiss (2):
>       ASoC: codecs: lpass-tx-macro: Use correct config for sc7280
>       arm64: dts: qcom: kodiak: Fix up LPASS TX macro v9.4 control names
>
>  arch/arm64/boot/dts/qcom/qcm6490-idp.dts           |  2 +-
>  .../boot/dts/qcom/qcs6490-radxa-dragon-q6a.dts     |  2 +-
>  arch/arm64/boot/dts/qcom/sc7280-crd-r3.dts         | 22 +++++++++++-----------
>  .../dts/qcom/sc7280-herobrine-audio-wcd9385.dtsi   | 22 +++++++++++-----------
>  .../dts/qcom/sc7280-herobrine-villager-r1.dtsi     | 22 +++++++++++-----------
>  arch/arm64/boot/dts/qcom/sc7280-idp.dtsi           | 22 +++++++++++-----------
>  sound/soc/codecs/lpass-tx-macro.c                  |  9 ++-------
>  7 files changed, 48 insertions(+), 53 deletions(-)
> ---
> base-commit: 550604d6c9b9efc8d068aff94dc301694a7afdee
> change-id: 20260526-sc7280-tx-macro-1179d786af1f
>
> Best regards,
> --  
> Luca Weiss <luca.weiss@fairphone.com>


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH RFC 1/2] ASoC: codecs: lpass-tx-macro: Use correct config for sc7280
  2026-05-26 15:29 ` [PATCH RFC 1/2] ASoC: codecs: lpass-tx-macro: Use correct config for sc7280 Luca Weiss
  2026-05-26 15:58   ` sashiko-bot
@ 2026-07-03 23:55   ` Dmitry Baryshkov
  1 sibling, 0 replies; 7+ messages in thread
From: Dmitry Baryshkov @ 2026-07-03 23:55 UTC (permalink / raw)
  To: Luca Weiss
  Cc: Srinivas Kandagatla, Liam Girdwood, Mark Brown, Jaroslav Kysela,
	Takashi Iwai, Bjorn Andersson, Konrad Dybcio, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley, cros-qcom-dts-watchers,
	~postmarketos/upstreaming, phone-devel, linux-sound,
	linux-arm-msm, linux-kernel, devicetree

On Tue, May 26, 2026 at 05:29:54PM +0200, Luca Weiss wrote:
> With the v9 data, the controls will have completely wrong names and
> using wrong code paths that do not apply to v9.4.
> 
> Note, that this will change control names so it's a breaking change.

Is it something that we want to keep as compatible for the old DTs? Or
is it completely broken and unusable?

> 
> Signed-off-by: Luca Weiss <luca.weiss@fairphone.com>
> ---
>  sound/soc/codecs/lpass-tx-macro.c | 9 ++-------
>  1 file changed, 2 insertions(+), 7 deletions(-)
> 

-- 
With best wishes
Dmitry

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2026-07-03 23:56 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-05-26 15:29 [PATCH RFC 0/2] Correctly use TX macro v9.4 for SC7280 / Kodiak Luca Weiss
2026-05-26 15:29 ` [PATCH RFC 1/2] ASoC: codecs: lpass-tx-macro: Use correct config for sc7280 Luca Weiss
2026-05-26 15:58   ` sashiko-bot
2026-07-03 23:55   ` Dmitry Baryshkov
2026-05-26 15:29 ` [PATCH RFC 2/2] arm64: dts: qcom: kodiak: Fix up LPASS TX macro v9.4 control names Luca Weiss
2026-05-26 16:16   ` sashiko-bot
2026-07-03  9:40 ` [PATCH RFC 0/2] Correctly use TX macro v9.4 for SC7280 / Kodiak Luca Weiss

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox