[PATCH 0/9] arm64: dts: qcom: x1: Disable audio codecs by default

Stephan Gerhold posted 9 patches 1 month, 3 weeks ago
arch/arm64/boot/dts/qcom/x1-asus-zenbook-a14.dtsi    | 16 ++++++++++++++++
arch/arm64/boot/dts/qcom/x1-crd.dtsi                 | 20 ++++++++++++++++++++
arch/arm64/boot/dts/qcom/x1e001de-devkit.dts         | 13 +++++++++++++
.../boot/dts/qcom/x1e78100-lenovo-thinkpad-t14s.dtsi | 16 ++++++++++++++++
.../arm64/boot/dts/qcom/x1e80100-hp-omnibook-x14.dts | 16 ++++++++++++++++
.../boot/dts/qcom/x1e80100-lenovo-yoga-slim7x.dts    | 12 ++++++++++++
.../boot/dts/qcom/x1e80100-microsoft-romulus.dtsi    | 16 ++++++++++++++++
arch/arm64/boot/dts/qcom/x1e80100-qcp.dts            | 19 +++++++++++++++++++
arch/arm64/boot/dts/qcom/x1e80100.dtsi               | 12 ++++++++++++
9 files changed, 140 insertions(+)
[PATCH 0/9] arm64: dts: qcom: x1: Disable audio codecs by default
Posted by Stephan Gerhold 1 month, 3 weeks ago
Currently, the macro audio codecs are enabled by default in x1e80100.dtsi.
However, they do not probe without the ADSP remoteproc, which is disabled
by default. Also, not all boards make use of all the audio codecs, e.g.
there are several boards with just two speakers. In this case, the
&lpass_wsa2macro is not used.

Disable the audio codecs by default in x1e80100.dtsi and enable only the
used macros for each device.

Signed-off-by: Stephan Gerhold <stephan.gerhold@linaro.org>
---
Stephan Gerhold (9):
      arm64: dts: qcom: x1-asus-zenbook-a14: Explicitly enable used audio codecs
      arm64: dts: qcom: x1-crd: Explicitly enable used audio codecs
      arm64: dts: qcom: x1e001de-devkit: Explicitly enable used audio codecs
      arm64: dts: qcom: x1e78100-lenovo-thinkpad-t14s: Explicitly enable used audio codecs
      arm64: dts: qcom: x1e80100-hp-omnibook-x14: Explicitly enable used audio codecs
      arm64: dts: qcom: x1e80100-lenovo-yoga-slim7x: Explicitly enable used audio codecs
      arm64: dts: qcom: x1e80100-microsoft-romulus: Explicitly enable used audio codecs
      arm64: dts: qcom: x1e80100-qcp: Explicitly enable used audio codecs
      arm64: dts: qcom: x1e80100: Disable audio codecs by default

 arch/arm64/boot/dts/qcom/x1-asus-zenbook-a14.dtsi    | 16 ++++++++++++++++
 arch/arm64/boot/dts/qcom/x1-crd.dtsi                 | 20 ++++++++++++++++++++
 arch/arm64/boot/dts/qcom/x1e001de-devkit.dts         | 13 +++++++++++++
 .../boot/dts/qcom/x1e78100-lenovo-thinkpad-t14s.dtsi | 16 ++++++++++++++++
 .../arm64/boot/dts/qcom/x1e80100-hp-omnibook-x14.dts | 16 ++++++++++++++++
 .../boot/dts/qcom/x1e80100-lenovo-yoga-slim7x.dts    | 12 ++++++++++++
 .../boot/dts/qcom/x1e80100-microsoft-romulus.dtsi    | 16 ++++++++++++++++
 arch/arm64/boot/dts/qcom/x1e80100-qcp.dts            | 19 +++++++++++++++++++
 arch/arm64/boot/dts/qcom/x1e80100.dtsi               | 12 ++++++++++++
 9 files changed, 140 insertions(+)
---
base-commit: 33a21dab19b31540dfeb06dde02e55129a10aec4
change-id: 20250813-x1e80100-disable-audio-codecs-ef258fcea345

Best regards,
-- 
Stephan Gerhold <stephan.gerhold@linaro.org>
Re: [PATCH 0/9] arm64: dts: qcom: x1: Disable audio codecs by default
Posted by Alexey Klimov 1 month, 3 weeks ago
On Wed Aug 13, 2025 at 4:58 PM BST, Stephan Gerhold wrote:
> Currently, the macro audio codecs are enabled by default in x1e80100.dtsi.
> However, they do not probe without the ADSP remoteproc, which is disabled
> by default. Also, not all boards make use of all the audio codecs, e.g.
> there are several boards with just two speakers. In this case, the
> &lpass_wsa2macro is not used.
>
> Disable the audio codecs by default in x1e80100.dtsi and enable only the
> used macros for each device.
>
> Signed-off-by: Stephan Gerhold <stephan.gerhold@linaro.org>
> ---
> Stephan Gerhold (9):
>       arm64: dts: qcom: x1-asus-zenbook-a14: Explicitly enable used audio codecs
>       arm64: dts: qcom: x1-crd: Explicitly enable used audio codecs
>       arm64: dts: qcom: x1e001de-devkit: Explicitly enable used audio codecs
>       arm64: dts: qcom: x1e78100-lenovo-thinkpad-t14s: Explicitly enable used audio codecs
>       arm64: dts: qcom: x1e80100-hp-omnibook-x14: Explicitly enable used audio codecs
>       arm64: dts: qcom: x1e80100-lenovo-yoga-slim7x: Explicitly enable used audio codecs
>       arm64: dts: qcom: x1e80100-microsoft-romulus: Explicitly enable used audio codecs
>       arm64: dts: qcom: x1e80100-qcp: Explicitly enable used audio codecs

The subject or title is a bit confusing. "Disable audio codecs" and bunch
of enable commits.
Maybe "Move audio codecs enablement out of .dtsi into whatever"?

>       arm64: dts: qcom: x1e80100: Disable audio codecs by default

Best regards,
Alexey
Re: [PATCH 0/9] arm64: dts: qcom: x1: Disable audio codecs by default
Posted by Konrad Dybcio 1 month, 3 weeks ago
On 8/13/25 5:58 PM, Stephan Gerhold wrote:
> Currently, the macro audio codecs are enabled by default in x1e80100.dtsi.
> However, they do not probe without the ADSP remoteproc, which is disabled
> by default.

FWIW if the ADSP doesn't start, you can't really consider the platform
working.. It just does oversees too much of the SoC to even seriously
consider using the device without it

I would maybe perhaps even skew towards removing the status=disable from
under remoteprocs instead.. that the user may not supply firmware doesn't
have any negative effects as compared to keeping it disabled (other than
a line or two of fwloader complaining)

Konrad

> Also, not all boards make use of all the audio codecs, e.g.
> there are several boards with just two speakers. In this case, the
> &lpass_wsa2macro is not used.
> 
> Disable the audio codecs by default in x1e80100.dtsi and enable only the
> used macros for each device.
> 
> Signed-off-by: Stephan Gerhold <stephan.gerhold@linaro.org>
> ---
> Stephan Gerhold (9):
>       arm64: dts: qcom: x1-asus-zenbook-a14: Explicitly enable used audio codecs
>       arm64: dts: qcom: x1-crd: Explicitly enable used audio codecs
>       arm64: dts: qcom: x1e001de-devkit: Explicitly enable used audio codecs
>       arm64: dts: qcom: x1e78100-lenovo-thinkpad-t14s: Explicitly enable used audio codecs
>       arm64: dts: qcom: x1e80100-hp-omnibook-x14: Explicitly enable used audio codecs
>       arm64: dts: qcom: x1e80100-lenovo-yoga-slim7x: Explicitly enable used audio codecs
>       arm64: dts: qcom: x1e80100-microsoft-romulus: Explicitly enable used audio codecs
>       arm64: dts: qcom: x1e80100-qcp: Explicitly enable used audio codecs
>       arm64: dts: qcom: x1e80100: Disable audio codecs by default
> 
>  arch/arm64/boot/dts/qcom/x1-asus-zenbook-a14.dtsi    | 16 ++++++++++++++++
>  arch/arm64/boot/dts/qcom/x1-crd.dtsi                 | 20 ++++++++++++++++++++
>  arch/arm64/boot/dts/qcom/x1e001de-devkit.dts         | 13 +++++++++++++
>  .../boot/dts/qcom/x1e78100-lenovo-thinkpad-t14s.dtsi | 16 ++++++++++++++++
>  .../arm64/boot/dts/qcom/x1e80100-hp-omnibook-x14.dts | 16 ++++++++++++++++
>  .../boot/dts/qcom/x1e80100-lenovo-yoga-slim7x.dts    | 12 ++++++++++++
>  .../boot/dts/qcom/x1e80100-microsoft-romulus.dtsi    | 16 ++++++++++++++++
>  arch/arm64/boot/dts/qcom/x1e80100-qcp.dts            | 19 +++++++++++++++++++
>  arch/arm64/boot/dts/qcom/x1e80100.dtsi               | 12 ++++++++++++
>  9 files changed, 140 insertions(+)
> ---
> base-commit: 33a21dab19b31540dfeb06dde02e55129a10aec4
> change-id: 20250813-x1e80100-disable-audio-codecs-ef258fcea345
> 
> Best regards,
Re: [PATCH 0/9] arm64: dts: qcom: x1: Disable audio codecs by default
Posted by Krzysztof Kozlowski 1 month, 3 weeks ago
On 14/08/2025 01:09, Konrad Dybcio wrote:
> On 8/13/25 5:58 PM, Stephan Gerhold wrote:
>> Currently, the macro audio codecs are enabled by default in x1e80100.dtsi.
>> However, they do not probe without the ADSP remoteproc, which is disabled
>> by default.
> 
> FWIW if the ADSP doesn't start, you can't really consider the platform
> working.. It just does oversees too much of the SoC to even seriously
> consider using the device without it


I agree. ADSP is supposed to come up for every or almost every platform,
because it is crucial for USB and charging.

It's true that LPASS macro codec nodes need resources from ADSP, but
still these are resources internal to the SoC. We disable nodes in DTI
which need an external resource. That's not really the case for LPASS.

Best regards,
Krzysztof
Re: [PATCH 0/9] arm64: dts: qcom: x1: Disable audio codecs by default
Posted by Stephan Gerhold 1 month, 3 weeks ago
On Thu, Aug 14, 2025 at 08:07:17AM +0200, Krzysztof Kozlowski wrote:
> On 14/08/2025 01:09, Konrad Dybcio wrote:
> > On 8/13/25 5:58 PM, Stephan Gerhold wrote:
> >> Currently, the macro audio codecs are enabled by default in x1e80100.dtsi.
> >> However, they do not probe without the ADSP remoteproc, which is disabled
> >> by default.
> > 
> > FWIW if the ADSP doesn't start, you can't really consider the platform
> > working.. It just does oversees too much of the SoC to even seriously
> > consider using the device without it
> 
> 
> I agree. ADSP is supposed to come up for every or almost every platform,
> because it is crucial for USB and charging.
> 

I agree with that as well, especially because I have an upcoming patch
series that allows reusing the "lite" ADSP firmware from UEFI for USB
and charging, so you don't even need to have firmware present for that.

The question for this patch series is separate though: Should we enable
the SoC audio codecs by default? What happens if a board does not make
use of them?

> It's true that LPASS macro codec nodes need resources from ADSP, but
> still these are resources internal to the SoC. We disable nodes in DTI
> which need an external resource. That's not really the case for LPASS.

The reason that triggered this patch series is that I was seeing an
error from the va_macro when testing on x1e001de-devkit. That board does
not have DMICs defined, so it doesn't make direct use of the va_macro:

 va_macro 6d44000.codec: qcom,dmic-sample-rate dt entry missing

We should fix this in the lpass-va-macro driver. You could take this
case one step further though: What if a board uses none of the audio
functionality? Apparently, X1E is also going to be an IoT platform. It's
very well possible we will end up with a board that doesn't have any
audio functionality. I would argue it's valid to use a minimal kernel
config in that case that has all of the audio subsystem disabled. That
won't work though, since we need to probe all the enabled audio codecs
to reach sync_state().

This might be a Linux issue unrelated to the device tree, but in my
opinion an audio codec without audio inputs/outputs is not
"operational", it should not be status = "okay". That's quite subjective
though.

At the end, I realized that x1e001de-devkit actually does have DMICs and
I just need to enable them properly to get rid of the error. I only sent
this series because I believe it fits better to our conventions. Given
that I don't need it anymore, I'm also happy to just drop it. Let me
know what you prefer.

Thanks,
Stephan
Re: [PATCH 0/9] arm64: dts: qcom: x1: Disable audio codecs by default
Posted by Konrad Dybcio 1 month, 3 weeks ago
On 8/14/25 10:50 AM, Stephan Gerhold wrote:
> On Thu, Aug 14, 2025 at 08:07:17AM +0200, Krzysztof Kozlowski wrote:
>> On 14/08/2025 01:09, Konrad Dybcio wrote:
>>> On 8/13/25 5:58 PM, Stephan Gerhold wrote:
>>>> Currently, the macro audio codecs are enabled by default in x1e80100.dtsi.
>>>> However, they do not probe without the ADSP remoteproc, which is disabled
>>>> by default.
>>>
>>> FWIW if the ADSP doesn't start, you can't really consider the platform
>>> working.. It just does oversees too much of the SoC to even seriously
>>> consider using the device without it
>>
>>
>> I agree. ADSP is supposed to come up for every or almost every platform,
>> because it is crucial for USB and charging.
>>
> 
> I agree with that as well, especially because I have an upcoming patch
> series that allows reusing the "lite" ADSP firmware from UEFI for USB
> and charging, so you don't even need to have firmware present for that.

Really nice!

> The question for this patch series is separate though: Should we enable
> the SoC audio codecs by default? What happens if a board does not make
> use of them?

Then they (should) get parked (powered down, or re-programmed if
necessary)

>> It's true that LPASS macro codec nodes need resources from ADSP, but
>> still these are resources internal to the SoC. We disable nodes in DTI
>> which need an external resource. That's not really the case for LPASS.
> 
> The reason that triggered this patch series is that I was seeing an
> error from the va_macro when testing on x1e001de-devkit. That board does
> not have DMICs defined, so it doesn't make direct use of the va_macro:
> 
>  va_macro 6d44000.codec: qcom,dmic-sample-rate dt entry missing

Perhaps we can print the error if there's any sound connections, i.e.
if it's "really" used?

> We should fix this in the lpass-va-macro driver. You could take this
> case one step further though: What if a board uses none of the audio
> functionality? Apparently, X1E is also going to be an IoT platform. It's
> very well possible we will end up with a board that doesn't have any
> audio functionality. I would argue it's valid to use a minimal kernel
> config in that case that has all of the audio subsystem disabled. That
> won't work though, since we need to probe all the enabled audio codecs
> to reach sync_state().

Because of the resources being driven by the OS, I don't think removing
information from the device tree (i.e. cutting down on the plumbing
data) is fair.. Enabling all the hardware (minus firmwares) should result
in only a couple hundred kilobytes of added RAM use, but will get rid of
a huge number of edge cases where sketchy combinations cause annoying
issues.

> This might be a Linux issue unrelated to the device tree, but in my
> opinion an audio codec without audio inputs/outputs is not
> "operational", it should not be status = "okay". That's quite subjective
> though.

If the codec is present on board, there's no less reason to disable it
vs leaving it hanging, unaware by the OS.. cutting the power by hand is
at least predictable

Konrad

> At the end, I realized that x1e001de-devkit actually does have DMICs and
> I just need to enable them properly to get rid of the error. I only sent
> this series because I believe it fits better to our conventions. Given
> that I don't need it anymore, I'm also happy to just drop it. Let me
> know what you prefer.
> 
> Thanks,
> Stephan