Add KBUILD_OPTIONS and Kbuild conf.
Read hw params from dts and set it during dailink startup.
Change-Id: Ifba87ce6c20bba515566450ddbfaf63a29758e33
Signed-off-by: shengruz <quic_shengruz@quicinc.com>
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>
When SSR triggered, graph_set_config failed should return ENETRESET instead of
ECONNRESET. so when gpr_send_pkt returns ECONNRESET, reset the value to ENETRESET.
Change-Id: I2ce72a8fef3163050f777c41fffd0266642e75dc
Signed-off-by: Yuhui Zhao <quic_yuhuzhao@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
Add checks in the function call audio_pkt_write, whether the given buffer is
of sufficient length or not. If buffer size is less than required size, return
an error.
Change-Id: Ia4ef36f2465ef9d0f424e02c71ca9c9a578e1885
Signed-off-by: Sivanagaraju S <quic_sivanaga@quicinc.com>
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>
Count should not be equal to or greater than this packet_size.
Add check to avoid invalid count size.
Change-Id: I1235425c0807f50784da9d7181c8e29d297b9013
Signed-off-by: Nimit Jain <quic_nimijain@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>
add kalama config file to all drivers' Kbuild, including soc/dsp/ipc
Change-Id: I56a6092da515f211a56617f0cff60079dbf0aa39
Signed-off-by: Junkai Cai <junkai@quicinc.com>
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
Add Makefile in each sub-folder
Add Android.mk file on top level folder of audio-kernel
Change-Id: I024aa5080ae52b55700f0a65ab05034be8c9cdad
Signed-off-by: Jyotirmoi Sarma <jyosarma@codeaurora.org>
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>
Audio pkt passthrough device name is set incorrectly to channel_name.
Correct the name of the passthrough device.
Change-Id: I2f46b2f17938933d2ada35da1101f3fc6c5d5803
Signed-off-by: Phani Kumar Uppalapati <phaniu@codeaurora.org>
apr_register_adsp_state_cb is declared in apr.h.
Change-Id: Ifd5b9c53af62868076db066f12615af22f54f5be
Signed-off-by: Guodong Hu <guodhu@codeaurora.org>
Update Kbuild and header files in msm_audio_ion_vm.c
and apr_vm.c for kernel 5.4 gvm audio bring up.
Change-Id: I6bcd0e49f783aaec43a64ad308b817a474b30dc7
Signed-off-by: Guodong Hu <guodhu@codeaurora.org>
LV Platform use the same ARCH cause Kbuild mismatch issue
Change-Id: I803aeb3bbee45566b1f9e66b4a6c8b8c26ba86f3
Signed-off-by: Fei Tong <ftong@codeaurora.org>
When SSR happens, APR state can update to DOWN
immediately which ensures avoid continuous retry
for PCM open from userspace as audio clients check
APR state at pcm_open and return ENETRESET if
APR is down.
Change-Id: I60a6d217786b3d610b70adbd12d0e5f2a7c12205
Signed-off-by: Laxminath Kasam <lkasam@codeaurora.org>
The promoting is necessary to prevent audio tick noise under
heavy cpu loading.
Change-Id: I3fccb3b758b5fb5571031902344e542886b89209
Signed-off-by: Han Lu <hanlu@codeaurora.org>
Remove send/check ACK in HAB communication, it consumes HAB bandwidth
without necessity. Remove it to improve audio performance.
Change-Id: Idee1d0276f40d463186e3caea6c4b28ef16ab67c
Signed-off-by: Han Lu <hanlu@codeaurora.org>
Rename casa to ar and gecko to spf in audio-kernel.
Change-Id: Ia37ee0497ce043443ca70131d2739737cb8f0366
Signed-off-by: Phani Kumar Uppalapati <phaniu@codeaurora.org>
Add support in kona machine driver to expose a sysfs node.
Userspace uses this sysfs node to notify machine driver
on which dai-link ( pcm id) is opened/closed. This information
regarding device open/close is then compared against shutdown/
startup dai_link ops. If there is a mismatch we conclude
that there has been a userspace service crash and we
issue a close all session command to dsp and also clear
all the dma buffers which were allocated by the service.
Change-Id: I4fc13adf8cc527c87b822a3b189d4ff081539a3c
Signed-off-by: Ashish Jain <ashishj@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>