diff options
| author | Vidyakumar Athota <vathota@codeaurora.org> | 2016-02-02 14:10:42 -0800 |
|---|---|---|
| committer | David Keitel <dkeitel@codeaurora.org> | 2016-03-23 21:20:59 -0700 |
| commit | a15e630662d440db1f72446482b7e2367ac1794c (patch) | |
| tree | 46b84c26afeff5e7a09557b1cc7ee6185f6f41fc /include/uapi/linux/msm_audio_calibration.h | |
| parent | 41a12ff0ed0f69fd6180b9c8852446d58b5a0c94 (diff) | |
ASoC: msm: Add support to query speaker parameters
Add SET and GET parameter APIs to query speaker
parameters in feedback speaker protection FTM mode.
CRs-Fixed: 974621
Change-Id: I1a51e5033d7836c0c996621593cd2f4dd6982dcd
Signed-off-by: Vidyakumar Athota <vathota@codeaurora.org>
Diffstat (limited to 'include/uapi/linux/msm_audio_calibration.h')
| -rw-r--r-- | include/uapi/linux/msm_audio_calibration.h | 91 |
1 files changed, 88 insertions, 3 deletions
diff --git a/include/uapi/linux/msm_audio_calibration.h b/include/uapi/linux/msm_audio_calibration.h index eb6c692b394c..3c6ab13ca470 100644 --- a/include/uapi/linux/msm_audio_calibration.h +++ b/include/uapi/linux/msm_audio_calibration.h @@ -96,9 +96,14 @@ enum { ADM_RTAC_AUDVOL_CAL_TYPE, ULP_LSM_TOPOLOGY_ID_CAL_TYPE, + AFE_FB_SPKR_PROT_TH_VI_CAL_TYPE, + AFE_FB_SPKR_PROT_EX_VI_CAL_TYPE, MAX_CAL_TYPES, }; +#define AFE_FB_SPKR_PROT_TH_VI_CAL_TYPE AFE_FB_SPKR_PROT_TH_VI_CAL_TYPE +#define AFE_FB_SPKR_PROT_EX_VI_CAL_TYPE AFE_FB_SPKR_PROT_EX_VI_CAL_TYPE + enum { VERSION_0_0, }; @@ -271,7 +276,9 @@ enum msm_spkr_prot_states { MSM_SPKR_PROT_DISABLED, MSM_SPKR_PROT_NOT_CALIBRATED, MSM_SPKR_PROT_PRE_CALIBRATED, + MSM_SPKR_PROT_IN_FTM_MODE }; +#define MSM_SPKR_PROT_IN_FTM_MODE MSM_SPKR_PROT_IN_FTM_MODE enum msm_spkr_count { SP_V2_SPKR_1, @@ -283,9 +290,46 @@ struct audio_cal_info_spk_prot_cfg { int32_t r0[SP_V2_NUM_MAX_SPKRS]; int32_t t0[SP_V2_NUM_MAX_SPKRS]; uint32_t quick_calib_flag; - uint32_t mode; /*0 - Start spk prot - 1 - Start calib - 2 - Disable spk prot*/ + uint32_t mode; + /* + * 0 - Start spk prot + * 1 - Start calib + * 2 - Disable spk prot + */ +}; + +struct audio_cal_info_sp_th_vi_ftm_cfg { + uint32_t wait_time[SP_V2_NUM_MAX_SPKRS]; + uint32_t ftm_time[SP_V2_NUM_MAX_SPKRS]; + uint32_t mode; + /* + * 0 - normal running mode + * 1 - Calibration + * 2 - FTM mode + */ +}; + +struct audio_cal_info_sp_ex_vi_ftm_cfg { + uint32_t wait_time[SP_V2_NUM_MAX_SPKRS]; + uint32_t ftm_time[SP_V2_NUM_MAX_SPKRS]; + uint32_t mode; + /* + * 0 - normal running mode + * 2 - FTM mode + */ +}; + +struct audio_cal_info_sp_ex_vi_param { + int32_t freq_q20[SP_V2_NUM_MAX_SPKRS]; + int32_t resis_q24[SP_V2_NUM_MAX_SPKRS]; + int32_t qmct_q24[SP_V2_NUM_MAX_SPKRS]; + int32_t status[SP_V2_NUM_MAX_SPKRS]; +}; + +struct audio_cal_info_sp_th_vi_param { + int32_t r_dc_q24[SP_V2_NUM_MAX_SPKRS]; + int32_t temp_q22[SP_V2_NUM_MAX_SPKRS]; + int32_t status[SP_V2_NUM_MAX_SPKRS]; }; struct audio_cal_info_msm_spk_prot_status { @@ -493,6 +537,27 @@ struct audio_cal_fb_spk_prot_cfg { struct audio_cal_type_fb_spk_prot_cfg cal_type; }; +struct audio_cal_type_sp_th_vi_ftm_cfg { + struct audio_cal_type_header cal_hdr; + struct audio_cal_data cal_data; + struct audio_cal_info_sp_th_vi_ftm_cfg cal_info; +}; + +struct audio_cal_sp_th_vi_ftm_cfg { + struct audio_cal_header hdr; + struct audio_cal_type_sp_th_vi_ftm_cfg cal_type; +}; + +struct audio_cal_type_sp_ex_vi_ftm_cfg { + struct audio_cal_type_header cal_hdr; + struct audio_cal_data cal_data; + struct audio_cal_info_sp_ex_vi_ftm_cfg cal_info; +}; + +struct audio_cal_sp_ex_vi_ftm_cfg { + struct audio_cal_header hdr; + struct audio_cal_type_sp_ex_vi_ftm_cfg cal_type; +}; struct audio_cal_type_hw_delay { struct audio_cal_type_header cal_hdr; struct audio_cal_data cal_data; @@ -604,4 +669,24 @@ struct audio_cal_fb_spk_prot_status { struct audio_cal_type_fb_spk_prot_status cal_type; }; +struct audio_cal_type_sp_th_vi_param { + struct audio_cal_type_header cal_hdr; + struct audio_cal_data cal_data; + struct audio_cal_info_sp_th_vi_param cal_info; +}; + +struct audio_cal_sp_th_vi_param { + struct audio_cal_header hdr; + struct audio_cal_type_sp_th_vi_param cal_type; +}; +struct audio_cal_type_sp_ex_vi_param { + struct audio_cal_type_header cal_hdr; + struct audio_cal_data cal_data; + struct audio_cal_info_sp_ex_vi_param cal_info; +}; + +struct audio_cal_sp_ex_vi_param { + struct audio_cal_header hdr; + struct audio_cal_type_sp_ex_vi_param cal_type; +}; #endif /* _UAPI_MSM_AUDIO_CALIBRATION_H */ |
