Re: [PATCH 1/2] ASoC: qcom: q6apm: Guard callbacks until probe data is ready

From: Mohit Sharma

Date: Wed Dec 02 2026 - 06:59:00 EST


Thanks for reviewing.

There should not be a response belonging to the current driver instance
while drvdata is NULL. apm_callback() processes responses to SPF-state,
graph/configuration and shared-memory commands. apm_probe() publishes its
fully initialized driver data before issuing GET_SPF_STATE and before
populating command-issuing children.

Similarly, prm_callback() only processes hardware-resource request/release
responses, and q6prm publishes its driver data before exposing consumers
that can issue those commands. The q6apm_is_adsp_ready() call from
prm_probe() targets the APM service, not PRM.

Therefore, a packet received during this interval cannot be a response to
a command issued by the current driver instance. It would be stale or
unsolicited, with no valid waiter or initialized client state to which it
could be delivered. I agree that silently returning makes this reasoning
unclear, and this should have been explained explicitly in the commit
message.

Thanks,
Mohit