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