blob: 01e58e320b32c754d309ea38ddcb781793d9209f [file] [log] [blame]
Asish Bhattacharya8e2277f2017-07-20 18:31:55 +05301/*
Soumya Managoli98bcc292018-04-09 14:03:02 +05302 * Copyright (c) 2012-2018, The Linux Foundation. All rights reserved.
Asish Bhattacharya8e2277f2017-07-20 18:31:55 +05303 * 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 Kasam8f7ccc22017-08-28 17:35:04 +053017#define DSP_BIT_WIDTH_MIXER_CTL "ASM Bit Width"
Soumya Managoli98bcc292018-04-09 14:03:02 +053018#if IS_ENABLED(CONFIG_QTI_PP)
Asish Bhattacharya8e2277f2017-07-20 18:31:55 +053019int msm_adsp_inform_mixer_ctl(struct snd_soc_pcm_runtime *rtd,
20 uint32_t *payload);
21int msm_adsp_init_mixer_ctl_pp_event_queue(struct snd_soc_pcm_runtime *rtd);
22int msm_adsp_clean_mixer_ctl_pp_event_queue(struct snd_soc_pcm_runtime *rtd);
23int msm_adsp_stream_cmd_info(struct snd_kcontrol *kcontrol,
24 struct snd_ctl_elem_info *uinfo);
25int msm_adsp_stream_callback_get(struct snd_kcontrol *kcontrol,
26 struct snd_ctl_elem_value *ucontrol);
27int msm_adsp_stream_callback_info(struct snd_kcontrol *kcontrol,
28 struct snd_ctl_elem_info *uinfo);
Asish Bhattacharya8e2277f2017-07-20 18:31:55 +053029void msm_qti_pp_send_eq_values(int fedai_id);
30int 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);
36void msm_qti_pp_add_controls(struct snd_soc_platform *platform);
37#else /* CONFIG_QTI_PP */
Xiaoyu Yea63f8be2017-09-12 16:51:26 -070038static inline int msm_adsp_inform_mixer_ctl(struct snd_soc_pcm_runtime *rtd,
39 uint32_t *payload)
40{
41 return 0;
42}
43
44static inline int msm_adsp_init_mixer_ctl_pp_event_queue(
45 struct snd_soc_pcm_runtime *rtd)
46{
47 return 0;
48}
49
50static inline int msm_adsp_clean_mixer_ctl_pp_event_queue(
51 struct snd_soc_pcm_runtime *rtd)
52{
53 return 0;
54}
55
56static inline int msm_adsp_stream_cmd_info(struct snd_kcontrol *kcontrol,
57 struct snd_ctl_elem_info *uinfo)
58{
59 return 0;
60}
61
62static inline int msm_adsp_stream_callback_get(struct snd_kcontrol *kcontrol,
63 struct snd_ctl_elem_value *ucontrol)
64{
65 return 0;
66}
67
68static 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 Bhattacharya8e2277f2017-07-20 18:31:55 +053074#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 Managoli98bcc292018-04-09 14:03:02 +053081#if IS_ENABLED(CONFIG_QTI_PP) && IS_ENABLED(CONFIG_QTI_PP_AUDIOSPHERE)
Asish Bhattacharya8e2277f2017-07-20 18:31:55 +053082int msm_qti_pp_asphere_init(int port_id, int copp_idx);
83void 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_ */