diff mbox series

arm64: dts: qcom: sc8280xp-x13s: correct analogue microphone route

Message ID 20240125154531.417098-1-krzysztof.kozlowski@linaro.org
State New
Headers show
Series arm64: dts: qcom: sc8280xp-x13s: correct analogue microphone route | expand

Commit Message

Krzysztof Kozlowski Jan. 25, 2024, 3:45 p.m. UTC
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 <krzysztof.kozlowski@linaro.org>

---

This unfortunately depends on:
https://lore.kernel.org/alsa-devel/20240125153110.410295-1-krzysztof.kozlowski@linaro.org/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(-)

Comments

Srinivas Kandagatla Jan. 26, 2024, 1:21 p.m. UTC | #1
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 <krzysztof.kozlowski@linaro.org>
> 
> ---
> 
Unfortunately this is breaking mic on X13s.

--srini
> This unfortunately depends on:
> https://lore.kernel.org/alsa-devel/20240125153110.410295-1-krzysztof.kozlowski@linaro.org/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";
Krzysztof Kozlowski Jan. 26, 2024, 1:22 p.m. UTC | #2
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 <krzysztof.kozlowski@linaro.org>
>>
>> ---
>>
> Unfortunately this is breaking mic on X13s.

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

Best regards,
Krzysztof
Krzysztof Kozlowski Jan. 29, 2024, 2:26 p.m. UTC | #3
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 <krzysztof.kozlowski@linaro.org>
>>>
>>> ---
>>>
>> 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/20240125153110.410295-1-krzysztof.kozlowski@linaro.org/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
Srinivas Kandagatla Feb. 7, 2024, 11:05 a.m. UTC | #4
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
>> <krzysztof.kozlowski@linaro.org> 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
Johan Hovold Feb. 7, 2024, 12:04 p.m. UTC | #5
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
diff mbox series

Patch

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";