/arch/arm/mach-msm/qdsp6v2/msm_qdsp6_audio.h

https://bitbucket.org/sammyz/iscream_thunderc-2.6.35-rebase · C++ Header · 52 lines · 28 code · 9 blank · 15 comment · 0 complexity · f682d93818684258ed165cd37bc15ca9 MD5 · raw file

  1. /* arch/arm/mach-msm/include/mach/msm_qdsp6_audio.h
  2. *
  3. * Copyright (C) 2009 Google, Inc.
  4. * Author: Brian Swetland <swetland@google.com>
  5. *
  6. * This software is licensed under the terms of the GNU General Public
  7. * License version 2, as published by the Free Software Foundation, and
  8. * may be copied, distributed, and modified under those terms.
  9. *
  10. * This program is distributed in the hope that it will be useful,
  11. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  12. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  13. * GNU General Public License for more details.
  14. *
  15. */
  16. #ifndef _MACH_MSM_QDSP6_Q6AUDIO_
  17. #define _MACH_MSM_QDSP6_Q6AUDIO_
  18. #define AUDIO_FLAG_READ 0
  19. #define AUDIO_FLAG_WRITE 1
  20. #define AUDIO_FLAG_INCALL_MIXED 2
  21. struct audio_buffer {
  22. dma_addr_t phys;
  23. void *data;
  24. uint32_t size;
  25. uint32_t used; /* 1 = CPU is waiting for DSP to consume this buf */
  26. uint32_t actual_size; /* actual number of bytes read by DSP */
  27. };
  28. struct audio_client {
  29. struct audio_buffer buf[2];
  30. int cpu_buf; /* next buffer the CPU will touch */
  31. int dsp_buf; /* next buffer the DSP will touch */
  32. int running;
  33. int session;
  34. int state;
  35. wait_queue_head_t wait;
  36. wait_queue_head_t cmd_wait;
  37. struct dal_client *client;
  38. int cb_status;
  39. uint32_t flags;
  40. void *apr;
  41. int ref_count;
  42. };
  43. #endif