Re: [PATCH v2 2/2] soundwire: qcom: force runtime suspend across system sleep
From: Konrad Dybcio
Date: Mon Nov 30 2026 - 03:34:45 EST
On 11/30/26 8:10 AM, Gopi Chandra Sekhar Reddy Kanala wrote:
> The controller only implements runtime PM callbacks and relies on
> runtime suspend to stop the bus clock, gate hclk and arm the wake IRQ.
> That is not enough across system suspend: from the prepare phase until
> the complete phase the PM core holds a runtime PM usage count on every
> device, so a controller that is runtime active at that point stays
> active until the system resumes. This happens when suspend is entered
> within the 3 second autosuspend delay after bus activity, or when a
> peripheral driver resumes its device from its own system suspend
> callback, as the SDCA class function driver does to quiesce its
> interrupts.
>
> The bus clock then keeps running and hclk stays enabled for the whole
> suspend. On Qualcomm platforms the LPASS clock votes behind it are held
> as well, which keeps CX and DDR from collapsing in s2idle.
>
> Add system sleep callbacks that force the controller into runtime
> suspend and undo it on resume. Only do this when it is safe to run the
> runtime suspend path with the peripherals still attached:
>
> - The bus supports clock stop. Without it, runtime resume resets the
> bus and only re-initializes the peripherals it saw detach, which
> peripherals that were never runtime suspended have not done.
>
> - No stream is set up on the bus. A set up stream stays prepared and
> enabled across system sleep, and nothing programs its ports again
> on resume. Forcing the suspend during playback left the speakers
> silent after resume on Glymur CRD.
>
> A controller that is already runtime suspended is left alone, so runtime
> PM is not disabled for it any earlier than before.
>
> Signed-off-by: Gopi Chandra Sekhar Reddy Kanala <gopi.kanala@xxxxxxxxxxxxxxxx>
> ---
Sashiko has seemingly valid feedback
Konrad