2018-12-09 23:32:05 -05:00
|
|
|
/* SPDX-License-Identifier: GPL-2.0-only */
|
2017-07-20 09:01:55 -04:00
|
|
|
/*
|
2018-09-04 04:11:58 -04:00
|
|
|
* Copyright (c) 2012-2018, The Linux Foundation. All rights reserved.
|
2017-07-20 09:01:55 -04:00
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef _MSM_QTI_PP_H_
|
|
|
|
#define _MSM_QTI_PP_H_
|
|
|
|
|
|
|
|
#include <sound/soc.h>
|
2017-08-28 08:05:04 -04:00
|
|
|
#define DSP_BIT_WIDTH_MIXER_CTL "ASM Bit Width"
|
2017-09-12 19:51:26 -04:00
|
|
|
#ifdef CONFIG_QTI_PP
|
2017-07-20 09:01:55 -04:00
|
|
|
int msm_adsp_inform_mixer_ctl(struct snd_soc_pcm_runtime *rtd,
|
|
|
|
uint32_t *payload);
|
|
|
|
int msm_adsp_init_mixer_ctl_pp_event_queue(struct snd_soc_pcm_runtime *rtd);
|
|
|
|
int msm_adsp_clean_mixer_ctl_pp_event_queue(struct snd_soc_pcm_runtime *rtd);
|
|
|
|
int msm_adsp_stream_cmd_info(struct snd_kcontrol *kcontrol,
|
|
|
|
struct snd_ctl_elem_info *uinfo);
|
|
|
|
int msm_adsp_stream_callback_get(struct snd_kcontrol *kcontrol,
|
|
|
|
struct snd_ctl_elem_value *ucontrol);
|
|
|
|
int msm_adsp_stream_callback_info(struct snd_kcontrol *kcontrol,
|
|
|
|
struct snd_ctl_elem_info *uinfo);
|
|
|
|
void msm_qti_pp_send_eq_values(int fedai_id);
|
|
|
|
int msm_qti_pp_send_stereo_to_custom_stereo_cmd(int port_id, int copp_idx,
|
|
|
|
unsigned int session_id,
|
|
|
|
uint16_t op_FL_ip_FL_weight,
|
|
|
|
uint16_t op_FL_ip_FR_weight,
|
|
|
|
uint16_t op_FR_ip_FL_weight,
|
|
|
|
uint16_t op_FR_ip_FR_weight);
|
2018-09-04 04:11:58 -04:00
|
|
|
void msm_qti_pp_add_controls(struct snd_soc_component *component);
|
2018-05-15 19:48:07 -04:00
|
|
|
int msm_qti_pp_send_chmix_cfg_cmd(int port_id, int copp_idx,
|
|
|
|
unsigned int session_id, int ip_channel_count,
|
|
|
|
int out_channel_cnt, int *ch_wght_coeff,
|
|
|
|
int session_type, int stream_type);
|
2017-07-20 09:01:55 -04:00
|
|
|
#else /* CONFIG_QTI_PP */
|
2017-09-12 19:51:26 -04:00
|
|
|
static inline int msm_adsp_inform_mixer_ctl(struct snd_soc_pcm_runtime *rtd,
|
|
|
|
uint32_t *payload)
|
|
|
|
{
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
static inline int msm_adsp_init_mixer_ctl_pp_event_queue(
|
|
|
|
struct snd_soc_pcm_runtime *rtd)
|
|
|
|
{
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
static inline int msm_adsp_clean_mixer_ctl_pp_event_queue(
|
|
|
|
struct snd_soc_pcm_runtime *rtd)
|
|
|
|
{
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
static inline int msm_adsp_stream_cmd_info(struct snd_kcontrol *kcontrol,
|
|
|
|
struct snd_ctl_elem_info *uinfo)
|
|
|
|
{
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
static inline int msm_adsp_stream_callback_get(struct snd_kcontrol *kcontrol,
|
|
|
|
struct snd_ctl_elem_value *ucontrol)
|
|
|
|
{
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
static inline int msm_adsp_stream_callback_info(struct snd_kcontrol *kcontrol,
|
|
|
|
struct snd_ctl_elem_info *uinfo)
|
|
|
|
{
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
2018-05-15 19:48:07 -04:00
|
|
|
int msm_qti_pp_send_chmix_cfg_cmd(int port_id, int copp_idx,
|
|
|
|
unsigned int session_id, int ip_channel_count,
|
|
|
|
int out_channel_cnt, int *ch_wght_coeff,
|
|
|
|
int session_type, int stream_type)
|
|
|
|
{
|
|
|
|
return 0;
|
|
|
|
}
|
2017-07-20 09:01:55 -04:00
|
|
|
#define msm_qti_pp_send_eq_values(fedai_id) do {} while (0)
|
|
|
|
#define msm_qti_pp_send_stereo_to_custom_stereo_cmd(port_id, copp_idx, \
|
|
|
|
session_id, op_FL_ip_FL_weight, op_FL_ip_FR_weight, \
|
|
|
|
op_FR_ip_FL_weight, op_FR_ip_FR_weight) (0)
|
|
|
|
#define msm_qti_pp_add_controls(platform) do {} while (0)
|
|
|
|
#endif /* CONFIG_QTI_PP */
|
|
|
|
|
|
|
|
|
|
|
|
#if defined(CONFIG_QTI_PP) && defined(CONFIG_QTI_PP_AUDIOSPHERE)
|
|
|
|
int msm_qti_pp_asphere_init(int port_id, int copp_idx);
|
|
|
|
void msm_qti_pp_asphere_deinit(int port_id);
|
|
|
|
#else
|
|
|
|
#define msm_qti_pp_asphere_init(port_id, copp_idx) (0)
|
|
|
|
#define msm_qti_pp_asphere_deinit(port_id) do {} while (0)
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#endif /* _MSM_QTI_PP_H_ */
|