|
@@ -1,6 +1,8 @@
|
|
|
#ifndef _AUDIO_EFFECTS_H
|
|
|
#define _AUDIO_EFFECTS_H
|
|
|
|
|
|
+#include <linux/types.h>
|
|
|
+
|
|
|
/** AUDIO EFFECTS **/
|
|
|
|
|
|
|
|
@@ -147,209 +149,209 @@
|
|
|
|
|
|
/* Command Payload length and size for Non-IID commands */
|
|
|
#define COMMAND_PAYLOAD_LEN 3
|
|
|
-#define COMMAND_PAYLOAD_SZ (COMMAND_PAYLOAD_LEN * sizeof(uint32_t))
|
|
|
+#define COMMAND_PAYLOAD_SZ (COMMAND_PAYLOAD_LEN * sizeof(__u32))
|
|
|
/* Command Payload length and size for IID commands */
|
|
|
#define COMMAND_IID_PAYLOAD_LEN 4
|
|
|
-#define COMMAND_IID_PAYLOAD_SZ (COMMAND_IID_PAYLOAD_LEN * sizeof(uint32_t))
|
|
|
+#define COMMAND_IID_PAYLOAD_SZ (COMMAND_IID_PAYLOAD_LEN * sizeof(__u32))
|
|
|
#define MAX_INBAND_PARAM_SZ 4096
|
|
|
#define Q27_UNITY (1 << 27)
|
|
|
#define Q8_UNITY (1 << 8)
|
|
|
#define CUSTOM_OPENSL_PRESET 18
|
|
|
|
|
|
#define VIRTUALIZER_ENABLE_PARAM_SZ \
|
|
|
- (VIRTUALIZER_ENABLE_PARAM_LEN*sizeof(uint32_t))
|
|
|
+ (VIRTUALIZER_ENABLE_PARAM_LEN*sizeof(__u32))
|
|
|
#define VIRTUALIZER_STRENGTH_PARAM_SZ \
|
|
|
- (VIRTUALIZER_STRENGTH_PARAM_LEN*sizeof(uint32_t))
|
|
|
+ (VIRTUALIZER_STRENGTH_PARAM_LEN*sizeof(__u32))
|
|
|
#define VIRTUALIZER_OUT_TYPE_PARAM_SZ \
|
|
|
- (VIRTUALIZER_OUT_TYPE_PARAM_LEN*sizeof(uint32_t))
|
|
|
+ (VIRTUALIZER_OUT_TYPE_PARAM_LEN*sizeof(__u32))
|
|
|
#define VIRTUALIZER_GAIN_ADJUST_PARAM_SZ \
|
|
|
- (VIRTUALIZER_GAIN_ADJUST_PARAM_LEN*sizeof(uint32_t))
|
|
|
+ (VIRTUALIZER_GAIN_ADJUST_PARAM_LEN*sizeof(__u32))
|
|
|
struct virtualizer_params {
|
|
|
- uint32_t device;
|
|
|
- uint32_t enable_flag;
|
|
|
- uint32_t strength;
|
|
|
- uint32_t out_type;
|
|
|
- int32_t gain_adjust;
|
|
|
+ __u32 device;
|
|
|
+ __u32 enable_flag;
|
|
|
+ __u32 strength;
|
|
|
+ __u32 out_type;
|
|
|
+ __s32 gain_adjust;
|
|
|
};
|
|
|
|
|
|
#define NUM_OSL_REVERB_PRESETS_SUPPORTED 6
|
|
|
#define REVERB_ENABLE_PARAM_SZ \
|
|
|
- (REVERB_ENABLE_PARAM_LEN*sizeof(uint32_t))
|
|
|
+ (REVERB_ENABLE_PARAM_LEN*sizeof(__u32))
|
|
|
#define REVERB_MODE_PARAM_SZ \
|
|
|
- (REVERB_MODE_PARAM_LEN*sizeof(uint32_t))
|
|
|
+ (REVERB_MODE_PARAM_LEN*sizeof(__u32))
|
|
|
#define REVERB_PRESET_PARAM_SZ \
|
|
|
- (REVERB_PRESET_PARAM_LEN*sizeof(uint32_t))
|
|
|
+ (REVERB_PRESET_PARAM_LEN*sizeof(__u32))
|
|
|
#define REVERB_WET_MIX_PARAM_SZ \
|
|
|
- (REVERB_WET_MIX_PARAM_LEN*sizeof(uint32_t))
|
|
|
+ (REVERB_WET_MIX_PARAM_LEN*sizeof(__u32))
|
|
|
#define REVERB_GAIN_ADJUST_PARAM_SZ \
|
|
|
- (REVERB_GAIN_ADJUST_PARAM_LEN*sizeof(uint32_t))
|
|
|
+ (REVERB_GAIN_ADJUST_PARAM_LEN*sizeof(__u32))
|
|
|
#define REVERB_ROOM_LEVEL_PARAM_SZ \
|
|
|
- (REVERB_ROOM_LEVEL_PARAM_LEN*sizeof(uint32_t))
|
|
|
+ (REVERB_ROOM_LEVEL_PARAM_LEN*sizeof(__u32))
|
|
|
#define REVERB_ROOM_HF_LEVEL_PARAM_SZ \
|
|
|
- (REVERB_ROOM_HF_LEVEL_PARAM_LEN*sizeof(uint32_t))
|
|
|
+ (REVERB_ROOM_HF_LEVEL_PARAM_LEN*sizeof(__u32))
|
|
|
#define REVERB_DECAY_TIME_PARAM_SZ \
|
|
|
- (REVERB_DECAY_TIME_PARAM_LEN*sizeof(uint32_t))
|
|
|
+ (REVERB_DECAY_TIME_PARAM_LEN*sizeof(__u32))
|
|
|
#define REVERB_DECAY_HF_RATIO_PARAM_SZ \
|
|
|
- (REVERB_DECAY_HF_RATIO_PARAM_LEN*sizeof(uint32_t))
|
|
|
+ (REVERB_DECAY_HF_RATIO_PARAM_LEN*sizeof(__u32))
|
|
|
#define REVERB_REFLECTIONS_LEVEL_PARAM_SZ \
|
|
|
- (REVERB_REFLECTIONS_LEVEL_PARAM_LEN*sizeof(uint32_t))
|
|
|
+ (REVERB_REFLECTIONS_LEVEL_PARAM_LEN*sizeof(__u32))
|
|
|
#define REVERB_REFLECTIONS_DELAY_PARAM_SZ \
|
|
|
- (REVERB_REFLECTIONS_DELAY_PARAM_LEN*sizeof(uint32_t))
|
|
|
+ (REVERB_REFLECTIONS_DELAY_PARAM_LEN*sizeof(__u32))
|
|
|
#define REVERB_LEVEL_PARAM_SZ \
|
|
|
- (REVERB_LEVEL_PARAM_LEN*sizeof(uint32_t))
|
|
|
+ (REVERB_LEVEL_PARAM_LEN*sizeof(__u32))
|
|
|
#define REVERB_DELAY_PARAM_SZ \
|
|
|
- (REVERB_DELAY_PARAM_LEN*sizeof(uint32_t))
|
|
|
+ (REVERB_DELAY_PARAM_LEN*sizeof(__u32))
|
|
|
#define REVERB_DIFFUSION_PARAM_SZ \
|
|
|
- (REVERB_DIFFUSION_PARAM_LEN*sizeof(uint32_t))
|
|
|
+ (REVERB_DIFFUSION_PARAM_LEN*sizeof(__u32))
|
|
|
#define REVERB_DENSITY_PARAM_SZ \
|
|
|
- (REVERB_DENSITY_PARAM_LEN*sizeof(uint32_t))
|
|
|
+ (REVERB_DENSITY_PARAM_LEN*sizeof(__u32))
|
|
|
struct reverb_params {
|
|
|
- uint32_t device;
|
|
|
- uint32_t enable_flag;
|
|
|
- uint32_t mode;
|
|
|
- uint32_t preset;
|
|
|
- uint32_t wet_mix;
|
|
|
- int32_t gain_adjust;
|
|
|
- int32_t room_level;
|
|
|
- int32_t room_hf_level;
|
|
|
- uint32_t decay_time;
|
|
|
- uint32_t decay_hf_ratio;
|
|
|
- int32_t reflections_level;
|
|
|
- uint32_t reflections_delay;
|
|
|
- int32_t level;
|
|
|
- uint32_t delay;
|
|
|
- uint32_t diffusion;
|
|
|
- uint32_t density;
|
|
|
+ __u32 device;
|
|
|
+ __u32 enable_flag;
|
|
|
+ __u32 mode;
|
|
|
+ __u32 preset;
|
|
|
+ __u32 wet_mix;
|
|
|
+ __s32 gain_adjust;
|
|
|
+ __s32 room_level;
|
|
|
+ __s32 room_hf_level;
|
|
|
+ __u32 decay_time;
|
|
|
+ __u32 decay_hf_ratio;
|
|
|
+ __s32 reflections_level;
|
|
|
+ __u32 reflections_delay;
|
|
|
+ __s32 level;
|
|
|
+ __u32 delay;
|
|
|
+ __u32 diffusion;
|
|
|
+ __u32 density;
|
|
|
};
|
|
|
|
|
|
#define BASS_BOOST_ENABLE_PARAM_SZ \
|
|
|
- (BASS_BOOST_ENABLE_PARAM_LEN*sizeof(uint32_t))
|
|
|
+ (BASS_BOOST_ENABLE_PARAM_LEN*sizeof(__u32))
|
|
|
#define BASS_BOOST_MODE_PARAM_SZ \
|
|
|
- (BASS_BOOST_MODE_PARAM_LEN*sizeof(uint32_t))
|
|
|
+ (BASS_BOOST_MODE_PARAM_LEN*sizeof(__u32))
|
|
|
#define BASS_BOOST_STRENGTH_PARAM_SZ \
|
|
|
- (BASS_BOOST_STRENGTH_PARAM_LEN*sizeof(uint32_t))
|
|
|
+ (BASS_BOOST_STRENGTH_PARAM_LEN*sizeof(__u32))
|
|
|
struct bass_boost_params {
|
|
|
- uint32_t device;
|
|
|
- uint32_t enable_flag;
|
|
|
- uint32_t mode;
|
|
|
- uint32_t strength;
|
|
|
+ __u32 device;
|
|
|
+ __u32 enable_flag;
|
|
|
+ __u32 mode;
|
|
|
+ __u32 strength;
|
|
|
};
|
|
|
|
|
|
|
|
|
#define MAX_EQ_BANDS 12
|
|
|
#define MAX_OSL_EQ_BANDS 5
|
|
|
#define EQ_ENABLE_PARAM_SZ \
|
|
|
- (EQ_ENABLE_PARAM_LEN*sizeof(uint32_t))
|
|
|
+ (EQ_ENABLE_PARAM_LEN*sizeof(__u32))
|
|
|
#define EQ_CONFIG_PARAM_SZ \
|
|
|
- (EQ_CONFIG_PARAM_LEN*sizeof(uint32_t))
|
|
|
+ (EQ_CONFIG_PARAM_LEN*sizeof(__u32))
|
|
|
#define EQ_CONFIG_PER_BAND_PARAM_SZ \
|
|
|
- (EQ_CONFIG_PER_BAND_PARAM_LEN*sizeof(uint32_t))
|
|
|
+ (EQ_CONFIG_PER_BAND_PARAM_LEN*sizeof(__u32))
|
|
|
#define EQ_CONFIG_PARAM_MAX_LEN (EQ_CONFIG_PARAM_LEN+\
|
|
|
MAX_EQ_BANDS*EQ_CONFIG_PER_BAND_PARAM_LEN)
|
|
|
#define EQ_CONFIG_PARAM_MAX_SZ \
|
|
|
- (EQ_CONFIG_PARAM_MAX_LEN*sizeof(uint32_t))
|
|
|
+ (EQ_CONFIG_PARAM_MAX_LEN*sizeof(__u32))
|
|
|
#define EQ_NUM_BANDS_PARAM_SZ \
|
|
|
- (EQ_NUM_BANDS_PARAM_LEN*sizeof(uint32_t))
|
|
|
+ (EQ_NUM_BANDS_PARAM_LEN*sizeof(__u32))
|
|
|
#define EQ_BAND_LEVELS_PARAM_SZ \
|
|
|
- (EQ_BAND_LEVELS_PARAM_LEN*sizeof(uint32_t))
|
|
|
+ (EQ_BAND_LEVELS_PARAM_LEN*sizeof(__u32))
|
|
|
#define EQ_BAND_LEVEL_RANGE_PARAM_SZ \
|
|
|
- (EQ_BAND_LEVEL_RANGE_PARAM_LEN*sizeof(uint32_t))
|
|
|
+ (EQ_BAND_LEVEL_RANGE_PARAM_LEN*sizeof(__u32))
|
|
|
#define EQ_BAND_FREQS_PARAM_SZ \
|
|
|
- (EQ_BAND_FREQS_PARAM_LEN*sizeof(uint32_t))
|
|
|
+ (EQ_BAND_FREQS_PARAM_LEN*sizeof(__u32))
|
|
|
#define EQ_SINGLE_BAND_FREQ_RANGE_PARAM_SZ \
|
|
|
- (EQ_SINGLE_BAND_FREQ_RANGE_PARAM_LEN*sizeof(uint32_t))
|
|
|
+ (EQ_SINGLE_BAND_FREQ_RANGE_PARAM_LEN*sizeof(__u32))
|
|
|
#define EQ_SINGLE_BAND_FREQ_PARAM_SZ \
|
|
|
- (EQ_SINGLE_BAND_FREQ_PARAM_LEN*sizeof(uint32_t))
|
|
|
+ (EQ_SINGLE_BAND_FREQ_PARAM_LEN*sizeof(__u32))
|
|
|
#define EQ_BAND_INDEX_PARAM_SZ \
|
|
|
- (EQ_BAND_INDEX_PARAM_LEN*sizeof(uint32_t))
|
|
|
+ (EQ_BAND_INDEX_PARAM_LEN*sizeof(__u32))
|
|
|
#define EQ_PRESET_ID_PARAM_SZ \
|
|
|
- (EQ_PRESET_ID_PARAM_LEN*sizeof(uint32_t))
|
|
|
+ (EQ_PRESET_ID_PARAM_LEN*sizeof(__u32))
|
|
|
#define EQ_NUM_PRESETS_PARAM_SZ \
|
|
|
- (EQ_NUM_PRESETS_PARAM_LEN*sizeof(uint8_t))
|
|
|
+ (EQ_NUM_PRESETS_PARAM_LEN*sizeof(__u8))
|
|
|
struct eq_config_t {
|
|
|
- int32_t eq_pregain;
|
|
|
- int32_t preset_id;
|
|
|
- uint32_t num_bands;
|
|
|
+ __s32 eq_pregain;
|
|
|
+ __s32 preset_id;
|
|
|
+ __u32 num_bands;
|
|
|
};
|
|
|
struct eq_per_band_config_t {
|
|
|
- int32_t band_idx;
|
|
|
- uint32_t filter_type;
|
|
|
- uint32_t freq_millihertz;
|
|
|
- int32_t gain_millibels;
|
|
|
- uint32_t quality_factor;
|
|
|
+ __s32 band_idx;
|
|
|
+ __u32 filter_type;
|
|
|
+ __u32 freq_millihertz;
|
|
|
+ __s32 gain_millibels;
|
|
|
+ __u32 quality_factor;
|
|
|
};
|
|
|
struct eq_per_band_freq_range_t {
|
|
|
- uint32_t band_index;
|
|
|
- uint32_t min_freq_millihertz;
|
|
|
- uint32_t max_freq_millihertz;
|
|
|
+ __u32 band_index;
|
|
|
+ __u32 min_freq_millihertz;
|
|
|
+ __u32 max_freq_millihertz;
|
|
|
};
|
|
|
|
|
|
struct eq_params {
|
|
|
- uint32_t device;
|
|
|
- uint32_t enable_flag;
|
|
|
+ __u32 device;
|
|
|
+ __u32 enable_flag;
|
|
|
struct eq_config_t config;
|
|
|
struct eq_per_band_config_t per_band_cfg[MAX_EQ_BANDS];
|
|
|
struct eq_per_band_freq_range_t per_band_freq_range[MAX_EQ_BANDS];
|
|
|
- uint32_t band_index;
|
|
|
- uint32_t freq_millihertz;
|
|
|
+ __u32 band_index;
|
|
|
+ __u32 freq_millihertz;
|
|
|
};
|
|
|
|
|
|
#define PBE_ENABLE_PARAM_SZ \
|
|
|
- (PBE_ENABLE_PARAM_LEN*sizeof(uint32_t))
|
|
|
+ (PBE_ENABLE_PARAM_LEN*sizeof(__u32))
|
|
|
#define PBE_CONFIG_PARAM_SZ \
|
|
|
- (PBE_CONFIG_PARAM_LEN*sizeof(uint16_t))
|
|
|
+ (PBE_CONFIG_PARAM_LEN*sizeof(__u16))
|
|
|
struct pbe_config_t {
|
|
|
- int16_t real_bass_mix;
|
|
|
- int16_t bass_color_control;
|
|
|
- uint16_t main_chain_delay;
|
|
|
- uint16_t xover_filter_order;
|
|
|
- uint16_t bandpass_filter_order;
|
|
|
- int16_t drc_delay;
|
|
|
- uint16_t rms_tav;
|
|
|
- int16_t exp_threshold;
|
|
|
- uint16_t exp_slope;
|
|
|
- int16_t comp_threshold;
|
|
|
- uint16_t comp_slope;
|
|
|
- uint16_t makeup_gain;
|
|
|
- uint32_t comp_attack;
|
|
|
- uint32_t comp_release;
|
|
|
- uint32_t exp_attack;
|
|
|
- uint32_t exp_release;
|
|
|
- int16_t limiter_bass_threshold;
|
|
|
- int16_t limiter_high_threshold;
|
|
|
- int16_t limiter_bass_makeup_gain;
|
|
|
- int16_t limiter_high_makeup_gain;
|
|
|
- int16_t limiter_bass_gc;
|
|
|
- int16_t limiter_high_gc;
|
|
|
- int16_t limiter_delay;
|
|
|
- uint16_t reserved;
|
|
|
+ __s16 real_bass_mix;
|
|
|
+ __s16 bass_color_control;
|
|
|
+ __u16 main_chain_delay;
|
|
|
+ __u16 xover_filter_order;
|
|
|
+ __u16 bandpass_filter_order;
|
|
|
+ __s16 drc_delay;
|
|
|
+ __u16 rms_tav;
|
|
|
+ __s16 exp_threshold;
|
|
|
+ __u16 exp_slope;
|
|
|
+ __s16 comp_threshold;
|
|
|
+ __u16 comp_slope;
|
|
|
+ __u16 makeup_gain;
|
|
|
+ __u32 comp_attack;
|
|
|
+ __u32 comp_release;
|
|
|
+ __u32 exp_attack;
|
|
|
+ __u32 exp_release;
|
|
|
+ __s16 limiter_bass_threshold;
|
|
|
+ __s16 limiter_high_threshold;
|
|
|
+ __s16 limiter_bass_makeup_gain;
|
|
|
+ __s16 limiter_high_makeup_gain;
|
|
|
+ __s16 limiter_bass_gc;
|
|
|
+ __s16 limiter_high_gc;
|
|
|
+ __s16 limiter_delay;
|
|
|
+ __u16 reserved;
|
|
|
/* place holder for filter coeffs to be followed */
|
|
|
- int32_t p1LowPassCoeffs[5*2];
|
|
|
- int32_t p1HighPassCoeffs[5*2];
|
|
|
- int32_t p1BandPassCoeffs[5*3];
|
|
|
- int32_t p1BassShelfCoeffs[5];
|
|
|
- int32_t p1TrebleShelfCoeffs[5];
|
|
|
+ __s32 p1LowPassCoeffs[5*2];
|
|
|
+ __s32 p1HighPassCoeffs[5*2];
|
|
|
+ __s32 p1BandPassCoeffs[5*3];
|
|
|
+ __s32 p1BassShelfCoeffs[5];
|
|
|
+ __s32 p1TrebleShelfCoeffs[5];
|
|
|
} __packed;
|
|
|
|
|
|
struct pbe_params {
|
|
|
- uint32_t device;
|
|
|
- uint32_t enable_flag;
|
|
|
- uint32_t cfg_len;
|
|
|
+ __u32 device;
|
|
|
+ __u32 enable_flag;
|
|
|
+ __u32 cfg_len;
|
|
|
struct pbe_config_t config;
|
|
|
};
|
|
|
|
|
|
#define SOFT_VOLUME_ENABLE_PARAM_SZ \
|
|
|
- (SOFT_VOLUME_ENABLE_PARAM_LEN*sizeof(uint32_t))
|
|
|
+ (SOFT_VOLUME_ENABLE_PARAM_LEN*sizeof(__u32))
|
|
|
#define SOFT_VOLUME_GAIN_MASTER_PARAM_SZ \
|
|
|
- (SOFT_VOLUME_GAIN_MASTER_PARAM_LEN*sizeof(uint32_t))
|
|
|
+ (SOFT_VOLUME_GAIN_MASTER_PARAM_LEN*sizeof(__u32))
|
|
|
#define SOFT_VOLUME_GAIN_2CH_PARAM_SZ \
|
|
|
- (SOFT_VOLUME_GAIN_2CH_PARAM_LEN*sizeof(uint16_t))
|
|
|
+ (SOFT_VOLUME_GAIN_2CH_PARAM_LEN*sizeof(__u16))
|
|
|
struct soft_volume_params {
|
|
|
- uint32_t device;
|
|
|
- uint32_t enable_flag;
|
|
|
- uint32_t master_gain;
|
|
|
- uint32_t left_gain;
|
|
|
- uint32_t right_gain;
|
|
|
+ __u32 device;
|
|
|
+ __u32 enable_flag;
|
|
|
+ __u32 master_gain;
|
|
|
+ __u32 left_gain;
|
|
|
+ __u32 right_gain;
|
|
|
};
|
|
|
|
|
|
struct msm_nt_eff_all_config {
|