msm-qti-pp-config.h 2.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394
  1. /* SPDX-License-Identifier: GPL-2.0-only */
  2. /*
  3. * Copyright (c) 2012-2018, The Linux Foundation. All rights reserved.
  4. */
  5. #ifndef _MSM_QTI_PP_H_
  6. #define _MSM_QTI_PP_H_
  7. #include <sound/soc.h>
  8. #define DSP_BIT_WIDTH_MIXER_CTL "ASM Bit Width"
  9. #ifdef CONFIG_QTI_PP
  10. int msm_adsp_inform_mixer_ctl(struct snd_soc_pcm_runtime *rtd,
  11. uint32_t *payload);
  12. int msm_adsp_init_mixer_ctl_pp_event_queue(struct snd_soc_pcm_runtime *rtd);
  13. int msm_adsp_clean_mixer_ctl_pp_event_queue(struct snd_soc_pcm_runtime *rtd);
  14. int msm_adsp_stream_cmd_info(struct snd_kcontrol *kcontrol,
  15. struct snd_ctl_elem_info *uinfo);
  16. int msm_adsp_stream_callback_get(struct snd_kcontrol *kcontrol,
  17. struct snd_ctl_elem_value *ucontrol);
  18. int msm_adsp_stream_callback_info(struct snd_kcontrol *kcontrol,
  19. struct snd_ctl_elem_info *uinfo);
  20. void msm_qti_pp_send_eq_values(int fedai_id);
  21. int msm_qti_pp_send_stereo_to_custom_stereo_cmd(int port_id, int copp_idx,
  22. unsigned int session_id,
  23. uint16_t op_FL_ip_FL_weight,
  24. uint16_t op_FL_ip_FR_weight,
  25. uint16_t op_FR_ip_FL_weight,
  26. uint16_t op_FR_ip_FR_weight);
  27. void msm_qti_pp_add_controls(struct snd_soc_component *component);
  28. int msm_qti_pp_send_chmix_cfg_cmd(int port_id, int copp_idx,
  29. unsigned int session_id, int ip_channel_count,
  30. int out_channel_cnt, int *ch_wght_coeff,
  31. int session_type, int stream_type);
  32. #else /* CONFIG_QTI_PP */
  33. static inline int msm_adsp_inform_mixer_ctl(struct snd_soc_pcm_runtime *rtd,
  34. uint32_t *payload)
  35. {
  36. return 0;
  37. }
  38. static inline int msm_adsp_init_mixer_ctl_pp_event_queue(
  39. struct snd_soc_pcm_runtime *rtd)
  40. {
  41. return 0;
  42. }
  43. static inline int msm_adsp_clean_mixer_ctl_pp_event_queue(
  44. struct snd_soc_pcm_runtime *rtd)
  45. {
  46. return 0;
  47. }
  48. static inline int msm_adsp_stream_cmd_info(struct snd_kcontrol *kcontrol,
  49. struct snd_ctl_elem_info *uinfo)
  50. {
  51. return 0;
  52. }
  53. static inline int msm_adsp_stream_callback_get(struct snd_kcontrol *kcontrol,
  54. struct snd_ctl_elem_value *ucontrol)
  55. {
  56. return 0;
  57. }
  58. static inline int msm_adsp_stream_callback_info(struct snd_kcontrol *kcontrol,
  59. struct snd_ctl_elem_info *uinfo)
  60. {
  61. return 0;
  62. }
  63. int msm_qti_pp_send_chmix_cfg_cmd(int port_id, int copp_idx,
  64. unsigned int session_id, int ip_channel_count,
  65. int out_channel_cnt, int *ch_wght_coeff,
  66. int session_type, int stream_type)
  67. {
  68. return 0;
  69. }
  70. #define msm_qti_pp_send_eq_values(fedai_id) do {} while (0)
  71. #define msm_qti_pp_send_stereo_to_custom_stereo_cmd(port_id, copp_idx, \
  72. session_id, op_FL_ip_FL_weight, op_FL_ip_FR_weight, \
  73. op_FR_ip_FL_weight, op_FR_ip_FR_weight) (0)
  74. #define msm_qti_pp_add_controls(platform) do {} while (0)
  75. #endif /* CONFIG_QTI_PP */
  76. #if defined(CONFIG_QTI_PP) && defined(CONFIG_QTI_PP_AUDIOSPHERE)
  77. int msm_qti_pp_asphere_init(int port_id, int copp_idx);
  78. void msm_qti_pp_asphere_deinit(int port_id);
  79. #else
  80. #define msm_qti_pp_asphere_init(port_id, copp_idx) (0)
  81. #define msm_qti_pp_asphere_deinit(port_id) do {} while (0)
  82. #endif
  83. #endif /* _MSM_QTI_PP_H_ */