Laxminath Kasam | 605b42f | 2017-08-01 22:02:15 +0530 | [diff] [blame] | 1 | /* |
| 2 | * Copyright (c) 2013-2015, The Linux Foundation. All rights reserved. |
| 3 | * |
| 4 | * This program is free software; you can redistribute it and/or modify |
| 5 | * it under the terms of the GNU General Public License version 2 and |
| 6 | * only version 2 as published by the Free Software Foundation. |
| 7 | * |
| 8 | * This program is distributed in the hope that it will be useful, |
| 9 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 10 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 11 | * GNU General Public License for more details. |
| 12 | */ |
| 13 | |
| 14 | #ifndef _LINUX_MSM_AUDIO_ION_H |
| 15 | #define _LINUX_MSM_AUDIO_ION_H |
| 16 | #include <dsp/q6asm-v2.h> |
| 17 | #include <sound/pcm.h> |
| 18 | #include <linux/msm_ion.h> |
| 19 | |
| 20 | |
| 21 | int msm_audio_ion_alloc(const char *name, struct ion_client **client, |
| 22 | struct ion_handle **handle, size_t bufsz, |
| 23 | ion_phys_addr_t *paddr, size_t *pa_len, void **vaddr); |
| 24 | |
| 25 | int msm_audio_ion_import(const char *name, struct ion_client **client, |
| 26 | struct ion_handle **handle, int fd, |
| 27 | unsigned long *ionflag, size_t bufsz, |
| 28 | ion_phys_addr_t *paddr, size_t *pa_len, void **vaddr); |
| 29 | int msm_audio_ion_free(struct ion_client *client, struct ion_handle *handle); |
| 30 | int msm_audio_ion_mmap(struct audio_buffer *substream, |
| 31 | struct vm_area_struct *vma); |
| 32 | |
| 33 | bool msm_audio_ion_is_smmu_available(void); |
| 34 | int msm_audio_ion_cache_operations(struct audio_buffer *abuff, int cache_op); |
| 35 | |
| 36 | struct ion_client *msm_audio_ion_client_create(const char *name); |
| 37 | void msm_audio_ion_client_destroy(struct ion_client *client); |
| 38 | int msm_audio_ion_import_legacy(const char *name, struct ion_client *client, |
| 39 | struct ion_handle **handle, int fd, |
| 40 | unsigned long *ionflag, size_t bufsz, |
| 41 | ion_phys_addr_t *paddr, size_t *pa_len, void **vaddr); |
| 42 | int msm_audio_ion_free_legacy(struct ion_client *client, |
| 43 | struct ion_handle *handle); |
| 44 | u32 msm_audio_populate_upper_32_bits(ion_phys_addr_t pa); |
| 45 | #endif /* _LINUX_MSM_AUDIO_ION_H */ |