Commit Graph

17 Commits

Author SHA1 Message Date
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
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
Junkai Cai
d51e529a44 dsp: update audio ion driver to support new kernel
dma buffer virtuall mapping API has been updated in the kernel
update the ion driver to match the new interface

Change-Id: I3aab0609b91da7efcfb03dac99961ace498d79f3
Signed-off-by: Junkai Cai <junkai@quicinc.com>
2021-10-28 16:51:22 -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
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
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
1831ffeeec Merge "Revert "audio-driver: dsp: Adapt to non sys heap support for GVM"" 2020-09-03 18:06:22 -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
qctecmdr
7b0c66d071 Merge "ASoC: msm: unmap and free dma memory if smmu map failed" 2020-03-25 09:38:22 -07:00
Hui Li
037acea398 dsp: use dma handle as default input in hab export
currently in hab driver, it want to hold all bufs as dmabuf for fulture implement, 
and it's hard to get dmabuf fd/handle from a kva, so hab need to generate a new
dmabuf for itself, and this will intruduce audio crash issue
in conclusion, for now hab just accept dma fd/handl as input in KHAB export path.

Change-Id: I11715ba966036f7c02b67d0bdae97eb6d7118d5c
Signed-off-by: Hui Li <hul@codeaurora.org>
2020-03-24 17:08:05 -07:00
Derek Chen
256b05b2b0 ASoC: msm: unmap and free dma memory if smmu map failed
Unmap and free DMA memory in case of ION SMMU
mapping failure from PVM backend or MMHAB.

Change-Id: I2d2780941ba6922534654afa463a011f27ef7c66
Signed-off-by: Derek Chen <chenche@codeaurora.org>
2020-03-23 20:26:54 -07:00
King Tam
4f4ebc9228 dsp: ion_vm: adapt to new interfaces
Add new interfaces stub functions for Dolby security change,
since ion_vm share the same header file with ion.

Change-Id: Iaac5931a9c97eafe1a8cc5980ac70b9a62288faa
Signed-off-by: King Tam <kingt@codeaurora.org>
2019-07-20 13:04:01 -07:00
Xiaojun Sang
ab07f12b3a dsp: ion: unmap DMA buffer after kernel ion map failure
DMA buffer does not unmap after kernel ion map failure. It leads
to unexpected vaddr and memory leak.

Change-Id: I363dd9178a0bcbca601180bfd0a7bd7ef2430d3e
Signed-off-by: Xiaojun Sang <xsang@codeaurora.org>
2019-07-01 14:14:37 +08:00
Timothy Sham
5f0a52cccd audio-driver: dsp: Adapt to non sys heap support for GVM
Adapt to non sys heap support for SMMU FE driver on GVM of
automotive.

Change-Id: I67f5ca511cea1a7a5c1615868b5b2d74e6b22dac
Signed-off-by: Timothy Sham <tsham@codeaurora.org>
2019-06-20 14:24:41 -07:00
Timothy Sham
49cbca051c dsp: add audio ion virtualization support
Add support for virtualized ION frontend driver for audio.
Virtualized ION driver currently is designed to extract
physical memory through hypervisor abstracted ion layer,
which can be shared between APPS and ADSP directly.

Change-Id: I3c664ec3c3a99ce092da6ee103a3b2de4073664f
Signed-off-by: Timothy Sham <tsham@codeaurora.org>
2019-05-13 23:46:55 -07:00