Merge tag 'AUDIO.LA.8.0.r1-10100-KAILUA.0' into staging/lineage-21.0_merge-AUDIO.LA.8.0.r1-10100-KAILUA.0

AUDIO.LA.8.0.r1-10100-KAILUA.0

# By Huang, Yidong (2) and others
# Via Gerrit - the friendly Code Review server (2) and others
* tag 'AUDIO.LA.8.0.r1-10100-KAILUA.0':
  config: anorak: add umd service
  configs: add support for kalama-rb5-gen2-dvt variant
  configs: kalama: move ffv model to platform based section
  configs: kalama: add small size FFV model with eAI version 2.10
  hal: Clear android devices if usb device is unavailable

Change-Id: I4d75a6756320a2a5d155ed455282a275f928917d
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..73e4eef 100644
--- a/configs/kalama/audio-modules.mk
+++ b/configs/kalama/audio-modules.mk
@@ -86,6 +86,9 @@
     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
 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 abb55ca..f508b82 100644
--- a/configs/kalama/kalama.mk
+++ b/configs/kalama/kalama.mk
@@ -137,11 +137,13 @@
     $(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_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 \
     $(AUDIO_HAL_DIR)/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;
                 }