msm_audio_ion.h 786 B

1234567891011121314151617181920212223242526272829303132
  1. /* SPDX-License-Identifier: GPL-2.0-only */
  2. /*
  3. * Copyright (c) 2013-2015, 2017-2021, The Linux Foundation. All rights reserved.
  4. */
  5. #ifndef _LINUX_MSM_AUDIO_ION_H
  6. #define _LINUX_MSM_AUDIO_ION_H
  7. #include <sound/pcm.h>
  8. #include <linux/msm_ion.h>
  9. #include <linux/dma-mapping.h>
  10. enum {
  11. HLOS_TO_ADSP = 1,
  12. ADSP_TO_HLOS,
  13. };
  14. #define VMID_CP_ADSP_SHARED 33
  15. enum {
  16. MSM_AUDIO_ION_INV_CACHES = 0,
  17. MSM_AUDIO_ION_CLEAN_CACHES,
  18. };
  19. struct audio_buffer {
  20. dma_addr_t phys;
  21. void *data;
  22. uint32_t used;
  23. uint32_t size;/* size of buffer */
  24. uint32_t actual_size; /* actual number of bytes read by DSP */
  25. struct dma_buf *dma_buf;
  26. };
  27. int msm_audio_get_phy_addr(int fd, dma_addr_t *paddr, size_t *pa_len);
  28. void msm_audio_ion_crash_handler(void);
  29. #endif /* _LINUX_MSM_AUDIO_ION_H */