summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: ddd7bf0)
raw | patch | inline | side by side (parent: ddd7bf0)
author | Peeyush Gupta <a0875211@ti.com> | |
Wed, 29 Jan 2020 04:46:15 +0000 (10:16 +0530) | ||
committer | Peeyush Gupta <a0875211@ti.com> | |
Wed, 29 Jan 2020 04:46:15 +0000 (10:16 +0530) |
dsp/smart_amp.h | patch | blob | history | |
tas2562-codec.c | patch | blob | history | |
tas2562-regmap.c | patch | blob | history | |
tas25xx-calib.c | patch | blob | history |
diff --git a/dsp/smart_amp.h b/dsp/smart_amp.h
index 4b0aa105b2efc71619904f322267b052dc13e960..5331264a07918f3933c4f24f0ca86d373586ff3e 100644 (file)
--- a/dsp/smart_amp.h
+++ b/dsp/smart_amp.h
IV_SENSE_FORMAT_12_BIT_WITH_8BIT_VBAT = 1,
} ti_smartamp_iv_vbat_format_t;
+#ifdef INSTANCE_ID_0
struct afe_smartamp_set_params_t {
uint32_t payload[TAS_PAYLOAD_SIZE];
} __packed;
struct param_hdr_v3 pdata;
struct afe_smartamp_get_params_t res_cfg;
} __packed;
+#else
+struct afe_smartamp_set_params_t {
+ uint32_t payload[TAS_PAYLOAD_SIZE];
+} __packed;
+struct afe_smartamp_config_command {
+ struct apr_hdr hdr;
+ struct afe_port_cmd_set_param_v2 param;
+ struct afe_port_param_data_v2 pdata;
+ struct afe_smartamp_set_params_t prot_config;
+} __packed;
+
+struct afe_smartamp_get_calib {
+ struct apr_hdr hdr;
+ struct afe_port_cmd_get_param_v2 get_param;
+ struct afe_port_param_data_v2 pdata;
+ struct afe_smartamp_set_params_t res_cfg;
+} __packed;
+
+struct afe_smartamp_calib_get_resp {
+ uint32_t status;
+ struct afe_port_param_data_v2 pdata;
+ struct afe_smartamp_set_params_t res_cfg;
+} __packed;
+#endif
int afe_smartamp_get_calib_data(struct afe_smartamp_get_calib *calib_resp,
uint32_t param_id, uint32_t module_id, uint32_t port_id);
diff --git a/tas2562-codec.c b/tas2562-codec.c
index 4b0ea1918951a28b0bc9c2642a8b517b04752c4b..70ba4c52007d24a86a7076765b031cb1bd1ef23f 100644 (file)
--- a/tas2562-codec.c
+++ b/tas2562-codec.c
#include "tas2562.h"
#ifdef CONFIG_TAS25XX_ALGO
+#ifdef CONFIG_PLATFORM_EXYNOS
#include <sound/smart_amp.h>
+#else
+#include <dsp/smart_amp.h>
+#endif /*CONFIG_PLATFORM_EXYNOS*/
#include "tas25xx-calib.h"
#endif /*CONFIG_TAS25XX_ALGO*/
diff --git a/tas2562-regmap.c b/tas2562-regmap.c
index 7d5ab21cdc647db3f88bdffb73f7a7e36ec1bf28..b3bbc55a030f1d983a1398a10765792522fd4f90 100644 (file)
--- a/tas2562-regmap.c
+++ b/tas2562-regmap.c
#include "tas2562-codec.h"
#include "tas2562-misc.h"
#ifdef CONFIG_TAS25XX_ALGO
+#ifdef CONFIG_PLATFORM_EXYNOS
#include <sound/smart_amp.h>
+#else
+#include <dsp/smart_amp.h>
+#endif
#endif /*CONFIG_TAS25XX_ALGO*/
static char p_icn_threshold[] = {0x00, 0x01, 0x2f, 0x2c};
diff --git a/tas25xx-calib.c b/tas25xx-calib.c
index 259b6b9e0eadfb6408a576b71fa59adc834ed0b5..3bb2d3d9dddffe6cce401b71e00e5a1305118c29 100644 (file)
--- a/tas25xx-calib.c
+++ b/tas25xx-calib.c
* AFE_PARAM_ID_ENABLE and AFE_PARAM_ID_SMARTAMP_DEFAULT
*/
- #ifndef PLATFORM_EXYNOS
+ #ifndef CONFIG_PLATFORM_EXYNOS
if (paramid == CAPI_V2_TAS_TX_ENABLE ||
paramid == CAPI_V2_TAS_TX_CFG ||
paramid == CAPI_V2_TAS_RX_ENABLE ||