gecko compliant drivers

Change-Id: I5f19da1472a0e90cc5d16459b5367dc07ec2f28b
Signed-off-by: Taha Azzaoui <tazzaoui@codeaurora.org>
This commit is contained in:
Taha Azzaoui
2019-10-21 12:30:54 -07:00
committed by Phani Kumar Uppalapati
parent 5986527a1e
commit 6c8bf95ddf
10 changed files with 1624 additions and 223 deletions

View File

@@ -1,20 +1,32 @@
/* SPDX-License-Identifier: GPL-2.0-only */
/*
* Copyright (c) 2013-2015, 2017-2019, The Linux Foundation. All rights reserved.
* Copyright (c) 2013-2015, 2017-2020, The Linux Foundation. All rights reserved.
*/
#ifndef _LINUX_MSM_AUDIO_ION_H
#define _LINUX_MSM_AUDIO_ION_H
#include <dsp/q6asm-v2.h>
#include <sound/pcm.h>
#include <linux/msm_ion.h>
#include <linux/dma-mapping.h>
enum {
HLOS_TO_ADSP = 1,
ADSP_TO_HLOS,
};
#define VMID_CP_ADSP_SHARED 33
enum {
MSM_AUDIO_ION_INV_CACHES = 0,
MSM_AUDIO_ION_CLEAN_CACHES,
};
struct audio_buffer {
dma_addr_t phys;
void *data;
uint32_t used;
uint32_t size;/* size of buffer */
uint32_t actual_size; /* actual number of bytes read by DSP */
struct dma_buf *dma_buf;
};
int msm_audio_ion_alloc(struct dma_buf **dma_buf, size_t bufsz,
dma_addr_t *paddr, size_t *pa_len, void **vaddr);
@@ -30,4 +42,11 @@ int msm_audio_ion_get_smmu_info(struct device **cb_dev, u64 *smmu_sid);
int msm_audio_ion_dma_map(dma_addr_t *phys_addr, dma_addr_t *iova_base,
u32 size, enum dma_data_direction dir);
int msm_audio_ion_phys_assign(void **mem_hdl, int fd, dma_addr_t *paddr,
size_t *pa_len, u8 assign_type, int id);
int msm_audio_ion_phys_free(void *mem_hdl, dma_addr_t *paddr,
size_t *pa_len, u8 assign_type, int id, int key);
bool msm_audio_is_hypervisor_supported(void);
int msm_audio_get_phy_addr(int fd, dma_addr_t *paddr);
void msm_audio_ion_crash_handler(void);
#endif /* _LINUX_MSM_AUDIO_ION_H */