audio_acdb.h 2.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  1. /* Copyright (c) 2010-2013, 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. */
  13. #ifndef _AUDIO_ACDB_H
  14. #define _AUDIO_ACDB_H
  15. #include <linux/msm_audio_acdb.h>
  16. #include <sound/q6adm-v2.h>
  17. enum {
  18. RX_CAL,
  19. TX_CAL,
  20. MAX_AUDPROC_TYPES
  21. };
  22. enum {
  23. VOCPROC_CAL,
  24. VOCSTRM_CAL,
  25. VOCVOL_CAL,
  26. MAX_VOCPROC_TYPES
  27. };
  28. struct acdb_cal_block {
  29. uint32_t cal_size;
  30. uint32_t cal_kvaddr;
  31. uint32_t cal_paddr;
  32. };
  33. struct hw_delay_entry {
  34. uint32_t sample_rate;
  35. uint32_t delay_usec;
  36. };
  37. uint32_t get_voice_rx_topology(void);
  38. uint32_t get_voice_tx_topology(void);
  39. uint32_t get_adm_rx_topology(void);
  40. uint32_t get_adm_tx_topology(void);
  41. uint32_t get_asm_topology(void);
  42. void reset_custom_topology_flags(void);
  43. int get_adm_custom_topology(struct acdb_cal_block *cal_block);
  44. int get_asm_custom_topology(struct acdb_cal_block *cal_block);
  45. int get_voice_cal_allocation(struct acdb_cal_block *cal_block);
  46. int get_lsm_cal(struct acdb_cal_block *cal_block);
  47. int get_anc_cal(struct acdb_cal_block *cal_block);
  48. int get_afe_cal(int32_t path, struct acdb_cal_block *cal_block);
  49. int get_audproc_cal(int32_t path, struct acdb_cal_block *cal_block);
  50. int get_audstrm_cal(int32_t path, struct acdb_cal_block *cal_block);
  51. int get_audvol_cal(int32_t path, struct acdb_cal_block *cal_block);
  52. int get_voice_col_data(uint32_t vocproc_type,
  53. struct acdb_cal_block *cal_block);
  54. int get_vocproc_dev_cfg_cal(struct acdb_cal_block *cal_block);
  55. int get_vocproc_cal(struct acdb_cal_block *cal_block);
  56. int get_vocstrm_cal(struct acdb_cal_block *cal_block);
  57. int get_vocvol_cal(struct acdb_cal_block *cal_block);
  58. int get_sidetone_cal(struct sidetone_cal *cal_data);
  59. int get_spk_protection_cfg(struct msm_spk_prot_cfg *prot_cfg);
  60. int get_aanc_cal(struct acdb_cal_block *cal_block);
  61. int get_hw_delay(int32_t path, struct hw_delay_entry *delay_info);
  62. #endif