blob: 7fddb9f4984013b7f2456a4c37b5a632470db3cc [file] [log] [blame]
Meng Wang43bbb872018-12-10 12:32:05 +08001/* SPDX-License-Identifier: GPL-2.0-only */
Asish Bhattacharya8e2277f2017-07-20 18:31:55 +05302/*
Meng Wangee084a02018-09-04 16:11:58 +08003 * Copyright (c) 2012-2018, The Linux Foundation. All rights reserved.
Asish Bhattacharya8e2277f2017-07-20 18:31:55 +05304 */
5
6#ifndef _MSM_QTI_PP_H_
7#define _MSM_QTI_PP_H_
8
9#include <sound/soc.h>
Laxminath Kasam8f7ccc22017-08-28 17:35:04 +053010#define DSP_BIT_WIDTH_MIXER_CTL "ASM Bit Width"
Xiaoyu Yea63f8be2017-09-12 16:51:26 -070011#ifdef CONFIG_QTI_PP
Asish Bhattacharya8e2277f2017-07-20 18:31:55 +053012int msm_adsp_inform_mixer_ctl(struct snd_soc_pcm_runtime *rtd,
13 uint32_t *payload);
14int msm_adsp_init_mixer_ctl_pp_event_queue(struct snd_soc_pcm_runtime *rtd);
15int msm_adsp_clean_mixer_ctl_pp_event_queue(struct snd_soc_pcm_runtime *rtd);
16int msm_adsp_stream_cmd_info(struct snd_kcontrol *kcontrol,
17 struct snd_ctl_elem_info *uinfo);
18int msm_adsp_stream_callback_get(struct snd_kcontrol *kcontrol,
19 struct snd_ctl_elem_value *ucontrol);
20int msm_adsp_stream_callback_info(struct snd_kcontrol *kcontrol,
21 struct snd_ctl_elem_info *uinfo);
Asish Bhattacharya8e2277f2017-07-20 18:31:55 +053022void msm_qti_pp_send_eq_values(int fedai_id);
23int 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 Wangee084a02018-09-04 16:11:58 +080029void msm_qti_pp_add_controls(struct snd_soc_component *component);
Bhalchandra Gajareeed46bd2018-05-15 16:48:07 -070030int 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 Bhattacharya8e2277f2017-07-20 18:31:55 +053034#else /* CONFIG_QTI_PP */
Xiaoyu Yea63f8be2017-09-12 16:51:26 -070035static inline int msm_adsp_inform_mixer_ctl(struct snd_soc_pcm_runtime *rtd,
36 uint32_t *payload)
37{
38 return 0;
39}
40
41static inline int msm_adsp_init_mixer_ctl_pp_event_queue(
42 struct snd_soc_pcm_runtime *rtd)
43{
44 return 0;
45}
46
47static inline int msm_adsp_clean_mixer_ctl_pp_event_queue(
48 struct snd_soc_pcm_runtime *rtd)
49{
50 return 0;
51}
52
53static inline int msm_adsp_stream_cmd_info(struct snd_kcontrol *kcontrol,
54 struct snd_ctl_elem_info *uinfo)
55{
56 return 0;
57}
58
59static inline int msm_adsp_stream_callback_get(struct snd_kcontrol *kcontrol,
60 struct snd_ctl_elem_value *ucontrol)
61{
62 return 0;
63}
64
65static 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 Gajareeed46bd2018-05-15 16:48:07 -070071int 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 Bhattacharya8e2277f2017-07-20 18:31:55 +053078#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)
87int msm_qti_pp_asphere_init(int port_id, int copp_idx);
88void 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_ */