summaryrefslogtreecommitdiff
path: root/include/sound/tas2781-dsp.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/sound/tas2781-dsp.h')
-rw-r--r--include/sound/tas2781-dsp.h46
1 files changed, 38 insertions, 8 deletions
diff --git a/include/sound/tas2781-dsp.h b/include/sound/tas2781-dsp.h
index ea9af2726a53..c3a9efa73d5d 100644
--- a/include/sound/tas2781-dsp.h
+++ b/include/sound/tas2781-dsp.h
@@ -2,7 +2,7 @@
//
// ALSA SoC Texas Instruments TAS2781 Audio Smart Amplifier
//
-// Copyright (C) 2022 - 2023 Texas Instruments Incorporated
+// Copyright (C) 2022 - 2025 Texas Instruments Incorporated
// https://www.ti.com
//
// The TAS2781 driver implements a flexible and configurable
@@ -13,8 +13,8 @@
// Author: Kevin Lu <kevin-lu@ti.com>
//
-#ifndef __TASDEVICE_DSP_H__
-#define __TASDEVICE_DSP_H__
+#ifndef __TAS2781_DSP_H__
+#define __TAS2781_DSP_H__
#define MAIN_ALL_DEVICES 0x0d
#define MAIN_DEVICE_A 0x01
@@ -30,8 +30,10 @@
#define PRE_DEVICE_C 0x12
#define PRE_DEVICE_D 0x16
-#define PPC3_VERSION 0x4100
-#define PPC3_VERSION_TAS2781 0x14600
+#define PPC3_VERSION_BASE 0x4100
+#define PPC3_VERSION_TAS2781_BASIC_MIN 0x14600
+#define PPC3_VERSION_TAS2781_ALPHA_MIN 0x4a00
+#define PPC3_VERSION_TAS2781_BETA_MIN 0x19400
#define TASDEVICE_DEVICE_SUM 8
#define TASDEVICE_CONFIG_SUM 64
@@ -106,6 +108,27 @@ struct tasdevice_calibration {
struct tasdevice_data dev_data;
};
+struct fct_param_address {
+ /* Thermal data for PG 1.0 device */
+ unsigned char thr[3];
+ /* Thermal data for PG 2.0 device */
+ unsigned char thr2[3];
+ /* Pilot tone enable flag, usually the sine wave */
+ unsigned char plt_flg[3];
+ /* Pilot tone gain for calibration */
+ unsigned char sin_gn[3];
+ /* Pilot tone gain for calibration */
+ unsigned char sin_gn2[3];
+ /* high 32-bit of real-time spk impedance */
+ unsigned char r0_reg[3];
+ /* check spk connection */
+ unsigned char tf_reg[3];
+ /* check spk resonant frequency */
+ unsigned char a1_reg[3];
+ /* check spk resonant frequency */
+ unsigned char a2_reg[3];
+};
+
struct tasdevice_fw {
struct tasdevice_dspfw_hdr fw_hdr;
unsigned short nr_programs;
@@ -114,13 +137,21 @@ struct tasdevice_fw {
struct tasdevice_config *configs;
unsigned short nr_calibrations;
struct tasdevice_calibration *calibrations;
+ struct fct_param_address fct_par_addr;
struct device *dev;
};
-enum tasdevice_dsp_fw_state {
- TASDEVICE_DSP_FW_NONE = 0,
+enum tasdevice_fw_state {
+ /* Driver in startup mode, not load any firmware. */
TASDEVICE_DSP_FW_PENDING,
+ /* DSP firmware in the system, but parsing error. */
TASDEVICE_DSP_FW_FAIL,
+ /*
+ * Only RCA (Reconfigurable Architecture) firmware load
+ * successfully.
+ */
+ TASDEVICE_RCA_FW_OK,
+ /* Both RCA and DSP firmware load successfully. */
TASDEVICE_DSP_FW_ALL_OK,
};
@@ -180,7 +211,6 @@ void tasdevice_calbin_remove(void *context);
int tasdevice_select_tuningprm_cfg(void *context, int prm,
int cfg_no, int rca_conf_no);
int tasdevice_prmg_load(void *context, int prm_no);
-int tasdevice_prmg_calibdata_load(void *context, int prm_no);
void tasdevice_tuning_switch(void *context, int state);
int tas2781_load_calibration(void *context, char *file_name,
unsigned short i);