2024-01-25 15:45:47

by Krzysztof Kozlowski

[permalink] [raw]
Subject: [PATCH] arm64: dts: qcom: sc8280xp-x13s: correct analogue microphone route

Starting with Qualcomm SM8350 SoC, so Low Power Audio SubSystem (LPASS)
block version v9.2, the register responsible for TX SMIC MUXn muxes is
different. The LPASS TX macro codec driver is being fixed to handle
that difference, so the DTS must be updated as well for new widget name.

Signed-off-by: Krzysztof Kozlowski <[email protected]>

---

This unfortunately depends on:
https://lore.kernel.org/alsa-devel/[email protected]/T/#m62da29e6b80fa419e6339d3c27439894cb04cecb

and my tries to make it backwards compatible failed.
---
arch/arm64/boot/dts/qcom/sc8280xp-lenovo-thinkpad-x13s.dts | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/arm64/boot/dts/qcom/sc8280xp-lenovo-thinkpad-x13s.dts b/arch/arm64/boot/dts/qcom/sc8280xp-lenovo-thinkpad-x13s.dts
index def3976bd5bb..0165492e4e11 100644
--- a/arch/arm64/boot/dts/qcom/sc8280xp-lenovo-thinkpad-x13s.dts
+++ b/arch/arm64/boot/dts/qcom/sc8280xp-lenovo-thinkpad-x13s.dts
@@ -986,7 +986,7 @@ &sound {
"VA DMIC0", "VA MIC BIAS1",
"VA DMIC1", "VA MIC BIAS1",
"VA DMIC2", "VA MIC BIAS3",
- "TX SWR_ADC1", "ADC2_OUTPUT";
+ "TX SWR_INPUT1", "ADC2_OUTPUT";

wcd-playback-dai-link {
link-name = "WCD Playback";
--
2.34.1



2024-01-26 13:21:22

by Srinivas Kandagatla

[permalink] [raw]
Subject: Re: [PATCH] arm64: dts: qcom: sc8280xp-x13s: correct analogue microphone route

Thanks Krzystof,

On 25/01/2024 15:45, Krzysztof Kozlowski wrote:
> Starting with Qualcomm SM8350 SoC, so Low Power Audio SubSystem (LPASS)
> block version v9.2, the register responsible for TX SMIC MUXn muxes is
> different. The LPASS TX macro codec driver is being fixed to handle
> that difference, so the DTS must be updated as well for new widget name.
>
> Signed-off-by: Krzysztof Kozlowski <[email protected]>
>
> ---
>
Unfortunately this is breaking mic on X13s.

--srini
> This unfortunately depends on:
> https://lore.kernel.org/alsa-devel/[email protected]/T/#m62da29e6b80fa419e6339d3c27439894cb04cecb
>
> and my tries to make it backwards compatible failed.
> ---
> arch/arm64/boot/dts/qcom/sc8280xp-lenovo-thinkpad-x13s.dts | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/arch/arm64/boot/dts/qcom/sc8280xp-lenovo-thinkpad-x13s.dts b/arch/arm64/boot/dts/qcom/sc8280xp-lenovo-thinkpad-x13s.dts
> index def3976bd5bb..0165492e4e11 100644
> --- a/arch/arm64/boot/dts/qcom/sc8280xp-lenovo-thinkpad-x13s.dts
> +++ b/arch/arm64/boot/dts/qcom/sc8280xp-lenovo-thinkpad-x13s.dts
> @@ -986,7 +986,7 @@ &sound {
> "VA DMIC0", "VA MIC BIAS1",
> "VA DMIC1", "VA MIC BIAS1",
> "VA DMIC2", "VA MIC BIAS3",
> - "TX SWR_ADC1", "ADC2_OUTPUT";
> + "TX SWR_INPUT1", "ADC2_OUTPUT";
>
> wcd-playback-dai-link {
> link-name = "WCD Playback";

2024-01-26 13:22:30

by Krzysztof Kozlowski

[permalink] [raw]
Subject: Re: [PATCH] arm64: dts: qcom: sc8280xp-x13s: correct analogue microphone route

On 26/01/2024 14:21, Srinivas Kandagatla wrote:
> Thanks Krzystof,
>
> On 25/01/2024 15:45, Krzysztof Kozlowski wrote:
>> Starting with Qualcomm SM8350 SoC, so Low Power Audio SubSystem (LPASS)
>> block version v9.2, the register responsible for TX SMIC MUXn muxes is
>> different. The LPASS TX macro codec driver is being fixed to handle
>> that difference, so the DTS must be updated as well for new widget name.
>>
>> Signed-off-by: Krzysztof Kozlowski <[email protected]>
>>
>> ---
>>
> Unfortunately this is breaking mic on X13s.

This alone? Of course, there is dependency... Or you meant something else?

Best regards,
Krzysztof


2024-01-29 14:27:36

by Krzysztof Kozlowski

[permalink] [raw]
Subject: Re: [PATCH] arm64: dts: qcom: sc8280xp-x13s: correct analogue microphone route

On 26/01/2024 14:22, Krzysztof Kozlowski wrote:
> On 26/01/2024 14:21, Srinivas Kandagatla wrote:
>> Thanks Krzystof,
>>
>> On 25/01/2024 15:45, Krzysztof Kozlowski wrote:
>>> Starting with Qualcomm SM8350 SoC, so Low Power Audio SubSystem (LPASS)
>>> block version v9.2, the register responsible for TX SMIC MUXn muxes is
>>> different. The LPASS TX macro codec driver is being fixed to handle
>>> that difference, so the DTS must be updated as well for new widget name.
>>>
>>> Signed-off-by: Krzysztof Kozlowski <[email protected]>
>>>
>>> ---
>>>
>> Unfortunately this is breaking mic on X13s.
>
> This alone? Of course, there is dependency... Or you meant something else?

There was no further comments on my proposal to skip touching sc8280xp:
https://lore.kernel.org/alsa-devel/[email protected]/T/#mc45e487f25a2d6388b5c478b1b7827b113640f4f

so I will go with that approach. Please ignore this DTS patch. I will
send ASoC changes which won't affect sc8280xp.

Best regards,
Krzysztof


2024-02-05 05:31:23

by Steev Klimaszewski

[permalink] [raw]
Subject: Re: [PATCH] arm64: dts: qcom: sc8280xp-x13s: correct analogue microphone route

On Mon, Jan 29, 2024 at 8:27 AM Krzysztof Kozlowski
<[email protected]> wrote:
>
> On 26/01/2024 14:22, Krzysztof Kozlowski wrote:
> > On 26/01/2024 14:21, Srinivas Kandagatla wrote:
> >> Thanks Krzystof,
> >>
> >> On 25/01/2024 15:45, Krzysztof Kozlowski wrote:
> >>> Starting with Qualcomm SM8350 SoC, so Low Power Audio SubSystem (LPASS)
> >>> block version v9.2, the register responsible for TX SMIC MUXn muxes is
> >>> different. The LPASS TX macro codec driver is being fixed to handle
> >>> that difference, so the DTS must be updated as well for new widget name.
> >>>
> >>> Signed-off-by: Krzysztof Kozlowski <[email protected]>
> >>>
> >>> ---
> >>>
> >> Unfortunately this is breaking mic on X13s.
> >
> > This alone? Of course, there is dependency... Or you meant something else?
>
> There was no further comments on my proposal to skip touching sc8280xp:
> https://lore.kernel.org/alsa-devel/[email protected]/T/#mc45e487f25a2d6388b5c478b1b7827b113640f4f
>
> so I will go with that approach. Please ignore this DTS patch. I will
> send ASoC changes which won't affect sc8280xp.
>
> Best regards,
> Krzysztof
>
>
I somehow missed that patchset or conversation; As an owner of an
X13s, which is sc8280xp, I can say, neither pre-dts patch, nor post,
seem to do much good. When I attempt to do a voice chat in armcord,
the responses I get to how I sound when using the mic on the X13s
itself range from "You sound like hot trash" to "You sound like a
robot with hiccups".

-- steev

2024-02-05 08:10:02

by Johan Hovold

[permalink] [raw]
Subject: Re: [PATCH] arm64: dts: qcom: sc8280xp-x13s: correct analogue microphone route

On Sun, Feb 04, 2024 at 11:30:54PM -0600, Steev Klimaszewski wrote:
> On Mon, Jan 29, 2024 at 8:27 AM Krzysztof Kozlowski
> <[email protected]> wrote:

> > so I will go with that approach. Please ignore this DTS patch. I will
> > send ASoC changes which won't affect sc8280xp.

> I somehow missed that patchset or conversation; As an owner of an
> X13s, which is sc8280xp, I can say, neither pre-dts patch, nor post,
> seem to do much good. When I attempt to do a voice chat in armcord,
> the responses I get to how I sound when using the mic on the X13s
> itself range from "You sound like hot trash" to "You sound like a
> robot with hiccups".

That's a separate issue entirely. Both the digital and analog microphone
(jack) is working on the X13s as long as you use pulseaudio.

As I've mentioned before, there are problems with both playback and
capture when you use pipewire however ("robot with hiccups" one could
indeed describe it as).

That suggests a more general problem with the Qualcomm audio drivers,
but that has nothing to do with the audio routing.

Johan

2024-02-07 11:05:25

by Srinivas Kandagatla

[permalink] [raw]
Subject: Re: [PATCH] arm64: dts: qcom: sc8280xp-x13s: correct analogue microphone route

Thanks Steev,

On 05/02/2024 08:09, Johan Hovold wrote:
> On Sun, Feb 04, 2024 at 11:30:54PM -0600, Steev Klimaszewski wrote:
>> On Mon, Jan 29, 2024 at 8:27 AM Krzysztof Kozlowski
>> <[email protected]> wrote:
>
>>> so I will go with that approach. Please ignore this DTS patch. I will
>>> send ASoC changes which won't affect sc8280xp.
>
>> I somehow missed that patchset or conversation; As an owner of an
>> X13s, which is sc8280xp, I can say, neither pre-dts patch, nor post,
>> seem to do much good. When I attempt to do a voice chat in armcord,
>> the responses I get to how I sound when using the mic on the X13s
>> itself range from "You sound like hot trash" to "You sound like a
>> robot with hiccups".

does arecord exhibit same issue?

What is your setup looking like? I would like to reproduce this on my x13s.

thanks,
Srini
>
> That's a separate issue entirely. Both the digital and analog microphone
> (jack) is working on the X13s as long as you use pulseaudio.
>
> As I've mentioned before, there are problems with both playback and
> capture when you use pipewire however ("robot with hiccups" one could
> indeed describe it as).
>
> That suggests a more general problem with the Qualcomm audio drivers,
> but that has nothing to do with the audio routing.
>
> Johan

2024-02-07 12:11:20

by Johan Hovold

[permalink] [raw]
Subject: Re: [PATCH] arm64: dts: qcom: sc8280xp-x13s: correct analogue microphone route

On Wed, Feb 07, 2024 at 11:05:02AM +0000, Srinivas Kandagatla wrote:
> On 05/02/2024 08:09, Johan Hovold wrote:
> > On Sun, Feb 04, 2024 at 11:30:54PM -0600, Steev Klimaszewski wrote:

> >> I somehow missed that patchset or conversation; As an owner of an
> >> X13s, which is sc8280xp, I can say, neither pre-dts patch, nor post,
> >> seem to do much good. When I attempt to do a voice chat in armcord,
> >> the responses I get to how I sound when using the mic on the X13s
> >> itself range from "You sound like hot trash" to "You sound like a
> >> robot with hiccups".
>
> does arecord exhibit same issue?

I only did a quick test by switching from pulseaudio to pipewire and
running parecord. Recording is corrupted (robot with hiccups), while it
works fine with pulseaudio proper.

You can also notice that something is off by looking at the pavucontrol
volume meters which were quite active.

> What is your setup looking like? I would like to reproduce this on my x13s.

I know that Steve is using pipewire (on Kali Linux I assume).

> > That's a separate issue entirely. Both the digital and analog microphone
> > (jack) is working on the X13s as long as you use pulseaudio.
> >
> > As I've mentioned before, there are problems with both playback and
> > capture when you use pipewire however ("robot with hiccups" one could
> > indeed describe it as).

Johan