diff mbox series

[2/2] arm64: dts: qcom: x1e80100-crd: fix DAI used for headset recording

Message ID 20240611142555.994675-2-krzysztof.kozlowski@linaro.org
State Accepted
Commit 74de2ecf1c418c96d2bffa7770953b8991425dd2
Headers show
Series [1/2] arm64: dts: qcom: x1e80100-crd: fix WCD audio codec TX port mapping | expand

Commit Message

Krzysztof Kozlowski June 11, 2024, 2:25 p.m. UTC
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(-)

Comments

Konrad Dybcio June 13, 2024, 7:45 a.m. UTC | #1
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
Krzysztof Kozlowski June 13, 2024, 9:11 a.m. UTC | #2
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
Dmitry Baryshkov June 13, 2024, 10:10 a.m. UTC | #3
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.
Krzysztof Kozlowski June 13, 2024, 1:17 p.m. UTC | #4
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
diff mbox series

Patch

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 {