Asish Bhattacharya | 8e2277f | 2017-07-20 18:31:55 +0530 | [diff] [blame] | 1 | /* |
Soumya Managoli | 98bcc29 | 2018-04-09 14:03:02 +0530 | [diff] [blame] | 2 | * Copyright (c) 2012-2018, The Linux Foundation. All rights reserved. |
Asish Bhattacharya | 8e2277f | 2017-07-20 18:31:55 +0530 | [diff] [blame] | 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 _MSM_QTI_PP_H_ |
| 14 | #define _MSM_QTI_PP_H_ |
| 15 | |
| 16 | #include <sound/soc.h> |
Laxminath Kasam | 8f7ccc2 | 2017-08-28 17:35:04 +0530 | [diff] [blame] | 17 | #define DSP_BIT_WIDTH_MIXER_CTL "ASM Bit Width" |
Soumya Managoli | 98bcc29 | 2018-04-09 14:03:02 +0530 | [diff] [blame] | 18 | #if IS_ENABLED(CONFIG_QTI_PP) |
Asish Bhattacharya | 8e2277f | 2017-07-20 18:31:55 +0530 | [diff] [blame] | 19 | int msm_adsp_inform_mixer_ctl(struct snd_soc_pcm_runtime *rtd, |
| 20 | uint32_t *payload); |
| 21 | int msm_adsp_init_mixer_ctl_pp_event_queue(struct snd_soc_pcm_runtime *rtd); |
| 22 | int msm_adsp_clean_mixer_ctl_pp_event_queue(struct snd_soc_pcm_runtime *rtd); |
| 23 | int msm_adsp_stream_cmd_info(struct snd_kcontrol *kcontrol, |
| 24 | struct snd_ctl_elem_info *uinfo); |
| 25 | int msm_adsp_stream_callback_get(struct snd_kcontrol *kcontrol, |
| 26 | struct snd_ctl_elem_value *ucontrol); |
| 27 | int msm_adsp_stream_callback_info(struct snd_kcontrol *kcontrol, |
| 28 | struct snd_ctl_elem_info *uinfo); |
Asish Bhattacharya | 8e2277f | 2017-07-20 18:31:55 +0530 | [diff] [blame] | 29 | void msm_qti_pp_send_eq_values(int fedai_id); |
| 30 | int msm_qti_pp_send_stereo_to_custom_stereo_cmd(int port_id, int copp_idx, |
| 31 | unsigned int session_id, |
| 32 | uint16_t op_FL_ip_FL_weight, |
| 33 | uint16_t op_FL_ip_FR_weight, |
| 34 | uint16_t op_FR_ip_FL_weight, |
| 35 | uint16_t op_FR_ip_FR_weight); |
| 36 | void msm_qti_pp_add_controls(struct snd_soc_platform *platform); |
| 37 | #else /* CONFIG_QTI_PP */ |
Xiaoyu Ye | a63f8be | 2017-09-12 16:51:26 -0700 | [diff] [blame] | 38 | static inline int msm_adsp_inform_mixer_ctl(struct snd_soc_pcm_runtime *rtd, |
| 39 | uint32_t *payload) |
| 40 | { |
| 41 | return 0; |
| 42 | } |
| 43 | |
| 44 | static inline int msm_adsp_init_mixer_ctl_pp_event_queue( |
| 45 | struct snd_soc_pcm_runtime *rtd) |
| 46 | { |
| 47 | return 0; |
| 48 | } |
| 49 | |
| 50 | static inline int msm_adsp_clean_mixer_ctl_pp_event_queue( |
| 51 | struct snd_soc_pcm_runtime *rtd) |
| 52 | { |
| 53 | return 0; |
| 54 | } |
| 55 | |
| 56 | static inline int msm_adsp_stream_cmd_info(struct snd_kcontrol *kcontrol, |
| 57 | struct snd_ctl_elem_info *uinfo) |
| 58 | { |
| 59 | return 0; |
| 60 | } |
| 61 | |
| 62 | static inline int msm_adsp_stream_callback_get(struct snd_kcontrol *kcontrol, |
| 63 | struct snd_ctl_elem_value *ucontrol) |
| 64 | { |
| 65 | return 0; |
| 66 | } |
| 67 | |
| 68 | static inline int msm_adsp_stream_callback_info(struct snd_kcontrol *kcontrol, |
| 69 | struct snd_ctl_elem_info *uinfo) |
| 70 | { |
| 71 | return 0; |
| 72 | } |
| 73 | |
Asish Bhattacharya | 8e2277f | 2017-07-20 18:31:55 +0530 | [diff] [blame] | 74 | #define msm_qti_pp_send_eq_values(fedai_id) do {} while (0) |
| 75 | #define msm_qti_pp_send_stereo_to_custom_stereo_cmd(port_id, copp_idx, \ |
| 76 | session_id, op_FL_ip_FL_weight, op_FL_ip_FR_weight, \ |
| 77 | op_FR_ip_FL_weight, op_FR_ip_FR_weight) (0) |
| 78 | #define msm_qti_pp_add_controls(platform) do {} while (0) |
| 79 | #endif /* CONFIG_QTI_PP */ |
| 80 | |
Soumya Managoli | 98bcc29 | 2018-04-09 14:03:02 +0530 | [diff] [blame] | 81 | #if IS_ENABLED(CONFIG_QTI_PP) && IS_ENABLED(CONFIG_QTI_PP_AUDIOSPHERE) |
Asish Bhattacharya | 8e2277f | 2017-07-20 18:31:55 +0530 | [diff] [blame] | 82 | int msm_qti_pp_asphere_init(int port_id, int copp_idx); |
| 83 | void msm_qti_pp_asphere_deinit(int port_id); |
| 84 | #else |
| 85 | #define msm_qti_pp_asphere_init(port_id, copp_idx) (0) |
| 86 | #define msm_qti_pp_asphere_deinit(port_id) do {} while (0) |
| 87 | #endif |
| 88 | |
| 89 | #endif /* _MSM_QTI_PP_H_ */ |