diff options
Diffstat (limited to 'include/dsp')
-rw-r--r-- | include/dsp/apr_audio-v2.h | 26 | ||||
-rw-r--r-- | include/dsp/audio_cal_utils.h | 4 | ||||
-rw-r--r-- | include/dsp/q6afe-v2.h | 4 |
3 files changed, 33 insertions, 1 deletions
diff --git a/include/dsp/apr_audio-v2.h b/include/dsp/apr_audio-v2.h index eed5652f..dc51307a 100644 --- a/include/dsp/apr_audio-v2.h +++ b/include/dsp/apr_audio-v2.h @@ -10,6 +10,9 @@ #include <ipc/apr.h> #include <linux/msm_audio.h> +/* number of threshold levels in speaker protection module */ +#define MAX_CPS_LEVELS 3 + /* size of header needed for passing data out of band */ #define APR_CMD_OB_HDR_SZ 12 @@ -2364,6 +2367,28 @@ int16_t excursionf[AFE_SPKR_PROT_EXCURSIONF_LEN]; */ } __packed; +struct lpass_swr_spkr_dep_cfg_t { + uint32_t vbatt_pkd_reg_addr; + uint32_t temp_pkd_reg_addr; + uint32_t value_normal_thrsd[MAX_CPS_LEVELS]; + uint32_t value_low1_thrsd[MAX_CPS_LEVELS]; + uint32_t value_low2_thrsd[MAX_CPS_LEVELS]; +} __packed; + +struct lpass_swr_hw_reg_cfg_t { + uint32_t lpass_wr_cmd_reg_phy_addr; + uint32_t lpass_rd_cmd_reg_phy_addr; + uint32_t lpass_rd_fifo_reg_phy_addr; + uint32_t vbatt_lower1_threshold; + uint32_t vbatt_lower2_threshold; + uint32_t num_spkr; +} __packed; + +struct afe_cps_hw_intf_cfg { + uint32_t lpass_hw_intf_cfg_mode; + struct lpass_swr_hw_reg_cfg_t hw_reg_cfg; + struct lpass_swr_spkr_dep_cfg_t *spkr_dep_cfg; +} __packed; #define AFE_SERVICE_CMD_REGISTER_RT_PORT_DRIVER 0x000100E0 @@ -10784,6 +10809,7 @@ struct cmd_set_topologies { #define AFE_PARAM_ID_FBSP_MODE_RX_CFG 0x0001021D #define AFE_PARAM_ID_FBSP_PTONE_RAMP_CFG 0x00010260 #define AFE_PARAM_ID_SP_RX_TMAX_XMAX_LOGGING 0x000102BC +#define AFE_PARAM_ID_CPS_LPASS_HW_INTF_CFG 0x000102EF struct asm_fbsp_mode_rx_cfg { uint32_t minor_version; diff --git a/include/dsp/audio_cal_utils.h b/include/dsp/audio_cal_utils.h index 06078150..99f619f2 100644 --- a/include/dsp/audio_cal_utils.h +++ b/include/dsp/audio_cal_utils.h @@ -1,6 +1,6 @@ /* SPDX-License-Identifier: GPL-2.0-only */ /* - * Copyright (c) 2014, 2018, The Linux Foundation. All rights reserved. + * Copyright (c) 2014, 2018, 2020, The Linux Foundation. All rights reserved. */ #ifndef _AUDIO_CAL_UTILS_H #define _AUDIO_CAL_UTILS_H @@ -95,4 +95,6 @@ int32_t cal_utils_get_cal_type_version(void *cal_type_data); void cal_utils_mark_cal_used(struct cal_block_data *cal_block); bool cal_utils_is_cal_stale(struct cal_block_data *cal_block); + +int cal_utils_init(void); #endif diff --git a/include/dsp/q6afe-v2.h b/include/dsp/q6afe-v2.h index 8b82069a..bd2cba69 100644 --- a/include/dsp/q6afe-v2.h +++ b/include/dsp/q6afe-v2.h @@ -432,6 +432,9 @@ int afe_pseudo_port_start_nowait(u16 port_id); int afe_pseudo_port_stop_nowait(u16 port_id); int afe_set_lpass_clock(u16 port_id, struct afe_clk_cfg *cfg); int afe_set_lpass_clock_v2(u16 port_id, struct afe_clk_set *cfg); +void afe_set_cps_config(int src_port, + struct afe_cps_hw_intf_cfg *cps_config, + u32 ch_mask); int afe_set_lpass_clk_cfg(int index, struct afe_clk_set *cfg); int afe_set_digital_codec_core_clock(u16 port_id, struct afe_digital_clk_cfg *cfg); @@ -496,6 +499,7 @@ int afe_get_doa_tracking_mon(u16 port_id, int afe_set_pll_clk_drift(u16 port_id, int32_t set_clk_drift, uint32_t clk_reset); int afe_set_clk_id(u16 port_id, uint32_t clk_id); +void afe_set_lsm_afe_port_id(int idx, int lsm_port); enum { AFE_LPASS_CORE_HW_BLOCK_ID_NONE, |