ASoC: msm: limit audiosphere driver logics to legacy soc
Since GEF was introduced, effect control function is moved to user land and driver related logics are not needed anymore. Adding a config to limit audiosphere related functions to legacy platforms only. CRs-Fixed: 1067706 Change-Id: I1d860a1ecf930e09988fa116add8518bfb3abc25 Signed-off-by: Weiyin Jiang <wjiang@codeaurora.org>
This commit is contained in:
parent
9e2d528dc4
commit
3a1b20f595
4 changed files with 49 additions and 36 deletions
|
@ -79,6 +79,15 @@ config QTI_PP
|
|||
tuning parameters of various modules such as equalizer,
|
||||
customized mixing.
|
||||
|
||||
config QTI_PP_AUDIOSPHERE
|
||||
bool "Enable QTI AUDIOSPHERE PP"
|
||||
depends on SND_SOC_MSM_QDSP6V2_INTF
|
||||
help
|
||||
To add support for QTI audio sphere post processing.
|
||||
This support is to configure the post processing
|
||||
parameters to DSP. The configuration includes sending
|
||||
tuning parameters of audio sphere module.
|
||||
|
||||
config SND_SOC_CPE
|
||||
tristate "CPE drivers"
|
||||
depends on SND_SOC_WCD_CPE
|
||||
|
@ -104,6 +113,7 @@ config SND_SOC_MSM8996
|
|||
select SND_SOC_MSM_HDMI_CODEC_RX
|
||||
select DTS_SRS_TM
|
||||
select QTI_PP
|
||||
select QTI_PP_AUDIOSPHERE
|
||||
select SND_SOC_CPE
|
||||
select MSM_ULTRASOUND
|
||||
select DOLBY_DS2
|
||||
|
|
|
@ -177,7 +177,10 @@ static void msm_pcm_routing_cfg_pp(int port_id, int copp_idx, int topology,
|
|||
break;
|
||||
case ADM_CMD_COPP_OPEN_TOPOLOGY_ID_AUDIOSPHERE:
|
||||
pr_debug("%s: TOPOLOGY_ID_AUDIOSPHERE\n", __func__);
|
||||
msm_qti_pp_asphere_init(port_id, copp_idx);
|
||||
rc = msm_qti_pp_asphere_init(port_id, copp_idx);
|
||||
if (rc < 0)
|
||||
pr_err("%s: topo_id 0x%x, port %d, copp %d, rc %d\n",
|
||||
__func__, topology, port_id, copp_idx, rc);
|
||||
break;
|
||||
default:
|
||||
/* custom topology specific feature param handlers */
|
||||
|
@ -223,14 +226,17 @@ static void msm_pcm_routing_deinit_pp(int port_id, int topology)
|
|||
static void msm_pcm_routng_cfg_matrix_map_pp(struct route_payload payload,
|
||||
int path_type, int perf_mode)
|
||||
{
|
||||
int itr = 0;
|
||||
int itr = 0, rc = 0;
|
||||
if ((path_type == ADM_PATH_PLAYBACK) &&
|
||||
(perf_mode == LEGACY_PCM_MODE) &&
|
||||
is_custom_stereo_on) {
|
||||
for (itr = 0; itr < payload.num_copps; itr++) {
|
||||
if ((payload.port_id[itr] == SLIMBUS_0_RX) ||
|
||||
(payload.port_id[itr] == RT_PROXY_PORT_001_RX)) {
|
||||
msm_qti_pp_send_stereo_to_custom_stereo_cmd(
|
||||
if ((payload.port_id[itr] != SLIMBUS_0_RX) &&
|
||||
(payload.port_id[itr] != RT_PROXY_PORT_001_RX)) {
|
||||
continue;
|
||||
}
|
||||
|
||||
rc = msm_qti_pp_send_stereo_to_custom_stereo_cmd(
|
||||
payload.port_id[itr],
|
||||
payload.copp_idx[itr],
|
||||
payload.session_id,
|
||||
|
@ -238,7 +244,9 @@ static void msm_pcm_routng_cfg_matrix_map_pp(struct route_payload payload,
|
|||
Q14_GAIN_ZERO_POINT_FIVE,
|
||||
Q14_GAIN_ZERO_POINT_FIVE,
|
||||
Q14_GAIN_ZERO_POINT_FIVE);
|
||||
}
|
||||
if (rc < 0)
|
||||
pr_err("%s: err setting custom stereo\n",
|
||||
__func__);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -241,6 +241,7 @@ static int msm_qti_pp_put_eq_band_audio_mixer(struct snd_kcontrol *kcontrol,
|
|||
return 0;
|
||||
}
|
||||
|
||||
#ifdef CONFIG_QTI_PP
|
||||
void msm_qti_pp_send_eq_values(int fedai_id)
|
||||
{
|
||||
if (eq_data[fedai_id].enable)
|
||||
|
@ -325,6 +326,7 @@ skip_send_cmd:
|
|||
kfree(params_value);
|
||||
return -ENOMEM;
|
||||
}
|
||||
#endif /* CONFIG_QTI_PP */
|
||||
|
||||
/* RMS */
|
||||
static int msm_qti_pp_get_rms_value_control(struct snd_kcontrol *kcontrol,
|
||||
|
@ -682,6 +684,7 @@ static int msm_qti_pp_asphere_send_params(int port_id, int copp_idx, bool force)
|
|||
return 0;
|
||||
}
|
||||
|
||||
#if defined(CONFIG_QTI_PP) && defined(CONFIG_QTI_PP_AUDIOSPHERE)
|
||||
int msm_qti_pp_asphere_init(int port_id, int copp_idx)
|
||||
{
|
||||
int index = adm_validate_and_get_port_index(port_id);
|
||||
|
@ -719,6 +722,7 @@ void msm_qti_pp_asphere_deinit(int port_id)
|
|||
asphere_state.copp_idx[index] = -1;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
static int msm_qti_pp_asphere_get(struct snd_kcontrol *kcontrol,
|
||||
struct snd_ctl_elem_value *ucontrol)
|
||||
|
@ -976,6 +980,7 @@ static const struct snd_kcontrol_new asphere_mixer_controls[] = {
|
|||
0xFFFFFFFF, 0, 2, msm_qti_pp_asphere_get, msm_qti_pp_asphere_set),
|
||||
};
|
||||
|
||||
#ifdef CONFIG_QTI_PP
|
||||
void msm_qti_pp_add_controls(struct snd_soc_platform *platform)
|
||||
{
|
||||
snd_soc_add_platform_controls(platform, int_fm_vol_mixer_controls,
|
||||
|
@ -1023,3 +1028,4 @@ void msm_qti_pp_add_controls(struct snd_soc_platform *platform)
|
|||
snd_soc_add_platform_controls(platform, asphere_mixer_controls,
|
||||
ARRAY_SIZE(asphere_mixer_controls));
|
||||
}
|
||||
#endif /* CONFIG_QTI_PP */
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* Copyright (c) 2012-2015, The Linux Foundation. All rights reserved.
|
||||
/* Copyright (c) 2012-2016, The Linux Foundation. All rights reserved.
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License version 2 and
|
||||
* only version 2 as published by the Free Software Foundation.
|
||||
|
@ -15,7 +15,6 @@
|
|||
#include <sound/soc.h>
|
||||
|
||||
#ifdef CONFIG_QTI_PP
|
||||
|
||||
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,
|
||||
|
@ -24,32 +23,22 @@ int msm_qti_pp_send_stereo_to_custom_stereo_cmd(int port_id, int copp_idx,
|
|||
uint16_t op_FR_ip_FL_weight,
|
||||
uint16_t op_FR_ip_FR_weight);
|
||||
void msm_qti_pp_add_controls(struct snd_soc_platform *platform);
|
||||
#else /* CONFIG_QTI_PP */
|
||||
#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
|
||||
|
||||
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)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
void msm_qti_pp_add_controls(struct snd_soc_platform *platform) { }
|
||||
|
||||
int msm_qti_pp_asphere_init(int port_id, int copp_idx)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
void msm_qti_pp_asphere_deinit(int port_id) { }
|
||||
|
||||
#define msm_qti_pp_asphere_init(port_id, copp_idx) (0)
|
||||
#define msm_qti_pp_asphere_deinit(port_id) do {} while (0)
|
||||
#endif
|
||||
|
||||
#endif
|
||||
#endif /* _MSM_QTI_PP_H_ */
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue