hal: update audio effects config names
Update audio effects config names to be more descriptive to avoid conflict with kernel config naming convention. Change-Id: I784b6435d49990fde610c22e482a668ac5b23ff4
This commit is contained in:
parent
cd57e18eb6
commit
60c2347cac
|
@ -23,6 +23,10 @@ ifeq ($(strip $(AUDIO_FEATURE_ENABLED_PROXY_DEVICE)),true)
|
|||
LOCAL_CFLAGS += -DAFE_PROXY_ENABLED
|
||||
endif
|
||||
|
||||
ifeq ($(strip $(AUDIO_FEATURE_ENABLED_GKI)),true)
|
||||
LOCAL_CFLAGS += -DAUDIO_GKI_ENABLED
|
||||
endif
|
||||
|
||||
LOCAL_SRC_FILES:= \
|
||||
bundle.c \
|
||||
equalizer.c \
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 2013-2015, 2019 The Linux Foundation. All rights reserved.
|
||||
* Copyright (c) 2013-2015, 2019-2020 The Linux Foundation. All rights reserved.
|
||||
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are
|
||||
|
@ -175,6 +175,19 @@ void offload_bassboost_set_mode(struct bass_boost_params *bassboost,
|
|||
bassboost->mode = mode;
|
||||
}
|
||||
|
||||
static inline long get_config_set_param()
|
||||
{
|
||||
long config_param = 0;
|
||||
|
||||
#ifdef AUDIO_GKI_ENABLED
|
||||
config_param = AUDIO_EFFECTS_CONFIG_SET;
|
||||
#else
|
||||
config_param = CONFIG_SET;
|
||||
#endif
|
||||
|
||||
return config_param;
|
||||
}
|
||||
|
||||
static int bassboost_send_params(eff_mode_t mode, void *ctl,
|
||||
struct bass_boost_params *bassboost,
|
||||
unsigned param_send_flags)
|
||||
|
@ -188,7 +201,7 @@ static int bassboost_send_params(eff_mode_t mode, void *ctl,
|
|||
*p_param_values++ = 0; /* num of commands*/
|
||||
if (param_send_flags & OFFLOAD_SEND_BASSBOOST_ENABLE_FLAG) {
|
||||
*p_param_values++ = BASS_BOOST_ENABLE;
|
||||
*p_param_values++ = CONFIG_SET;
|
||||
*p_param_values++ = get_config_set_param();
|
||||
*p_param_values++ = 0; /* start offset if param size if greater than 128 */
|
||||
*p_param_values++ = BASS_BOOST_ENABLE_PARAM_LEN;
|
||||
*p_param_values++ = bassboost->enable_flag;
|
||||
|
@ -196,7 +209,7 @@ static int bassboost_send_params(eff_mode_t mode, void *ctl,
|
|||
}
|
||||
if (param_send_flags & OFFLOAD_SEND_BASSBOOST_STRENGTH) {
|
||||
*p_param_values++ = BASS_BOOST_STRENGTH;
|
||||
*p_param_values++ = CONFIG_SET;
|
||||
*p_param_values++ = get_config_set_param();
|
||||
*p_param_values++ = 0; /* start offset if param size if greater than 128 */
|
||||
*p_param_values++ = BASS_BOOST_STRENGTH_PARAM_LEN;
|
||||
*p_param_values++ = bassboost->strength;
|
||||
|
@ -204,7 +217,7 @@ static int bassboost_send_params(eff_mode_t mode, void *ctl,
|
|||
}
|
||||
if (param_send_flags & OFFLOAD_SEND_BASSBOOST_MODE) {
|
||||
*p_param_values++ = BASS_BOOST_MODE;
|
||||
*p_param_values++ = CONFIG_SET;
|
||||
*p_param_values++ = get_config_set_param();
|
||||
*p_param_values++ = 0; /* start offset if param size if greater than 128 */
|
||||
*p_param_values++ = BASS_BOOST_MODE_PARAM_LEN;
|
||||
*p_param_values++ = bassboost->mode;
|
||||
|
@ -275,7 +288,7 @@ static int pbe_send_params(eff_mode_t mode, void *ctl,
|
|||
*p_param_values++ = 0; /* num of commands*/
|
||||
if (param_send_flags & OFFLOAD_SEND_PBE_ENABLE_FLAG) {
|
||||
*p_param_values++ = PBE_ENABLE;
|
||||
*p_param_values++ = CONFIG_SET;
|
||||
*p_param_values++ = get_config_set_param();
|
||||
*p_param_values++ = 0; /* start offset if param size if greater than 128 */
|
||||
*p_param_values++ = PBE_ENABLE_PARAM_LEN;
|
||||
*p_param_values++ = pbe->enable_flag;
|
||||
|
@ -283,7 +296,7 @@ static int pbe_send_params(eff_mode_t mode, void *ctl,
|
|||
}
|
||||
if (param_send_flags & OFFLOAD_SEND_PBE_CONFIG) {
|
||||
*p_param_values++ = PBE_CONFIG;
|
||||
*p_param_values++ = CONFIG_SET;
|
||||
*p_param_values++ = get_config_set_param();
|
||||
*p_param_values++ = 0; /* start offset if param size if greater than 128 */
|
||||
*p_param_values++ = pbe->cfg_len;
|
||||
*p_param_values++ = pbe->config.real_bass_mix;
|
||||
|
@ -414,7 +427,7 @@ static int virtualizer_send_params(eff_mode_t mode, void *ctl,
|
|||
*p_param_values++ = 0; /* num of commands*/
|
||||
if (param_send_flags & OFFLOAD_SEND_VIRTUALIZER_ENABLE_FLAG) {
|
||||
*p_param_values++ = VIRTUALIZER_ENABLE;
|
||||
*p_param_values++ = CONFIG_SET;
|
||||
*p_param_values++ = get_config_set_param();
|
||||
*p_param_values++ = 0; /* start offset if param size if greater than 128 */
|
||||
*p_param_values++ = VIRTUALIZER_ENABLE_PARAM_LEN;
|
||||
*p_param_values++ = virtualizer->enable_flag;
|
||||
|
@ -422,7 +435,7 @@ static int virtualizer_send_params(eff_mode_t mode, void *ctl,
|
|||
}
|
||||
if (param_send_flags & OFFLOAD_SEND_VIRTUALIZER_STRENGTH) {
|
||||
*p_param_values++ = VIRTUALIZER_STRENGTH;
|
||||
*p_param_values++ = CONFIG_SET;
|
||||
*p_param_values++ = get_config_set_param();
|
||||
*p_param_values++ = 0; /* start offset if param size if greater than 128 */
|
||||
*p_param_values++ = VIRTUALIZER_STRENGTH_PARAM_LEN;
|
||||
*p_param_values++ = virtualizer->strength;
|
||||
|
@ -430,7 +443,7 @@ static int virtualizer_send_params(eff_mode_t mode, void *ctl,
|
|||
}
|
||||
if (param_send_flags & OFFLOAD_SEND_VIRTUALIZER_OUT_TYPE) {
|
||||
*p_param_values++ = VIRTUALIZER_OUT_TYPE;
|
||||
*p_param_values++ = CONFIG_SET;
|
||||
*p_param_values++ = get_config_set_param();
|
||||
*p_param_values++ = 0; /* start offset if param size if greater than 128 */
|
||||
*p_param_values++ = VIRTUALIZER_OUT_TYPE_PARAM_LEN;
|
||||
*p_param_values++ = virtualizer->out_type;
|
||||
|
@ -438,7 +451,7 @@ static int virtualizer_send_params(eff_mode_t mode, void *ctl,
|
|||
}
|
||||
if (param_send_flags & OFFLOAD_SEND_VIRTUALIZER_GAIN_ADJUST) {
|
||||
*p_param_values++ = VIRTUALIZER_GAIN_ADJUST;
|
||||
*p_param_values++ = CONFIG_SET;
|
||||
*p_param_values++ = get_config_set_param();
|
||||
*p_param_values++ = 0; /* start offset if param size if greater than 128 */
|
||||
*p_param_values++ = VIRTUALIZER_GAIN_ADJUST_PARAM_LEN;
|
||||
*p_param_values++ = virtualizer->gain_adjust;
|
||||
|
@ -540,7 +553,7 @@ static int eq_send_params(eff_mode_t mode, void *ctl, struct eq_params *eq,
|
|||
*p_param_values++ = 0; /* num of commands*/
|
||||
if (param_send_flags & OFFLOAD_SEND_EQ_ENABLE_FLAG) {
|
||||
*p_param_values++ = EQ_ENABLE;
|
||||
*p_param_values++ = CONFIG_SET;
|
||||
*p_param_values++ = get_config_set_param();
|
||||
*p_param_values++ = 0; /* start offset if param size if greater than 128 */
|
||||
*p_param_values++ = EQ_ENABLE_PARAM_LEN;
|
||||
*p_param_values++ = eq->enable_flag;
|
||||
|
@ -548,7 +561,7 @@ static int eq_send_params(eff_mode_t mode, void *ctl, struct eq_params *eq,
|
|||
}
|
||||
if (param_send_flags & OFFLOAD_SEND_EQ_PRESET) {
|
||||
*p_param_values++ = EQ_CONFIG;
|
||||
*p_param_values++ = CONFIG_SET;
|
||||
*p_param_values++ = get_config_set_param();
|
||||
*p_param_values++ = 0; /* start offset if param size if greater than 128 */
|
||||
*p_param_values++ = EQ_CONFIG_PARAM_LEN;
|
||||
*p_param_values++ = eq->config.eq_pregain;
|
||||
|
@ -559,7 +572,7 @@ static int eq_send_params(eff_mode_t mode, void *ctl, struct eq_params *eq,
|
|||
}
|
||||
if (param_send_flags & OFFLOAD_SEND_EQ_BANDS_LEVEL) {
|
||||
*p_param_values++ = EQ_CONFIG;
|
||||
*p_param_values++ = CONFIG_SET;
|
||||
*p_param_values++ = get_config_set_param();
|
||||
*p_param_values++ = 0; /* start offset if param size if greater than 128 */
|
||||
*p_param_values++ = EQ_CONFIG_PARAM_LEN +
|
||||
eq->config.num_bands * EQ_CONFIG_PER_BAND_PARAM_LEN;
|
||||
|
@ -724,7 +737,7 @@ static int reverb_send_params(eff_mode_t mode, void *ctl,
|
|||
|
||||
if (param_send_flags & OFFLOAD_SEND_REVERB_ENABLE_FLAG) {
|
||||
*p_param_values++ = REVERB_ENABLE;
|
||||
*p_param_values++ = CONFIG_SET;
|
||||
*p_param_values++ = get_config_set_param();
|
||||
*p_param_values++ = 0; /* start offset if param size if greater than 128 */
|
||||
*p_param_values++ = REVERB_ENABLE_PARAM_LEN;
|
||||
*p_param_values++ = reverb->enable_flag;
|
||||
|
@ -732,7 +745,7 @@ static int reverb_send_params(eff_mode_t mode, void *ctl,
|
|||
}
|
||||
if (param_send_flags & OFFLOAD_SEND_REVERB_MODE) {
|
||||
*p_param_values++ = REVERB_MODE;
|
||||
*p_param_values++ = CONFIG_SET;
|
||||
*p_param_values++ = get_config_set_param();
|
||||
*p_param_values++ = 0; /* start offset if param size if greater than 128 */
|
||||
*p_param_values++ = REVERB_MODE_PARAM_LEN;
|
||||
*p_param_values++ = reverb->mode;
|
||||
|
@ -740,7 +753,7 @@ static int reverb_send_params(eff_mode_t mode, void *ctl,
|
|||
}
|
||||
if (param_send_flags & OFFLOAD_SEND_REVERB_PRESET) {
|
||||
*p_param_values++ = REVERB_PRESET;
|
||||
*p_param_values++ = CONFIG_SET;
|
||||
*p_param_values++ = get_config_set_param();
|
||||
*p_param_values++ = 0; /* start offset if param size if greater than 128 */
|
||||
*p_param_values++ = REVERB_PRESET_PARAM_LEN;
|
||||
*p_param_values++ = reverb->preset;
|
||||
|
@ -748,7 +761,7 @@ static int reverb_send_params(eff_mode_t mode, void *ctl,
|
|||
}
|
||||
if (param_send_flags & OFFLOAD_SEND_REVERB_WET_MIX) {
|
||||
*p_param_values++ = REVERB_WET_MIX;
|
||||
*p_param_values++ = CONFIG_SET;
|
||||
*p_param_values++ = get_config_set_param();
|
||||
*p_param_values++ = 0; /* start offset if param size if greater than 128 */
|
||||
*p_param_values++ = REVERB_WET_MIX_PARAM_LEN;
|
||||
*p_param_values++ = reverb->wet_mix;
|
||||
|
@ -756,7 +769,7 @@ static int reverb_send_params(eff_mode_t mode, void *ctl,
|
|||
}
|
||||
if (param_send_flags & OFFLOAD_SEND_REVERB_GAIN_ADJUST) {
|
||||
*p_param_values++ = REVERB_GAIN_ADJUST;
|
||||
*p_param_values++ = CONFIG_SET;
|
||||
*p_param_values++ = get_config_set_param();
|
||||
*p_param_values++ = 0; /* start offset if param size if greater than 128 */
|
||||
*p_param_values++ = REVERB_GAIN_ADJUST_PARAM_LEN;
|
||||
*p_param_values++ = reverb->gain_adjust;
|
||||
|
@ -764,7 +777,7 @@ static int reverb_send_params(eff_mode_t mode, void *ctl,
|
|||
}
|
||||
if (param_send_flags & OFFLOAD_SEND_REVERB_ROOM_LEVEL) {
|
||||
*p_param_values++ = REVERB_ROOM_LEVEL;
|
||||
*p_param_values++ = CONFIG_SET;
|
||||
*p_param_values++ = get_config_set_param();
|
||||
*p_param_values++ = 0; /* start offset if param size if greater than 128 */
|
||||
*p_param_values++ = REVERB_ROOM_LEVEL_PARAM_LEN;
|
||||
*p_param_values++ = reverb->room_level;
|
||||
|
@ -772,7 +785,7 @@ static int reverb_send_params(eff_mode_t mode, void *ctl,
|
|||
}
|
||||
if (param_send_flags & OFFLOAD_SEND_REVERB_ROOM_HF_LEVEL) {
|
||||
*p_param_values++ = REVERB_ROOM_HF_LEVEL;
|
||||
*p_param_values++ = CONFIG_SET;
|
||||
*p_param_values++ = get_config_set_param();
|
||||
*p_param_values++ = 0; /* start offset if param size if greater than 128 */
|
||||
*p_param_values++ = REVERB_ROOM_HF_LEVEL_PARAM_LEN;
|
||||
*p_param_values++ = reverb->room_hf_level;
|
||||
|
@ -780,7 +793,7 @@ static int reverb_send_params(eff_mode_t mode, void *ctl,
|
|||
}
|
||||
if (param_send_flags & OFFLOAD_SEND_REVERB_DECAY_TIME) {
|
||||
*p_param_values++ = REVERB_DECAY_TIME;
|
||||
*p_param_values++ = CONFIG_SET;
|
||||
*p_param_values++ = get_config_set_param();
|
||||
*p_param_values++ = 0; /* start offset if param size if greater than 128 */
|
||||
*p_param_values++ = REVERB_DECAY_TIME_PARAM_LEN;
|
||||
*p_param_values++ = reverb->decay_time;
|
||||
|
@ -788,7 +801,7 @@ static int reverb_send_params(eff_mode_t mode, void *ctl,
|
|||
}
|
||||
if (param_send_flags & OFFLOAD_SEND_REVERB_DECAY_HF_RATIO) {
|
||||
*p_param_values++ = REVERB_DECAY_HF_RATIO;
|
||||
*p_param_values++ = CONFIG_SET;
|
||||
*p_param_values++ = get_config_set_param();
|
||||
*p_param_values++ = 0; /* start offset if param size if greater than 128 */
|
||||
*p_param_values++ = REVERB_DECAY_HF_RATIO_PARAM_LEN;
|
||||
*p_param_values++ = reverb->decay_hf_ratio;
|
||||
|
@ -796,7 +809,7 @@ static int reverb_send_params(eff_mode_t mode, void *ctl,
|
|||
}
|
||||
if (param_send_flags & OFFLOAD_SEND_REVERB_REFLECTIONS_LEVEL) {
|
||||
*p_param_values++ = REVERB_REFLECTIONS_LEVEL;
|
||||
*p_param_values++ = CONFIG_SET;
|
||||
*p_param_values++ = get_config_set_param();
|
||||
*p_param_values++ = 0; /* start offset if param size if greater than 128 */
|
||||
*p_param_values++ = REVERB_REFLECTIONS_LEVEL_PARAM_LEN;
|
||||
*p_param_values++ = reverb->reflections_level;
|
||||
|
@ -804,7 +817,7 @@ static int reverb_send_params(eff_mode_t mode, void *ctl,
|
|||
}
|
||||
if (param_send_flags & OFFLOAD_SEND_REVERB_REFLECTIONS_DELAY) {
|
||||
*p_param_values++ = REVERB_REFLECTIONS_DELAY;
|
||||
*p_param_values++ = CONFIG_SET;
|
||||
*p_param_values++ = get_config_set_param();
|
||||
*p_param_values++ = 0; /* start offset if param size if greater than 128 */
|
||||
*p_param_values++ = REVERB_REFLECTIONS_DELAY_PARAM_LEN;
|
||||
*p_param_values++ = reverb->reflections_delay;
|
||||
|
@ -812,7 +825,7 @@ static int reverb_send_params(eff_mode_t mode, void *ctl,
|
|||
}
|
||||
if (param_send_flags & OFFLOAD_SEND_REVERB_LEVEL) {
|
||||
*p_param_values++ = REVERB_LEVEL;
|
||||
*p_param_values++ = CONFIG_SET;
|
||||
*p_param_values++ = get_config_set_param();
|
||||
*p_param_values++ = 0; /* start offset if param size if greater than 128 */
|
||||
*p_param_values++ = REVERB_LEVEL_PARAM_LEN;
|
||||
*p_param_values++ = reverb->level;
|
||||
|
@ -820,7 +833,7 @@ static int reverb_send_params(eff_mode_t mode, void *ctl,
|
|||
}
|
||||
if (param_send_flags & OFFLOAD_SEND_REVERB_DELAY) {
|
||||
*p_param_values++ = REVERB_DELAY;
|
||||
*p_param_values++ = CONFIG_SET;
|
||||
*p_param_values++ = get_config_set_param();
|
||||
*p_param_values++ = 0; /* start offset if param size if greater than 128 */
|
||||
*p_param_values++ = REVERB_DELAY_PARAM_LEN;
|
||||
*p_param_values++ = reverb->delay;
|
||||
|
@ -828,7 +841,7 @@ static int reverb_send_params(eff_mode_t mode, void *ctl,
|
|||
}
|
||||
if (param_send_flags & OFFLOAD_SEND_REVERB_DIFFUSION) {
|
||||
*p_param_values++ = REVERB_DIFFUSION;
|
||||
*p_param_values++ = CONFIG_SET;
|
||||
*p_param_values++ = get_config_set_param();
|
||||
*p_param_values++ = 0; /* start offset if param size if greater than 128 */
|
||||
*p_param_values++ = REVERB_DIFFUSION_PARAM_LEN;
|
||||
*p_param_values++ = reverb->diffusion;
|
||||
|
@ -836,7 +849,7 @@ static int reverb_send_params(eff_mode_t mode, void *ctl,
|
|||
}
|
||||
if (param_send_flags & OFFLOAD_SEND_REVERB_DENSITY) {
|
||||
*p_param_values++ = REVERB_DENSITY;
|
||||
*p_param_values++ = CONFIG_SET;
|
||||
*p_param_values++ = get_config_set_param();
|
||||
*p_param_values++ = 0; /* start offset if param size if greater than 128 */
|
||||
*p_param_values++ = REVERB_DENSITY_PARAM_LEN;
|
||||
*p_param_values++ = reverb->density;
|
||||
|
@ -903,7 +916,7 @@ int offload_soft_volume_send_params(struct mixer_ctl *ctl,
|
|||
*p_param_values++ = 0; /* num of commands*/
|
||||
if (param_send_flags & OFFLOAD_SEND_SOFT_VOLUME_ENABLE_FLAG) {
|
||||
*p_param_values++ = SOFT_VOLUME_ENABLE;
|
||||
*p_param_values++ = CONFIG_SET;
|
||||
*p_param_values++ = get_config_set_param();
|
||||
*p_param_values++ = 0; /* start offset if param size if greater than 128 */
|
||||
*p_param_values++ = SOFT_VOLUME_ENABLE_PARAM_LEN;
|
||||
*p_param_values++ = vol.enable_flag;
|
||||
|
@ -911,7 +924,7 @@ int offload_soft_volume_send_params(struct mixer_ctl *ctl,
|
|||
}
|
||||
if (param_send_flags & OFFLOAD_SEND_SOFT_VOLUME_GAIN_MASTER) {
|
||||
*p_param_values++ = SOFT_VOLUME_GAIN_MASTER;
|
||||
*p_param_values++ = CONFIG_SET;
|
||||
*p_param_values++ = get_config_set_param();
|
||||
*p_param_values++ = 0; /* start offset if param size if greater than 128 */
|
||||
*p_param_values++ = SOFT_VOLUME_GAIN_MASTER_PARAM_LEN;
|
||||
*p_param_values++ = vol.master_gain;
|
||||
|
@ -919,7 +932,7 @@ int offload_soft_volume_send_params(struct mixer_ctl *ctl,
|
|||
}
|
||||
if (param_send_flags & OFFLOAD_SEND_SOFT_VOLUME_GAIN_2CH) {
|
||||
*p_param_values++ = SOFT_VOLUME_GAIN_2CH;
|
||||
*p_param_values++ = CONFIG_SET;
|
||||
*p_param_values++ = get_config_set_param();
|
||||
*p_param_values++ = 0; /* start offset if param size if greater than 128 */
|
||||
*p_param_values++ = SOFT_VOLUME_GAIN_2CH_PARAM_LEN;
|
||||
*p_param_values++ = vol.left_gain;
|
||||
|
@ -968,7 +981,7 @@ int offload_transition_soft_volume_send_params(struct mixer_ctl *ctl,
|
|||
*p_param_values++ = 0; /* num of commands*/
|
||||
if (param_send_flags & OFFLOAD_SEND_TRANSITION_SOFT_VOLUME_ENABLE_FLAG) {
|
||||
*p_param_values++ = SOFT_VOLUME2_ENABLE;
|
||||
*p_param_values++ = CONFIG_SET;
|
||||
*p_param_values++ = get_config_set_param();
|
||||
*p_param_values++ = 0; /* start offset if param size if greater than 128 */
|
||||
*p_param_values++ = SOFT_VOLUME2_ENABLE_PARAM_LEN;
|
||||
*p_param_values++ = vol.enable_flag;
|
||||
|
@ -976,7 +989,7 @@ int offload_transition_soft_volume_send_params(struct mixer_ctl *ctl,
|
|||
}
|
||||
if (param_send_flags & OFFLOAD_SEND_TRANSITION_SOFT_VOLUME_GAIN_MASTER) {
|
||||
*p_param_values++ = SOFT_VOLUME2_GAIN_MASTER;
|
||||
*p_param_values++ = CONFIG_SET;
|
||||
*p_param_values++ = get_config_set_param();
|
||||
*p_param_values++ = 0; /* start offset if param size if greater than 128 */
|
||||
*p_param_values++ = SOFT_VOLUME2_GAIN_MASTER_PARAM_LEN;
|
||||
*p_param_values++ = vol.master_gain;
|
||||
|
@ -984,7 +997,7 @@ int offload_transition_soft_volume_send_params(struct mixer_ctl *ctl,
|
|||
}
|
||||
if (param_send_flags & OFFLOAD_SEND_TRANSITION_SOFT_VOLUME_GAIN_2CH) {
|
||||
*p_param_values++ = SOFT_VOLUME2_GAIN_2CH;
|
||||
*p_param_values++ = CONFIG_SET;
|
||||
*p_param_values++ = get_config_set_param();
|
||||
*p_param_values++ = 0; /* start offset if param size if greater than 128 */
|
||||
*p_param_values++ = SOFT_VOLUME2_GAIN_2CH_PARAM_LEN;
|
||||
*p_param_values++ = vol.left_gain;
|
||||
|
|
Loading…
Reference in New Issue