msm-pcm-afe-v2.h 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. /* Copyright (c) 2012, The Linux Foundation. All rights reserved.
  2. *
  3. * This program is free software; you can redistribute it and/or modify
  4. * it under the terms of the GNU General Public License version 2 and
  5. * only version 2 as published by the Free Software Foundation.
  6. *
  7. * This program is distributed in the hope that it will be useful,
  8. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  9. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  10. * GNU General Public License for more details.
  11. */
  12. #ifndef _MSM_PCM_AFE_H
  13. #define _MSM_PCM_AFE_H
  14. #include <sound/apr_audio-v2.h>
  15. #include <sound/q6afe-v2.h>
  16. struct pcm_afe_info {
  17. unsigned long dma_addr;
  18. struct snd_pcm_substream *substream;
  19. unsigned int pcm_irq_pos; /* IRQ position */
  20. struct mutex lock;
  21. spinlock_t dsp_lock;
  22. uint32_t samp_rate;
  23. uint32_t channel_mode;
  24. uint8_t start;
  25. uint32_t dsp_cnt;
  26. uint32_t buf_phys;
  27. int32_t mmap_flag;
  28. int prepared;
  29. struct hrtimer hrt;
  30. int poll_time;
  31. struct afe_audio_client *audio_client;
  32. };
  33. #define MSM_EXT(xname, fp_info, fp_get, fp_put, addr) \
  34. {.iface = SNDRV_CTL_ELEM_IFACE_MIXER, \
  35. .access = SNDRV_CTL_ELEM_ACCESS_READWRITE, \
  36. .name = xname, \
  37. .info = fp_info,\
  38. .get = fp_get, .put = fp_put, \
  39. .private_value = addr, \
  40. }
  41. #endif /*_MSM_PCM_AFE_H*/