summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPeeyush Gupta2020-01-28 22:46:15 -0600
committerPeeyush Gupta2020-01-28 22:46:15 -0600
commitaae6ca7f883d8632e3a5671a61ed016875992781 (patch)
tree090c4fd872292e7a1b9d9e00bc479a6fea59239c
parentddd7bf01be9daa7cfe9e2f874310d83b1ac8ad00 (diff)
downloadtas2562-stereo-android-driver-aae6ca7f883d8632e3a5671a61ed016875992781.tar.gz
tas2562-stereo-android-driver-aae6ca7f883d8632e3a5671a61ed016875992781.tar.xz
tas2562-stereo-android-driver-aae6ca7f883d8632e3a5671a61ed016875992781.zip
fixing build error when algo enabledTAS2562_v1.0
-rw-r--r--dsp/smart_amp.h25
-rw-r--r--tas2562-codec.c4
-rw-r--r--tas2562-regmap.c4
-rw-r--r--tas25xx-calib.c2
4 files changed, 34 insertions, 1 deletions
diff --git a/dsp/smart_amp.h b/dsp/smart_amp.h
index 4b0aa10..5331264 100644
--- a/dsp/smart_amp.h
+++ b/dsp/smart_amp.h
@@ -67,6 +67,7 @@ typedef enum {
67 IV_SENSE_FORMAT_12_BIT_WITH_8BIT_VBAT = 1, 67 IV_SENSE_FORMAT_12_BIT_WITH_8BIT_VBAT = 1,
68} ti_smartamp_iv_vbat_format_t; 68} ti_smartamp_iv_vbat_format_t;
69 69
70#ifdef INSTANCE_ID_0
70struct afe_smartamp_set_params_t { 71struct afe_smartamp_set_params_t {
71 uint32_t payload[TAS_PAYLOAD_SIZE]; 72 uint32_t payload[TAS_PAYLOAD_SIZE];
72} __packed; 73} __packed;
@@ -87,6 +88,30 @@ struct afe_smartamp_calib_get_resp {
87 struct param_hdr_v3 pdata; 88 struct param_hdr_v3 pdata;
88 struct afe_smartamp_get_params_t res_cfg; 89 struct afe_smartamp_get_params_t res_cfg;
89} __packed; 90} __packed;
91#else
92struct afe_smartamp_set_params_t {
93 uint32_t payload[TAS_PAYLOAD_SIZE];
94} __packed;
95struct afe_smartamp_config_command {
96 struct apr_hdr hdr;
97 struct afe_port_cmd_set_param_v2 param;
98 struct afe_port_param_data_v2 pdata;
99 struct afe_smartamp_set_params_t prot_config;
100} __packed;
101
102struct afe_smartamp_get_calib {
103 struct apr_hdr hdr;
104 struct afe_port_cmd_get_param_v2 get_param;
105 struct afe_port_param_data_v2 pdata;
106 struct afe_smartamp_set_params_t res_cfg;
107} __packed;
108
109struct afe_smartamp_calib_get_resp {
110 uint32_t status;
111 struct afe_port_param_data_v2 pdata;
112 struct afe_smartamp_set_params_t res_cfg;
113} __packed;
114#endif
90 115
91int afe_smartamp_get_calib_data(struct afe_smartamp_get_calib *calib_resp, 116int afe_smartamp_get_calib_data(struct afe_smartamp_get_calib *calib_resp,
92 uint32_t param_id, uint32_t module_id, uint32_t port_id); 117 uint32_t param_id, uint32_t module_id, uint32_t port_id);
diff --git a/tas2562-codec.c b/tas2562-codec.c
index 4b0ea19..70ba4c5 100644
--- a/tas2562-codec.c
+++ b/tas2562-codec.c
@@ -45,7 +45,11 @@
45 45
46#include "tas2562.h" 46#include "tas2562.h"
47#ifdef CONFIG_TAS25XX_ALGO 47#ifdef CONFIG_TAS25XX_ALGO
48#ifdef CONFIG_PLATFORM_EXYNOS
48#include <sound/smart_amp.h> 49#include <sound/smart_amp.h>
50#else
51#include <dsp/smart_amp.h>
52#endif /*CONFIG_PLATFORM_EXYNOS*/
49#include "tas25xx-calib.h" 53#include "tas25xx-calib.h"
50#endif /*CONFIG_TAS25XX_ALGO*/ 54#endif /*CONFIG_TAS25XX_ALGO*/
51 55
diff --git a/tas2562-regmap.c b/tas2562-regmap.c
index 7d5ab21..b3bbc55 100644
--- a/tas2562-regmap.c
+++ b/tas2562-regmap.c
@@ -40,7 +40,11 @@
40#include "tas2562-codec.h" 40#include "tas2562-codec.h"
41#include "tas2562-misc.h" 41#include "tas2562-misc.h"
42#ifdef CONFIG_TAS25XX_ALGO 42#ifdef CONFIG_TAS25XX_ALGO
43#ifdef CONFIG_PLATFORM_EXYNOS
43#include <sound/smart_amp.h> 44#include <sound/smart_amp.h>
45#else
46#include <dsp/smart_amp.h>
47#endif
44#endif /*CONFIG_TAS25XX_ALGO*/ 48#endif /*CONFIG_TAS25XX_ALGO*/
45 49
46static char p_icn_threshold[] = {0x00, 0x01, 0x2f, 0x2c}; 50static char p_icn_threshold[] = {0x00, 0x01, 0x2f, 0x2c};
diff --git a/tas25xx-calib.c b/tas25xx-calib.c
index 259b6b9..3bb2d3d 100644
--- a/tas25xx-calib.c
+++ b/tas25xx-calib.c
@@ -101,7 +101,7 @@ static int smartamp_params_ctrl(uint8_t *input, u8 dir, u8 count)
101 * AFE_PARAM_ID_ENABLE and AFE_PARAM_ID_SMARTAMP_DEFAULT 101 * AFE_PARAM_ID_ENABLE and AFE_PARAM_ID_SMARTAMP_DEFAULT
102 */ 102 */
103 103
104 #ifndef PLATFORM_EXYNOS 104 #ifndef CONFIG_PLATFORM_EXYNOS
105 if (paramid == CAPI_V2_TAS_TX_ENABLE || 105 if (paramid == CAPI_V2_TAS_TX_ENABLE ||
106 paramid == CAPI_V2_TAS_TX_CFG || 106 paramid == CAPI_V2_TAS_TX_CFG ||
107 paramid == CAPI_V2_TAS_RX_ENABLE || 107 paramid == CAPI_V2_TAS_RX_ENABLE ||