Linux ARM-MSM sub-architecture
 help / color / mirror / Atom feed
* [PATCH 1/2] arm64: dts: qcom: x1e80100-crd: fix WCD audio codec TX port mapping
@ 2024-06-11 14:25 Krzysztof Kozlowski
  2024-06-11 14:25 ` [PATCH 2/2] arm64: dts: qcom: x1e80100-crd: fix DAI used for headset recording Krzysztof Kozlowski
                   ` (2 more replies)
  0 siblings, 3 replies; 8+ messages in thread
From: Krzysztof Kozlowski @ 2024-06-11 14:25 UTC (permalink / raw)
  To: Bjorn Andersson, Konrad Dybcio, Rob Herring, Krzysztof Kozlowski,
	Conor Dooley, linux-arm-msm, devicetree, linux-kernel
  Cc: Krzysztof Kozlowski, stable

Starting with the LPASS v11 (SM8550 also X1E80100), there is an
additional output port on SWR2 Soundwire instance, thus WCD9385 audio
codec TX port mapping should be shifted by one.  This is a necessary fix
for proper audio recording via analogue microphones connected to WCD9385
codec (e.g. headset AMIC2).

Fixes: 229c9ce0fd11 ("arm64: dts: qcom: x1e80100-crd: add WCD9385 Audio Codec")
Cc: <stable@vger.kernel.org>
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
---
 arch/arm64/boot/dts/qcom/x1e80100-crd.dts | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/arm64/boot/dts/qcom/x1e80100-crd.dts b/arch/arm64/boot/dts/qcom/x1e80100-crd.dts
index f19d89d3d6e1..12a4c4637baf 100644
--- a/arch/arm64/boot/dts/qcom/x1e80100-crd.dts
+++ b/arch/arm64/boot/dts/qcom/x1e80100-crd.dts
@@ -775,7 +775,7 @@ &swr2 {
 	wcd_tx: codec@0,3 {
 		compatible = "sdw20217010d00";
 		reg = <0 3>;
-		qcom,tx-port-mapping = <1 1 2 3>;
+		qcom,tx-port-mapping = <2 2 3 4>;
 	};
 };
 
-- 
2.43.0


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

* [PATCH 2/2] arm64: dts: qcom: x1e80100-crd: fix DAI used for headset recording
  2024-06-11 14:25 [PATCH 1/2] arm64: dts: qcom: x1e80100-crd: fix WCD audio codec TX port mapping Krzysztof Kozlowski
@ 2024-06-11 14:25 ` Krzysztof Kozlowski
  2024-06-13  7:45   ` Konrad Dybcio
  2024-06-13  7:43 ` [PATCH 1/2] arm64: dts: qcom: x1e80100-crd: fix WCD audio codec TX port mapping Konrad Dybcio
  2024-06-21  5:29 ` (subset) " Bjorn Andersson
  2 siblings, 1 reply; 8+ messages in thread
From: Krzysztof Kozlowski @ 2024-06-11 14:25 UTC (permalink / raw)
  To: Bjorn Andersson, Konrad Dybcio, Rob Herring, Krzysztof Kozlowski,
	Conor Dooley, linux-arm-msm, devicetree, linux-kernel
  Cc: Krzysztof Kozlowski, stable

The SWR2 Soundwire instance has 1 output and 4 input ports, so for the
headset recording (via the WCD9385 codec and the TX macro codec) we want
to use the next DAI, not the first one (see qcom,dout-ports and
qcom,din-ports for soundwire@6d30000 node).

Original code was copied from other devices like SM8450 and SM8550.  On
the SM8450 this was a correct setting, however on the SM8550 this worked
probably only by coincidence, because the DTS defined no output ports on
SWR2 Soundwire.

This is a necessary fix for proper audio recording via analogue
microphones connected to WCD9385 codec (e.g. headset AMIC2).

Fixes: 4442a67eedc1 ("arm64: dts: qcom: x1e80100-crd: add sound card")
Cc: <stable@vger.kernel.org>
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
---
 arch/arm64/boot/dts/qcom/x1e80100-crd.dts | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/arm64/boot/dts/qcom/x1e80100-crd.dts b/arch/arm64/boot/dts/qcom/x1e80100-crd.dts
index 12a4c4637baf..05e62d9f1cbc 100644
--- a/arch/arm64/boot/dts/qcom/x1e80100-crd.dts
+++ b/arch/arm64/boot/dts/qcom/x1e80100-crd.dts
@@ -102,7 +102,7 @@ cpu {
 			};
 
 			codec {
-				sound-dai = <&wcd938x 1>, <&swr2 0>, <&lpass_txmacro 0>;
+				sound-dai = <&wcd938x 1>, <&swr2 1>, <&lpass_txmacro 0>;
 			};
 
 			platform {
-- 
2.43.0


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

* Re: [PATCH 1/2] arm64: dts: qcom: x1e80100-crd: fix WCD audio codec TX port mapping
  2024-06-11 14:25 [PATCH 1/2] arm64: dts: qcom: x1e80100-crd: fix WCD audio codec TX port mapping Krzysztof Kozlowski
  2024-06-11 14:25 ` [PATCH 2/2] arm64: dts: qcom: x1e80100-crd: fix DAI used for headset recording Krzysztof Kozlowski
@ 2024-06-13  7:43 ` Konrad Dybcio
  2024-06-21  5:29 ` (subset) " Bjorn Andersson
  2 siblings, 0 replies; 8+ messages in thread
From: Konrad Dybcio @ 2024-06-13  7:43 UTC (permalink / raw)
  To: Krzysztof Kozlowski, Bjorn Andersson, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley, linux-arm-msm, devicetree,
	linux-kernel
  Cc: stable



On 6/11/24 16:25, Krzysztof Kozlowski wrote:
> Starting with the LPASS v11 (SM8550 also X1E80100), there is an
> additional output port on SWR2 Soundwire instance, thus WCD9385 audio
> codec TX port mapping should be shifted by one.  This is a necessary fix
> for proper audio recording via analogue microphones connected to WCD9385
> codec (e.g. headset AMIC2).
> 
> Fixes: 229c9ce0fd11 ("arm64: dts: qcom: x1e80100-crd: add WCD9385 Audio Codec")
> Cc: <stable@vger.kernel.org>
> Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
> ---

Reviewed-by: Konrad Dybcio <konrad.dybcio@linaro.org>

Konrad

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

* Re: [PATCH 2/2] arm64: dts: qcom: x1e80100-crd: fix DAI used for headset recording
  2024-06-11 14:25 ` [PATCH 2/2] arm64: dts: qcom: x1e80100-crd: fix DAI used for headset recording Krzysztof Kozlowski
@ 2024-06-13  7:45   ` Konrad Dybcio
  2024-06-13  9:11     ` Krzysztof Kozlowski
  0 siblings, 1 reply; 8+ messages in thread
From: Konrad Dybcio @ 2024-06-13  7:45 UTC (permalink / raw)
  To: Krzysztof Kozlowski, Bjorn Andersson, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley, linux-arm-msm, devicetree,
	linux-kernel
  Cc: stable



On 6/11/24 16:25, Krzysztof Kozlowski wrote:
> The SWR2 Soundwire instance has 1 output and 4 input ports, so for the
> headset recording (via the WCD9385 codec and the TX macro codec) we want
> to use the next DAI, not the first one (see qcom,dout-ports and
> qcom,din-ports for soundwire@6d30000 node).
> 
> Original code was copied from other devices like SM8450 and SM8550.  On
> the SM8450 this was a correct setting, however on the SM8550 this worked
> probably only by coincidence, because the DTS defined no output ports on
> SWR2 Soundwire.

Planning to send a fix for that?

Reviewed-by: Konrad Dybcio <konrad.dybcio@linaro.org>

Konrad

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

* Re: [PATCH 2/2] arm64: dts: qcom: x1e80100-crd: fix DAI used for headset recording
  2024-06-13  7:45   ` Konrad Dybcio
@ 2024-06-13  9:11     ` Krzysztof Kozlowski
  2024-06-13 10:10       ` Dmitry Baryshkov
  0 siblings, 1 reply; 8+ messages in thread
From: Krzysztof Kozlowski @ 2024-06-13  9:11 UTC (permalink / raw)
  To: Konrad Dybcio, Bjorn Andersson, Rob Herring, Krzysztof Kozlowski,
	Conor Dooley, linux-arm-msm, devicetree, linux-kernel
  Cc: stable

On 13/06/2024 09:45, Konrad Dybcio wrote:
> 
> 
> On 6/11/24 16:25, Krzysztof Kozlowski wrote:
>> The SWR2 Soundwire instance has 1 output and 4 input ports, so for the
>> headset recording (via the WCD9385 codec and the TX macro codec) we want
>> to use the next DAI, not the first one (see qcom,dout-ports and
>> qcom,din-ports for soundwire@6d30000 node).
>>
>> Original code was copied from other devices like SM8450 and SM8550.  On
>> the SM8450 this was a correct setting, however on the SM8550 this worked
>> probably only by coincidence, because the DTS defined no output ports on
>> SWR2 Soundwire.
> 
> Planning to send a fix for that?
> 
> Reviewed-by: Konrad Dybcio <konrad.dybcio@linaro.org>

Not really, because microphone works on these targets and changing it
would require testing. I don't have boards suitable for testing, so
let's just leave it.

Best regards,
Krzysztof


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

* Re: [PATCH 2/2] arm64: dts: qcom: x1e80100-crd: fix DAI used for headset recording
  2024-06-13  9:11     ` Krzysztof Kozlowski
@ 2024-06-13 10:10       ` Dmitry Baryshkov
  2024-06-13 13:17         ` Krzysztof Kozlowski
  0 siblings, 1 reply; 8+ messages in thread
From: Dmitry Baryshkov @ 2024-06-13 10:10 UTC (permalink / raw)
  To: Krzysztof Kozlowski
  Cc: Konrad Dybcio, Bjorn Andersson, Rob Herring, Krzysztof Kozlowski,
	Conor Dooley, linux-arm-msm, devicetree, linux-kernel, stable

On Thu, Jun 13, 2024 at 11:11:05AM +0200, Krzysztof Kozlowski wrote:
> On 13/06/2024 09:45, Konrad Dybcio wrote:
> > 
> > 
> > On 6/11/24 16:25, Krzysztof Kozlowski wrote:
> >> The SWR2 Soundwire instance has 1 output and 4 input ports, so for the
> >> headset recording (via the WCD9385 codec and the TX macro codec) we want
> >> to use the next DAI, not the first one (see qcom,dout-ports and
> >> qcom,din-ports for soundwire@6d30000 node).
> >>
> >> Original code was copied from other devices like SM8450 and SM8550.  On
> >> the SM8450 this was a correct setting, however on the SM8550 this worked
> >> probably only by coincidence, because the DTS defined no output ports on
> >> SWR2 Soundwire.
> > 
> > Planning to send a fix for that?
> > 
> > Reviewed-by: Konrad Dybcio <konrad.dybcio@linaro.org>
> 
> Not really, because microphone works on these targets and changing it
> would require testing. I don't have boards suitable for testing, so
> let's just leave it.

If you provide instructions, I can test microphones on SM8450 HDK.

-- 
With best wishes
Dmitry

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

* Re: [PATCH 2/2] arm64: dts: qcom: x1e80100-crd: fix DAI used for headset recording
  2024-06-13 10:10       ` Dmitry Baryshkov
@ 2024-06-13 13:17         ` Krzysztof Kozlowski
  0 siblings, 0 replies; 8+ messages in thread
From: Krzysztof Kozlowski @ 2024-06-13 13:17 UTC (permalink / raw)
  To: Dmitry Baryshkov, Krzysztof Kozlowski
  Cc: Konrad Dybcio, Bjorn Andersson, Rob Herring, Krzysztof Kozlowski,
	Conor Dooley, linux-arm-msm, devicetree, linux-kernel, stable

On 13/06/2024 12:10, Dmitry Baryshkov wrote:
> On Thu, Jun 13, 2024 at 11:11:05AM +0200, Krzysztof Kozlowski wrote:
>> On 13/06/2024 09:45, Konrad Dybcio wrote:
>>>
>>>
>>> On 6/11/24 16:25, Krzysztof Kozlowski wrote:
>>>> The SWR2 Soundwire instance has 1 output and 4 input ports, so for the
>>>> headset recording (via the WCD9385 codec and the TX macro codec) we want
>>>> to use the next DAI, not the first one (see qcom,dout-ports and
>>>> qcom,din-ports for soundwire@6d30000 node).
>>>>
>>>> Original code was copied from other devices like SM8450 and SM8550.  On
>>>> the SM8450 this was a correct setting, however on the SM8550 this worked
>>>> probably only by coincidence, because the DTS defined no output ports on
>>>> SWR2 Soundwire.
>>>
>>> Planning to send a fix for that?
>>>
>>> Reviewed-by: Konrad Dybcio <konrad.dybcio@linaro.org>
>>
>> Not really, because microphone works on these targets and changing it
>> would require testing. I don't have boards suitable for testing, so
>> let's just leave it.
> 
> If you provide instructions, I can test microphones on SM8450 HDK.
> 

SM8550 and SM8650

Best regards,
Krzysztof


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

* Re: (subset) [PATCH 1/2] arm64: dts: qcom: x1e80100-crd: fix WCD audio codec TX port mapping
  2024-06-11 14:25 [PATCH 1/2] arm64: dts: qcom: x1e80100-crd: fix WCD audio codec TX port mapping Krzysztof Kozlowski
  2024-06-11 14:25 ` [PATCH 2/2] arm64: dts: qcom: x1e80100-crd: fix DAI used for headset recording Krzysztof Kozlowski
  2024-06-13  7:43 ` [PATCH 1/2] arm64: dts: qcom: x1e80100-crd: fix WCD audio codec TX port mapping Konrad Dybcio
@ 2024-06-21  5:29 ` Bjorn Andersson
  2 siblings, 0 replies; 8+ messages in thread
From: Bjorn Andersson @ 2024-06-21  5:29 UTC (permalink / raw)
  To: Konrad Dybcio, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
	linux-arm-msm, devicetree, linux-kernel, Krzysztof Kozlowski
  Cc: stable


On Tue, 11 Jun 2024 16:25:54 +0200, Krzysztof Kozlowski wrote:
> Starting with the LPASS v11 (SM8550 also X1E80100), there is an
> additional output port on SWR2 Soundwire instance, thus WCD9385 audio
> codec TX port mapping should be shifted by one.  This is a necessary fix
> for proper audio recording via analogue microphones connected to WCD9385
> codec (e.g. headset AMIC2).
> 
> 
> [...]

Applied, thanks!

[1/2] arm64: dts: qcom: x1e80100-crd: fix WCD audio codec TX port mapping
      commit: dfce1771680c70a437556bc81e3e1e22088b67de
[2/2] arm64: dts: qcom: x1e80100-crd: fix DAI used for headset recording
      commit: 74de2ecf1c418c96d2bffa7770953b8991425dd2

Best regards,
-- 
Bjorn Andersson <andersson@kernel.org>

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

end of thread, other threads:[~2024-06-21  5:29 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-06-11 14:25 [PATCH 1/2] arm64: dts: qcom: x1e80100-crd: fix WCD audio codec TX port mapping Krzysztof Kozlowski
2024-06-11 14:25 ` [PATCH 2/2] arm64: dts: qcom: x1e80100-crd: fix DAI used for headset recording Krzysztof Kozlowski
2024-06-13  7:45   ` Konrad Dybcio
2024-06-13  9:11     ` Krzysztof Kozlowski
2024-06-13 10:10       ` Dmitry Baryshkov
2024-06-13 13:17         ` Krzysztof Kozlowski
2024-06-13  7:43 ` [PATCH 1/2] arm64: dts: qcom: x1e80100-crd: fix WCD audio codec TX port mapping Konrad Dybcio
2024-06-21  5:29 ` (subset) " Bjorn Andersson

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