Commit Graph

647 Commits

Author SHA1 Message Date
Saurav Kumar
9ec95bb9c8 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: I3e52b9a6885a8d8a91c09f75fe92ba69e3eb555f
Signed-off-by: Saurav Kumar <sauravk@codeaurora.org>
2020-09-11 01:58:16 -07:00
Guodong Hu
d200c2fbe1 dsp: add support for CMA heap allocation during call
Add support for CMA heap allocation during call.

Mirror from: 3226736

Change-Id: I30a237b360ec6d690515682f0d98a86148acf059
Signed-off-by: Kunlei Zhang <kunleiz@codeaurora.org>
Signed-off-by: Guodong Hu <guodhu@codeaurora.org>
2020-09-03 18:45:53 -07:00
qctecmdr
994eb4e818 Merge "ASOC: fix audio machine driver compile issue" 2020-09-03 18:06:23 -07:00
qctecmdr
1831ffeeec Merge "Revert "audio-driver: dsp: Adapt to non sys heap support for GVM"" 2020-09-03 18:06:22 -07:00
qctecmdr
3c36eede88 Merge "dsp/ipc: update kbuild and header files for gvm bringup" 2020-09-03 18:06:22 -07:00
qctecmdr
4716ce11df Merge "dsp: ensure unmap memory is called when PDR/SSR" 2020-09-01 18:11:51 -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
Guodong Hu
9a0b1fb8c4 Revert "audio-driver: dsp: Adapt to non sys heap support for GVM"
This reverts commit 5f0a52cccd.

Change-Id: Id60781c539e036d8877fac8e092e40dfb5bc42a5
2020-09-01 00:10:54 -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
Vignesh Kulothungan
26c1ce2fb7 dsp: afe: send cps config after sending topology
Set params for a module should be done after sending
the topology information in which the module resides in.
Send cps configuration after sending afe topology.
Send cps configuration only for speaker protected usecases.

Change-Id: I89c7df9f0d70862813aa7a2bd1ea1afc2ddcc882
Signed-off-by: Vignesh Kulothungan <vigneshk@codeaurora.org>
2020-08-27 17:11:05 -07:00
Kunlei Zhang
048c3b9418 dsp: ensure unmap memory is called when PDR/SSR
During PDR/SSR, hyp assign is not called when stop
call in below cases:
1. cvs and mvm handle are not null
2. disable voice path failure during device switch

Fix it by ensuring unmap memory is called during
PDR/SSR.

Change-Id: I37b66a6f6dc29934dde0b0814ab44b784ebe2aea
Signed-off-by: Kunlei Zhang <kunleiz@codeaurora.org>
2020-08-27 19:38:13 +08:00
qctecmdr
5caa78db45 Merge "dsp: add support for SVA to use afe topology deregister" 2020-08-25 11:21:17 -07:00
qctecmdr
694c6f67cc Merge "dsp: adm: change channel number for AUDIO_RX_MONO_VOIP module" 2020-08-17 01:44:20 -07:00
qctecmdr
f5c694ecab Merge "ASoC: lahaina: add support for CPS speaker protection" 2020-08-17 01:44:19 -07:00
Sanjana B
afcc911b4e dsp: add support for SVA to use afe topology deregister
To handle erroneous scenario when audio afe driver registers
a FFNS topology in non-island mode instead of island mode,
add capability for audio afe driver to deregister previously
created topology before registering a new topology for SVA.

Change-Id: Iff871da998847ea5d3bcee417c780b8acaf70ca3
Signed-off-by: Sanjana B <sanjb@codeaurora.org>
Signed-off-by: Xiaoyu Ye <benyxy@codeaurora.org>
2020-08-13 18:24:08 -07:00
Vignesh Kulothungan
3fa8c9411f dsp: add afe function to send cps configuration
Define cps hw interface configuration structures.
Add AFE_PARAM_ID_CPS_LPASS_HW_INTF_CFG parameter id.
Add a function to send afe cps speaker protection
configuration.

Change-Id: I865e9981b6dd1da4b9ef1a3e18be82cea2996309
Signed-off-by: Vignesh Kulothungan <vigneshk@codeaurora.org>
2020-08-10 16:12:04 -07:00
Kunlei Zhang
13803a3ca6 dsp: adm: change channel number for AUDIO_RX_MONO_VOIP module
AUDIO_RX_MONO_VOIP module in COPreP topology doesn't support
stereo input. Update channel number to mono for
AUDIO_RX_MONO_VOIP_COPP_TOPOLOGY.

Change-Id: I23632808cfcf82496f0e8f9618e28915974fc584
Signed-off-by: Kunlei Zhang <kunleiz@codeaurora.org>
2020-08-10 18:12:36 +08:00
Nirav Khatri
ac1e77dc77 ASoC: Add external mclk mixer support
Add mixer control and callback for selecting external mclk at start of
next playback for a particular BE.

Change-Id: Ifc25eda2f14da564c6b066eb8f76049697bbd44e
Signed-off-by: Nirav Khatri <khatri@codeaurora.org>
2020-08-06 06:17:08 +05:30
Harshal Ahire
2fdf19ac8e dsp: Add support for GET_PARAMS
Add support to query module parameters from ADSP.

Change-Id: Ie63dd95cf27277f9c836becc98952d48971a3ec3
Signed-off-by: Harshal Ahire <hahire@codeaurora.org>
2020-08-04 21:03:04 +05:30
qctecmdr
4e91300a68 Merge "dsp: add support for CMA heap allocation during call" 2020-07-30 01:29:53 -07:00
qctecmdr
d839e618a0 Merge "adsp-loader: Fix compilation error in adsp loader" 2020-07-27 05:45:11 -07:00
qctecmdr
e20df1da06 Merge "asoc: dsp: Fix possible invalid memory access due to race condition" 2020-07-27 05:45:11 -07:00
Kunlei Zhang
d9bf6df220 dsp: add support for CMA heap allocation during call
Add support for CMA heap allocation during call.

Change-Id: I65cd291a9db56bf53d9bb9b4e6c7236da9d7288c
Signed-off-by: Kunlei Zhang <kunleiz@codeaurora.org>
2020-07-27 11:53:28 +08:00
qctecmdr
04a841333a Merge "dsp: fix to race condition in voice call mute command handling." 2020-07-24 00:05:32 -07:00
Aditya Bavanari
91815984c2 adsp-loader: Fix compilation error in adsp loader
Debug logs arguments are not correct in adsp loader
during an error scenario. Correct the arguments to
fix compilation error.

Change-Id: Ibdba5ce1332b287c84a38512fba8764298f4dd80
2020-07-23 15:36:36 +05:30
Vangala, Amarnath
d2c1b2d294 asoc: dsp: Fix possible invalid memory access due to race condition
Fix for double free issue reported by KASAN.
Replace vulnerable code with safe call flow.

Change-Id: Id96cf97dd60d85897d64f1d8f2440a5b6de3ba61
Signed-off-by: Vangala, Amarnath <avangala@codeaurora.org>
2020-07-21 15:07:06 +05:30
qctecmdr
6720f1b670 Merge "ASoC: msm: Support different POPPs to single COPP" 2020-07-17 22:40:14 -07:00
qctecmdr
d70f2387d0 Merge "dsp: fix mute for AptX Adaptive A2DP streaming" 2020-07-17 22:40:13 -07:00
Vangala, Amarnath
d6093c7f6c dsp: fix to race condition in voice call mute command handling.
Apply the cached value of device mute setting to dsp,
after voc state moves to RUN.

Change-Id: I82bc9ab2d49a199f0277b1694cd00311eddd6115
Signed-off-by: Vangala, Amarnath <avangala@codeaurora.org>
2020-07-16 12:47:53 +05:30
Harshal Ahire
39ab7828be dsp: fix mute for AptX Adaptive A2DP streaming
Only load depacketizer module for aptx_adaptive and ldac playback
use-case during dynamic load of BT modules, decoder module loading
not required. 

Change-Id: If7ec559f5cc7ff428b8e0e4fac1f34e7f2469c8e
Signed-off-by: Harshal Ahire <hahire@codeaurora.org>
2020-07-15 20:25:40 +05:30
Viraja Kommaraju
5fdef1b590 ASoC: msm: Support different POPPs to single COPP
For multi COPP feature it could only allow POPPs with same app_type
to connect single COPP. But it's possible to connect different POPPs
with different app_type to single COPP, to achieve this, it should
skip the app_type check when create copp_idx.

Change-Id: I9da6e84b8ef4a5e13d29d71c016b114ea759b94f
Signed-off-by: Viraja Kommaraju <virajak@codeaurora.org>
2020-07-15 01:33:26 +05:30
qctecmdr
848466a9cc Merge "dsp: voice: Reset music_info on SSR" 2020-07-14 06:11:20 -07:00
Dhananjay Kumar
02aa9f5f33 dsp: voice: Reset music_info on SSR
Reset music_info playback states during SSR to fix incall music session
failure after SSR.
Music delivery session requests are getting ignored if the state is not reset.

Change-Id: I7dd736baa538fb3697c874230c5a9c02f90b6a06
Signed-off-by: Dhananjay Kumar <dhakumar@codeaurora.org>
2020-07-09 00:11:46 +05:30
Harshal Ahire
ed50512138 dsp: fix compilation issue in dynamic load/unload BT modules
Compilation issue addressed in failure case to load
num_modules.

Change-Id: Ieb923074a71f4ddc4c8da379b1169a06ce9267b6
2020-07-07 03:20:28 -07:00
qctecmdr
db0a7df795 Merge "dsp: Feedback path cfg to support 3rd party spkr protection algorithms." 2020-06-30 19:16:29 -07:00
qctecmdr
66099fcea7 Merge "dsp: redefine audio_notifier_init to silence PDR error" 2020-06-29 11:21:31 -07:00
qctecmdr
59e150f829 Merge "dsp: don't reset rx ec ref channel after adm open" 2020-06-29 11:21:31 -07:00
Vangala, Amarnath
366f76d21c dsp: Feedback path cfg to support 3rd party spkr protection algorithms.
Backward compatibility change to set 'feedback path cfg' to AFE_MODULE_FEEDBACK,
to support 3rd party spkr protection algorithms.

Change-Id: I9af731902fbc5bc69f130a4f30d8fc5f18ceaace
Signed-off-by: Vangala, Amarnath <avangala@codeaurora.org>
2020-06-23 10:14:57 -07:00
Guodong Hu
4d71a88b69 dsp: redefine audio_notifier_init to silence PDR error
CONFIG_MSM_QDSP6_PDR is not enabled on Auto targets.

Change-Id: If7ac374bbe88635eeb328593b4d3a9f01a716c5c
Signed-off-by: Guodong Hu <guodhu@codeaurora.org>
2020-06-18 02:12:16 -07:00
Xiaoyu Ye
db5ae827eb dsp: convert pr_info to pr_debug to reduce kernel logs
To reduce kernel logs, change unnecessary pr_info to
pr_debug in audio drivers.

Change-Id: I6df096b50c81b2fe7e315e7f278708bc9d46a050
Signed-off-by: Xiaoyu Ye <benyxy@codeaurora.org>
2020-06-17 06:34:16 -07:00
qctecmdr
06ed8063cd Merge "dsp: adsp-loader: Support ADSP restart recovery when stuck" 2020-06-17 06:08:08 -07:00
qctecmdr
8c500e2d43 Merge "dsp: Fix out of bound memory access." 2020-06-16 20:17:02 -07:00
qctecmdr
7284897e35 Merge "asoc:support for DSD on MI2S interface" 2020-06-16 20:17:02 -07:00
qctecmdr
122fd6707a Merge "audio-kernel: Add void param in function definition" 2020-06-16 20:17:02 -07:00
Zhou Song
d8005c664b dsp: don't reset rx ec ref channel after adm open
Remove reset of rx ec ref channel for adm after using,
if the channel value is not changed, user space won't
set it to driver again, then causing adm opening failed.
2020-06-15 20:46:17 +08:00
Aditya Bavanari
6bacce4b9c audio-kernel: Add void param in function definition
Add void param in function definition to
avoid compilation errors when strict prototypes
flag is defined.

Change-Id: I4515c730139fff18638805cd70db24ec1886f127
2020-06-11 07:03:04 -07:00
Avinash Chandra
5638ecaf5d dsp: q6adm: Update the proper param_hdr for offset
For Source Tracking adm_get_param, param_hdr (struct param_hdr_v3) size
being sent was different as param_hdr(struct param_hdr_v1)size used for
offset of virtual memory to copy the param data in out-band case get_param.

Change-Id: I01dd4f704cc5b6994f1203a0e28199a6936cba7f
Signed-off-by: Avinash Chandra <avicha@codeaurora.org>
2020-06-11 07:02:18 -07:00
qctecmdr
e0a48cd1e5 Merge "q6afe: add support for handling rx proxy ports concurrency" 2020-06-11 04:15:16 -07:00
Soumya Managoli
d1a006c81e dsp: adsp-loader: Support ADSP restart recovery when stuck
Changes to support silent restart of adsp subsys
based on the apr callback when packet transfer
to adsp timesout.

Change-Id: Icedb76907a441792d1953a08dd071791e5b08706
Signed-off-by: Soumya Managoli <smanag@codeaurora.org>
2020-06-11 12:05:42 +05:30
Harshal Ahire
e7ca214c29 dsp: Fix out of bound memory access.
Fix out of bound memory access in q6afe_load_avcs_modules()
for afe_avcs_payload_port_mapping structure.

Change-Id: Ibe0e90e4fbedc2cf6a88abd9f3845643020a904a
2020-06-10 23:12:39 -07:00