Commit Graph

777 Commitit

Tekijä SHA1 Viesti Päivämäärä
Prasad Kumpatla
7d084b4b16 dsp: add early down support for PDR
When early down happens ADSP is down and APPS is trying to render audio
to ADSP continuously in impression that DSP is Up until APPS get down
notification. In some scenarios the time taken b/w early down to down
taking more time than expected. This longer times may cause block in
printk and other system hogging. So add support to listen early down
to do avoid such issues.

Change-Id: I798265d682e2d93ae889a514eb3a2022afa73196
Signed-off-by: Prasad Kumpatla <quic_pkumpatl@quicinc.com>
2024-02-07 21:17:32 -08:00
qctecmdr
843ddedcd2 Merge "audio_ssr: Mutex dead lock" 2024-02-02 23:49:11 -08:00
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
Ravulapati Vishnu Vardhan Rao
a60909ecb4 audio_ssr: Mutex dead lock
notifier_mutex is global mutex and there might be a thread which will
acquire notifier_mutex which causes other thread to be in wait
causing deadlock. Using static initialized mutex rectifies issue.

Change-Id: Id8ba30f22419e1a8a7a7356f984db2559197a075
Signed-off-by: Ravulapati Vishnu Vardhan Rao <quic_visr@quicinc.com>
2024-01-23 16:36:02 +05:30
Srinivas Marka
098bc9ac84 dsp: audio_ion: Add 32 bit userspace ioctl support
Add ioctl support for 32 bit userspace on 64bit platform.

Change-Id: I208c452993d10d1901eb926dcd4e4a0a1747eaea
Signed-off-by: Srinivas Marka <quic_smarka@quicinc.com>
2024-01-09 14:24:45 +05:30
qctecmdr
a30841251b Merge "asoc: codec: wcd9378: optimize the micbias usage set logic" 2024-01-07 02:11:24 -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
yuayang
568d8d0822 asoc: audio-kernel: Remove trace_printk
Remove trace_printk point.

Change-Id: I76b53eda77bc41c75e06a885084022d74c248188
Signed-off-by: yuayang <quic_yuayang@quicinc.com>
2023-12-21 16:26:31 +08:00
Sarath Varma Ganapathiraju
e5a753acaf dsp: spf-core: update add child devices timeout to 10000 ms
update add child devices timeout to 10000 ms

Change-Id: Ieee7333561df87112ff9f37102ab1a6237d55d6f
Signed-off-by: Sarath Varma Ganapathiraju <quic_ganavarm@quicinc.com>
2023-12-06 23:09:17 -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
qctecmdr
960ba2a87f Merge "dsp: adsp_loader: load proper dtb image" 2023-11-02 06:39:11 -07:00
qctecmdr
c4a89a1cda Merge "dsp : Update timeout for spf_apm_ready_check" 2023-10-30 06:45:17 -07:00
Faiz Nabi Kuchay
9d97bbe631 dsp: adsp_loader: load proper dtb image
Load proper dtb image when fuse is not supported.

Change-Id: If87fcc715954b1526fa6718a3453357cbb8957e3
Signed-off-by: Faiz Nabi Kuchay <quic_fkuchay@quicinc.com>
2023-10-25 19:34:31 +05:30
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
qctecmdr
477e2db368 Merge "dsp: adsp_loader: Load adsp mdt using fuse-not-supported property" 2023-10-04 07:18:55 -07:00
Faiz Nabi Kuchay
3521224669 dsp: adsp_loader: Load adsp mdt using fuse-not-supported property
As per current code there isn't a way to load custom adsp-mdt image.
Use kernel api to load custom adsp-mdt.

Change-Id: I42f1186741dff0b9bd953e536eb33907d3c6cb90
Signed-off-by: Faiz Nabi Kuchay <quic_fkuchay@quicinc.com>
2023-09-22 19:49:52 +05:30
Prasad Kumpatla
a71db6c39a dsp: add dt flag for enable and disable sleep api
add dt flag for enable and disable sleep api.

Change-Id: I97e9aa8c319d478b2fa979c38f5cc4559e1fb435
Signed-off-by: Prasad Kumpatla <quic_pkumpatl@quicinc.com>
2023-09-19 11:15:24 +05:30
Phani Kumar Uppalapati
dcf0e16597 prm: add support for low power resource API for pineapple target
Add support for CPU LPR API for pineapple target.

Change-Id: Ic934591b254fcf7af41c4e49396c81ba75530529
Signed-off-by: Prasad Kumpatla <quic_pkumpatl@quicinc.com>
Signed-off-by: Phani Kumar Uppalapati <quic_phaniu@quicinc.com>
2023-08-24 15:24:11 +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
Prasad Kumpatla
8d79e00ae1 dsp: address memleak in msm_audio_ion_map_kernel
dma_vmap is not freed in else case of is_iova, so kfree dma_vmap
when is_iova is false. And also if dma_buf_vmap kernel map is
failed, need to end cpu access dma buf.

Change-Id: I111fb7a2a367a8418f46a7b5fc1459d135d7115e
Signed-off-by: Prasad Kumpatla <quic_pkumpatl@quicinc.com>
2023-04-09 23:35:34 -07:00
Phani Kumar Uppalapati
7370c9bf8d audio: Switch to qcom_scm_assign_mem() from hyp_assign_phys()
Switch to upstream friendly qcom_scm_assign_mem from hyp_assign_phys.

Change-Id: I4a4a798c2f3fb05a3be1ec99cccbd05b6c940903
Signed-off-by: Phani Kumar Uppalapati <quic_phaniu@quicinc.com>
2023-03-20 15:55:02 -07:00
Prasad Kumpatla
934cadd456 dsp: add lock in ion free to avoid use after free
add lock in ion free to protect dma buff and avoid
use after free.

Change-Id: I6376408ce1a5b98b7aeacc32e44ec4db08ff9df5
Signed-off-by: Prasad Kumpatla <quic_pkumpatl@quicinc.com>
2023-02-09 09:56:57 -08:00
Aditya Bavanari
4e4aec5874 adsp-loader: Add support to load adsp firmware with image name
Use rproc_set_firmware API to load ADSP firmware using
image name when adsp_fw_name is set based on
fuse variant.

Signed-off-by: Aditya Bavanari <quic_abavanar@quicinc.com>
Change-Id: I529fe3f9f5f3a861c6b345a79f3ef90f517405a4
2023-02-06 18:07:04 -08:00
Akhil Karuturi
f8f8f14c93 dsp: fix miscellaneous defects
Fix syntax errors and spacing issues.

Change-Id: I793af41a9a72301de4200e57278b5bd8ddc018a6
2022-12-29 05:04:32 -08:00
Prasad Kumpatla
a976c491a1 dsp: increase the spf close all command timeout
While graph_open is processing by the SPF, apps receives
userspace(agm/pal) crash which will triggers spf_close_all
cmd from msm common drivers and immediately calls
msm_audio_ion_crash_handler() which will un-maps the memory. But
here SPF is still in processing the graph_open, recieved spf_close_all
cmd is queued in SPF. Due to un-mapping is done immediately in HLOS
will resulting in SMMU fault.

To avoid such scenarios, increased the spf_close_all cmd timeout,
because the AGM timeout for the graph_open is 4sec, so increase the timeout
for spf_close_all cmd response until graph open completes or timed out.

Change-Id: I67430cad5a55bd250ea110587c0ead2d97115efc
Signed-off-by: Prasad Kumpatla <quic_pkumpatl@quicinc.com>
2022-12-19 03:34:38 -08:00
Phani Kumar Uppalapati
dc970caadb Revert "audio kernel: add null point check for lpass cdc."
This reverts commit bfbf93e9f8.

Change-Id: Id5e9e84b18e809831618639a0bf8f0497eb82bd3
Signed-off-by: Phani Kumar Uppalapati <quic_phaniu@quicinc.com>
2022-11-30 13:26:49 -08:00
qctecmdr
da4943cefd Merge "audio kernel: add null point check for lpass cdc." 2022-11-22 22:10:11 -08:00
qctecmdr
829115c0e4 Merge "dsp: audio_ion: Add checks before memmory access" 2022-11-22 07:34:51 -08:00
qctecmdr
013b17911a Merge "dsp: prm: move g_prm.state and g_prm.status into mutex_lock protection" 2022-11-22 07:13:49 -08:00
Ranjith
a241af4cf8 dsp: audio_ion: Add checks before memmory access
-Add check for memory access in msm_audio_ion_crash_handler

Change-Id: Idd7a51578260b2779c72040d99483de453c4330e
2022-11-21 01:28:07 -08:00
Phani Kumar Uppalapati
5555970830 audio-kernel: fix compilation issues for pineapple target
Fix compilation issues in audio-kernel for pineapple target.

Change-Id: I93fa4fb670989f82139dd2cd0dbe57b52ad52504
Signed-off-by: Phani Kumar Uppalapati <quic_phaniu@quicinc.com>
2022-11-18 11:58:44 -08:00
yuayang
bfbf93e9f8 audio kernel: add null point check for lpass cdc.
add null point check for lpass cdc.

Change-Id: I280d4dcb5a1e28336fd1b074231b28c398808880
2022-11-14 17:09:44 +08:00
Meng Wang
ac06fe7d10 dsp: prm: move g_prm.state and g_prm.status into mutex_lock protection
When two clients call prm_gpr_send_pkr concurrently, g_prm.status will be
set to 0 for both clients. When client_A returns some error, g_prm.status
will be some error value and not cleared for Client_B. When audio_prm_callback
returns correct value for Client_B, g_prm.status is some error value which causes
prm_gpr_send_pkt fails for Client_B by mistake.
Move g_prm.status and g_prm.state into mutex_lock to resolve this issue.

Change-Id: Ie028533e6590bfd59b2fa08a496bbffc8793e5f6
Signed-off-by: Meng Wang <quic_mengw@quicinc.com>
2022-10-28 01:59:53 -07:00
Yuhui Zhao
8891411636 audio-kernel: Replace struct dma_buf_map with struct iosys_map
Replace struct dam_buf_map with struct iosys_map and
Delete nonexistent header files and API calls.

Change-Id: I04f87dc9739b487b5a4fb7d7bb615198c27b9925
Signed-off-by: Prasad Kumpatla <quic_pkumpatl@quicinc.com>
2022-10-06 22:57:55 -07: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
Yuhui Zhao
1dacaf014f audio-kernel: Compilation fixes with "Break" and "fallthrough"
Compilation fixes with "Break" and "fallthrough".

Change-Id: Ica05d0410efc5e9dc52addcf4cd8c0253f49fada
2022-10-06 22:40:29 -07:00
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
qctecmdr
6f16c80cc0 Merge "dsp: Correct the condition check of apm ready." 2022-08-04 09:00:20 -07:00
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
Ritu Sharma
cd090cb9e9 dsp: Correct the condition check of apm ready.
Correct the condition check of apm ready status during
prm_send_pkt, loop should exit if apm is ready or retry
count exceeds max count.

Change-Id: I0c32731cb3696ef388a0d17d873a8b1485b54805
Signed-off-by: Ritu Sharma <quic_ritushar@quicinc.com>
2022-07-25 02:54:39 -07:00
Asish Bhattacharya
d27e25c674 dsp: add change to fix use-after-free issue
Add change to properly handle the pointers by setting them to
NULL after free and adding some null checks before dereferencing.

Change-Id: Ic2f3ef5631d0f4e4191bf772eb0b3f0b825044a6
2022-07-05 04:50:41 -07:00
qctecmdr
a041970a5d Merge "audio-kernel: select param id vote against sleep when enter to securezone" 2022-06-01 13:21:21 -07:00
Prasad Kumpatla
6a758782b1 audio-kernel: select param id vote against sleep when enter to securezone
select param id vote against sleep when enter to securezone with the help of
mixer ctl from pal.

Change-Id: Icb0d6aba4b13edc0658e676eb89c996d440e9971
Signed-off-by: Prasad Kumpatla <quic_pkumpatl@quicinc.com>
2022-05-27 12:51:23 +05:30
Matthew Rice
acc89c1a44 dsp: Add audio SSR traces for profiling
Adds traces before ssr shutdown and after powerup.

Change-Id: I77309be3e7598381117f6bdbf991f540a736b4f9
Signed-off-by: Matthew Rice <quic_mrice@quicinc.com>
2022-05-26 13:46:14 -07:00
Meng Wang
95c95b2d67 asoc: update digital_cdc_rsc_mgr_hw_vote API
Update digital_cdc_rsc_mgr_hw_vote_enable/disable API with device
info for easy debug. Also, add swrm clock enable checks during SSR.
When SSR happens, swrm->hw_core_clk_en and swrm->aud_core_clk_en will
be reset without resetting audio_vote and core_vote clk. This would
cause clk mismatch in audio driver and adsp and device fails suspending
when there's no audio usecase. Make this change to reset audio_vote
and core_vote clk when receiving SWR_DEVICE_SSR_DOWN.

Change-Id: I9875aac9f6faf8b6481457a70f31b005073369e0
Signed-off-by: Meng Wang <quic_mengw@quicinc.com>
2022-05-06 10:50:36 -07:00
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
Phani Kumar Uppalapati
0ceec6c1ac audio-kernel: select RCO clock if lpi PCM logging is enabled
Select clock root as RCO for VA use-case whenever LPI
PCM logging feature is enabled.

Change-Id: I461b2afb9eeb595975d550d56c54e7548f0f2130
Signed-off-by: Phani Kumar Uppalapati <quic_phaniu@quicinc.com>
2022-02-27 23:55:47 -08:00
Shiv Maliyappanahalli
964187d31d dsp: fix issues related to caching of dma_vmap data
Local variable is used for dma_vmap and same value is used for caching
which becomes invalid after going out of scope. Store in heap instead.

Change-Id: I2e291137dd461d0cdb49209a6c1d804f1e806457
2022-02-10 18:50:33 -08:00
Vikram Panduranga
d42016b9c4 dsp: call hyp_assign during clean up
If the userspace which has allocated & hyp assigned the CMA
memory crashes, the crash handler is just freeing the memory
without calling hyp assign to get access back. This leads
to crash when freeing the memory as HLOS driver does not have
access to memory.

Fix this by calling hyp_assign to get access back to
HLOS driver.

Change-Id: Ic04736cf241eb7e310b8ce0af260e147f4d1edc6
Signed-off-by: Vikram Panduranga <vpandura@codeaurora.org>
Signed-off-by: Akhil Karuturi <akarutur@codeaurora.org>
2021-11-23 23:59:20 -08:00