techpack: audio: revert PERSISTENT_CAL additions
Change-Id: Ie033b46a001f1c8fb0527dec2b22aeba046963dd
Signed-off-by: Alexander Martinz <amartinz@shiftphones.com>
diff --git a/techpack/audio/dsp/audio_cal_utils.c b/techpack/audio/dsp/audio_cal_utils.c
index 703c180..c54e4ae 100644
--- a/techpack/audio/dsp/audio_cal_utils.c
+++ b/techpack/audio/dsp/audio_cal_utils.c
@@ -65,7 +65,6 @@ size_t get_cal_info_size(int32_t cal_type)
break;
case ADM_AUDPROC_CAL_TYPE:
case ADM_LSM_AUDPROC_CAL_TYPE:
- case ADM_LSM_AUDPROC_PERSISTENT_CAL_TYPE:
size = sizeof(struct audio_cal_info_audproc);
break;
case ADM_AUDVOL_CAL_TYPE:
@@ -216,7 +215,6 @@ size_t get_user_cal_type_size(int32_t cal_type)
break;
case ADM_AUDPROC_CAL_TYPE:
case ADM_LSM_AUDPROC_CAL_TYPE:
- case ADM_LSM_AUDPROC_PERSISTENT_CAL_TYPE:
size = sizeof(struct audio_cal_type_audproc);
break;
case ADM_AUDVOL_CAL_TYPE:
diff --git a/techpack/audio/dsp/q6adm.c b/techpack/audio/dsp/q6adm.c
index 89d845b..4bb6381 100644
--- a/techpack/audio/dsp/q6adm.c
+++ b/techpack/audio/dsp/q6adm.c
@@ -1,4 +1,4 @@
-/* Copyright (c) 2012-2019, 2020, The Linux Foundation. All rights reserved.
+/* Copyright (c) 2012-2019, The Linux Foundation. All rights reserved.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 and
@@ -2038,8 +2038,7 @@ static struct cal_block_data *adm_find_cal_by_path(int cal_index, int path)
continue;
if (cal_index == ADM_AUDPROC_CAL ||
- cal_index == ADM_LSM_AUDPROC_CAL ||
- cal_index == ADM_LSM_AUDPROC_PERSISTENT_CAL) {
+ cal_index == ADM_LSM_AUDPROC_CAL) {
audproc_cal_info = cal_block->cal_info;
if ((audproc_cal_info->path == path) &&
(cal_block->cal_data.size > 0))
@@ -2076,8 +2075,7 @@ static struct cal_block_data *adm_find_cal_by_app_type(int cal_index, int path,
continue;
if (cal_index == ADM_AUDPROC_CAL ||
- cal_index == ADM_LSM_AUDPROC_CAL ||
- cal_index == ADM_LSM_AUDPROC_PERSISTENT_CAL) {
+ cal_index == ADM_LSM_AUDPROC_CAL) {
audproc_cal_info = cal_block->cal_info;
if ((audproc_cal_info->path == path) &&
(audproc_cal_info->app_type == app_type) &&
@@ -2117,8 +2115,7 @@ static struct cal_block_data *adm_find_cal(int cal_index, int path,
continue;
if (cal_index == ADM_AUDPROC_CAL ||
- cal_index == ADM_LSM_AUDPROC_CAL ||
- cal_index == ADM_LSM_AUDPROC_PERSISTENT_CAL) {
+ cal_index == ADM_LSM_AUDPROC_CAL) {
audproc_cal_info = cal_block->cal_info;
if ((audproc_cal_info->path == path) &&
(audproc_cal_info->app_type == app_type) &&
@@ -2207,18 +2204,12 @@ static void send_adm_cal(int port_id, int copp_idx, int path, int perf_mode,
{
pr_debug("%s: port id 0x%x copp_idx %d\n", __func__, port_id, copp_idx);
- if (passthr_mode != LISTEN) {
+ if (passthr_mode != LISTEN)
send_adm_cal_type(ADM_AUDPROC_CAL, path, port_id, copp_idx,
perf_mode, app_type, acdb_id, sample_rate);
- } else {
+ else
send_adm_cal_type(ADM_LSM_AUDPROC_CAL, path, port_id, copp_idx,
perf_mode, app_type, acdb_id, sample_rate);
-
- send_adm_cal_type(ADM_LSM_AUDPROC_PERSISTENT_CAL, path,
- port_id, copp_idx, perf_mode, app_type,
- acdb_id, sample_rate);
- }
-
send_adm_cal_type(ADM_AUDVOL_CAL, path, port_id, copp_idx, perf_mode,
app_type, acdb_id, sample_rate);
}
@@ -3298,9 +3289,6 @@ static int get_cal_type_index(int32_t cal_type)
case ADM_RTAC_AUDVOL_CAL_TYPE:
ret = ADM_RTAC_AUDVOL_CAL;
break;
- case ADM_LSM_AUDPROC_PERSISTENT_CAL_TYPE:
- ret = ADM_LSM_AUDPROC_PERSISTENT_CAL;
- break;
default:
pr_err("%s: invalid cal type %d!\n", __func__, cal_type);
}
@@ -3522,12 +3510,6 @@ static int adm_init_cal_data(void)
adm_set_cal, NULL, NULL} },
{adm_map_cal_data, adm_unmap_cal_data,
cal_utils_match_buf_num} },
-
- {{ADM_LSM_AUDPROC_PERSISTENT_CAL_TYPE,
- {adm_alloc_cal, adm_dealloc_cal, NULL,
- adm_set_cal, NULL, NULL} },
- {adm_map_cal_data, adm_unmap_cal_data,
- cal_utils_match_buf_num} },
};
pr_debug("%s:\n", __func__);
@@ -4211,13 +4193,6 @@ int adm_store_cal_data(int port_id, int copp_idx, int path, int perf_mode,
rc = -ENOMEM;
goto unlock;
}
- } else if (cal_index == ADM_LSM_AUDPROC_PERSISTENT_CAL) {
- if (cal_block->cal_data.size > AUD_PROC_PERSIST_BLOCK_SIZE) {
- pr_err("%s:persist invalid size exp/actual[%zd, %d]\n",
- __func__, cal_block->cal_data.size, *size);
- rc = -ENOMEM;
- goto unlock;
- }
} else if (cal_index == ADM_AUDVOL_CAL) {
if (cal_block->cal_data.size > AUD_VOL_BLOCK_SIZE) {
pr_err("%s:aud_vol:invalid size exp/actual[%zd, %d]\n",
diff --git a/techpack/audio/include/dsp/q6adm-v2.h b/techpack/audio/include/dsp/q6adm-v2.h
index 91b3724..69de7c9 100644
--- a/techpack/audio/include/dsp/q6adm-v2.h
+++ b/techpack/audio/include/dsp/q6adm-v2.h
@@ -1,4 +1,4 @@
-/* Copyright (c) 2012-2018, 2020, The Linux Foundation. All rights reserved.
+/* Copyright (c) 2012-2018, The Linux Foundation. All rights reserved.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 and
@@ -27,7 +27,6 @@
((MAX_MODULES_IN_TOPO + 1) * sizeof(uint32_t))
#define AUD_PROC_BLOCK_SIZE 4096
#define AUD_VOL_BLOCK_SIZE 4096
-#define AUD_PROC_PERSIST_BLOCK_SIZE (2 * 1024 * 1020)
#define AUDIO_RX_CALIBRATION_SIZE (AUD_PROC_BLOCK_SIZE + \
AUD_VOL_BLOCK_SIZE)
enum {
@@ -39,7 +38,6 @@ enum {
ADM_RTAC_APR_CAL,
ADM_SRS_TRUMEDIA,
ADM_RTAC_AUDVOL_CAL,
- ADM_LSM_AUDPROC_PERSISTENT_CAL,
ADM_MAX_CAL_TYPES
};
diff --git a/techpack/audio/include/uapi/linux/msm_audio_calibration.h b/techpack/audio/include/uapi/linux/msm_audio_calibration.h
index c5811d0..3b97ab2 100644
--- a/techpack/audio/include/uapi/linux/msm_audio_calibration.h
+++ b/techpack/audio/include/uapi/linux/msm_audio_calibration.h
@@ -103,7 +103,6 @@ enum {
AFE_LSM_TX_CAL_TYPE,
ADM_LSM_TOPOLOGY_CAL_TYPE,
ADM_LSM_AUDPROC_CAL_TYPE,
- ADM_LSM_AUDPROC_PERSISTENT_CAL_TYPE,
MAX_CAL_TYPES,
};
@@ -116,7 +115,6 @@ enum {
#define AFE_LSM_TX_CAL_TYPE AFE_LSM_TX_CAL_TYPE
#define ADM_LSM_TOPOLOGY_CAL_TYPE ADM_LSM_TOPOLOGY_CAL_TYPE
#define ADM_LSM_AUDPROC_CAL_TYPE ADM_LSM_AUDPROC_CAL_TYPE
-#define ADM_LSM_AUDPROC_PERSISTENT_CAL_TYPE ADM_LSM_AUDPROC_PERSISTENT_CAL_TYPE
#define LSM_CAL_TYPES
#define TOPOLOGY_SPECIFIC_CHANNEL_INFO