diff options
Diffstat (limited to 'original-kernel-headers')
-rw-r--r-- | original-kernel-headers/linux/msm_audio_calibration.h | 44 | ||||
-rw-r--r-- | original-kernel-headers/sound/lsm_params.h | 114 |
2 files changed, 150 insertions, 8 deletions
diff --git a/original-kernel-headers/linux/msm_audio_calibration.h b/original-kernel-headers/linux/msm_audio_calibration.h index dfa6663..78f6ffd 100644 --- a/original-kernel-headers/linux/msm_audio_calibration.h +++ b/original-kernel-headers/linux/msm_audio_calibration.h @@ -71,7 +71,11 @@ enum { AFE_FB_SPKR_PROT_CAL_TYPE, AFE_HW_DELAY_CAL_TYPE, AFE_SIDETONE_CAL_TYPE, + AFE_TOPOLOGY_CAL_TYPE, + AFE_CUST_TOPOLOGY_CAL_TYPE, + LSM_CUST_TOPOLOGY_CAL_TYPE, + LSM_TOPOLOGY_CAL_TYPE, LSM_CAL_TYPE, ADM_RTAC_INFO_CAL_TYPE, @@ -216,6 +220,14 @@ struct audio_cal_info_afe { int32_t sample_rate; }; +struct audio_cal_info_afe_top { + int32_t topology; + int32_t acdb_id; + /* RX_DEVICE or TX_DEVICE */ + int32_t path; + int32_t sample_rate; +}; + struct audio_cal_info_asm_top { int32_t topology; int32_t app_type; @@ -253,7 +265,8 @@ enum msm_spkr_prot_states { MSM_SPKR_PROT_CALIBRATED, MSM_SPKR_PROT_CALIBRATION_IN_PROGRESS, MSM_SPKR_PROT_DISABLED, - MSM_SPKR_PROT_NOT_CALIBRATED + MSM_SPKR_PROT_NOT_CALIBRATED, + MSM_SPKR_PROT_PRE_CALIBRATED, }; enum msm_spkr_count { @@ -285,6 +298,13 @@ struct audio_cal_info_sidetone { int32_t pid; }; +struct audio_cal_info_lsm_top { + int32_t topology; + int32_t acdb_id; + int32_t app_type; +}; + + struct audio_cal_info_lsm { int32_t acdb_id; /* RX_DEVICE or TX_DEVICE */ @@ -436,6 +456,17 @@ struct audio_cal_afe { struct audio_cal_type_afe cal_type; }; +struct audio_cal_type_afe_top { + struct audio_cal_type_header cal_hdr; + struct audio_cal_data cal_data; + struct audio_cal_info_afe_top cal_info; +}; + +struct audio_cal_afe_top { + struct audio_cal_header hdr; + struct audio_cal_type_afe_top cal_type; +}; + struct audio_cal_type_aanc { struct audio_cal_type_header cal_hdr; struct audio_cal_data cal_data; @@ -480,6 +511,17 @@ struct audio_cal_sidetone { struct audio_cal_type_sidetone cal_type; }; +struct audio_cal_type_lsm_top { + struct audio_cal_type_header cal_hdr; + struct audio_cal_data cal_data; + struct audio_cal_info_lsm_top cal_info; +}; + +struct audio_cal_lsm_top { + struct audio_cal_header hdr; + struct audio_cal_type_lsm_top cal_type; +}; + struct audio_cal_type_lsm { struct audio_cal_type_header cal_hdr; struct audio_cal_data cal_data; diff --git a/original-kernel-headers/sound/lsm_params.h b/original-kernel-headers/sound/lsm_params.h index a7e8187..eafdc11 100644 --- a/original-kernel-headers/sound/lsm_params.h +++ b/original-kernel-headers/sound/lsm_params.h @@ -6,6 +6,18 @@ #define SNDRV_LSM_VERSION SNDRV_PROTOCOL_VERSION(0, 1, 0) +#define LSM_OUT_FORMAT_PCM (0) +#define LSM_OUT_FORMAT_ADPCM (1 << 0) + +#define LSM_OUT_DATA_RAW (0) +#define LSM_OUT_DATA_PACKED (1) + +#define LSM_OUT_DATA_EVENTS_DISABLED (0) +#define LSM_OUT_DATA_EVENTS_ENABLED (1) + +#define LSM_OUT_TRANSFER_MODE_RT (0) +#define LSM_OUT_TRANSFER_MODE_FTRT (1) + enum lsm_app_id { LSM_VOICE_WAKEUP_APP_ID = 1, LSM_VOICE_WAKEUP_APP_ID_V2 = 2, @@ -23,15 +35,47 @@ enum lsm_vw_status { LSM_VOICE_WAKEUP_STATUS_REJECTED }; -struct snd_lsm_sound_model { - __u8 __user *data; - __u32 data_size; - enum lsm_detection_mode detection_mode; - __u16 min_keyw_confidence; - __u16 min_user_confidence; +enum LSM_PARAM_TYPE { + LSM_ENDPOINT_DETECT_THRESHOLD = 0, + LSM_OPERATION_MODE, + LSM_GAIN, + LSM_MIN_CONFIDENCE_LEVELS, + LSM_REG_SND_MODEL, + LSM_DEREG_SND_MODEL, + LSM_CUSTOM_PARAMS, + /* driver ioctl will parse only so many params */ + LSM_PARAMS_MAX, +}; + +/* + * Data for LSM_ENDPOINT_DETECT_THRESHOLD param_type + * @epd_begin: Begin threshold + * @epd_end: End threshold + */ +struct snd_lsm_ep_det_thres { + __u32 epd_begin; + __u32 epd_end; +}; + +/* + * Data for LSM_OPERATION_MODE param_type + * @mode: The detection mode to be used + * @detect_failure: Setting to enable failure detections. + */ +struct snd_lsm_detect_mode { + enum lsm_detection_mode mode; bool detect_failure; }; +/* + * Data for LSM_GAIN param_type + * @gain: The gain to be applied on LSM + */ +struct snd_lsm_gain { + __u16 gain; +}; + + struct snd_lsm_sound_model_v2 { __u8 __user *data; __u8 *confidence_level; @@ -58,7 +102,59 @@ struct snd_lsm_detection_params { bool detect_failure; }; -#define SNDRV_LSM_REG_SND_MODEL _IOW('U', 0x00, struct snd_lsm_sound_model) +/* + * Param info for each parameter type + * @module_id: Module to which parameter is to be set + * @param_id: Parameter that is to be set + * @param_size: size (in number of bytes) for the data + * in param_data. + * For confidence levels, this is num_conf_levels + * For REG_SND_MODEL, this is size of sound model + * For CUSTOM_PARAMS, this is size of the entire blob of data + * @param_data: Data for the parameter. + * For some param_types this is a structure defined, ex: LSM_GAIN + * For CONFIDENCE_LEVELS, this is array of confidence levels + * For REG_SND_MODEL, this is the sound model data + * For CUSTOM_PARAMS, this is the blob of custom data. + */ +struct lsm_params_info { + __u32 module_id; + __u32 param_id; + __u32 param_size; + __u8 __user *param_data; + enum LSM_PARAM_TYPE param_type; +}; + +/* + * Data passed to the SET_PARAM_V2 IOCTL + * @num_params: Number of params that are to be set + * should not be greater than LSM_PARAMS_MAX + * @params: Points to an array of lsm_params_info + * Each entry points to one parameter to set + * @data_size: size (in bytes) for params + * should be equal to + * num_params * sizeof(struct lsm_parms_info) + */ +struct snd_lsm_module_params { + __u8 __user *params; + __u32 num_params; + __u32 data_size; +}; + +/* + * Data passed to LSM_OUT_FORMAT_CFG IOCTL + * @format: The media format enum + * @packing: indicates the packing method used for data path + * @events: indicates whether data path events need to be enabled + * @transfer_mode: indicates whether FTRT mode or RT mode. + */ +struct snd_lsm_output_format_cfg { + __u8 format; + __u8 packing; + __u8 events; + __u8 mode; +}; + #define SNDRV_LSM_DEREG_SND_MODEL _IOW('U', 0x01, int) #define SNDRV_LSM_EVENT_STATUS _IOW('U', 0x02, struct snd_lsm_event_status) #define SNDRV_LSM_ABORT_EVENT _IOW('U', 0x03, int) @@ -71,5 +167,9 @@ struct snd_lsm_detection_params { #define SNDRV_LSM_STOP_LAB _IO('U', 0x09) #define SNDRV_LSM_SET_PARAMS _IOW('U', 0x0A, \ struct snd_lsm_detection_params) +#define SNDRV_LSM_SET_MODULE_PARAMS _IOW('U', 0x0B, \ + struct snd_lsm_module_params) +#define SNDRV_LSM_OUT_FORMAT_CFG _IOW('U', 0x0C, \ + struct snd_lsm_output_format_cfg) #endif |