q6adm.h 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. /* Copyright (c) 2010-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 __Q6_ADM_H__
  13. #define __Q6_ADM_H__
  14. #include <sound/q6afe.h>
  15. #define ADM_PATH_PLAYBACK 0x1
  16. #define ADM_PATH_LIVE_REC 0x2
  17. #define ADM_PATH_NONLIVE_REC 0x3
  18. /* multiple copp per stream. */
  19. struct route_payload {
  20. unsigned int copp_ids[AFE_MAX_PORTS];
  21. unsigned short num_copps;
  22. unsigned int session_id;
  23. };
  24. int adm_open(int port, int path, int rate, int mode, int topology);
  25. int adm_multi_ch_copp_open(int port, int path, int rate, int mode,
  26. int topology, int perfmode);
  27. int adm_memory_map_regions(uint32_t *buf_add, uint32_t mempool_id,
  28. uint32_t *bufsz, uint32_t bufcnt);
  29. int adm_memory_unmap_regions(uint32_t *buf_add, uint32_t *bufsz,
  30. uint32_t bufcnt);
  31. int adm_close(int port);
  32. int adm_pseudo_close(int port);
  33. int adm_matrix_map(int session_id, int path, int num_copps,
  34. unsigned int *port_id, int copp_id);
  35. int adm_connect_afe_port(int mode, int session_id, int port_id);
  36. int adm_disconnect_afe_port(int mode, int session_id, int port_id);
  37. void adm_ec_ref_rx_id(int port_id);
  38. int adm_connect_afe_port_v2(int mode, int session_id, int port_id,
  39. int sample_rate, int channels);
  40. int adm_multi_ch_copp_pseudo_open_v3(int port_id, int path, int rate,
  41. int channel_mode, int topology);
  42. #ifdef CONFIG_RTAC
  43. int adm_get_copp_id(int port_id);
  44. #endif
  45. #endif /* __Q6_ADM_H__ */