Commit Graph

138 Commits

Author SHA1 Message Date
shengruz
b1246dc67c audio-kernel-ar: enable ar-audio-kernel for quin-gvm-gen4
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>
2024-01-25 00:12:59 -08:00
Prasad Kumpatla
d36fc5c57f asoc: add audio kernel config files for pitti
add audio kernel config files for pitti.

Change-Id: I2ef71e7ce42b6083c099558bd0d14f49800d3e3a
Signed-off-by: Prasad Kumpatla <quic_pkumpatl@quicinc.com>
2023-12-29 14:52:53 +08:00
Linux Build Service Account
abb843d268 Merge "asoc: add support for 7255 monaco" into audio-kernel.lnx.6.0 2023-11-21 20:31:15 -08:00
Jiazai Wu
60687055d2 asoc: add support for 7255 monaco
1. Add config for 7255 monaco.
2. Add kernel build rule for 7255 monaco dlkms.

Change-Id: I0b697856907d6bbc7e78a421cde75d6cdf4ee2b4
Signed-off-by: Jiazai Wu <quic_jiazwu@quicinc.com>
2023-11-09 10:38:43 +05:30
Jiazai Wu
9ce7dace9f ipc : gpr-lite: set dsp state to GPR_SUBSYS_LOADED
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>
2023-11-02 21:46:11 -07:00
qctecmdr
c4a89a1cda Merge "dsp : Update timeout for spf_apm_ready_check" 2023-10-30 06:45:17 -07:00
sarath varma ganapathiraju
9bb0f01c5d pitti: Add compilation support for target pitti
Add Compilation support for target pitti.

Change-Id: Ibb06ace7332aa87eb5f8082db95f0c0f8b3deb66
Signed-off-by: sarath varma ganapathiraju <quic_ganavarm@quicinc.com>
2023-10-19 22:01:23 -07:00
Ganapathiraju Sarath Varma
378a3eea83 dsp : Update timeout for spf_apm_ready_check
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>
2023-10-16 14:46:06 +05:30
Karishma Tekade
1ed2ece8c4 audio_kernel: Enable audio kernel compilation for blair platform
Updated make files in audio_kernel to support blair platform.

Change-Id: I00c832875fc4558580e22825e9a72305e05ae409
2023-05-23 22:44:18 -07:00
Shalini Manjunatha
914ac00bc0 ipc: reset the ret to ENETRESET when gpr_send_pkt returns ECONNRESET
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>
2023-02-14 18:36:11 -08:00
Yuhui Zhao
19b039aa73 asoc: add config files to support pineapple target
add pineapple config file to all drivers:
Kbuild, including soc/dsp/ipc

Change-Id: I2357c7c96739bd42cb8764753d2a4fd5dd1c9634
Signed-off-by: Prasad Kumpatla <quic_pkumpatl@quicinc.com>
2022-10-07 11:24:42 +05:30
Soumya Managoli
ee00c83a92 audio-kernel: Bring up changes for bengal
Enable audio driver compilation for bengal.

Change-Id: I1ce7f0356fe70bc59c7caa6d333ad380d1e725ff
Signed-off-by: Soumya Managoli <quic_c_smanag@quicinc.com>
2022-09-29 16:50:51 +05:30
Deepali Jindal
69fa44f6db ipc : gpr-lite: Add NULL check for gpr dev pointer
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
2022-09-23 11:02:46 +05:30
qctecmdr
b132cbe8f3 Merge "audio-pkt: Fix out-of-bound memory access in audio_pkt_write" 2022-09-07 02:56:17 -07:00
Sivanagaraju S
bd49c54f57 audio-pkt: Fix out-of-bound memory access in audio_pkt_write
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>
2022-08-23 15:37:33 +05:30
Prasad Kumpatla
e569b3b05e dsp: Defer clients probe, when audio notify probe is not complete.
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>
2022-07-27 10:32:03 -07:00
Nimit Jain
3cc2ef661a ipc : audio-pkt: Add check to avoid invalid count size
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>
2022-06-12 09:53:19 -07:00
Aditya Bavanari
212be997ee ipc: gpr-lite: Add wake lock with timeout while handling callback
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>
2022-04-18 16:52:19 +05:30
Shazmaan Ali
a20e11e0c3 asoc: codecs: Replace dev_err/info with ratelimit prints
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>
2022-04-13 12:43:20 -07:00
Junkai Cai
11b2aeb0c9 asoc: update asoc and ipc drivers for kernel 5.15
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>
2021-10-28 16:47:53 -07:00
Junkai Cai
bd4a663a65 asoc: add config files to support kalama
add kalama config file to all drivers' Kbuild, including soc/dsp/ipc

Change-Id: I56a6092da515f211a56617f0cff60079dbf0aa39
Signed-off-by: Junkai Cai <junkai@quicinc.com>
2021-10-27 14:37:34 -07:00
pavanisr
ba39b85277 dsp, ipc: add fluence NN changes
Change-Id: Ie8323156c74601333871646052068a609c7cf474
2021-03-19 16:22:04 -07:00
Patrick Lai
32363052e1 Revert "ipc: Remove adsp/modem up check in gpr_send_pkt"
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
2021-02-24 23:37:21 -08:00
Jyotirmoi Sarma
6b78aacd7f audio-kernel: Enable out of tree compilaton
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>
2020-12-17 18:05:48 +05:30
Jyotirmoi Sarma
80543a69c0 ipc: Upgrade ipc to support 5.10 kernel
Modify Kbuild to include waipio config file

Change-Id: Ic930c14e5dfa5731e6f7bd689ad691b95f70bda7
Signed-off-by: Jyotirmoi Sarma <jyosarma@codeaurora.org>
2020-12-16 13:37:23 +05:30
Linux Build Service Account
73a3066e99 Merge "ASoC: sdxlemur: Add support for new target compilation" into audio-kernel-5-4.lnx.1.0 2020-10-20 23:13:16 -07:00
Asish Bhattacharya
a9e1270b31 ASoC: sdxlemur: Add support for new target compilation
Add support for sdxlemur

Change-Id: I2338fd4df56e4f2c9f0c5f233e7e41aba4f37045
Signed-off-by: Asish Bhattacharya <asishb@codeaurora.org>
2020-10-08 18:57:50 +05:30
Ritu Sharma
2922723c6f ipc: Remove adsp/modem up check in gpr_send_pkt
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>
2020-10-08 18:41:12 +05:30
Vidyakumar Athota
88c1c0288c Merge commit '1a7cee75ba63d6cce68924591b125d604bef39f5' into audio-kernel-5-4.lnx.1.0
Change-Id: Ie4363b4d1be12c7fd85e261bf728462009d8a2cf
2020-09-30 10:01:03 -07:00
Linux Build Service Account
208be1ace1 Merge "ipc: Correct the domain check in gpr_pkt_send" into audio-kernel-5-4.lnx.1.0 2020-09-18 10:07:27 -07:00
Ritu Sharma
44c69aec58 ipc: Correct the domain check in gpr_pkt_send
Change-Id: I717ca24161c9761239f3e1a60aff4870f91a1913
Signed-off-by: Ritu Sharma <ritushar@codeaurora.org>
2020-09-18 00:29:47 -07:00
xsang
1513b912b3 ASoC: limit error log print rate
Limit error log print rate to avoid crash.

Change-Id: I76ff715cb98a19d2885ca89d281a882a898a8264
Signed-off-by: xsang <xsang@codeaurora.org>
2020-09-08 10:51:44 +08:00
qctecmdr
994eb4e818 Merge "ASOC: fix audio machine driver compile issue" 2020-09-03 18:06:23 -07:00
qctecmdr
6047761857 Merge "ipc: apr_vm: add symbol apr_register_adsp_state_cb" 2020-09-03 18:06:22 -07:00
Phani Kumar Uppalapati
0454a383c5 audio-pkt: correct passthrough device name
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>
2020-09-03 03:04:15 -07:00
Guodong Hu
0d65a666bc ipc: apr_vm: add symbol apr_register_adsp_state_cb
apr_register_adsp_state_cb is declared in apr.h.

Change-Id: Ifd5b9c53af62868076db066f12615af22f54f5be
Signed-off-by: Guodong Hu <guodhu@codeaurora.org>
2020-09-01 00:48:19 -07:00
Guodong Hu
6d6529a694 dsp/ipc: update kbuild and header files for gvm bringup
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>
2020-09-01 00:47:51 -07:00
Fei Tong
111a594520 ASOC: fix audio machine driver compile issue
LV Platform use the same ARCH cause Kbuild mismatch issue

Change-Id: I803aeb3bbee45566b1f9e66b4a6c8b8c26ba86f3
Signed-off-by: Fei Tong <ftong@codeaurora.org>
2020-08-31 14:48:19 +08:00
qctecmdr
b6adfb5938 Merge "ipc: apr: set q6 state down when ECONNRESET from TAL" 2020-08-29 00:30:36 -07:00
qctecmdr
4b151cba32 Merge "soc: qcom: qdsp6v2: promote priority of apr_vm_cb_thread" 2020-08-25 11:21:17 -07:00
Laxminath Kasam
35d2276eac ipc: apr: set q6 state down when ECONNRESET from TAL
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>
2020-08-24 14:05:31 +05:30
Han Lu
6d78e2c24d soc: qcom: qdsp6v2: promote priority of apr_vm_cb_thread
The promoting is necessary to prevent audio tick noise under
heavy cpu loading.

Change-Id: I3fccb3b758b5fb5571031902344e542886b89209
Signed-off-by: Han Lu <hanlu@codeaurora.org>
2020-08-19 19:33:12 -07:00
Han Lu
8ab5ee64d9 soc: qcom: audio: remove unnecessary ack
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>
2020-08-19 19:32:20 -07:00
Phani Kumar Uppalapati
bc326d21fd audio-kernel: upgrade to ar/spf changes
Rename casa to ar and gecko to spf in audio-kernel.

Change-Id: Ia37ee0497ce043443ca70131d2739737cb8f0366
Signed-off-by: Phani Kumar Uppalapati <phaniu@codeaurora.org>
2020-06-25 00:39:53 -07:00
Ashish Jain
de3e09d08d asoc: Expose a sysfs node to notify device open/close.
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>
2020-06-25 00:35:46 -07:00
Phani Kumar Uppalapati
4adf995c01 audio-kernel: Update audio adsp glink channel name to adsp_apps
Change-Id: I31a50b4d8b7d979882b323b227f577ca168aa780
Signed-off-by: Phani Kumar Uppalapati <phaniu@codeaurora.org>
2020-06-25 00:35:42 -07:00
Bharath Tirunagaru
ac15eb7016 audio-kernel: SSR/PDR fixes on audio-drivers.
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>
2020-06-25 00:35:35 -07:00
Bharath Tirunagaru
ebf0162590 audio-kernel: Add changes to support SSR/PDR
Add changes in audio-pkt,voice_mhi and gpr-lite drivers.
Fixing bug in audio_pdr driver w.r.t memory allocation.

Change-Id: I6ab7ff13b532921f85e9548341969abd32ee3b6d

Signed-off-by: Bharath Tirunagaru <bharatht@codeaurora.org>
2020-06-25 00:35:08 -07:00
qctecmdr
06ed8063cd Merge "dsp: adsp-loader: Support ADSP restart recovery when stuck" 2020-06-17 06:08:08 -07:00
Deru Wang
f1a7ecab50 asoc: flags is used but is uninitialized
initialize flags to resolve static code analysis issue

Change-Id: I23e74050e69db6894b02cbc00605861abdce0e56
Signed-off-by: Deru Wang <deruwang@codeaurora.org>
2020-06-11 08:08:49 -07:00