Commit Graph

684 Commits

Author SHA1 Message Date
qctecmdr
d01dff99d6 Merge "dsp: afe: Add new token to handle nowait cmds" 2020-11-25 18:57:02 -08:00
qctecmdr
f3bf502f35 Merge "dsp: unmap cma memory before hyp unassign during adm close" 2020-11-25 18:57:01 -08:00
qctecmdr
b27eed5dc9 Merge "dsp: q6core: retry till adsp is up to send custom topologies" 2020-11-20 02:14:34 -08:00
qctecmdr
ddd29e8bca Merge "dsp: use default bit-width when start VoLTE call in power mode" 2020-11-20 02:14:34 -08:00
qctecmdr
8148965cc4 Merge "dsp: add change to fix use-after-free issue" 2020-11-20 02:14:34 -08:00
qctecmdr
30f572a80d Merge "ASOC: fix audio machine driver compile issue" 2020-11-20 02:14:34 -08:00
qctecmdr
2fea3356dc Merge "ASoC: Fix typo in SENARY_MI2S_RX clk info" 2020-11-20 02:14:33 -08:00
Akhil Karuturi
62eca6d27b dsp: unmap cma memory before hyp unassign during adm close
unmap memory before hyp unassign during adm close
for handset/speaker FNN usecase.

Change-Id: I1d4d335c5179e42af4dcf7cf8e82e48669b32830
Signed-off-by: Akhil Karuturi <akarutur@codeaurora.org>
2020-11-19 21:35:04 -08:00
Hongtao Peng
eae52c27a7 ASOC: fix audio machine driver compile issue
LV Platform use the same LVGVM cause Kbuild mismatch issue

Change-Id: Iad092ebcbd991e52daedb87406920055528e3a1c
Signed-off-by: Hongtao Peng <hongtaop@codeaurora.org>
2020-11-15 18:32:38 -08:00
Kunlei Zhang
f3e67f4b51 dsp: use default bit-width when start VoLTE call in power mode
VoLTE in power mode doesn't support to configure bit-width of
AFE port with 24bit.

Fix it by use default bit-width when start VoLTE in power mode.

Change-Id: Ic429ea317c71c9a4436705663185fc69cb885166
Signed-off-by: Kunlei Zhang <kunleiz@codeaurora.org>
2020-11-12 16:35:35 +08:00
Akhil Karuturi
a6d9099cf5 dsp: q6core: retry till adsp is up to send custom topologies
add retry logic to ensure adsp is up before registering custom
topologies

Change-Id: Ib88c06ae8c64cd0784319f40e3746ccbbce0cdf7
Signed-off-by: Akhil Karuturi <akarutur@codeaurora.org>
2020-11-11 21:25:47 -08:00
Nirav Khatri
123a24f2c0 ASoC: Fix typo in SENARY_MI2S_RX clk info
Update the typo to fix failure in afe_get_port_idx during RX usecase.

Change-Id: I2026cbce0165e6f5e4059945183a09feaee89b45
Signed-off-by: Nirav Khatri <khatri@codeaurora.org>
2020-11-12 07:32:28 +05:30
Saurav Kumar
1546c9a1b2 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
2020-11-11 02:54:36 -08:00
Soumya Managoli
c98cda65d3 dsp: afe: Add new token to handle nowait cmds
Race condition is observed when sending afe cmd
and afe nowait cmd one after other resulting
in incorrect interpretation of the adsp responses
received back to back.
Handle this by adding a new data token for nowait
commands to indentify the response recevied is for
the same.

Change-Id: I76bf810c23d1fd572cb496c62cbfaac1a5c349b5
Signed-off-by: Soumya Managoli <smanag@codeaurora.org>
2020-11-09 16:08:57 +05:30
Saurav Kumar
e4463e36c8 dsp: add change to enable preemption at cal_utils_dealloc_cal.
Add change to enable preemption at cal_utils_dealloc_cal.

Change-Id: I3d9304851f4d61d7afb82c0512421159ec788db1
Signed-off-by: Saurav Kumar <sauravk@codeaurora.org>
2020-11-03 12:30:01 +05:30
qctecmdr
e2c4330a48 Merge "q6afe: add support for lc3 codec playback" 2020-10-19 21:44:03 -07:00
qctecmdr
ef3408efeb Merge "soc: Add ratelimit to supress the pr_err/dev_err." 2020-10-12 10:10:29 -07:00
Manisha Agarwal
da866c30a6 q6afe: add support for lc3 codec playback
Add support for lc3 codec playback.

Change-Id: I96ee7bb869c89c71bf8ee986529bf8575efd4b5b
Signed-off-by: Manisha Agarwal <maniagar@codeaurora.org>
2020-10-12 21:39:47 +05:30
qctecmdr
7f2fb6f8ee Merge "dsp: update cal data lock when deregister cvp calibration" 2020-10-12 08:55:34 -07:00
qctecmdr
ab02a0d9c1 Merge "dsp: Add param header size based on the instance id support" 2020-10-07 01:58:57 -07:00
qctecmdr
3df4c1d586 Merge "dsp: add change to handle use-after-free in cal_utils_is_cal_stale" 2020-10-07 01:58:57 -07:00
Prasad Kumpatla
a07613afcd soc: Add ratelimit to supress the pr_err/dev_err.
Add ratelimit to supress the logs flooding at the
time of SSR.In all places defined ratelimit as,
in 1sec one debug msg prints.

Change-Id: I6dfe140848e5cecb1b311c432f8311cdf0615a58
Signed-off-by: Prasad Kumpatla <nkumpat@codeaurora.org>
2020-10-07 10:21:42 +05:30
Kunlei Zhang
0acec76b45 dsp: update cal data lock when deregister cvp calibration
Ensure cal data lock is set correctly when deregister
cvp calibration.

Change-Id: Ib9c50d689431eee1a8d9b4676691d61afd77ae9a
Signed-off-by: Kunlei Zhang <kunleiz@codeaurora.org>
Signed-off-by: Akhil Karuturi <akarutur@codeaurora.org>
2020-10-02 12:29:04 -07:00
Saurav Kumar
97d18542c1 dsp: add change to handle use-after-free in cal_utils_is_cal_stale
Add change to address the race condition between
pointer dereference and memory deallocation.

Change-Id: Ia1ed47986ec81d3dc2feb3bc874847fadddac292
Signed-off-by: Saurav Kumar <sauravk@codeaurora.org>
2020-10-01 09:35:23 +05:30
Vignesh Kulothungan
2d4ec76dfc dsp: check speaker index before accessing array
Add check to validate the speaker index before accessing
speaker config array.

Change-Id: I7060806e327b46c044e5339f2c4bbd0e584feae5
Signed-off-by: Vignesh Kulothungan <vigneshk@codeaurora.org>
2020-09-30 12:05:28 -07:00
Sujin Panicker
67413f55e1 dsp: Add param header size based on the instance id support
Add param header size to the actual parameter size
based on the instance id support.

Change-Id: I8937e71254265dbc9faf00b9cfc7c40c88f4388a
Signed-off-by: Sujin Panicker <spanic@codeaurora.org>
2020-09-30 11:42:15 +05:30
qctecmdr
8cb83a63a2 Merge "dsp: add support for audio use cases to use afe topo deregister" 2020-09-27 03:10:55 -07:00
Laxminath Kasam
eedc416e70 dsp: q6core: Check q6core avs state to be modules ready
During PDR, in dynamic load module if attempted
before all module state ready on AVS it may fail.
Add AVS state check before send load module cmd.

Change-Id: I70a5a5b11f5661042d704222759608179ba9d47c
Signed-off-by: Laxminath Kasam <lkasam@codeaurora.org>
2020-09-23 23:12:05 -07:00
qctecmdr
683ae4f2f1 Merge "dsp: add change to fix use-after-free issue" 2020-09-23 22:09:43 -07:00
qctecmdr
87e8178fd7 Merge "dsp: ion: avoid dma_buf_put twice when msm_audio_ion_map_buf fails" 2020-09-23 22:09:43 -07:00
Viraja Kommaraju
8c623f54c4 dsp: support ION memory allocation from audio heap
* Add support to allocate memory from the ION audio heap
  once smmu enabled.

Change-Id: Ic1686c7a3225b723811cbbd35f08d0ac123d1f78
Signed-off-by: Viraja Kommaraju <virajak@codeaurora.org>
2020-09-19 01:30:48 +05:30
Xiaoyu Ye
56dbe8147e dsp: add support for audio use cases to use afe topo deregister
To handle erroneous scenario when an afe port's island mode is
mismatched with its audio use case's island mode, add support for
all audio use cases to deregister previously created afe topology
if an audio use case's afe port failed to start but its topology
has already been set in ADSP previously.

Change-Id: I0176eb09d313150541c6946b1b3001604e7c04c7
Signed-off-by: Xiaoyu Ye <benyxy@codeaurora.org>
2020-09-17 04:39:54 -07:00
Meng Wang
b53d514f0d dsp: ion: avoid dma_buf_put twice when msm_audio_ion_map_buf fails
Update logic to avoid calling dma_buf_put twice
when msm_audio_ion_map_buf fails.

Change-Id: I6958ec55dc78f245e93fbaedf085873fe0f4cb93
Signed-off-by: Meng Wang <mengw@codeaurora.org>
2020-09-15 18:45:21 -07:00
qctecmdr
156b36504a Merge "dsp: Fix issues due to accessing array out of bounds" 2020-09-15 10:44:42 -07:00
qctecmdr
d46b228359 Merge "ASoC: limit error log print rate" 2020-09-15 10:44:41 -07:00
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
Prasad Kumpatla
69415f2e6c dsp: Fix issues due to accessing array out of bounds
Add check for ASM_ACTIVE_STREAMS_ALLOWED
sessions to avoid accessing the array out of bounds.

Change-Id: I7b2fe2dffdb3132fded0b1e268ebd29139050823
Signed-off-by: Prasad Kumpatla <nkumpat@codeaurora.org>
2020-09-07 22:59:15 -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
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