diff --git a/configs/anorak/audio-modules.mk b/configs/anorak/audio-modules.mk
index c8e2fdc..bfd294f 100644
--- a/configs/anorak/audio-modules.mk
+++ b/configs/anorak/audio-modules.mk
@@ -161,4 +161,8 @@
     vendor.qti.hardware.ListenSoundModel@1.0 \
     vendor.qti.hardware.ListenSoundModel@1.0-impl
 
+#usb recorder
+AUDIO_MODULES += \
+    vendor.qti.hardware.umd@1.0-service \
+    libumd-adaptor
 endif
diff --git a/configs/kalama/audio-modules.mk b/configs/kalama/audio-modules.mk
index cb1a8cc..1c11240 100644
--- a/configs/kalama/audio-modules.mk
+++ b/configs/kalama/audio-modules.mk
@@ -86,6 +86,11 @@
     AUDIO_MODULES += IDP_UPD_workspaceFileXml.qwsp
     AUDIO_MODULES += GRD_acdb_cal.acdb
     AUDIO_MODULES += GRD_workspaceFileXml.qwsp
+    AUDIO_MODULES += RB5_GEN2_DVT_acdb_cal.acdb
+    AUDIO_MODULES += RB5_GEN2_DVT_workspaceFileXml.qwsp
+    AUDIO_MODULES += ffv__5.0.2_0.1__eai_2.10_enpu.pmd
+    AUDIO_MODULES += AIM_acdb_cal.acdb
+    AUDIO_MODULES += AIM_workspaceFileXml.qwsp
 endif
 ifeq ($(call is-board-platform-in-list,crow),true)
     AUDIO_MODULES += audio.primary.crow
diff --git a/configs/kalama/kalama.mk b/configs/kalama/kalama.mk
index 7196d11..1c3e9c7 100644
--- a/configs/kalama/kalama.mk
+++ b/configs/kalama/kalama.mk
@@ -129,17 +129,21 @@
     $(CONFIG_HAL_SRC_DIR)/microphone_characteristics.xml:$(TARGET_COPY_OUT_VENDOR)/etc/microphone_characteristics.xml \
     $(CONFIG_PAL_SRC_DIR)/card-defs.xml:$(TARGET_COPY_OUT_VENDOR)/etc/card-defs.xml \
     $(CONFIG_PAL_SRC_DIR)/mixer_paths_kalama_qrd.xml:$(CONFIG_SKU_OUT_DIR)/mixer_paths_kalama_qrd.xml \
+    $(CONFIG_PAL_SRC_DIR)/mixer_paths_kalama_aim.xml:$(CONFIG_SKU_OUT_DIR)/mixer_paths_kalama_aim.xml \
     $(CONFIG_PAL_SRC_DIR)/mixer_paths_kalama_mtp.xml:$(CONFIG_SKU_OUT_DIR)/mixer_paths_kalama_mtp.xml \
     $(CONFIG_PAL_SRC_DIR)/mixer_paths_kalama_mtp_apq.xml:$(CONFIG_SKU_OUT_DIR)/mixer_paths_kalama_mtp_apq.xml \
     $(CONFIG_PAL_SRC_DIR)/mixer_paths_kalama_cdp.xml:$(CONFIG_SKU_OUT_DIR)/mixer_paths_kalama_cdp.xml \
     $(CONFIG_PAL_SRC_DIR)/mixer_paths_kalama_cdp_apq.xml:$(CONFIG_SKU_OUT_DIR)/mixer_paths_kalama_cdp_apq.xml \
     $(CONFIG_PAL_SRC_DIR)/mixer_paths_kalama_cdp_wsa883x.xml:$(CONFIG_SKU_OUT_DIR)/mixer_paths_kalama_cdp_wsa883x.xml \
     $(CONFIG_PAL_SRC_DIR)/mixer_paths_kalama_grd.xml:$(CONFIG_SKU_OUT_DIR)/mixer_paths_kalama_grd.xml \
+    $(CONFIG_PAL_SRC_DIR)/mixer_paths_kalama_rb5_gen2_dvt.xml:$(CONFIG_SKU_OUT_DIR)/mixer_paths_kalama_rb5_gen2_dvt.xml \
     $(CONFIG_PAL_SRC_DIR)/resourcemanager_kalama_qrd.xml:$(CONFIG_SKU_OUT_DIR)/resourcemanager_kalama_qrd.xml \
+    $(CONFIG_PAL_SRC_DIR)/resourcemanager_kalama_aim.xml:$(CONFIG_SKU_OUT_DIR)/resourcemanager_kalama_aim.xml \
     $(CONFIG_PAL_SRC_DIR)/resourcemanager_kalama_mtp.xml:$(CONFIG_SKU_OUT_DIR)/resourcemanager_kalama_mtp.xml \
     $(CONFIG_PAL_SRC_DIR)/resourcemanager_kalama_mtp_apq.xml:$(CONFIG_SKU_OUT_DIR)/resourcemanager_kalama_mtp_apq.xml \
     $(CONFIG_PAL_SRC_DIR)/resourcemanager_kalama_cdp.xml:$(CONFIG_SKU_OUT_DIR)/resourcemanager_kalama_cdp.xml \
     $(CONFIG_PAL_SRC_DIR)/resourcemanager_kalama_cdp_apq.xml:$(CONFIG_SKU_OUT_DIR)/resourcemanager_kalama_cdp_apq.xml \
+    $(CONFIG_PAL_SRC_DIR)/resourcemanager_kalama_rb5_gen2_dvt.xml:$(CONFIG_SKU_OUT_DIR)/resourcemanager_kalama_rb5_gen2_dvt.xml \
     $(CONFIG_PAL_SRC_DIR)/usecaseKvManager.xml:$(TARGET_COPY_OUT_VENDOR)/etc/usecaseKvManager.xml \
     $(CONFIG_PAL_SRC_DIR)/resourcemanager_kalama_grd.xml:$(CONFIG_SKU_OUT_DIR)/resourcemanager_kalama_grd.xml \
     vendor/qcom/opensource/audio-hal/primary-hal/configs/common/media_codecs_vendor_audio.xml:$(TARGET_COPY_OUT_VENDOR)/etc/media_codecs_vendor_audio.xml \
diff --git a/hal/AudioStream.cpp b/hal/AudioStream.cpp
index 0bec4fc..3c88c56 100644
--- a/hal/AudioStream.cpp
+++ b/hal/AudioStream.cpp
@@ -2456,6 +2456,7 @@
 
                 if (ret<0){
                     AHAL_ERR("Error usb device is not connected");
+                    mAndroidOutDevices.clear();
                     ret = -ENOSYS;
                     goto done;
                 }
@@ -4503,6 +4504,7 @@
 
                 if (ret<0) {
                     AHAL_ERR("Error usb device is not connected");
+                    mAndroidInDevices.clear();
                     ret = -ENOSYS;
                     goto done;
                 }
diff --git a/hal/audio_extn/Android.mk b/hal/audio_extn/Android.mk
index bb4351e..20ddb5e 100644
--- a/hal/audio_extn/Android.mk
+++ b/hal/audio_extn/Android.mk
@@ -94,6 +94,12 @@
     -Wno-unused-function \
     -Wno-unused-variable
 
+# Define HEALTH_AIDL for targets other than anorak.
+ifneq ($(TARGET_BOARD_PLATFORM), anorak)
+    LOCAL_CFLAGS += -DHEALTH_AIDL
+    $(warning "Using AIDL HEALTH")
+endif
+
 LOCAL_SHARED_LIBRARIES := \
     android.hardware.health@1.0 \
     android.hardware.health@2.0 \
@@ -109,6 +115,12 @@
     liblog \
     libutils \
 
+ifneq ($(TARGET_BOARD_PLATFORM), anorak)
+    LOCAL_SHARED_LIBRARIES += \
+        android.hardware.health-V1-ndk \
+        libbinder_ndk
+endif
+
 LOCAL_STATIC_LIBRARIES := libhealthhalutils
 
 include $(BUILD_SHARED_LIBRARY)
diff --git a/hal/audio_extn/battery_listener.cpp b/hal/audio_extn/battery_listener.cpp
index 9c6b338..1250e78 100644
--- a/hal/audio_extn/battery_listener.cpp
+++ b/hal/audio_extn/battery_listener.cpp
@@ -28,23 +28,45 @@
 *
 * 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.
 * SPDX-License-Identifier: BSD-3-Clause-Clear
 */
 #define LOG_TAG "audio_hw::BatteryListener"
 #include <log/log.h>
+#ifdef HEALTH_AIDL
 #include <android/binder_manager.h>
 #include <aidl/android/hardware/health/IHealth.h>
 #include <aidl/android/hardware/health/IHealthInfoCallback.h>
 #include <aidl/android/hardware/health/BnHealthInfoCallback.h>
+#else
+#include <android/hidl/manager/1.0/IServiceManager.h>
+#include <android/hardware/health/2.1/IHealth.h>
+#include <android/hardware/health/2.1/IHealthInfoCallback.h>
+#include <healthhalutils/HealthHalUtils.h>
+#include <hidl/HidlTransportSupport.h>
+#endif
+
 #include <thread>
 #include "battery_listener.h"
 
+#ifdef HEALTH_AIDL
 using aidl::android::hardware::health::BatteryStatus;
 using aidl::android::hardware::health::HealthInfo;
 using aidl::android::hardware::health::IHealthInfoCallback;
 using aidl::android::hardware::health::BnHealthInfoCallback;
 using aidl::android::hardware::health::IHealth;
+#else
+using android::hardware::interfacesEqual;
+using android::hardware::Return;
+using android::hardware::Void;
+using android::hardware::health::V1_0::BatteryStatus;
+using android::hardware::health::V1_0::toString;
+using android::hardware::health::V2_1::HealthInfo;
+using android::hardware::health::V2_1::IHealthInfoCallback;
+using android::hardware::health::V2_1::IHealth;
+using android::hardware::health::V2_0::Result;
+using android::hidl::manager::V1_0::IServiceManager;
+#endif
 using namespace std::literals::chrono_literals;
 
 namespace android {
@@ -52,6 +74,7 @@
 #define GET_HEALTH_SVC_RETRY_CNT 5
 #define GET_HEALTH_SVC_WAIT_TIME_MS 500
 
+#ifdef HEALTH_AIDL
 struct BatteryListenerImpl : public BnHealthInfoCallback {
     typedef std::function<void(bool)> cb_fn_t;
     BatteryListenerImpl(cb_fn_t cb);
@@ -81,17 +104,55 @@
 
 static std::shared_ptr<BatteryListenerImpl> batteryListener;
 
+#else
+struct BatteryListenerImpl : public hardware::health::V2_1::IHealthInfoCallback,
+                             public hardware::hidl_death_recipient {
+    typedef std::function<void(bool)> cb_fn_t;
+    BatteryListenerImpl(cb_fn_t cb);
+    virtual ~BatteryListenerImpl ();
+    virtual hardware::Return<void> healthInfoChanged(
+            const hardware::health::V2_0::HealthInfo& info);
+    virtual hardware::Return<void> healthInfoChanged_2_1(
+            const hardware::health::V2_1::HealthInfo& info);
+    virtual void serviceDied(uint64_t cookie,
+                             const wp<hidl::base::V1_0::IBase>& who);
+    bool isCharging() {
+        std::lock_guard<std::mutex> _l(mLock);
+        return statusToBool(mStatus);
+    }
+    void reset();
+  private:
+    sp<hardware::health::V2_1::IHealth> mHealth;
+    status_t init();
+    BatteryStatus mStatus;
+    cb_fn_t mCb;
+    std::mutex mLock;
+    std::condition_variable mCond;
+    std::unique_ptr<std::thread> mThread;
+    bool mDone;
+    bool statusToBool(const BatteryStatus &s) const {
+        return (s == BatteryStatus::CHARGING) ||
+               (s ==  BatteryStatus::FULL);
+    }
+};
+#endif
 status_t BatteryListenerImpl::init()
 {
     int tries = 0;
+#ifdef HEALTH_AIDL
     auto service_name = std::string() + IHealth::descriptor + "/default";
+ #endif
 
     if (mHealth != NULL)
         return INVALID_OPERATION;
 
     do {
+#ifdef HEALTH_AIDL
         mHealth = IHealth::fromBinder(ndk::SpAIBinder(
             AServiceManager_getService(service_name.c_str())));
+#else
+            mHealth = IHealth::getService();
+#endif
         if (mHealth != NULL)
             break;
         usleep(GET_HEALTH_SVC_WAIT_TIME_MS * 1000);
@@ -105,7 +166,17 @@
         ALOGI("Get health service in %d tries", tries);
     }
     mStatus = BatteryStatus::UNKNOWN;
+#ifdef HEALTH_AIDL
     auto ret = mHealth->getChargeStatus(&mStatus);
+#else
+    auto ret = mHealth->getChargeStatus([&](Result r, BatteryStatus status) {
+        if (r != Result::SUCCESS) {
+            ALOGE("batterylistener: cannot get battery status");
+            return;
+        }
+        mStatus = status;
+    });
+#endif
     if (!ret.isOk())
         ALOGE("batterylistener: get charge status transaction error");
 
@@ -148,6 +219,7 @@
                 }
             }
         });
+#ifdef HEALTH_AIDL
     mHealth->registerCallback(batteryListener);
     binder_status_t binder_status = AIBinder_linkToDeath(
         mHealth->asBinder().get(), mDeathRecipient.get(), this);
@@ -156,9 +228,14 @@
             static_cast<int>(binder_status));
         return NO_INIT;
     }
+#else
+    mHealth->registerCallback(this);
+    mHealth->linkToDeath(this, 0 /* cookie */);
+#endif
     return NO_ERROR;
 }
 
+#ifdef HEALTH_AIDL
 BatteryListenerImpl::BatteryListenerImpl(cb_fn_t cb) :
         mCb(cb),
         mDeathRecipient(AIBinder_DeathRecipient_new(BatteryListenerImpl::serviceDied))
@@ -166,29 +243,44 @@
 
 }
 
+#else
+BatteryListenerImpl::BatteryListenerImpl(cb_fn_t cb) :
+        mCb(cb)
+{
+    init();
+}
+#endif
 BatteryListenerImpl::~BatteryListenerImpl()
 {
+#ifdef HEALTH_AIDL
     {
         std::lock_guard<std::mutex> _l(mLock);
         mDone = true;
         mCond.notify_one();
     }
+#endif
     mThread->join();
 }
 
 void BatteryListenerImpl::reset() {
     std::lock_guard<std::mutex> _l(mLock);
     if (mHealth != nullptr) {
+#ifdef HEALTH_AIDL
         mHealth->unregisterCallback(batteryListener);
         binder_status_t status = AIBinder_unlinkToDeath(
             mHealth->asBinder().get(), mDeathRecipient.get(), this);
         if (status != STATUS_OK && status != STATUS_DEAD_OBJECT)
             ALOGE("Cannot unlink to death");
+#else
+        mHealth->unregisterCallback(this);
+        mHealth->unlinkToDeath(this);
+#endif
     }
     mStatus = BatteryStatus::UNKNOWN;
     mDone = true;
     mCond.notify_one();
 }
+#ifdef HEALTH_AIDL
 void BatteryListenerImpl::serviceDied(void *cookie)
 {
     BatteryListenerImpl *listener = reinterpret_cast<BatteryListenerImpl *>(cookie);
@@ -208,11 +300,30 @@
     listener->init();
 }
 
+#else
+void BatteryListenerImpl::serviceDied(uint64_t cookie __unused,
+                                     const wp<hidl::base::V1_0::IBase>& who)
+{
+    {
+        std::lock_guard<std::mutex> _l(mLock);
+        if (mHealth == NULL || !interfacesEqual(mHealth, who.promote())) {
+            ALOGE("health not initialized or unknown interface died");
+            return;
+        }
+        ALOGI("health service died, reinit");
+        mDone = true;
+    }
+    mThread->join();
+    std::lock_guard<std::mutex> _l(mLock);
+    init();
+}
+#endif
 // this callback seems to be a SYNC callback and so
 // waits for return before next event is issued.
 // therefore we need not have a queue to process
 // NOT_CHARGING and CHARGING concurrencies.
 // Replace single var by a list if this assumption is broken
+#ifdef HEALTH_AIDL
 ndk::ScopedAStatus BatteryListenerImpl::healthInfoChanged(const HealthInfo& info)
 {
     ALOGV("healthInfoChanged: %d", info.batteryStatus);
@@ -224,15 +335,45 @@
     return ndk::ScopedAStatus::ok();
 }
 
+#else
+Return<void> BatteryListenerImpl::healthInfoChanged(
+        const hardware::health::V2_0::HealthInfo& info)
+{
+    ALOGV("healthInfoChanged: %d", info.legacy.batteryStatus);
+    std::unique_lock<std::mutex> l(mLock);
+    if (info.legacy.batteryStatus != mStatus) {
+        mStatus = info.legacy.batteryStatus;
+        mCond.notify_one();
+    }
+    return Void();
+}
+
+Return<void> BatteryListenerImpl::healthInfoChanged_2_1(
+        const hardware::health::V2_1::HealthInfo& info) {
+    ALOGV("healthInfoChanged_2_1: %d", info.legacy.legacy.batteryStatus);
+    healthInfoChanged(info.legacy);
+    return Void();
+}
+
+static sp<BatteryListenerImpl> batteryListener;
+#endif
 status_t batteryPropertiesListenerInit(BatteryListenerImpl::cb_fn_t cb)
 {
+#ifdef HEALTH_AIDL
     batteryListener = ndk::SharedRefBase::make<BatteryListenerImpl>(cb);
     return batteryListener->init();
+#else
+    batteryListener = new BatteryListenerImpl(cb);
+    return NO_ERROR;
+#endif
 }
 
 status_t batteryPropertiesListenerDeinit()
 {
     batteryListener->reset();
+#ifndef HEALTH_AIDL
+    batteryListener.clear();
+#endif
     return OK;
 }
 
