Re: [PATCH v8 0/3] ASoC: qcom: lpass: Switch VA/WSA macros to PM clock framework

From: Srinivas Kandagatla

Date: Fri Jul 03 2026 - 04:06:25 EST




On 7/1/26 7:44 PM, Ajay Kumar Nandam wrote:
> Hi,
>
> This series converts the LPASS WSA and VA macro codec drivers to the
> PM clock framework for runtime PM clock handling.
>
> The runtime clock enable/disable sequencing is moved to PM clock helpers
> for clocks described in device tree, while regcache state handling remains
> in the codec runtime PM callbacks. This keeps register cache synchronization
> explicit in the driver and lets runtime PM drop codec clock votes when the
> macros are idle.
>
> The series also keeps WSA MCLK-output clock registration resource-managed
> by switching it to devm_clk_hw_register(), which allows the empty WSA remove
> callback to be dropped.
>
> Changes since v7:
> - Dropped va_macro_setup_pm_clocks() helper in the VA patch and inlined
> devm_pm_clk_create() + of_pm_clk_add_clks() directly in probe, matching
> the WSA pattern for consistency.
>
> Changes since v6:
> - Dropped the now-empty WSA macro remove callback.
> - Sorted the VA macro pm_clock.h include.
> - Re-sent as v7 with proper cover-letter threading after the broken v6
> resend was accidentally sent as separate threads.
>
> Changes since v5:
> - Rebased to current linux-next/master and regenerated as a standalone
> series that applies cleanly.
> - Added depends on PM_CLK for SND_SOC_LPASS_WSA_MACRO and
> SND_SOC_LPASS_VA_MACRO since PM clock APIs are used.
> - Improved runtime-PM probe/resume unwind handling in WSA/VA error paths.
> - Kept runtime autosuspend delay at 100 ms in both PM-clock conversion
> patches.
>
> Link: https://lore.kernel.org/r/20260604124823.3467457-1-ajay.nandam@xxxxxxxxxxxxxxxx
> Link: https://lore.kernel.org/r/20260623071708.2822269-1-ajay.nandam@xxxxxxxxxxxxxxxx
> Signed-off-by: Ajay Kumar Nandam <ajay.nandam@xxxxxxxxxxxxxxxx>
> ---
> Changes in v8:
> - EDITME: describe what is new in this series revision.
> - EDITME: use bulletpoints and terse descriptions.
> - Link to v7: https://patch.msgid.link/20260629-xo-sd-codec-v7-b4-v7-0-fb37ce457c42@xxxxxxxxxxxxxxxx
>
> ---
> Ajay Kumar Nandam (3):
> ASoC: codecs: lpass-wsa-macro: Switch to PM clock framework for runtime PM
> ASoC: codecs: lpass-va-macro: Switch to PM clock framework for runtime PM
> ASoC: codecs: lpass-wsa-macro: Use devm_clk_hw_register() for MCLK output


Thanks for the patches, We should the same to tx and rx macros too.
For this series, I have tested it on my T14s

Reviewed-by: Srinivas Kandagatla <srinivas.kandagatla@xxxxxxxxxxxxxxxx>
Tested-by: Srinivas Kandagatla <srinivas.kandagatla@xxxxxxxxxxxxxxxx>

--srini
>
> sound/soc/codecs/Kconfig | 2 +
> sound/soc/codecs/lpass-va-macro.c | 129 ++++++++++++++++++-----------------
> sound/soc/codecs/lpass-wsa-macro.c | 133 +++++++++++++++----------------------
> 3 files changed, 122 insertions(+), 142 deletions(-)
> ---
> base-commit: 4e5dfb7c84012007c3c7061126491bbc92d71bf1
> change-id: 20260623-xo-sd-codec-v7-b4-8769da3a41ad
>
> Best regards,
> --
> Ajay Kumar Nandam <ajay.nandam@xxxxxxxxxxxxxxxx>
>