diff --git a/ipc/HwBinders/agm_ipc_client/src/agm_client_wrapper.cpp b/ipc/HwBinders/agm_ipc_client/src/agm_client_wrapper.cpp
index 8570662..f7b7df1 100644
--- a/ipc/HwBinders/agm_ipc_client/src/agm_client_wrapper.cpp
+++ b/ipc/HwBinders/agm_ipc_client/src/agm_client_wrapper.cpp
@@ -1,5 +1,6 @@
 /*
  * Copyright (c) 2019-2021, The Linux Foundation. All rights reserved.
+ * Copyright (c) 2022 Qualcomm Innovation Center, Inc. All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions are
@@ -156,8 +157,7 @@
     ALOGV("%s called audio_intf = %d \n", __func__, audio_intf);
     if (!agm_server_died) {
         android::sp<IAGM> agm_client = get_agm_server();
-        hidl_vec<AgmMediaConfig> media_config_hidl;
-        media_config_hidl.resize(sizeof(struct agm_media_config));
+        hidl_vec<AgmMediaConfig> media_config_hidl(1);
         media_config_hidl.data()->rate = media_config->rate;
         media_config_hidl.data()->channels = media_config->channels;
         media_config_hidl.data()->format = (::vendor::qti::hardware::AGMIPC::V1_0::AgmMediaFormat) media_config->format;
@@ -175,21 +175,18 @@
     ALOGV("%s called with handle = %llx \n", __func__, (unsigned long long)handle);
     if (!agm_server_died) {
         android::sp<IAGM> agm_client = get_agm_server();
-        hidl_vec<AgmSessionConfig> session_config_hidl;
-        session_config_hidl.resize(sizeof(struct agm_session_config));
+        hidl_vec<AgmSessionConfig> session_config_hidl(1);
         memcpy(session_config_hidl.data(),
                session_config,
                sizeof(struct agm_session_config));
 
-        hidl_vec<AgmMediaConfig> media_config_hidl;
-        media_config_hidl.resize(sizeof(struct agm_media_config));
+        hidl_vec<AgmMediaConfig> media_config_hidl(1);
         media_config_hidl.data()->rate = media_config->rate;
         media_config_hidl.data()->channels = media_config->channels;
         media_config_hidl.data()->format = (::vendor::qti::hardware::AGMIPC::V1_0::AgmMediaFormat) media_config->format;
         media_config_hidl.data()->data_format = media_config->data_format;
 
-        hidl_vec<AgmBufferConfig> buffer_config_hidl;
-        buffer_config_hidl.resize(sizeof(struct agm_buffer_config));
+        hidl_vec<AgmBufferConfig> buffer_config_hidl(1);
         buffer_config_hidl.data()->count = buffer_config->count;
         buffer_config_hidl.data()->size = buffer_config->size;
         ALOGV("%s : Exit", __func__);
@@ -598,19 +595,14 @@
     if (!agm_server_died) {
         android::sp<IAGM> agm_client = get_agm_server();
 
-        hidl_vec<AgmTagConfig> tag_cfg_hidl;
-        tag_cfg_hidl.resize(sizeof(struct agm_tag_config) +
-                             (tag_config->num_tkvs)*sizeof(agm_key_value));
+        hidl_vec<AgmTagConfig> tag_cfg_hidl(1);
         tag_cfg_hidl.data()->tag = tag_config->tag;
         tag_cfg_hidl.data()->num_tkvs = tag_config->num_tkvs;
-        AgmKeyValue * ptr = NULL;
-        for (int i=0 ; i < tag_cfg_hidl.data()->num_tkvs ; i++ ) {
-             ptr = (AgmKeyValue *)(tag_cfg_hidl.data()
-                                  + sizeof(struct agm_tag_config)
-                                  + (sizeof(AgmKeyValue) * i));
-             ptr->key = tag_config->kv[i].key;
-             ptr->value = tag_config->kv[i].value;
-    }
+        tag_cfg_hidl.data()->kv.resize(tag_config->num_tkvs);
+        for (int i = 0 ; i < tag_cfg_hidl.data()->num_tkvs ; i++ ) {
+             tag_cfg_hidl.data()->kv[i].key = tag_config->kv[i].key;
+             tag_cfg_hidl.data()->kv[i].value = tag_config->kv[i].value;
+        }
         return agm_client->ipc_agm_set_params_with_tag(session_id,
                                                          aif_id, tag_cfg_hidl);
     }
@@ -641,10 +633,7 @@
     if (!agm_server_died) {
         android::sp<IAGM> agm_client = get_agm_server();
 
-        hidl_vec<AgmEventRegCfg> evt_reg_cfg_hidl;
-        size_t size_local = sizeof(struct agm_event_reg_cfg) +
-                      (evt_reg_cfg->event_config_payload_size);
-        evt_reg_cfg_hidl.resize(size_local);
+        hidl_vec<AgmEventRegCfg> evt_reg_cfg_hidl(1);
 
         evt_reg_cfg_hidl.data()->module_instance_id = evt_reg_cfg->module_instance_id;
         evt_reg_cfg_hidl.data()->event_id = evt_reg_cfg->event_id;
@@ -667,17 +656,12 @@
     if (!agm_server_died) {
         android::sp<IAGM> agm_client = get_agm_server();
 
-        hidl_vec<AgmCalConfig> cal_cfg_hidl;
-        cal_cfg_hidl.resize(sizeof(AgmCalConfig) +
-                            (cal_config->num_ckvs)*sizeof(AgmKeyValue));
+        hidl_vec<AgmCalConfig> cal_cfg_hidl(1);
         cal_cfg_hidl.data()->num_ckvs = cal_config->num_ckvs;
-        AgmKeyValue * ptr = NULL;
-        for (int i=0 ; i < cal_cfg_hidl.data()->num_ckvs ; i++ ) {
-            ptr = (AgmKeyValue *) (cal_cfg_hidl.data() +
-                                   sizeof(struct agm_cal_config) +
-                                   (sizeof(AgmKeyValue)*i));
-            ptr->key = cal_config->kv[i].key;
-            ptr->value = cal_config->kv[i].value;
+        cal_cfg_hidl.data()->kv.resize(cal_config->num_ckvs);
+        for (int i = 0; i < cal_cfg_hidl.data()->num_ckvs; i++) {
+            cal_cfg_hidl.data()->kv[i].key = cal_config->kv[i].key;
+            cal_cfg_hidl.data()->kv[i].value = cal_config->kv[i].value;
         }
         return agm_client->ipc_agm_session_aif_set_cal(session_id, aif_id,
                                                                   cal_cfg_hidl);
@@ -862,34 +846,29 @@
 
     if (!agm_server_died) {
         android::sp<IAGM> agm_client = get_agm_server();
-        hidl_vec<AgmSessionConfig> session_config_hidl;
-        session_config_hidl.resize(sizeof(struct agm_session_config));
+        hidl_vec<AgmSessionConfig> session_config_hidl(1);
         memcpy(session_config_hidl.data(),
                session_config,
                sizeof(struct agm_session_config));
 
-        hidl_vec<AgmMediaConfig> in_media_config_hidl, out_media_config_hidl;
-        in_media_config_hidl.resize(sizeof(struct agm_media_config));
+        hidl_vec<AgmMediaConfig> in_media_config_hidl(1), out_media_config_hidl(1);
         in_media_config_hidl.data()->rate = in_media_config->rate;
         in_media_config_hidl.data()->channels = in_media_config->channels;
         in_media_config_hidl.data()->format =
                        (::vendor::qti::hardware::AGMIPC::V1_0::AgmMediaFormat) in_media_config->format;
         in_media_config_hidl.data()->data_format = in_media_config->data_format;
 
-        out_media_config_hidl.resize(sizeof(struct agm_media_config));
         out_media_config_hidl.data()->rate = out_media_config->rate;
         out_media_config_hidl.data()->channels = out_media_config->channels;
         out_media_config_hidl.data()->format =
                        (::vendor::qti::hardware::AGMIPC::V1_0::AgmMediaFormat) out_media_config->format;
         out_media_config_hidl.data()->data_format = out_media_config->data_format;
 
-        hidl_vec<AgmBufferConfig> in_buffer_config_hidl, out_buffer_config_hidl;
-        in_buffer_config_hidl.resize(sizeof(struct agm_buffer_config));
+        hidl_vec<AgmBufferConfig> in_buffer_config_hidl(1), out_buffer_config_hidl(1);
         in_buffer_config_hidl.data()->count = in_buffer_config->count;
         in_buffer_config_hidl.data()->size = in_buffer_config->size;
         in_buffer_config_hidl.data()->max_metadata_size = in_buffer_config->max_metadata_size;
 
-        out_buffer_config_hidl.resize(sizeof(struct agm_buffer_config));
         out_buffer_config_hidl.data()->count = out_buffer_config->count;
         out_buffer_config_hidl.data()->size = out_buffer_config->size;
         out_buffer_config_hidl.data()->max_metadata_size = out_buffer_config->max_metadata_size;
@@ -913,7 +892,7 @@
     if (!agm_server_died) {
         ALOGV("%s:%d hndl %p",__func__, __LINE__, handle);
         android::sp<IAGM> agm_client = get_agm_server();
-        hidl_vec<AgmBuff> buf_hidl;
+        hidl_vec<AgmBuff> buf_hidl(1);
         native_handle_t *allocHidlHandle = nullptr;
         allocHidlHandle = native_handle_create(1, 1);
         if (!allocHidlHandle) {
@@ -923,7 +902,6 @@
         }
         allocHidlHandle->data[0] = buf->alloc_info.alloc_handle;
         allocHidlHandle->data[1] = buf->alloc_info.alloc_handle;
-        buf_hidl.resize(sizeof(struct agm_buff));
         AgmBuff *agmBuff = buf_hidl.data();
         agmBuff->size = buf->size;
         agmBuff->buffer.resize(buf->size);
@@ -982,8 +960,7 @@
         allocHidlHandle->data[0] = buf->alloc_info.alloc_handle;
         allocHidlHandle->data[1] = buf->alloc_info.alloc_handle;
 
-        hidl_vec<AgmBuff> buf_hidl;
-        buf_hidl.resize(sizeof(struct agm_buff));
+        hidl_vec<AgmBuff> buf_hidl(1);
         AgmBuff *agmBuff = buf_hidl.data();
         agmBuff->size = buf->size;
         agmBuff->metadata_size = buf->metadata_size;
@@ -1034,8 +1011,7 @@
     ALOGV("%s called, group_id = %d \n", __func__, group_id);
     if (!agm_server_died) {
         android::sp<IAGM> agm_client = get_agm_server();
-        hidl_vec<AgmGroupMediaConfig> media_config_hidl;
-        media_config_hidl.resize(sizeof(struct agm_group_media_config));
+        hidl_vec<AgmGroupMediaConfig> media_config_hidl(1);
         media_config_hidl.data()->rate = media_config->config.rate;
         media_config_hidl.data()->channels = media_config->config.channels;
         media_config_hidl.data()->format = (::vendor::qti::hardware::AGMIPC::V1_0::AgmMediaFormat) media_config->config.format;
@@ -1087,8 +1063,7 @@
 
     if (!agm_server_died) {
         android::sp<IAGM> agm_client = get_agm_server();
-        hidl_vec<AgmBuff> buf_hidl;
-        buf_hidl.resize(sizeof(struct agm_buff));
+        hidl_vec<AgmBuff> buf_hidl(1);
         AgmBuff *agmBuff = buf_hidl.data();
         agmBuff->size = buf->size;
         agmBuff->buffer.resize(buf->size);
diff --git a/ipc/HwBinders/agm_ipc_service/src/agm_server_wrapper.cpp b/ipc/HwBinders/agm_ipc_service/src/agm_server_wrapper.cpp
index fa2c6a1..7de89aa 100644
--- a/ipc/HwBinders/agm_ipc_service/src/agm_server_wrapper.cpp
+++ b/ipc/HwBinders/agm_ipc_service/src/agm_server_wrapper.cpp
@@ -1,5 +1,6 @@
 /*
  * Copyright (c) 2019-2021, The Linux Foundation. All rights reserved.
+ * Copyright (c) 2022 Qualcomm Innovation Center, Inc. All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions are
@@ -361,8 +362,8 @@
     sp<IAGMCallback> clbk_bdr = NULL;
     struct listnode *node = NULL;
     struct listnode *tempnode = NULL;
-    hidl_vec<AgmEventCbParams> evt_param_l;
-    hidl_vec<AgmReadWriteEventCbParams> rw_evt_param_hidl;
+    hidl_vec<AgmEventCbParams> evt_param_l(1);
+    hidl_vec<AgmReadWriteEventCbParams> rw_evt_param_hidl(1);
     AgmReadWriteEventCbParams *rw_evt_param = NULL;
     AgmEventReadWriteDonePayload *rw_payload = NULL;
     struct gsl_event_read_write_done_payload *rw_done_payload;
@@ -438,7 +439,6 @@
             ALOGE("%s native_handle_create fails", __func__);
             return;
         }
-        rw_evt_param_hidl.resize(sizeof(struct AgmReadWriteEventCbParams));
         rw_evt_param = rw_evt_param_hidl.data();
         rw_evt_param->source_module_id = evt_param->source_module_id;
         rw_evt_param->event_payload_size = sizeof(struct agm_event_read_write_done_payload);
@@ -476,8 +476,6 @@
         if (allocHidlHandle)
             native_handle_delete(allocHidlHandle);
     } else {
-        evt_param_l.resize(sizeof(struct agm_event_cb_params) +
-                                evt_param->event_payload_size);
         evt_param_l.data()->source_module_id = evt_param->source_module_id;
         evt_param_l.data()->event_payload_size = evt_param->event_payload_size;
         evt_param_l.data()->event_id = evt_param->event_id;
@@ -716,13 +714,9 @@
             return -ENOMEM;
     }
     cal_config_local->num_ckvs = cal_config.data()->num_ckvs;
-    AgmKeyValue * ptr = NULL;
     for (int i=0 ; i < cal_config.data()->num_ckvs ; i++ ) {
-        ptr = (AgmKeyValue *) (cal_config.data() +
-                                             sizeof(struct agm_cal_config) +
-                                             (sizeof(AgmKeyValue)*i));
-        cal_config_local->kv[i].key = ptr->key;
-        cal_config_local->kv[i].value = ptr->value;
+        cal_config_local->kv[i].key = cal_config.data()->kv[i].key;
+        cal_config_local->kv[i].value = cal_config.data()->kv[i].value;
     }
     ret = agm_session_aif_set_cal(session_id, aif_id, cal_config_local);
     free(cal_config_local);
@@ -762,13 +756,9 @@
     }
     tag_config_local->num_tkvs = tag_config.data()->num_tkvs;
     tag_config_local->tag = tag_config.data()->tag;
-    AgmKeyValue * ptr = NULL;
-    for (int i=0 ; i < tag_config.data()->num_tkvs ; i++ ) {
-        ptr = (AgmKeyValue *) (tag_config.data() +
-                                             sizeof(struct agm_tag_config) +
-                                             (sizeof(AgmKeyValue)*i));
-        tag_config_local->kv[i].key = ptr->key;
-        tag_config_local->kv[i].value = ptr->value;
+    for (int i = 0; i < tag_config.data()->num_tkvs; i++) {
+        tag_config_local->kv[i].key = tag_config.data()->kv[i].key;
+        tag_config_local->kv[i].value = tag_config.data()->kv[i].value;
     }
     ret = agm_set_params_with_tag(session_id, aif_id, tag_config_local);
     free(tag_config_local);
@@ -824,13 +814,12 @@
                                        ipc_agm_session_open_cb _hidl_cb) {
     uint64_t handle = 0;
     agm_client_session_handle *session_handle = NULL;
-    hidl_vec<uint64_t> handle_ret;
+    hidl_vec<uint64_t> handle_ret(1);
     int32_t ret = -EINVAL;
     enum agm_session_mode session_mode = (enum agm_session_mode) sess_mode;
 
     ALOGV("%s: session_id=%d session_mode=%d\n", __func__, session_id,
               session_mode);
-    handle_ret.resize(sizeof(uint64_t));
     pthread_mutex_lock(&client_list_lock);
     session_handle = get_session_handle_l(session_id);
     pthread_mutex_unlock(&client_list_lock);
@@ -1046,7 +1035,7 @@
     }
     size_t num_aif_info_ret = (size_t) num_aif_info;
     ret = agm_get_aif_info_list(aif_list, &num_aif_info_ret);
-    aif_list_ret.resize(sizeof(struct aif_info) * num_aif_info);
+    aif_list_ret.resize(num_aif_info);
     if ( aif_list != NULL) {
         for (int i=0 ; i<num_aif_info ; i++) {
             aif_list_ret.data()[i].aif_name = aif_list[i].aif_name;
@@ -1402,7 +1391,7 @@
 {
     struct agm_buff buf;
     int32_t ret = 0;
-    hidl_vec<AgmBuff> outBuff_hidl;
+    hidl_vec<AgmBuff> outBuff_hidl(1);
     uint32_t bufSize;
     uint32_t captured_size = captured_sz;
     const native_handle *allochandle = nullptr;
@@ -1429,7 +1418,6 @@
     ALOGV("%s:%d sz %d", __func__,__LINE__,bufSize);
     ret = agm_session_read_with_metadata(hndl, &buf, &captured_size);
     if (ret > 0) {
-        outBuff_hidl.resize(sizeof(struct agm_buff));
         outBuff_hidl.data()->size = (uint32_t)buf.size;
         outBuff_hidl.data()->buffer.resize(buf.size);
         memcpy(outBuff_hidl.data()->buffer.data(), buf.addr,
@@ -1488,7 +1476,7 @@
     }
     size_t num_aif_groups_ret = (size_t) num_groups;
     ret = agm_get_group_aif_info_list(aif_list, &num_aif_groups_ret);
-    aif_list_ret.resize(sizeof(struct aif_info) * num_groups);
+    aif_list_ret.resize(num_groups);
     if (aif_list != NULL) {
         for (int i = 0; i < num_groups ; i++) {
             aif_list_ret.data()[i].aif_name = aif_list[i].aif_name;
diff --git a/ipc/SwBinders/agm_client/Makefile.am b/ipc/SwBinders/agm_client/Makefile.am
index e361e12..621cb7a 100644
--- a/ipc/SwBinders/agm_client/Makefile.am
+++ b/ipc/SwBinders/agm_client/Makefile.am
@@ -1,9 +1,9 @@
 
 AM_CPPFLAGS := -I $(top_srcdir) -I $(PKG_CONFIG_SYSROOT_DIR)/usr/include/agm/
 AM_CPPFLAGS += -DDYNAMIC_LOG_ENABLED
-lib_LTLIBRARIES      = libagmclient.la
-libagmclient_ladir = $(libdir)
-libagmclient_la_SOURCES   = src/agm_client_wrapper.cpp
-libagmclient_la_CPPFLAGS := $(AM_CPPFLAGS)
-libagmclient_la_LDFLAGS   = -lcutils -llog -ldl -lbinder -shared -avoid-version -lutils -lrt
-libagmclient_la_LIBADD     =  -lagmproxy -laudio_log_utils
+lib_LTLIBRARIES      = libagmclientwrapper.la
+libagmclientwrapper_ladir = $(libdir)
+libagmclientwrapper_la_SOURCES   = src/agm_client_wrapper.cpp
+libagmclientwrapper_la_CPPFLAGS := $(AM_CPPFLAGS)
+libagmclientwrapper_la_LDFLAGS   = -lcutils -llog -ldl -lbinder -shared -avoid-version -lutils -lrt
+libagmclientwrapper_la_LIBADD     =  -lagmproxy -laudio_log_utils
diff --git a/ipc/SwBinders/agm_client/src/agm_client_wrapper.cpp b/ipc/SwBinders/agm_client/src/agm_client_wrapper.cpp
index fd7a49e..9d43cc5 100644
--- a/ipc/SwBinders/agm_client/src/agm_client_wrapper.cpp
+++ b/ipc/SwBinders/agm_client/src/agm_client_wrapper.cpp
@@ -25,6 +25,39 @@
 ** WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
 ** OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
 ** IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * Changes from Qualcomm Innovation Center are provided under the following license:
+ * Copyright (c) 2022 Qualcomm Innovation Center, Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted (subject to the limitations in the
+ * disclaimer below) provided that the following conditions are met:
+ *
+ *   * Redistributions of source code must retain the above copyright
+ *     notice, this list of conditions and the following disclaimer.
+ *
+ *   * Redistributions in binary form must reproduce the above
+ *     copyright notice, this list of conditions and the following
+ *     disclaimer in the documentation and/or other materials provided
+ *     with the distribution.
+ *
+ *   * Neither the name of Qualcomm Innovation Center, Inc. nor the names of its
+ *     contributors may be used to endorse or promote products derived
+ *     from this software without specific prior written permission.
+ *
+ * NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE
+ * GRANTED BY THIS LICENSE. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT
+ * HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+ * IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
+ * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
+ * GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER
+ * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+ * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
+ * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 **/
 
 #define LOG_TAG "agm_client_wrapper"
@@ -85,7 +118,7 @@
     proc->startThreadPool();
 }
 
-void server_death_notifier::binderDied(const wp<IBinder>& who __unused)
+void server_death_notifier::binderDied(const wp<IBinder>& who __attribute__((unused)))
 {
     agm_server_died = true;
     AGM_LOGE("Agm server died !! and I am notified\n");
diff --git a/ipc/SwBinders/agm_server/inc/agm_server_wrapper.h b/ipc/SwBinders/agm_server/inc/agm_server_wrapper.h
index fb31fbe..f0ed0fc 100644
--- a/ipc/SwBinders/agm_server/inc/agm_server_wrapper.h
+++ b/ipc/SwBinders/agm_server/inc/agm_server_wrapper.h
@@ -25,6 +25,39 @@
 ** WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
 ** OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
 ** IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * Changes from Qualcomm Innovation Center are provided under the following license:
+ * Copyright (c) 2022 Qualcomm Innovation Center, Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted (subject to the limitations in the
+ * disclaimer below) provided that the following conditions are met:
+ *
+ *   * Redistributions of source code must retain the above copyright
+ *     notice, this list of conditions and the following disclaimer.
+ *
+ *   * Redistributions in binary form must reproduce the above
+ *     copyright notice, this list of conditions and the following
+ *     disclaimer in the documentation and/or other materials provided
+ *     with the distribution.
+ *
+ *   * Neither the name of Qualcomm Innovation Center, Inc. nor the names of its
+ *     contributors may be used to endorse or promote products derived
+ *     from this software without specific prior written permission.
+ *
+ * NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE
+ * GRANTED BY THIS LICENSE. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT
+ * HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+ * IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
+ * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
+ * GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER
+ * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+ * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
+ * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 **/
 
 
@@ -88,9 +121,6 @@
         virtual int ipc_agm_set_params_with_tag(uint32_t session_id,
                                      uint32_t aif_id,
                                      struct agm_tag_config *tag_config);
-        virtual int ipc_agm_set_params_with_tag_to_acdb(uint32_t session_id,
-                                     uint32_t aif_id, void *payload,
-                                     size_t size);
         virtual int ipc_agm_session_register_for_events(uint32_t session_id,
                                      struct agm_event_reg_cfg *evt_reg_cfg);
         virtual int ipc_agm_session_register_cb(uint32_t session_id,
diff --git a/ipc/SwBinders/agm_server/inc/ipc_interface.h b/ipc/SwBinders/agm_server/inc/ipc_interface.h
index c3bd023..cbbd0e1 100644
--- a/ipc/SwBinders/agm_server/inc/ipc_interface.h
+++ b/ipc/SwBinders/agm_server/inc/ipc_interface.h
@@ -25,6 +25,39 @@
 ** WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
 ** OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
 ** IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * Changes from Qualcomm Innovation Center are provided under the following license:
+ * Copyright (c) 2022 Qualcomm Innovation Center, Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted (subject to the limitations in the
+ * disclaimer below) provided that the following conditions are met:
+ *
+ *   * Redistributions of source code must retain the above copyright
+ *     notice, this list of conditions and the following disclaimer.
+ *
+ *   * Redistributions in binary form must reproduce the above
+ *     copyright notice, this list of conditions and the following
+ *     disclaimer in the documentation and/or other materials provided
+ *     with the distribution.
+ *
+ *   * Neither the name of Qualcomm Innovation Center, Inc. nor the names of its
+ *     contributors may be used to endorse or promote products derived
+ *     from this software without specific prior written permission.
+ *
+ * NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE
+ * GRANTED BY THIS LICENSE. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT
+ * HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+ * IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
+ * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
+ * GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER
+ * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+ * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
+ * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 **/
 
 #ifndef __AGM_SERVER_INTERFACE_H__
@@ -100,9 +133,6 @@
         virtual int ipc_agm_set_params_with_tag(uint32_t session_id,
                                     uint32_t aif_id,
                                     struct agm_tag_config *tag_config) = 0;
-        virtual int ipc_agm_set_params_with_tag_to_acdb(uint32_t session_id,
-                                    uint32_t aif_id,
-                                    void* payload, size_t size) = 0;
         virtual int ipc_agm_session_set_ec_ref(uint32_t capture_session_id,
                                     uint32_t aif_id, bool state) = 0;
         virtual int ipc_agm_session_aif_set_cal(
diff --git a/ipc/SwBinders/agm_server/src/ipc_proxy_server.cpp b/ipc/SwBinders/agm_server/src/ipc_proxy_server.cpp
index cf66eb7..bedb56e 100644
--- a/ipc/SwBinders/agm_server/src/ipc_proxy_server.cpp
+++ b/ipc/SwBinders/agm_server/src/ipc_proxy_server.cpp
@@ -25,6 +25,39 @@
 ** WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
 ** OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
 ** IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * Changes from Qualcomm Innovation Center are provided under the following license:
+ * Copyright (c) 2022 Qualcomm Innovation Center, Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted (subject to the limitations in the
+ * disclaimer below) provided that the following conditions are met:
+ *
+ *   * Redistributions of source code must retain the above copyright
+ *     notice, this list of conditions and the following disclaimer.
+ *
+ *   * Redistributions in binary form must reproduce the above
+ *     copyright notice, this list of conditions and the following
+ *     disclaimer in the documentation and/or other materials provided
+ *     with the distribution.
+ *
+ *   * Neither the name of Qualcomm Innovation Center, Inc. nor the names of its
+ *     contributors may be used to endorse or promote products derived
+ *     from this software without specific prior written permission.
+ *
+ * NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE
+ * GRANTED BY THIS LICENSE. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT
+ * HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+ * IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
+ * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
+ * GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER
+ * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+ * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
+ * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 **/
 
 #define LOG_TAG "ipc_proxy"
@@ -511,22 +544,14 @@
          int count = *size;
 
          data.writeInterfaceToken(IAgmService::getInterfaceDescriptor());
-         if (payload == NULL) {
-             data.writeInt64((long)payload);
-             data.writeUint32(count);
-             data.writeUint32(session_id);
-             data.writeUint32(aif_id);
-             remote()->transact(GET_TAG_MODULE_INFO, data, &reply);
-             *size = reply.readInt32();
-             return  reply.readInt32();
-         } else if (payload != NULL && count != 0) {
+         if (payload != NULL && count != 0) {
              android::Parcel::ReadableBlob tag_info_blob;
 
-             data.writeInt64((long)payload);
              data.writeUint32(count);
              data.writeUint32(session_id);
              data.writeUint32(aif_id);
              remote()->transact(GET_TAG_MODULE_INFO, data, &reply);
+             count = (size_t) reply.readUint32();
              reply.readBlob(count, &tag_info_blob);
              memcpy(payload, tag_info_blob.data(), count);
              tag_info_blob.release();
@@ -1177,16 +1202,10 @@
         size_t count = 0;
         void *bn_payload = NULL;
 
-        bn_payload = (void*)data.readInt64();
         count = (size_t) data.readUint32();
         pcm_idx = data.readUint32();
         be_idx = data.readUint32();
-        if (bn_payload == NULL) {
-            rc = ipc_agm_session_aif_get_tag_module_info(pcm_idx, be_idx, NULL,
-                                                                       &count);
-            reply->writeInt32(count);
-            reply->writeInt32(rc);
-        } else if (count != 0){
+        if (count != 0){
             bn_payload = calloc(count, sizeof(uint8_t));
             if (bn_payload == NULL) {
                 AGM_LOGE("calloc failed\n");
@@ -1195,6 +1214,7 @@
             rc = ipc_agm_session_aif_get_tag_module_info(pcm_idx, be_idx,
                                                      bn_payload, &count);
             android::Parcel::WritableBlob tag_info_blob;
+            reply->writeUint32(count);
             reply->writeBlob(count, false, &tag_info_blob);
             memcpy(tag_info_blob.data(), bn_payload, count);
             tag_info_blob.release();
@@ -1402,9 +1422,9 @@
 
     case SET_GAPLESS_SESSION_METADATA : {
         uint64_t handle = (uint64_t )data.readInt64();
-        uint32_t type = data.readUint32();
+        agm_gapless_silence_type type = (agm_gapless_silence_type) data.readUint32();
         uint32_t silence = data.readUint32();
-        rc = ipc_agm_set_gapless_session_metadata(handle, init_silence, trail_silence);
+        rc = ipc_agm_set_gapless_session_metadata(handle, type, silence);
         reply->writeInt32(rc);
         break; }
 
diff --git a/plugins/tinyalsa/Makefile.am b/plugins/tinyalsa/Makefile.am
index c82e5f2..7815088 100644
--- a/plugins/tinyalsa/Makefile.am
+++ b/plugins/tinyalsa/Makefile.am
@@ -7,7 +7,7 @@
 AM_CFLAGS := -Wno-unused-parameter
 if !BUILDSYSTEM_OPENWRT
 AM_CFLAGS += -I $(top_srcdir)/include @AGM_CFLAGS@
-AM_CFLAGS += @GLIB_CFLAGS@ -Dstrlcpy=g_strlcpy -Dstrlcat=g_strlcat
+AM_CFLAGS += @GLIB_CFLAGS@ -Dstrlcpy=g_strlcpy -Dstrlcat=g_strlcat -include glib.h
 AM_CFLAGS += -D__unused=__attribute__\(\(__unused__\)\) -DLINUX_ENABLED
 AM_CFLAGS += @SNDPARSER_CFLAGS@
 AM_CFLAGS += -Wno-unused-parameter
@@ -22,7 +22,7 @@
 if BUILDSYSTEM_OPENWRT
 libagm_pcm_plugin_la_LDFLAGS += -lagm
 else
-libagm_pcm_plugin_la_LDFLAGS += -lagm -laudio_log_utils
+libagm_pcm_plugin_la_LDFLAGS += -lagmclientwrapper -laudio_log_utils
 endif
 
 lib_LTLIBRARIES      += libagm_pcm_passthrough_plugin.la
@@ -40,7 +40,7 @@
 lib_LTLIBRARIES      += libagm_compress_plugin.la
 libagm_compress_plugin_la_SOURCES   = src/agm_compress_plugin.c
 libagm_compress_plugin_la_CFLAGS := $(AM_CFLAGS)
-libagm_compress_plugin_la_LDFLAGS   = -ltinyalsa -ltinycompress -lsndcardparser -lpthread  -avoid-version -laudio_log_utils -shared -lagm
+libagm_compress_plugin_la_LDFLAGS   = -ltinyalsa -ltinycompress -lsndcardparser -lpthread  -avoid-version -laudio_log_utils -shared -lagmclientwrapper
 
 lib_LTLIBRARIES      += libagm_compress_passthrough_plugin.la
 libagm_compress_passthrough_plugin_la_SOURCES   = src/agm_compress_plugin.c
@@ -55,7 +55,7 @@
 if BUILDSYSTEM_OPENWRT
 libagm_mixer_plugin_la_LDFLAGS += -lagm
 else
-libagm_mixer_plugin_la_LDFLAGS += -lagm -laudio_log_utils
+libagm_mixer_plugin_la_LDFLAGS += -lagmclientwrapper -laudio_log_utils
 endif
 
 lib_LTLIBRARIES      += libagm_mixer_passthrough_plugin.la
