During SSR, prm_gpr_send_pkr may request g_prm.lock and
audio_prm_probe may reinitiaze g_prm.lock. When prm_gpr_send_pkr
unlock g_prm_lock, warning log will be there.
Move g_prm.lock init and destroy to module_init and module_exit.
Change-Id: Id410e55f9dee7c0dcb487591cda8fd21e01c7255
Signed-off-by: Meng Wang <mengw@codeaurora.org>
GPR will deregister and register to audio notifier during
SSR. When ADSP up notification comes to pinctrl LPI before
GPR is registered to audio notifier. Pinctrl LPI will
reset core vote clks however GPR is not masked as up yet
which will causes audio hold clk mutex_lock for long time
and cause kernel panic.
Add workqueue for audio_prm and pinctrl_lpi to avoid hold
clk mutex_lock for long time to resolve this issue.
Change-Id: Idcd7c7d18709dbd5ae85e19eb2abfbed009ffab1
Signed-off-by: Meng Wang <mengw@codeaurora.org>
When ADSP crashes, prm driver can get audio PD down notification from
audio notifier in one thread while prm device instance is being removed
in another thread. This leads to two threads acquiring two locks
(audio notifier & prm) in reverse order. Update audio_prm_remove function
to deregister audio_notifier without acquiring prm lock.
Change-Id: I76dda54340973dc8c4005c741b273dfbdbb1610d
Signed-off-by: Patrick Lai <plai@codeaurora.org>
audio_notifier driver has been changed to be a platform driver.
Most of initialization steps have been moved to probe function
now. Client should also call audio_notifier_register in probe
function correspondingly. Update audio_prm driver to reflect
the new call sequence.
Signed-off-by: Patrick Lai <plai@codeaurora.org>
Change-Id: I378638d403f230ed20d5275e097ec3ee52f653b7
Wait for spf_core_is_apm_ready before sending first command to
spf after bootup and after SSR.
Change-Id: I7c3a7fbb9e190310554ae716937fd6a0d036ce6f
Signed-off-by: Ritu Sharma <ritushar@codeaurora.org>
Few Fixes on the drivers we are making are
1. snd_event is not resetting client info on deregister.
2. audio_prm is not providing the snd event up notification
3. gpr_lite reversing registration seq to avoid race condition
4. pinctrl-lpi reversing reg seq to avoid race condition.
Change-Id: I749de8874b33a528cb6b386d753f5d594139a577
Signed-off-by: Bharath Tirunagaru <bharatht@codeaurora.org>
Ensure that the mutex is not signalled twice.
Also update resp_recieved variable to false before
the command is sent. This helps ensure that the
prm driver does not miss wake up signal issued
from prm_callback.
Change-Id: Ief9274768ef38095e0cadaf8e1e4b1f0dc5350ad
Signed-off-by: Taha Azzaoui <tazzaoui@codeaurora.org>