summaryrefslogtreecommitdiff
path: root/include/dsp
diff options
context:
space:
mode:
authorWilson Sung <wilsonsung@google.com>2021-03-19 17:27:07 +0800
committerWilson Sung <wilsonsung@google.com>2021-03-19 17:31:38 +0800
commite4ec5db336f06b9cd8d94a9e3af527b60dfa3973 (patch)
tree59714d26952a06278a16bd10e1d033b276264584 /include/dsp
parent935f0b18ffed97fed2aa4de0a1ccb3152ad7c317 (diff)
parent8b44f642a7e2cd83939cc27cfc3c067abedfbde0 (diff)
downloadmsm-extra-e4ec5db336f06b9cd8d94a9e3af527b60dfa3973.tar.gz
Merge branch LA.UM.9.12.R1.11.00.00.597.108 into qcom-msm-4.19-7250-audio-drivers.lnx.4.0.r3
Change-Id: I0cef4ccfb5e280c4c21009fa9d1ea7f2ad7d2637
Diffstat (limited to 'include/dsp')
-rw-r--r--include/dsp/apr_audio-v2.h26
-rw-r--r--include/dsp/audio_cal_utils.h4
-rw-r--r--include/dsp/q6afe-v2.h4
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,