Merge ee821931e89a915efc3fc2cde733d694b2afc47b on remote branch

Change-Id: I87e8a47bb0a785af70634f0c883b84bcb2623af8
diff --git a/configs/bengal/bengal.mk b/configs/bengal/bengal.mk
index 81ba0b8..e3bc4e4 100644
--- a/configs/bengal/bengal.mk
+++ b/configs/bengal/bengal.mk
@@ -235,10 +235,7 @@
 
 ##fluencetype can be "fluence" or "fluencepro" or "none"
 PRODUCT_PROPERTY_OVERRIDES += \
-ro.qc.sdk.audio.fluencetype=none\
-persist.audio.fluence.voicecall=true\
-persist.audio.fluence.voicerec=false\
-persist.audio.fluence.speaker=true
+ro.qc.sdk.audio.fluencetype=none
 
 #disable tunnel encoding
 PRODUCT_PROPERTY_OVERRIDES += \
@@ -347,10 +344,6 @@
 #enable headset calibration
 PRODUCT_PROPERTY_OVERRIDES += \
 vendor.audio.volume.headset.gain.depcal=true
-
-#enable dualmic fluence for voice communication
-PRODUCT_PROPERTY_OVERRIDES += \
-persist.vendor.audio.fluence.voicecomm=true
 endif
 
 USE_XML_AUDIO_POLICY_CONF := 1
diff --git a/hal/audio_extn/spkr_protection.c b/hal/audio_extn/spkr_protection.c
index 571b4f3..c7f5726 100644
--- a/hal/audio_extn/spkr_protection.c
+++ b/hal/audio_extn/spkr_protection.c
@@ -30,7 +30,7 @@
 /*
 * Changes from Qualcomm Innovation Center are provided under the following license:
 *
-* Copyright (c) 2022 Qualcomm Innovation Center, Inc. All rights reserved.
+* Copyright (c) 2022-2023 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
@@ -1370,8 +1370,10 @@
                         }
                        thermal_fd = open(wsa_path, O_RDONLY);
                        if (thermal_fd > 0) {
-                           if ((ret = read(thermal_fd, buf, sizeof(buf))) >= 0)
+                           if ((ret = read(thermal_fd, buf, sizeof(buf))) >= 0) {
+                               buf[ret-1] = '\0';
                                t0_spk_1 = atoi(buf);
+                           }
                            else
                                ALOGE("%s: read fail for %s err:%d\n",
                                      __func__, wsa_path, ret);
@@ -1404,8 +1406,10 @@
                         }
                         thermal_fd = open(wsa_path, O_RDONLY);
                         if (thermal_fd > 0) {
-                           if ((ret = read(thermal_fd, buf, sizeof(buf))) >= 0)
+                           if ((ret = read(thermal_fd, buf, sizeof(buf))) >= 0) {
+                               buf[ret-1] = '\0';
                                t0_spk_2 = atoi(buf);
+                           }
                            else
                                ALOGE("%s: read fail for %s err:%d\n",
                                      __func__, wsa_path, ret);
diff --git a/hal/msm8974/platform.c b/hal/msm8974/platform.c
index 22c617b..d71ad0f 100644
--- a/hal/msm8974/platform.c
+++ b/hal/msm8974/platform.c
@@ -80,6 +80,7 @@
 #define PLATFORM_INFO_XML_PATH_SHIMA_QRD "audio_platform_info_shimaqrd.xml"
 #define PLATFORM_INFO_XML_PATH_YUPIK_QRD "audio_platform_info_yupikqrd.xml"
 #define PLATFORM_INFO_XML_PATH_YUPIK_IDP "audio_platform_info_yupikidp.xml"
+#define PLATFORM_INFO_XML_PATH_YUPIK_IDPRB3 "audio_platform_info_yupikidprb3.xml"
 #define PLATFORM_INFO_XML_PATH_SCUBA_IDP "audio_platform_info_scubaidp.xml"
 #define PLATFORM_INFO_XML_PATH_SCUBA_QRD "audio_platform_info_scubaqrd.xml"
 #define PLATFORM_INFO_XML_PATH_SA8295_ADP "audio_platform_info_sa8295.xml"
@@ -3673,7 +3674,7 @@
             my_data, PLATFORM);
     } else if (!strncmp(snd_card_name, "lahaina-yupikidprb3-snd-card",
                sizeof("lahaina-yupikidprb3-snd-card"))) {
-        platform_info_init(get_xml_file_path(PLATFORM_INFO_XML_PATH_YUPIK_IDP),
+        platform_info_init(get_xml_file_path(PLATFORM_INFO_XML_PATH_YUPIK_IDPRB3),
             my_data, PLATFORM);
     } else if (!strncmp(snd_card_name, "lahaina-yupikqrd-snd-card",
                sizeof("lahaina-yupikqrd-snd-card"))) {
diff --git a/post_proc/bundle.c b/post_proc/bundle.c
index a9f95b9..b9d310d 100644
--- a/post_proc/bundle.c
+++ b/post_proc/bundle.c
@@ -902,7 +902,8 @@
         }
         if (pCmdData == NULL || cmdSize != 2 * sizeof(uint32_t) ||
                 replySize == NULL || *replySize < 2*sizeof(int32_t)) {
-            return -EINVAL;
+            status = -EINVAL;
+            goto exit;
         }
         memcpy(pReplyData, pCmdData, sizeof(int32_t)*2);
         } break;
@@ -946,7 +947,8 @@
               cmdSize, pCmdData, *replySize, pReplyData);
         if (cmdSize != sizeof(uint32_t) || pCmdData == NULL
                 || pReplyData == NULL || *replySize != sizeof(int)) {
-            return -EINVAL;
+            status = -EINVAL;
+            goto exit;
         }
         uint32_t value = *(uint32_t *)pCmdData;
         if (context->ops.set_hw_acc_mode)