Re: [PATCH v5 1/3] ASoC: codecs: lpass-wsa-macro: Switch to PM clock framework for runtime PM

From: Ajay Kumar Nandam

Date: Fri May 22 2026 - 15:27:49 EST




On 5/22/2026 6:55 PM, Konrad Dybcio wrote:
On 5/22/26 3:04 PM, Ajay Kumar Nandam wrote:
Convert the LPASS WSA macro codec driver to use the PM clock framework
for runtime power management.

The driver now relies on pm_clk helpers and runtime PM instead of
manually enabling and disabling macro, dcodec, mclk, npl, and fsgen
clocks. Runtime suspend and resume handling is delegated to the PM
core via pm_clk_suspend() and pm_clk_resume(), while existing runtime
PM callbacks continue to manage regcache state.

This ensures clocks are enabled only when the WSA macro is active,
improves power efficiency on LPASS platforms supporting LPI/island
modes, and aligns the driver with common ASoC runtime PM patterns used
across Qualcomm LPASS codec drivers.

Keep the SWR gate runtime-PM reference from SWR clock enable until
disable so autosuspend does not gate clocks while SWR is prepared.

Add a PM dependency for SND_SOC_LPASS_WSA_MACRO so PM clock helpers are
available when this driver is built.

Suggested-by: Mark Brown <broonie@xxxxxxxxxx>

You added this tag, but was the entire content of this patch sparked
by Mark's suggestion?

Apologies for not including the Reviewed-by tag earlier — that was an oversight on my end.

Thanks
Ajay Kumar


Konrad