Dsp can get online before gpr ssr callback registering.
Dsp state is never changed in this case.
Set dsp state by default GPR_SUBSYS_LOADED at the tail of gpr probe.
Change-Id: I3cc4087e0433f6d827042244f91f3110d234669d
Signed-off-by: Jiazai Wu <quic_jiazwu@quicinc.com>
Added timing for spf_ready_check api, rightnow
we are waiting for 10sec when apm is not ready
instead updated timing as below
during adsp loading 10sec
during add child devices 5sec
during prm send pkt 0sec
Check for q6 state at the start of gpr_send_pkt.
Change-Id: I94a93842cc0dc7fc9acd7232f413b3c3a9038536
Signed-off-by: Ganapathiraju Sarath Varma <quic_ganavarm@quicinc.com>
it is possible that gpr may get deregistered already and
hence will not get any pointer for gpr from dev_get_drvdata
so proceed further only if gpr exists otherwise,
it will lead to crash issue.
Change-Id: I4129a76d1deade0c243c9a9515a8f84542f3596c
Audio notify probe is defer and PDR state change is not happening before
the clients calls to audio_notifier_register(). Due to this the
service_data[service][domain].state remains as UNINIT_SERVICE (where service is
PDR domain is ADSP) and due to this audio_notifier_reg_client() return success
without registering to PDR service, which is incorrect. To avoid this, will
defer the client probes when the audio notify probe is incomplete.
Change-Id: Ib96bdb24dd92ea8b81a0201a7b48e917c7b1403c
Signed-off-by: Prasad Kumpatla <quic_pkumpatl@quicinc.com>
While handling gpr callback, acquire wake lock with
timeout to avoid apps going to suspend and wake up if apps has
gone to suspend. It is required in order to make sure
SVA detections are handled properly with suspend scenarios.
Change-Id: I05e5792e4fa95cba074e936785357b26f8190865
Signed-off-by: Aditya Bavanari <quic_abavanar@quicinc.com>
replace all dev(pr)_err/info logs
that could potentially flood kernel logs with
ratelimit functions dev_err_ratelimited and
dev_info_ratelimited
Change-Id: I32dc6002dead1a07622978c4de63d541c01982fd
Signed-off-by: Shazmaan Ali <quic_shazmaan@quicinc.com>
Port drivers for Linux kernel 5.15(or after).
Remove unused headers that not present in the new kernel.
Update function interface matching API updates in the kernel.
Change-Id: Ibdffbe20c0b65b2ddda958d6a32c493696e15768
Signed-off-by: Junkai Cai <junkai@codeaurora.org>
It was found that sending GPR command before audio process
domain can lead to deadlock in ADSP. Reinstate the check to
send GPR command only when gpr-lite is informed that process
domain is up.This reverts commit
2922723c6f.
Change-Id: I8076dc053c2d7c5b84bdafa2feb35462b2309227
During SSR up, gpr-lite tries to register with audio_notifier during
gpr_probe, audio_notifier needs notifier_mutex during registration,
this mutex can also be held by audio_notifer callback. In some corner
cases, it was never getting unlocked from audio_notifier_callback,
because clk_enable/disable calls will call gpr_send_pkt, but as ADSP up
command is still not received by gpr-lite, it was returning back that
command with error code -ENETRESET. This creates a deadlock situation,
to avoid such corner cases, remove check from gpr_send_pkt. GPR clients
can ensure apm is up before sending the data.
Change-Id: I8893cc33de30883f17da2e4a11a036bcdfb69780
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>
Add support for GPR and Audio-pkt drivers for AudioReach.
Change-Id: I4813ec1e3696900ebd426caa3017eae623b3a6c9
Signed-off-by: Taha Azzaoui <tazzaoui@codeaurora.org>