diff --git a/.gitupstream b/.gitupstream
new file mode 100644
index 0000000..3fee311
--- /dev/null
+++ b/.gitupstream
@@ -0,0 +1 @@
+https://git.codelinaro.org/clo/la/platform/vendor/qcom/opensource/arpal-lx
diff --git a/Android.mk b/Android.mk
index 2253871..ce19399 100644
--- a/Android.mk
+++ b/Android.mk
@@ -7,12 +7,22 @@
 include $(CLEAR_VARS)
 
 LOCAL_MODULE := libarpal_headers
-LOCAL_EXPORT_C_INCLUDE_DIRS := $(LOCAL_PATH)/inc
+LOCAL_EXPORT_C_INCLUDE_DIRS := \
+    $(LOCAL_PATH)/inc \
+    $(LOCAL_PATH)/stream/inc \
+    $(LOCAL_PATH)/device/inc \
+    $(LOCAL_PATH)/session/inc \
+    $(LOCAL_PATH)/resource_manager/inc \
+    $(LOCAL_PATH)/context_manager/inc \
+    $(LOCAL_PATH)/utils/inc \
+    $(LOCAL_PATH)/plugins/codecs
 
 LOCAL_VENDOR_MODULE := true
 
 include $(BUILD_HEADER_LIBRARY)
 
+ifneq ($(QCPATH),)
+
 include $(CLEAR_VARS)
 
 LOCAL_MODULE        := libar-pal
@@ -44,13 +54,6 @@
 endif
 
 LOCAL_C_INCLUDES := \
-    $(LOCAL_PATH)/stream/inc \
-    $(LOCAL_PATH)/device/inc \
-    $(LOCAL_PATH)/session/inc \
-    $(LOCAL_PATH)/resource_manager/inc \
-    $(LOCAL_PATH)/context_manager/inc \
-    $(LOCAL_PATH)/utils/inc \
-    $(LOCAL_PATH)/plugins/codecs \
     $(TOP)/system/media/audio_route/include \
     $(TOP)/system/media/audio/include
 
@@ -141,7 +144,6 @@
     libcapiv2_headers \
     libagm_headers \
     libacdb_headers \
-    liblisten_headers \
     libarosal_headers \
     libvui_dmgr_headers
 
@@ -173,6 +175,8 @@
 
 include $(BUILD_SHARED_LIBRARY)
 
+endif
+
 #-------------------------------------------
 #            Build CHARGER_LISTENER LIB
 #-------------------------------------------
@@ -194,7 +198,6 @@
 include $(BUILD_SHARED_LIBRARY)
 
 include $(CLEAR_VARS)
-LOCAL_USE_VNDK := true
 
 LOCAL_CFLAGS += -Wno-tautological-compare
 LOCAL_CFLAGS += -Wno-macro-redefined
diff --git a/Makefile.am b/Makefile.am
index 98f5df9..16411f3 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -24,6 +24,7 @@
             ./device/inc/UltrasoundDevice.h \
             ./session/inc/Session.h \
             ./session/inc/PayloadBuilder.h \
+            ./session/inc/kvh2xml.h \
             ./session/inc/SessionGsl.h \
             ./session/inc/SessionAlsaUtils.h \
             ./session/inc/SessionAlsaPcm.h \
@@ -101,6 +102,7 @@
             ${top_srcdir}/session/inc/ACDEngine.h \
             ${top_srcdir}/session/inc/Session.h \
             ${top_srcdir}/session/inc/PayloadBuilder.h \
+            $(top_srcdir)/session/inc/kvh2xml.h \
             ${top_srcdir}/session/inc/SessionGsl.h \
             ${top_srcdir}/session/inc/SessionAlsaPcm.h \
             ${top_srcdir}/session/inc/SessionAlsaCompress.h \
@@ -135,6 +137,7 @@
 AM_CPPFLAGS += -Wno-sign-compare -Wno-unused-result
 AM_CPPFLAGS += -D__unused=__attribute__\(\(__unused__\)\) -DLINUX_ENABLED
 AM_CPPFLAGS += -DSND_AUDIOCODEC_ALAC=0x00000020 -DSND_AUDIOCODEC_APE=0x00000021
+AM_CPPFLAGS += $(GECKO_CFLAGS)
 AM_CPPFLAGS += -DCONFIG_GSL
 
 pal_sources = ${top_srcdir}/stream/src/Stream.cpp \
diff --git a/ipc/HwBinders/pal_ipc_client/Android.mk b/ipc/HwBinders/pal_ipc_client/Android.mk
index 7c99a63..b559a3a 100644
--- a/ipc/HwBinders/pal_ipc_client/Android.mk
+++ b/ipc/HwBinders/pal_ipc_client/Android.mk
@@ -5,6 +5,7 @@
 LOCAL_MODULE := libpalclient
 LOCAL_MODULE_OWNER := qti
 LOCAL_VENDOR_MODULE := true
+LOCAL_CFLAGS := -Wno-unused-parameter -Wno-unused-variable -Wno-format
 LOCAL_SRC_FILES := \
     src/pal_client_wrapper.cpp
 
diff --git a/ipc/HwBinders/pal_ipc_server/Android.mk b/ipc/HwBinders/pal_ipc_server/Android.mk
index 628544f..59beb4d 100644
--- a/ipc/HwBinders/pal_ipc_server/Android.mk
+++ b/ipc/HwBinders/pal_ipc_server/Android.mk
@@ -1,4 +1,7 @@
 LOCAL_PATH := $(call my-dir)
+
+ifneq ($(QCPATH),)
+
 include $(CLEAR_VARS)
 
 LOCAL_MODULE := vendor.qti.hardware.pal@1.0-impl
@@ -9,7 +12,7 @@
     src/pal_server_wrapper.cpp
 
 LOCAL_C_INCLUDES := \
-    $(TOP)/vendor/qcom/opensource/pal/utils/inc
+    $(call project-path-for,qcom-audio)/pal/utils/inc
 
 LOCAL_EXPORT_C_INCLUDE_DIRS := $(LOCAL_PATH)/inc
 
@@ -32,3 +35,4 @@
 
 include $(BUILD_SHARED_LIBRARY)
 
+endif
diff --git a/plugins/Android.mk b/plugins/Android.mk
index c455f97..4ea07b6 100644
--- a/plugins/Android.mk
+++ b/plugins/Android.mk
@@ -1,3 +1,5 @@
 LOCAL_PATH := $(call my-dir)
 
+ifneq ($(QCPATH),)
 include $(call all-subdir-makefiles)
+endif
diff --git a/session/inc/kvh2xml.h b/session/inc/kvh2xml.h
new file mode 100644
index 0000000..2d4e4b5
--- /dev/null
+++ b/session/inc/kvh2xml.h
@@ -0,0 +1,568 @@
+/*
+ * Copyright (c) 2019, The Linux Foundation. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted 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 The Linux Foundation nor the names of its
+ *       contributors may be used to endorse or promote products derived
+ *       from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE COPYRIGHT OWNER 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.
+ */
+
+typedef enum {
+	PLATFORM_LA = 1, 	/**< @h2xmle_name {LA} */
+	PLATFORM_LE = 2,	/**< @h2xmle_name {LE} */
+}platforms;
+/**
+  	@h2xml_platforms{PLATFORM_LA,PLATFORM_LE}
+*/
+
+enum AllKeyIds{
+	STREAMRX = 0xA1000000,       /**< @h2xmle_name{Stream} */
+	DEVICERX = 0xA2000000,       /**< @h2xmle_name{DeviceRX} */
+	DEVICETX = 0xA3000000,       /**< @h2xmle_name{DeviceTX} */
+	VOLUME = 0xA4000000,         /**< @h2xmle_name{Volume} */
+	SAMPLINGRATE = 0xA5000000,   /**< @h2xmle_name{SamplingRate} */
+	BITWIDTH = 0xA6000000,       /**< @h2xmle_name{BitWidth} */
+	PAUSE = 0xA7000000,          /**< @h2xmle_name{Pause} */
+	MUTE = 0xA8000000,           /**< @h2xmle_name{Mute} */
+	CHANNELS = 0xA9000000,       /**< @h2xmle_name{Channels} */
+	ECNS = 0xAA000000,           /**< @h2xmle_name{ECNS} */
+	INSTANCE = 0xAB000000,       /**< @h2xmle_name{Instance} */
+	DEVICEPP_RX = 0xAC000000,    /**< @h2xmle_name{DevicePP_Rx} */
+	DEVICEPP_TX = 0xAD000000,    /**< @h2xmle_name{DevicePP_Tx} */
+	MEDIAFMTID = 0xae000000,
+	STREAMPP_RX = 0xaf000000,
+	STREAMPP_TX = 0xb0000000,
+	STREAMTX = 0xb1000000,
+	EQUALIZER_SWITCH = 0xb2000000,
+	VSID = 0xb3000000,
+	BTPROFILE = 0xb4000000,
+	BTFORMAT = 0xb5000000,
+	PBE_SWITCH = 0xb6000000,
+	BASS_BOOST_SWITCH = 0xb7000000,
+	REVERB_SWITCH = 0xb8000000,
+	VIRTUALIZER_SWITCH = 0xb9000000,
+	SW_SIDETONE = 0xba000000,
+	STREAM_SLOWTALK = 0xbb000000,
+	STREAM_CONFIG = 0xbc000000,
+	STREAM_MUXDEMUX = 0xbd000000,
+	SPKRPROTDEVMAP = 0xbe000000,
+	SPKRPROTVIMAP = 0xbf000000,
+	RAS_SWITCH = 0xd0000000,
+	VOIP_SAMPLE_RATE = 0xd100000,
+	PROXYTXTYPE = 0xd1000000,
+	GAIN = 0xd2000000,
+	STREAM = 0xd3000000,
+	STREAMCHANNELS = 0xd4000000,
+	ICL = 0xd5000000,
+	DEVICETX_EXT = 0xd7000000,
+	DATALOGGING = 0xd8000000,
+	DTMF_SWITCH = 0xde000000,
+	DTMF_GEN_TONE = 0xdf000000,
+	TAG_KEY_SLOT_MASK = 0xe0000000,
+	DUTYCYCLE = 0xe1000000
+};
+
+/**
+	@h2xmlk_key {STREAMRX}
+	@h2xmlk_description {Type of Rx Stream}
+*/
+enum Key_StreamRX {
+	PCM_DEEP_BUFFER = 0xa1000001,
+	PCM_RX_LOOPBACK = 0xa1000003,
+	VOIP_RX_PLAYBACK = 0xa1000005,
+	COMPRESSED_OFFLOAD_PLAYBACK = 0xa100000a,
+	HFP_RX_PLAYBACK = 0xa100000c,
+	PCM_LL_PLAYBACK = 0xa100000e,
+	PCM_OFFLOAD_PLAYBACK = 0xa100000f,
+	VOICE_CALL_RX = 0xa1000010,
+	PCM_ULL_PLAYBACK = 0xa1000011,
+	PCM_PROXY_PLAYBACK = 0xa1000012,
+	INCALL_MUSIC = 0xa1000013,
+	GENERIC_PLAYBACK = 0xa1000014,
+	HAPTICS_PLAYBACK = 0xa1000015,
+	RAW_PLAYBACK = 0xa1000019,
+};
+
+/**
+	@h2xmlk_key {STREAMTX}
+	@h2xmlk_description {Type of Tx Stream}
+*/
+enum Key_StreamTX {
+	PCM_RECORD = 0xb1000001,
+	VOICE_UI = 0xb1000003,
+	VOIP_TX_RECORD = 0xb1000004,
+	HFP_RX_CAPTURE = 0xb1000005,
+	VOICE_CALL_TX = 0xb1000007,
+	RAW_RECORD = 0xb1000009,
+	PCM_ULL_RECORD = 0xb100000a,
+	PCM_PROXY_RECORD = 0xb100000b,
+	INCALL_RECORD = 0xb100000c,
+	ACD = 0xb100000d,
+	SENSOR_PCM_DATA = 0xb100000e,
+	VOICE_RECOGNITION_RECORD = 0xb1000011,
+	COMPRESS_CAPTURE = 0xb1000012,
+};
+
+/**
+	@h2xmlk_key {INSTANCE}
+	@h2xmlk_description {Stream Instance Id}
+*/
+enum Key_Instance {
+	INSTANCE_1 = 1, /**< @h2xmle_name {Instance_1}*/
+	INSTANCE_2 = 2, /**< @h2xmle_name {Instance_2}*/
+	INSTANCE_3 = 3, /**< @h2xmle_name {Instance_3}*/
+	INSTANCE_4 = 4,
+	INSTANCE_5 = 5,
+	INSTANCE_6 = 6,
+	INSTANCE_7 = 7,
+	INSTANCE_8 = 8,
+};
+
+/**
+	@h2xmlk_key {DEVICERX}
+	@h2xmlk_description {Rx Device}
+*/
+enum Key_DeviceRX {
+	SPEAKER = 0xa2000001,
+	HEADPHONES = 0xa2000002,
+	BT_RX = 0xa2000003,
+	HANDSET = 0xa2000004,
+	USB_RX = 0xa2000005,
+	HDMI_RX = 0xa2000006,
+	PROXY_RX = 0xa2000007,
+	PROXY_RX_VOICE = 0xa2000008,
+	HAPTICS_DEVICE = 0xa2000009,
+	ULTRASOUND_RX = 0xa200000a,
+	ULTRASOUND_RX_DEDICATED = 0xa200000b,
+};
+/**
+	@h2xmlk_key {DEVICETX}
+	@h2xmlk_description {Tx Device}
+*/
+enum Key_DeviceTX {
+	SPEAKER_MIC = 0xa3000001,
+	BT_TX = 0xa3000002,
+	HEADPHONE_MIC = 0xa3000003,
+	HANDSETMIC = 0xa3000004,
+	USB_TX = 0xa3000005,
+	HANDSETMIC_VA = 0xa3000006,
+	HEADSETMIC_VA = 0xa3000007,
+	PROXY_TX = 0xa3000008,
+	VI_TX = 0xa3000009,
+	FM_TX = 0xa300000a,
+	ULTRASOUND_TX = 0xa300000b,
+	ECHO_REF_TX = 0xa300000d,
+};
+
+/**
+	@h2xmlk_key {DEVICEPP_RX}
+	@h2xmlk_description {Rx Device Post/Pre Processing Chain}
+*/
+enum Key_DevicePP_RX {
+	DEVICEPP_RX_DEFAULT = 0xac000001,
+	DEVICEPP_RX_AUDIO_MBDRC = 0xac000002,
+	DEVICEPP_RX_VOIP_MBDRC = 0xac000003,
+	DEVICEPP_RX_HFPSINK = 0xac000004,
+	DEVICEPP_RX_VOICE_DEFAULT = 0xac000005,
+	DEVICEPP_RX_ULTRASOUND_GENERATOR = 0xac000006,
+	DEVICEPP_RX_VOICE_RVE = 0xac000007,
+	DEVICEPP_RX_VOICE_NN_NS = 0xac000009,
+	DEVICEPP_RX_AUDIO_MSPP = 0xac00000b,
+};
+
+/**
+	@h2xmlk_key {DEVICEPP_TX}
+	@h2xmlk_description {Tx Device Post/Pre Processing Chain}
+*/
+enum Key_DevicePP_TX {
+	DEVICEPP_TX_FLUENCE_FFECNS = 0xad000001,
+	DEVICEPP_TX_AUDIO_FLUENCE_SMECNS = 0xad000002,
+	DEVICEPP_TX_AUDIO_FLUENCE_ENDFIRE = 0xad000003,
+	DEVICEPP_TX_AUDIO_FLUENCE_PRO = 0xad000004,
+	DEVICEPP_TX_VOIP_FLUENCE_PRO = 0xad000005,
+	DEVICEPP_TX_HFP_SINK_FLUENCE_SMECNS = 0xad000006,
+	DEVICEPP_TX_VOIP_FLUENCE_SMECNS = 0xad000007,
+	DEVICEPP_TX_VOICE_FLUENCE_SMECNS = 0xad000008,
+	DEVICEPP_TX_VOICE_FLUENCE_ENDFIRE = 0xad000009,
+	DEVICEPP_TX_VOICE_FLUENCE_PRO = 0xad00000a,
+	DEVICEPP_TX_RAW_LPI = 0xad00000c,
+	DEVICEPP_TX_VOIP_FLUENCE_ENDFIRE = 0xad00000d,
+	DEVICEPP_TX_RAW_NLPI = 0xad00000e,
+	DEVICEPP_TX_VOICE_FLUENCE_NN_SM = 0xad00000f,
+	DEVICEPP_TX_VOIP_FLUENCE_NN_SM = 0xad000010,
+	DEVICEPP_TX_FLUENCE_FFEC = 0xad000012,
+	DEVICEPP_TX_VOICE_FLUENCE_ENDFIRE_RVE = 0xad000013,
+	DEVICEPP_TX_VOICE_RECOGNITION = 0xad000017,
+	DEVICEPP_TX_AAD = 0xad000019,
+	DEVICEPP_TX_FLUENCE_FFNS_AAD = 0xad00001a,
+	DEVICEPP_TX_RAW_LPI_AAD = 0xad00001b,
+	DEVICEPP_TX_AUDIO_RECORD_ENQORE = 0xad000023,
+};
+
+enum Key_StreamConfig {
+	STREAM_CFG_VUI_SVA = 0xbc000001,
+};
+
+/**
+	@h2xmlk_key {VOLUME}
+	@h2xmlk_description {Volume}
+*/
+enum Key_Volume {
+	LEVEL_0 = 0, /**< @h2xmle_name {Level_0}*/
+	LEVEL_1 = 1, /**< @h2xmle_name {Level_1}*/
+	LEVEL_2 = 2, /**< @h2xmle_name {Level_2}*/
+	LEVEL_3 = 3, /**< @h2xmle_name {Level_3}*/
+	LEVEL_4 = 4, /**< @h2xmle_name {Level_4}*/
+	LEVEL_5 = 5, /**< @h2xmle_name {Level_5}*/
+	LEVEL_6 = 6, /**< @h2xmle_name {Level_6}*/
+	LEVEL_7 = 7, /**< @h2xmle_name {Level_7}*/
+	LEVEL_8 = 8, /**< @h2xmle_name {Level_8}*/
+	LEVEL_9 = 9, /**< @h2xmle_name {Level_9}*/
+	LEVEL_10 = 10, /**< @h2xmle_name {Level_10}*/
+	LEVEL_11 = 11, /**< @h2xmle_name {Level_11}*/
+	LEVEL_12 = 12, /**< @h2xmle_name {Level_12}*/
+	LEVEL_13 = 13, /**< @h2xmle_name {Level_13}*/
+	LEVEL_14 = 14, /**< @h2xmle_name {Level_14}*/
+	LEVEL_15 = 15, /**< @h2xmle_name {Level_15}*/
+};
+
+/**
+	@h2xmlk_key {GAIN}
+	@h2xmlk_description {Gain}
+*/
+enum Key_Gain {
+	GAIN_0 = 0, /**< @h2xmle_name {Gain_0}*/
+	GAIN_1 = 1, /**< @h2xmle_name {Gain_1}*/
+	GAIN_2 = 2, /**< @h2xmle_name {Gain_2}*/
+	GAIN_3 = 3, /**< @h2xmle_name {Gain_3}*/
+	GAIN_4 = 4, /**< @h2xmle_name {Gain_4}*/
+	GAIN_5 = 5, /**< @h2xmle_name {Gain_5}*/
+	GAIN_6 = 6, /**< @h2xmle_name {Gain_6}*/
+	GAIN_7 = 7, /**< @h2xmle_name {Gain_7}*/
+	GAIN_8 = 8, /**< @h2xmle_name {Gain_8}*/
+	GAIN_9 = 9, /**< @h2xmle_name {Gain_9}*/
+	GAIN_10 = 10, /**< @h2xmle_name {Gain_10}*/
+	GAIN_11 = 11, /**< @h2xmle_name {Gain_11}*/
+	GAIN_12 = 12, /**< @h2xmle_name {Gain_12}*/
+	GAIN_13 = 13, /**< @h2xmle_name {Gain_13}*/
+	GAIN_14 = 14, /**< @h2xmle_name {Gain_14}*/
+	GAIN_15 = 15, /**< @h2xmle_name {Gain_15}*/
+};
+
+/**
+	@h2xmlk_key {SAMPLINGRATE}
+	@h2xmlk_sampleRate
+	@h2xmlk_description {Sampling Rate}
+*/
+enum Key_SamplingRate {
+	SAMPLINGRATE_8K = 8000,   /**< @h2xmle_sampleRate{8000} @h2xmle_name {SR_8K}*/
+	SAMPLINGRATE_16K = 16000, /**< @h2xmle_sampleRate{16000} @h2xmle_name {SR_16K}*/
+	SAMPLINGRATE_22K = 22050, /**< @h2xmle_sampleRate{22050} @h2xmle_name {SR_22K}*/
+	SAMPLINGRATE_24K = 24000, /**< @h2xmle_sampleRate{24000} @h2xmle_name {SR_24K}*/
+	SAMPLINGRATE_32K = 32000, /**< @h2xmle_sampleRate{32000} @h2xmle_name {SR_32K}*/
+	SAMPLINGRATE_44K = 44100, /**< @h2xmle_sampleRate{44100} @h2xmle_name {SR_44.1K}*/
+	SAMPLINGRATE_48K = 48000, /**< @h2xmle_sampleRate{48000} @h2xmle_name {SR_48K}*/
+	SAMPLINGRATE_96K = 96000, /**< @h2xmle_sampleRate{96000} @h2xmle_name {SR_96K}*/
+	SAMPLINGRATE_192K = 192000, /**< @h2xmle_sampleRate{192000} @h2xmle_name {SR_192K}*/
+	SAMPLINGRATE_352K = 352800, /**< @h2xmle_sampleRate{352800} @h2xmle_name {SR_352K}*/
+	SAMPLINGRATE_384K = 384000, /**< @h2xmle_sampleRate{384000} @h2xmle_name {SR_384K}*/
+};
+/**
+	@h2xmlk_key {BITWIDTH}
+	@h2xmlk_description {Bit Width}
+*/
+enum Key_BitWidth {
+	BITWIDTH_16 = 16, /**< @h2xmle_name {BW_16}*/
+	BITWIDTH_24 = 24, /**< @h2xmle_name {BW_24}*/
+	BITWIDTH_32 = 32, /**< @h2xmle_name {BW_32}*/
+};
+/**
+	@h2xmlk_key {PAUSE}
+	@h2xmlk_description {Pause}
+*/
+enum Key_Pause {
+	OFF = 0, /**< @h2xmle_name {Off}*/
+	ON = 1, /**< @h2xmle_name {On}*/
+};
+/**
+	@h2xmlk_key {MUTE}
+	@h2xmlk_description {Mute}
+*/
+enum Key_Mute {
+	MUTE_OFF = 0, /**< @h2xmle_name {Off}*/
+	MUTE_ON = 1, /**< @h2xmle_name {On}*/
+};
+/**
+	@h2xmlk_key {CHANNELS}
+	@h2xmlk_description {Channels}
+*/
+enum Key_Channels {
+	CHANNELS_1 = 1, /**< @h2xmle_name {CHS_1}*/
+	CHANNELS_2 = 2, /**< @h2xmle_name {CHS_2}*/
+        CHANNELS_3 = 3, /**< @h2xmle_name {CHS_3}*/
+	CHANNELS_4 = 4, /**< @h2xmle_name {CHS_4}*/
+        CHANNELS_5 = 5, /**< @h2xmle_name {CHS_5}*/
+        CHANNELS_5_1 = 6, /**< @h2xmle_name {CHS_6}*/
+	CHANNELS_7 = 7, /**< @h2xmle_name {CHS_7}*/
+	CHANNELS_8 = 8, /**< @h2xmle_name {CHS_8}*/
+};
+
+/**
+	@h2xmlk_key {ECNS}
+	@h2xmlk_description {ECNS}
+*/
+enum Key_ECNS {
+	ECNS_OFF = 0, /**< @h2xmle_name {ECNS_Off}*/
+	ECNS_ON = 1, /**< @h2xmle_name {ECNS_On}*/
+	EC_ON = 2,
+	NS_ON = 3,
+};
+
+/**
+	@h2xmlk_key {DTMF}
+	@h2xmlk_description {DMTF_SWITCH}
+*/
+enum Key_Dtmf {
+	DISABLE = 0,
+	ENABLE = 1,
+};
+
+/**
+	@h2xmlk_gkeys
+	@h2xmlk_description {Graph Keys}
+*/
+enum Graph_Keys {
+	gk_StreamRX = STREAMRX,
+	gk_DeviceRX = DEVICERX,
+	gk_DeviceTX = DEVICETX,
+	gk_DevicePP_RX = DEVICEPP_RX,
+	gk_DevicePP_TX = DEVICEPP_TX,
+	gk_Instance = INSTANCE,
+	gk_StreamPP_RX = STREAMPP_RX,
+	gk_StreamPP_TX = STREAMPP_TX,
+	gk_StreamTX = STREAMTX,
+	gk_VSID = VSID,
+	gk_BtProfile = BTPROFILE,
+	gk_BtFormat = BTFORMAT,
+	gk_SW_Sidetone = SW_SIDETONE,
+	gk_Stream_Config = STREAM_CONFIG,
+	gk_ProxyTxType = PROXYTXTYPE,
+	gk_Stream = STREAM,
+	gk_DeviceTX_EXT = DEVICETX_EXT,
+};
+/**
+	@h2xmlk_ckeys
+	@h2xmlk_description {Calibration Keys}
+*/
+enum Cal_Keys {
+	ck_volume = VOLUME,
+	ck_channels = CHANNELS,
+	ck_sp_dev_map = SPKRPROTDEVMAP,
+	ck_ras_switch = RAS_SWITCH,
+	ck_sp_vi_map = SPKRPROTVIMAP,
+	ck_gain = GAIN,
+	ck_stream_channels = STREAMCHANNELS,
+	ck_voip_sample_rate = VOIP_SAMPLE_RATE,
+};
+
+#define DEVICE_HW_ENDPOINT_RX        0xC0000004
+/**
+        @h2xmlk_modTag {"device_hw_ep_rx",DEVICE_HW_ENDPOINT_RX}
+	@h2xmlk_description {Hw EP Rx}
+*/
+enum HW_ENDPOINT_RX_Keys {
+	tk1_hweprx = DEVICERX,
+	tk2_hweprx = SAMPLINGRATE,
+	tk3_hweprx = BITWIDTH,
+	tk4_hweprx = CHANNELS,
+};
+#define DEVICE_HW_ENDPOINT_TX        0xC0000005
+/**
+        @h2xmlk_modTag {"device_hw_ep_tx",DEVICE_HW_ENDPOINT_TX}
+	@h2xmlk_description {Hw EP Tx}
+*/
+enum HW_ENDPOINT_TX_Keys {
+	tk1_hweptx = DEVICETX,
+	tk2_hweptx = SAMPLINGRATE,
+	tk3_hweptx = BITWIDTH,
+	tk4_hweptx = CHANNELS,
+};
+#define TAG_PAUSE       0xC0000006
+/**
+	@h2xmlk_modTag {"stream_pause", TAG_PAUSE}
+	@h2xmlk_description {Stream Pause}
+*/
+enum TAG_PAUSE_Keys {
+	tk1_Pause = PAUSE,
+};
+#define TAG_MUTE        0xC0000007
+/**
+	@h2xmlk_modTag {"stream_mute", TAG_MUTE}
+	@h2xmlk_description {Stream Mute}
+*/
+enum TAG_MUTE_Keys {
+	tk1_Mute = MUTE,
+};
+
+#define TAG_ECNS  0xC000000A
+/**
+	@h2xmlk_modTag {"device_ecns", TAG_ECNS}
+	@h2xmlk_description {Ecns On/Off}
+*/
+enum TAG_ECNS_Keys {
+	tk1_Ecns = ECNS,
+};
+
+#define TAG_STREAM_VOLUME  0xC000000D
+/**
+	@h2xmlk_modTag {"stream_volume", TAG_STREAM_VOLUME}
+	@h2xmlk_description {Stream Volume}
+*/
+enum TAG_STREAM_VOLUME_Keys {
+	tk1_Volume = VOLUME,
+};
+
+#define TAG_DEVICE_PP_MFC  0xC0000011
+/**
+	@h2xmlk_modTag {"device_pp_mfc", TAG_DEVICE_PP_MFC}
+	@h2xmlk_description {Device PP MFC}
+*/
+enum TAG_DEVICE_PP_MFC_Keys {
+	tk1_SamplingRate = SAMPLINGRATE,
+	tk2_BitWidth     = BITWIDTH,
+	tk3_Channels     = CHANNELS,
+};
+
+#define TAG_STREAM_MFC  0xc000000b
+
+// Same enum names as TAG_DEVICE_PP_MFC_Keys
+/*enum TAG_STREAM_MFC_Keys {
+	tk1_SamplingRate = SAMPLINGRATE,
+	tk2_BitWidth     = BITWIDTH,
+	tk3_Channels     = CHANNELS,
+};*/
+
+
+#define TAG_STREAM_PLACEHOLDER_DECODER  0xc0000012
+
+enum TAG_STREAM_PLACEHOLDER_DECODER_Keys {
+	tk1_MediaFmtID = MEDIAFMTID,
+};
+
+#define TAG_STREAM_EQUALIZER  0xc0000014
+
+enum TAG_STREAM_EQUALIZER_Keys {
+	tk1_Equalizer = EQUALIZER_SWITCH,
+};
+
+#define TAG_STREAM_VIRTUALIZER  0xc0000015
+
+enum TAG_STREAM_VIRTUALIZER_Keys {
+	tk1_Virtualizer_Switch = VIRTUALIZER_SWITCH,
+};
+
+#define TAG_STREAM_REVERB  0xc0000016
+
+enum TAG_STREAM_REVERB_Keys {
+	tk1_Reverb_Switch = REVERB_SWITCH,
+};
+
+#define TAG_STREAM_PBE  0xc0000017
+
+enum TAG_STREAM_PBE_Keys {
+	tk1_PBE_Switch = PBE_SWITCH,
+};
+
+#define TAG_STREAM_BASS_BOOST  0xc0000018
+
+enum TAG_STREAM_BASS_BOOST_Keys {
+	tk1_BASS_BOOST_Switch = BASS_BOOST_SWITCH,
+};
+
+#define PER_STREAM_PER_DEVICE_MFC  0xc0000019
+
+// Same enum names as TAG_DEVICE_PP_MFC_Keys
+/*enum TAG_PSPD_MFC_Keys {
+	tk1_SamplingRate = SAMPLINGRATE,
+	tk2_BitWidth     = BITWIDTH,
+	tk3_Channels     = CHANNELS,
+};*/
+
+#define TAG_STREAM_SLOWTALK  0xc0000025
+
+enum TAG_STREAM_SLOWTALK_Keys {
+	tk1_Stream_SlowTalk = STREAM_SLOWTALK,
+};
+
+#define TAG_MODULE_CHANNELS  0xc0000026
+
+enum TAG_MODULE_CHANNELS_Keys {
+	tk1_Channels = CHANNELS,
+};
+
+#define TAG_STREAM_MUXDEMUX  0xc0000027
+
+enum TAG_STREAM_MUXDEMUX_Keys {
+	tk1_Stream_MuxDemux= STREAM_MUXDEMUX,
+};
+
+#define TAG_DEVICE_MUX  0xc0000040
+
+enum TAG_DEVICE_MUX_Keys {
+	tk1_SlotMask= TAG_KEY_SLOT_MASK,
+};
+
+#define TAG_MODULE_MSPP  0xc0000043
+
+/**
+	@h2xmlk_modTagList
+*/
+enum TAGS_DEFINITIONS {
+        SHMEM_ENDPOINT              = 0xC0000001, /**< @h2xmle_name {"sh_ep"} */
+        STREAM_INPUT_MEDIA_FORMAT   = 0xC0000002, /**< @h2xmle_name {"stream_input_media_format" } */
+        STREAM_OUTPUT_MEDIA_FORMAT  = 0xC0000003, /**< @h2xmle_name {"stream_output_media_format" } */
+        DEVICE_SVA                  = 0xC0000008, /**< @h2xmle_name {"device_sva"} */
+        DEVICE_ADAM                 = 0xC0000009, /**< @h2xmle_name {"device_adam"} */
+        STREAM_MFC                  = 0xC000000B, /**< @h2xmle_name {"stream_mfc"} */
+        DEVICE_MFC                  = 0xC000000C, /**< @h2xmle_name {"device_mfc"} */
+        STREAM_PCM_DECODER          = 0xC000000E, /**< @h2xmle_name {"stream_pcm_decoder"} */
+        STREAM_PCM_ENCODER          = 0xC000000F, /**< @h2xmle_name {"stream_pcm_encoder"} */
+        STREAM_PCM_CONVERTER        = 0xC0000010, /**< @h2xmle_name {"stream_pcm_converter"} */
+        STREAM_SPR                  = 0xc0000013,
+        BT_ENCODER                  = 0xc0000020,
+        COP_PACKETIZER_V0           = 0xc0000021,
+        RATE_ADAPTER_MODULE         = 0xc0000022,
+        BT_PCM_CONVERTER            = 0xc0000023,
+        BT_DECODER                  = 0xc0000024,
+        MODULE_VI                   = 0xc0000028,
+        MODULE_SP                   = 0xc0000029,
+        MODULE_GAPLESS              = 0xc000002a,
+        WR_SHMEM_ENDPOINT           = 0xc000002c,
+        RD_SHMEM_ENDPOINT           = 0xc000002e,
+        COP_PACKETIZER_V2           = 0xc000002f,
+        COP_DEPACKETIZER_V2         = 0xc0000030,
+        CONTEXT_DETECTION_ENGINE    = 0xc0000031,
+        ULTRASOUND_DETECTION_MODULE = 0xc0000032,
+        DEVICE_POP_SUPPRESSOR       = 0xc000003a,
+};
+typedef enum TAGS_DEFINITIONS TAGS_DEFINITIONS;
diff --git a/utils/inc/ListenSoundModelLib.h b/utils/inc/ListenSoundModelLib.h
new file mode 100644
index 0000000..46103fa
--- /dev/null
+++ b/utils/inc/ListenSoundModelLib.h
@@ -0,0 +1,919 @@
+/*
+ * ListenSoundModelLib.h
+ *
+ * This is the interface file of sound model library which provides
+ * the APIs to get sound model information and merge, delete functionality
+ * which will be used by STHAL.
+ *
+ * Copyright (c) 2019-2020, The Linux Foundation. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted 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 The Linux Foundation nor the names of its
+ *       contributors may be used to endorse or promote products derived
+ *       from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE COPYRIGHT OWNER 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.
+ */
+
+/*======================================================================
+DESCRIPTION : ListenSoundModelLibrary Version 3
+====================================================================*/
+
+#ifndef __LISTEN_SOUND_MODEL_LIB_V3_H__
+#define __LISTEN_SOUND_MODEL_LIB_V3_H__
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#include <stdint.h>
+
+#if defined(_SML_NO_DLL)
+#define DllFunc
+#define CDECLARE
+#elif defined(_MSC_VER) && defined(_EXPORT)
+#define DllFunc   __declspec( dllexport )
+#define CDECLARE    __cdecl
+#elif defined(_MSC_VER)
+#define DllFunc   __declspec( dllimport )
+#define CDECLARE    __cdecl
+#else   // For other compiler like gcc
+#define DllFunc
+#define CDECLARE
+#endif
+
+#define LSMLIB_VERSION 2 // %%% some unique number that changes when API changes
+                         // %%% could be == SoundModel version supported for SVA 2.0
+
+#define MAX_STRING_LEN (100 * 2)  // maximum byte size of string representing Unicode character string
+// %%% NOTE: "MAX_STRING_LEN" replaces old constant "MAX_KEYWORD"
+
+
+// SVA 2.0
+// Keyword & User Identifier as zero terminated strings
+typedef char * keywordId_t;
+typedef char * userId_t;
+
+
+typedef struct {
+    //state machine parameters
+    float minSnrOnset;                  // The minimum snr of frame that speech segment starts
+    float minSnrLeave;                  // The minimum snr of frame that speech segment ends
+    float snrFloor;                     // The minimum snr value assumed in the end point detector
+    float snrThresholds;                // The minimum snr value of speech to verify
+    float forgettingFactorNoise;        // The forgetting factor used for noise estimation
+    int numFrameTransientFrame;         // the number of frames in the beginning that are used for noise estimate(valid only for online mode)
+    float minEnergyFrameRatio;          // the number of frame are used for noise estimation = minenergyFrameRatio * #frames of input(valid only for batch mode)
+
+    //post processing parameters
+    //Note:
+    int numMinFramesInPhrase;           // the minimum nubmer of samples for a speech phrase (targetted speech)
+    int numMinFramesInSpeech;           //the minimum number of samples for a speech intereval
+    int numMaxFrameInSpeechGap;         //the maximum allowable number of samples for a speech gap
+    int numFramesInHead;                //the speech head
+    int numFramesInTail;                //the speech tail
+} listen_epd_params;
+
+typedef struct {
+    int16_t *data;              /* Audio samples ( in Raw PCM format: 16kHz, 16bit, mono ) */
+    uint32_t n_samples;         /* number of audio samples */
+} listen_user_recording;
+
+typedef struct {
+    uint8_t *data;              /* block of memory containing Model data */
+    uint32_t size;              /* size of memory allocated for Model data */
+} listen_language_model_type;
+
+typedef struct {
+    uint8_t *data;              /* block of memory containing Model data */
+    uint32_t size;              /* size of memory allocated for Model data */
+} listen_model_type;
+
+// kwihyuk - comments will update
+// %%% the numbering - names are up to you, as long as type + version is unique between SVA 1.0 and 2.0 SMs
+typedef enum {
+    kKeywordModel = 1,           /* Keyword model */
+    kUserKeywordModel = 2,    /* Userkeyword model */
+    kTargetSoundModel = 3,
+    kMultiUserKeywordModel = 4, /* Multiple Keyword models */
+    kKeywordModelWithVop = 5,   //kwihyuk
+    kSecondStageKeywordModel = 6,   //kwihyuk
+    kSecondStageKeywordModelWithVop = 7,    //kwihyuk
+} listen_model_enum;
+
+typedef enum {
+    kSuccess = 0,
+    kFailure = 1
+} listen_detection_status_enum;
+
+typedef struct {
+    listen_model_enum type;     /* model type: Keyword, User, TargetSound */
+    uint32_t          version;  /* model version */
+    uint32_t          size;     /* total size of the model: header + payload size */
+} listen_sound_model_info;
+
+
+typedef struct {
+    listen_detection_status_enum status; // SUCCESS or FAILURE
+    uint32_t size;               // size in bytes of payload data
+                                                 // just contains result confidence level values
+    uint8_t *data;             // block of memory containing data payload
+} listen_event_payload;
+
+// SVA 2.0
+typedef struct {
+    uint16_t                numKeywords;  /* total number of keywords  */
+    uint16_t                numUsers;    /* total number of users  */
+    uint16_t                numActiveUserKeywordPairs;    /* total number of active user+keyword pairs in SM */
+    bool                    isStripped; /* if corresponding keyword is stripped or not */
+    uint16_t                *langPerKw; /* Language code of each keyword */
+    /* number active Users per keyword - included as convenience */
+    uint16_t                *numUsersSetPerKw;
+    bool                    *isUserDefinedKeyword;
+    /* Ordered 'truth' table of all possible pairs of users for each keyword.
+    * Active entries marked with 1, inactive 0.keywordPhrase
+    * 16-bit short (rather than boolean) is used to match SM model data size */
+    uint16_t                **userKeywordPairFlags;
+    uint16_t                model_indicator; /* for SM 3.0, indicate which models were combined */
+} listen_sound_model_header;
+
+
+
+
+// SVA 2.0
+// %%% this should match the 'sensitivity' data structure input in VoiceWakeupParamType
+typedef struct {
+    uint8_t   size     ;  // number of keyword plus activePair confidence levels set d
+    uint8_t   *pConfLevels;  // level of each keyword and each active user+keyword pair
+} listen_confidence_levels ;
+
+// SVA 2.0
+typedef enum {
+    kSingleKWDetectionEvent = 1,         /* SVA 1.0 model */
+    kMultiKWDetectionEvent = 2,       /* SVA 2.0 model */
+} listen_detection_type_enum;
+
+
+// duplicates existing SVA1.0 typedef
+// Do not include listen_detection_entry_v1 in SVA 1.0 header if both headers included
+typedef struct {
+    char keyword[MAX_STRING_LEN];
+    uint16_t keywordConfidenceLevel;
+    uint16_t userConfidenceLevel;
+} listen_detection_event_v1;
+
+// denotes that a particular entry in confidence level array is not active
+static const uint8_t  NO_CONF_LEVEL = 0;
+
+typedef struct {
+
+    char     keywordPhrase[MAX_STRING_LEN]; /* string containing phrase string of keyword with highest confidence score */
+    char     userName[MAX_STRING_LEN];  /* string containing name of user with highest confidence score */
+
+    uint8_t  highestKeywordConfidenceLevel;  // set to zero if detection status is Failed
+    uint8_t  highestUserConfidenceLevel;     // set to zero if detection status is Failed
+
+    listen_confidence_levels  pairConfidenceLevels; // confidence levels of ALL pair (active or not)
+} listen_detection_event_v2;
+
+// modified for SVA 2.0 - this should override SVA 1.0 typedef
+typedef struct {
+    // %%% uint16_t version;
+    listen_detection_type_enum   detection_data_type;
+    // data structure filled is based on detection_data_type
+    union {
+        listen_detection_event_v1 event_v1;  // for SVA 1.0
+        listen_detection_event_v2 event_v2;  // for SVA 2.0
+    } event;
+} listen_detection_event_type;
+
+typedef enum {
+    kSucess = 0,
+    kFailed = 1,
+    kBadParam,
+    kKeywordNotFound,
+    kUserNotFound,
+    kUserKwPairNotActive,
+    kSMVersionUnsupported,
+    kUserDataForKwAlreadyPresent,
+    kDuplicateKeyword,
+    kDuplicateUserKeywordPair,
+    kMaxKeywordsExceeded,
+    kMaxUsersExceeded,
+    kEventStructUnsupported,    // payload contains event data that can not be processed, or mismatches SM version
+    kLastKeyword,
+    kNoSignal,
+    kLowSnr,
+    kRecordingTooShort,
+    kRecordingTooLong,
+    kNeedRetrain,
+    kUserUDKPairNotRemoved,
+    kCannotCreateUserUDK,
+    kOutputArrayTooSmall,
+    kTooManyAbnormalUserScores,
+    kWrongModel,
+    kWrongModelAndIndicator,
+    kDuplicateModel,
+} listen_status_enum;
+
+/*
+*   Notes:
+*       1. The client code that calls getKeywordPhrases(), getUserNames() must allocate DstStr as [MAX_STRING_LEN]
+*       2. The client code that calls getUserKeywordModelSize(), createUserDefinedKeywordModel(),
+*           createUserKeywordModel() should assign meaningful string for keywordId or userId, empty string is not recommended.
+*       3. verifyUserRecording() should be called before calling createUserKeywordModel(). If pConfidenceLevel returned
+*           in verifyUserRecording() is below a CONFIDENCE_THRESHOLD value, the recording should be rejected and not used
+*           to a create user model. The client code should decide the CONFIDENCE_THRESHOLD value, a recommended value range for
+*           CONFIDENCE_THRESHOLD is 60~70.
+*
+*/
+
+    /*
+    * findKeywordEndPosition
+    *
+    * Returns the keyword end position of user recordings from the keyword model
+    * the keyword model finds the keyword end position by using keyword end finding algorithm inside SVA
+    *
+    * Param [in]  pKeywordModel - pointer to keyword model data which will be used to find keyword end
+    * Param [in]  keywordId - null terminated string contains keyword phrase string
+    * Param [in]  pUserRecording - a single recording of user speaking keyword
+                                   other speech such as following command may follows
+    * Param [out] pKendPosition - returns keyword end position from the start of user recording in number of samples
+    *
+    * Return - status
+    *       kBadParam - When any input pointer (except pEpdParameter) is NULL
+    *       kKeywordNotFound - When keywordId not exist in the model
+    *       kSMVersionUnsupported - When pKeywordModel is not 2.0 model
+    */
+DllFunc listen_status_enum CDECLARE findKeywordEndPosition(
+                listen_model_type           *pKeywordModel,
+                keywordId_t                 keywordId,
+                listen_user_recording       *pUserRecording,
+                uint32_t                    *pKendPosition);
+
+    /*
+    * verifyUserRecording
+    *
+    * Returns the confidence level ( 0 ~ 100 ) that user recording matches keyword
+    * User data is to be appended for a specific keyword in the model
+    * // will be updated or removed
+    * if input is SM 3.0 which combiend with GMM and other sound models,
+    * then parsing to GMM model and run same procedure.
+    *
+    * Param [in]  pKeywordModel - pointer to user-independent keyword model data
+    * Param [in]  keywordId - null terminated string contains keyword phrase string
+    * Param [in]  listen_epd_params - epd parameter
+                                      if null is passing, default epd parameter will be used internally
+    * Param [in]  pUserRecording - a single recording of user speaking keyword
+    * Param [out] pConfidenceLevel - returns confidence level returned by keyword detection
+    *
+    * Return - status
+    *       kBadParam - When any input pointer (except pEpdParameter) is NULL
+    *       kKeywordNotFound - When keywordId not exist in the model
+    *       kSMVersionUnsupported - When pKeywordModel is not 2.0 (have to contain GMM) model
+    *       kLowSnr - When user recording is too noisy
+    *       kNoSignal - When user recording is non-speech
+    */
+DllFunc listen_status_enum CDECLARE verifyUserRecording(
+        listen_model_type           *pKeywordModel,
+        keywordId_t                 keywordId, // add for SVA 2.0
+        listen_epd_params           *pEpdParameter,
+        listen_user_recording       *pUserRecording,
+        int16_t                     *pConfidenceLevel);
+
+    /*
+    * checkUserRecording
+    *
+    * Returns the status of user recordings that if user recording has problem with SNR(Signal Noise Ratio) and length
+    *
+    * Param [in]  pLanguageModel - pointer to language model
+    * Param [in]  pEpdParameter - pointer to EPD parameters
+    *                            Default parameter will be used if eEpdParameter is NULL
+    * Param [in]  pUserRecording - User recording that is going to be tested
+    * Param [out]  pOutSnr - SNR of user recording
+    * Param [in]  maxPhonemeLength (optional parameter) - maximum phoneme length allowed for each user recording
+    *                                                   - It is optional parameter, whose default value is 0.
+    *
+    * Return - status
+    *       kBadParam - When any input pointer (except pEpdParameter) is NULL
+    *         kLowSnr   - When user recording is too noisy
+    *         kNoSignal - When user recording is non-speech
+    *       kRecordingTooShort - When user recording is too short
+    */
+DllFunc listen_status_enum CDECLARE checkUserRecording(
+        listen_language_model_type  *pLanguageModel,
+        listen_epd_params           *pEpdParameter,
+        listen_user_recording       *pUserRecording,
+        float                       *pOutSnr,
+        uint32_t                    maxPhonemeLength);
+
+    /*
+    * checkRecordingsQuality
+    *
+    * Returns the status of the last user recording in recording array that
+    * if user recording has problem with SNR(Signal Noise Ratio) and length
+    * Check the consistency of the input recordings if numUserRecording > 1
+    *
+    * Param [in]  pLanguageModel - pointer to language model
+    * Param [in]  pEpdParameter - pointer to EPD parameters
+    *                            Default parameter will be used if eEpdParameter is NULL
+    * Param [in]  numUserRecording - number of input recordings
+    * Param [in]  pUserRecordings - User recordings those are going to be tested
+    * Param [out]  pOutSnr - SNR of user recording
+    *
+    * Return - status
+    *       kBadParam - When any input pointer (except pEpdParameter) is NULL
+    *         kLowSnr   - When user recording is too noisy
+    *         kNoSignal - When user recording is non-speech
+    *       kRecordingTooShort - When user recording is too short
+    */
+
+DllFunc listen_status_enum CDECLARE checkRecordingsQuality(
+        listen_language_model_type  *pLanguageModel,
+        listen_epd_params           *pEpdParameter,
+        uint32_t                     numUserRecording,
+        listen_user_recording       *pUserRecordings[],
+        float                       *pOutSnr);
+
+    /*
+    * tuneUserDefinedKeywordModelThreshold
+    *
+    * This function tunes threshold of user defined keyword.
+    *
+    * This function can be used when programmer want to make testing stage after training stage of user defined keyword
+    * even though threshold of user defined keyword is automatically tunned when create user defined keyword,
+    * this function can be useful when tune more threshold of user defined keyword
+    *
+    * Param [in]  pUserDefinedKeyword - pointer to user defined keyword
+    * Param [in]  keywordId - keyword spell
+    * Param [in]  pUserRecording - user recording from testing stage
+    * Param [out]  pOutputUserDefinedKeyword - tunned user defined keyword
+    *
+    * Return - listen_status_enum
+    * Return - status
+    *       kBadParam - When any input pointer is NULL, or pUserDefinedKeyword is not UDK
+    *       kKeywordNotFound - When keywordId not exist in the model
+    */
+DllFunc listen_status_enum CDECLARE tuneUserDefinedKeywordModelThreshold(
+        listen_model_type           *pUserDefinedKeyword,
+        keywordId_t                 keywordId,
+        listen_user_recording       *pUserRecording,
+        listen_model_type           *pOutputUserDefinedKeyword);
+
+
+    /*
+    * getUserDefinedKeywordSize
+    *
+    * Get the size required to hold user defined keyword model that extends given keyword model
+    * with give user data
+    *
+    * Param [in]  pUserDefinedKeyword - pointer to previous user defined keyword
+                                        if pUserDefinedKeyword is NULL, this will create new user defined keyword model
+                                        if pUserDefinedKeyword is not NULL, this will train incrementally ( not supported now )
+
+    * Param [in]  keywordId - keyword spell of user defined keyword
+    * Param [in]  userId - user spell of user defined keyword
+    * Param [in]  pEpdParameter - epd parameter which is used for chopping user recording.
+                                   if eEpdParameter is NULL, default parameter will be used
+    * Param [in]  numUserRecording - number of user recording
+    * Param [in]  pUserRecordings[] -  multiple recording of user speaking keyword
+    * Param [in]  pLanguageModel - language model
+    * Param [out]  pOutputSize - pointer to where output model size will be written
+    *
+    * Return - listen_status_enum
+    * Return - status
+    *       kBadParam - When any input pointer (except pUserDefinedKeyword, pEpdParameter) is NULL, or pLanguageModel is fake
+    *       kNoSignal - When user recording is non-speech
+    */
+DllFunc listen_status_enum CDECLARE getUserDefinedKeywordSize(
+        listen_model_type           *pUserDefinedKeyword,
+        keywordId_t                 keywordId,
+        userId_t                    userId,
+        listen_epd_params           *pEpdParameter,
+        uint32_t                    numUserRecording,
+        listen_user_recording       *pUserRecordings[],
+        listen_language_model_type  *pLanguageModel,
+        uint32_t                    *pOutputSize);
+
+    /*
+    * getUserDefinedKeywordApproxSize
+    *
+    * Get the size required to hold user-keyword model that extends given keyword model
+    * with give user data
+    *
+    * Param [in]  keywordId - null terminated string containing keyword phrase string
+    * Param [in]  userId - null terminated string containing user name string
+    * Param [in]  pLanguageModel - pointer to language model data
+    * Param [out] pOutputSize - size of approximated output model
+    * Param [in]  maxPhonemeLength (optional parameter) - maximum phoneme length allowed for each user recording
+    *                                                   - It is optional parameter, whose default value is 0.
+    *
+    * Return - status
+    *       kBadParam - When any input pointer is NULL
+    */
+
+DllFunc listen_status_enum CDECLARE getUserDefinedKeywordApproxSize(
+    keywordId_t keywordId,
+    userId_t userId,
+    listen_language_model_type *pLanguageModel,
+    uint32_t                        *pOutputSize,
+    uint32_t                        maxPhonemeLength);
+
+    /*
+    * createUserDefinedKeywordModel
+    *
+    * Description : Create User Defined Keyword Model
+    *
+    * Param [in]  pUserDefinedKeyword - pointer to previous user defined keyword
+                                        if pUserDefinedKeyword is NULL, this will create new user defined keyword model
+                                        if pUserDefinedKeyword is not NULL, this will train incrementally ( not supported now )
+
+    * Param [in]  keywordId - keyword spell of user defined keyword
+    * Param [in]  userId - user spell of user defined keyword
+    * Param [in]  pEpdParameter - epd parameter which is used for chopping user recording.
+                                   if eEpdParameter is NULL, default parameter will be used
+    * Param [in]  numUserRecording - number of user recording
+    * Param [in]  pUserRecordings[] - multiple recording of user speaking keyword
+    * Param [in]  pLanguageModel - language model
+    * Param [out] pOutputUserDefinedKeyword - pointer to where output model will be written
+    * Param [out] pMatchingScore - pointer to matching score
+    *
+    * Return - listen_status_enum
+    * Return - status
+    *       kBadParam - When any input pointer (except pUserDefinedKeyword, pEpdParameter) is NULL, or pLanguageModel is fake
+    *       kNoSignal - When user recording is non-speech
+    *       kCannotCreateUserUDK - When creation process fails somewhere
+    *       kOutputArrayTooSmall - When output size is smaller than actual udk model size
+    */
+DllFunc listen_status_enum CDECLARE createUserDefinedKeywordModel(
+        listen_model_type          *pUserDefinedKeyword,
+        keywordId_t                 keywordId,
+        userId_t                    userId,
+        listen_epd_params           *pEpdParameter,
+        uint32_t                     numUserRecording,
+        listen_user_recording      *pUserRecordings[],
+        listen_language_model_type  *pLanguageModel,
+        listen_model_type           *pOutputUserDefinedKeyword,
+        int16_t                     *pMatchingScore);
+
+    /*
+    * getStrippedUserKeywordModelSize
+    *
+    * Return stripped model size
+    *
+    * Param[in] pModel - pointer to (user)keyword model data
+    * Param[out] nStrippedModelSize - return model size of stripped model
+    *
+    * Return - status
+    *           kBadParam - When any input pointer is NULL
+    *           kSMVersionUnsupported - When pModel is not 2.0 model
+    *
+    */
+DllFunc listen_status_enum CDECLARE getStrippedUserKeywordModelSize(
+        listen_model_type           *pModel,
+        uint32_t                    *nStrippedModelSize);
+
+
+    /*
+    * stripUserKeywordModel
+    *
+    * Return stripped model
+    *
+    * Param[in] pModel - pointer to (user)keyword model data
+    * Param[out] pStrippedModel - pointer to stripped model data
+    *
+    * Return - status
+    *           kBadParam - When any input pointer is NULL
+    *           kSMVersionUnsupported - When pModel is not 2.0 model
+    *
+    */
+DllFunc listen_status_enum CDECLARE stripUserKeywordModel(
+        listen_model_type           *pModel,
+        listen_model_type           *pStrippedModel);
+
+    /*
+    * getUserKeywordModelSize
+    *
+    * Get the size required to hold user-keyword model that extends given keyword model
+    * with give user data
+    *
+    * Param [in]  pKeywordModel - pointer to keyword model data
+    * Param [in]  keywordId - null terminated string containing keyword phrase string
+    * Param [in]  userId - null terminated string containing user name string
+    * Param [out] nUserKeywordModelSize - size of user keyword model
+    *
+    * Return - status
+    *       kBadParam - When any input pointer is NULL
+    *       kKeywordNotFound - When keywordId not exist in the model
+    *       kSMVersionUnsupported - When pKeywordModel is not 2.0/3.0 model
+    */
+DllFunc listen_status_enum CDECLARE getUserKeywordModelSize(
+        listen_model_type           *pKeywordModel,
+        keywordId_t                 keywordId, // add for SVA 2.0
+        userId_t                    userId, // add for SVA 2.0
+        uint32_t                    *nUserKeywordModelSize);
+
+    /*
+    * createUserKeywordModel
+    *
+    * Create a user keyword model
+    * Writes the user keyword model into given memory location
+    *
+    * Param [in]  pKeywordModel - pointer to Keyword model  or User keyword model data
+                                if it is keyword model, create user-keyword model
+                                if it is user keyword model, incrementally train user keyword model
+    * Param [in]  keywordId - user data is to be appended for keyword in model with given identifier
+    * Param [in]  userId - identifier of user data is created
+    *            If identifier is already used, will replace existing user data with newly created data.
+    *            The User Name is passed to this function so that if this is the first time user data is
+    *            being added for a new user, the User's Name can be stored in the SM
+    * Param [in]  pEpdParameter - end point detection parameter
+    *                             if eEpdParameter is NULL, default parameter will be used
+    * Param [in]  numUserRecording - number of user recordings
+    * Param [in]  pUserRecordings - multiple recording of user speaking keyword
+    * Param [out] pUserKeywordModel - pointer to where user keyword model data is to be written
+    * Param [out] pUserMatchingScore - pointer to user matching score
+    * Return - status
+    *       kBadParam - When any input pointer (except pEpdParameter) is NULL
+    *       kKeywordNotFound - When keywordId not exist in the model
+    *       kSMVersionUnsupported - When pKeywordModel is not 2.0 or 3.0 model
+    *        kLowSnr    - When user recording is too noisy
+    *        kNoSignal - When user recording is non-speech
+    *       kCannotCreateUserUDK - When pKeywordModel is UDK model
+    */
+DllFunc listen_status_enum CDECLARE createUserKeywordModel(
+        listen_model_type           *pKeywordModel,
+        keywordId_t                 keywordId, // add for SVA 2.0
+        userId_t                    userId, // add for SVA 2.0
+        listen_epd_params           *pEpdParameter,
+        uint32_t                    numUserRecording,
+        listen_user_recording       *pUserRecordings[],
+        listen_model_type           *pUserKeywordModel,
+        int16_t                     *pUserMatchingScore);
+
+// Since size of new SM after removing data will be less than or equal to size of
+// input SM, this function could be optional and size of pInputModel could be used
+// to allocate memory for pResultModel when deleteFromModel() called.
+    /*
+    * getSizeAfterDeleting
+    *
+    * Return the size of sound model after removing data from a given SM for either
+    * a keyword, a user, or a specific user+keyword pair.
+    *
+    * Param [in]  pInputModel - pointer to sound model
+    * Param [in]  keywordId - data for this keyword in model with given identifier is removed
+    *           If userId is 'null', then all keyword-only data and all user data associated
+    *           with the given non-null keywordId is removed.
+    *           If userId is also non-null, then only data associated with the userId+keywordId
+    *           pair is removed.
+    * Param [in]  userId - all data for this user in model with given identifier is removed
+    *           If keywordId is 'null', then all all user data for the given non-null userId
+    *           is removed.
+    *           If keywordId is also non-null, then only data associated with the userId+keywordId
+    *           pair is removed.
+    * Param [out]  nOutputModelSize - outputs size of resulting soundmodel after removing data.
+    * Return - status
+    *       kBadParam - When any input pointer (except keywordId, userId) is NULL
+    *       kLastKeyword - When pInputModel has only one keyword
+    *       kSMVersionUnsupported - When pInputModel is not 2.0 model
+    *       kKeywordNotFound - When keywordId not exist in the model
+    *       kUserNotFound - When userId not exist in the model
+    *       kUserKWPairNotActive - When <keywordId, userId> pair not exist in the model
+    *       kUserUDKPairNotRemoved - When <keywordId, userId> pair to delete is UDK
+    */
+DllFunc listen_status_enum CDECLARE getSizeAfterDeleting(
+        listen_model_type           *pInputModel,
+        keywordId_t                 keywordId, // add for SVA 2.0
+        userId_t                    userId, // add for SVA 2.0
+        uint32_t                    *nOutputModelSize);
+
+// If getSizeAfterDeleting() supported, call it get size of new sound model after
+// removing desired data from given input sound model, and
+// allocate ResultModel with this size
+// Otherwise, use size of input SoundModel since size of ResultModel will be
+// less than or equal to size of input SoundModel.
+    /*
+    * deleteFromModel
+    *
+    * Return a new sound model after removing data from a given SM for a keyword, a user,
+    * or a user+keyword pair.
+    *
+    * Param [in]  pInputModel - pointer to sound model
+    * Param [in]  keywordId - data for this keyword in model with given identifier is removed
+    *           If userId is 'null', then all keyword-only data and all user data associated
+    *           with the given non-null keywordId is removed.
+    *           If userId is also non-null, then only data associated with the userId+keywordId
+    *           pair is removed.
+    * Param [in]  userId - all data for this user in model with given identifier is removed
+    *           If keywordId is 'null', then all all user data for the given non-null userId
+    *           is removed.
+    *           If keywordId is also non-null, then only data associated with the userId+keywordId
+    *           pair is removed.
+    * Param [out]  pResultModel - pointer to where user keyword model data is to be written
+    * Return - status
+    *       kBadParam - When any input pointer (except keywordId, userId) is NULL
+    *       kLastKeyword - When pInputModel has only one keyword
+    *       kSMVersionUnsupported - When pInputModel is not 2.0 or 3.0 model
+    *       kKeywordNotFound - When keywordId not exist in the model
+    *       kUserNotFound - When userId not exist in the model
+    *       kUserKWPairNotActive - When <keywordId, userId> pair not exist in the model
+    *       kUserUDKPairNotRemoved - When <keywordId, userId> pair to delete is UDK
+    */
+DllFunc listen_status_enum CDECLARE deleteFromModel(
+        listen_model_type           *pInputModel,
+        keywordId_t                 keywordId, // add for SVA 2.0
+        userId_t                    userId, // add for SVA 2.0
+        listen_model_type           *pResultModel);
+
+
+    /*
+    * getMergedModelSize
+    *
+    * Return the size of sound model after merging required models
+    *
+    * Param [in]  numModels - number of model files to be merged
+    * Param [in]  pModels - array of pointers to Keyword or User keyword model data
+    * Param [out]  nOutputModelSize - outputs size of resulting soundmodel after merging models
+    *
+    * Return - status
+    *       kBadParam - When any input pointer is NULL
+    *       kSMVersionUnsupported - When pInputModel is not 2.0 model
+    *       kDuplicateKeyword - When same keywordId exists in more than 1 model
+    *       kDuplicateUserKeywordPair
+    *       kMaxKeywordsExceeded
+    *       kMaxUsersExceeded,
+    */
+DllFunc listen_status_enum CDECLARE getMergedModelSize(
+        uint16_t                    numModels,
+        listen_model_type           *pModels[],
+        uint32_t                    *nOutputModelSize);
+
+
+
+    /*
+    * mergeModels
+    *
+    * merges two or more Sound Models
+    *
+    * Writes the new merged model into given memory location
+    *
+    * Param [in]  numModels - number of model files to be merged
+    * Param [in]  pModels - array of pointers to Keyword or User keyword model data
+    * Param [out]  pMergedModel - pointer to where merged model data is to be written
+    * Return - status
+    *       kBadParam - When any input pointer is NULL
+    *       kSMVersionUnsupported - When pInputModel is not 2.0 model
+    *       kDuplicateKeyword - When same keywordId exists in more than 1 model
+    *       kDuplicateUserKeywordPair - N/A to current version
+    *       kMaxKeywordsExceeded - N/A to current version
+    *       kMaxUsersExceeded - N/A to current version
+    */
+DllFunc listen_status_enum CDECLARE mergeModels(
+        uint16_t                    numModels,
+        listen_model_type       *pModels[],
+        listen_model_type       *pMergedModel);
+
+
+
+/* ParseFromBigSoundModel
+*
+* Parse the big 3.0 sound model to individual sub models
+*
+* Param [in]   *pSM3p0Model – The pointer to the big 3.0 sound model
+* Param [out]  p1stStageModel - pointer to parsed 1stStageModel
+* Param [out]  p2ndStageKWModel - pointer to parsed 2nd stage KW Model
+* Param [out]  p2stStageVoPModel - pointer to parsed 2nd stage VoP Model
+* Param [out]  indicator – returned indicator, indicating what types of models parsed/returned
+* Return - status
+*       kBadParam - When any input pointer is NULL
+*       kSMVersionUnsupported - When pInputModel is not 3.0 model
+*       kDuplicateKeyword - When same keywordId exists in more than 1 model
+*       kWrongModel - when input is broken
+*/
+
+DllFunc listen_status_enum CDECLARE parseFromBigSoundModel(
+        listen_model_type       *pSM3p0Model,
+        listen_model_type       *p1stStageModel,
+        listen_model_type       *p2ndStageKWModel,
+        listen_model_type       *p2stStageVoPModel,
+        uint16_t                *indicator );
+
+
+
+
+    /*
+    * parseDetectionEventData
+    *
+    * parse event payload into detection event.
+    *
+    * Version of input SM will detemine DetectionType created/returned
+    *
+    * Param [in]  pUserKeywordModel - pointer to keyword or user keyword model data
+    * Param [in]  pEventPayload - pointer to received event payload data
+    * Param [out] pDetectEvent - pointer to where detection event data is to be written
+    * Return - status
+    *       kBadParam - When any input pointer is NULL
+    *       kSMVersionUnsupported - When pUserKeywordModel is not 2.0 model
+    *       kEventStructUnsupported - When pEventPayload->size != numKeywords + numActiveUsers
+    */
+
+DllFunc listen_status_enum CDECLARE parseDetectionEventData(
+        listen_model_type           *pUserKeywordModel,
+        listen_event_payload        *pEventPayload,
+        listen_detection_event_type *pDetectionEvent);
+
+
+// Declared in both SVA 1.0 and SVA 2.0 versions and SML 3.0 of ListenSoundModelMLib
+//
+    /*
+    * querySoundModel
+    *
+    * Returns the information about a sound model
+    * Sound model could be of any type: Keyword, UserKeyword, TargetSound,...
+    * Sound model could be any versions
+    *
+    * Param [in] pSoundModel - pointer to model data
+    * Param [out] pListenSoundModelInfo - returns information about the give sound model
+    *
+    * Return - status
+    *       kBadParam - When any input pointer is NULL
+    *       kFailed - When input model failed to be decoded
+    *        kSMVersionUnsupported - When pSoundModel is fake model (invalid model other than 1.0 model, 2.0 model and 3.0 model)
+    */
+DllFunc listen_status_enum CDECLARE querySoundModel(
+        listen_model_type           *pSoundModel,
+        listen_sound_model_info     *pListenSoundModelInfo);
+
+
+    /*
+    * getSoundModelHeader
+    *
+    * Returns additional information about the sound model
+    * Sound model could be of any type: Keyword, UserKeyword, TargetSound,...
+    * Keyword
+    *
+    * Param [in] pSoundModel - pointer to model data
+    * Param [out] pListenSoundModelHeader - returns header field from sound model
+    *
+    * Return - status
+    *       kBadParam - When any input pointer is NULL
+    *       kSMVersionUnsupported - When pSoundModel is not 2.0 or 3.0 model
+    */
+
+DllFunc listen_status_enum CDECLARE getSoundModelHeader(
+        listen_model_type           *pSoundModel,
+        listen_sound_model_header   *pListenSoundModelHeader);
+
+
+    /*
+    * release sound model header
+    *
+    * deallocate sound model header
+    * Return - status
+    *       kBadParam - When any input pointer is NULL
+    */
+DllFunc listen_status_enum CDECLARE releaseSoundModelHeader(
+        listen_sound_model_header   *pListenSoundModelHeader);
+
+
+    /*
+    * getKeywordPhrases
+    *
+    * Get keyword phrase string for all Keywords defined in given SM 2.0 / 3.0
+    *
+    * App calling this function must allocate memory for all phrases
+    * by getting the number of keywords from querySoundModel() and allocating
+    * totalNumKeywords*MAX_STRING_LEN
+    * This function copies phrases into this allocated keywords array
+    *
+    * Param [in]  pSoundModel - pointer to model data
+    * Param [in/out] numKeywords - [in]  number of string entries allocated in keywords array
+    *                             [out] number of keyword phrase strings copied keyword array
+    * Param [out] keywords - array of keyword phrase null-terminated strings
+    *
+    * Return - status
+    *       kBadParam - When any input pointer is NULL, or numKeywords < real keywords number
+    *       kSMVersionUnsupported - When pSoundModel is not 2.0 or 3.0 model
+    */
+DllFunc listen_status_enum CDECLARE getKeywordPhrases(
+        listen_model_type           *pSoundModel,
+        uint16_t                    *numKeywords,
+        keywordId_t                 *keywords);
+
+
+    /*
+    * getUserNames
+    *
+    * Get user names for user data associated with a given SM 2.0 / 3.0
+    *
+    * App calling this function must allocate memory for all names
+    * by getting the number of users  from querySoundModel() and allocating
+    * totalNumUsers*MAX_STRING_LEN
+    * This function copies names into this allocated keywords array
+    *
+    * Param [in]  pSoundModel - pointer to model data
+    * Param [in/out] numUsers - [in]  number of string entries allocated in users array
+    *                          [out] number of user name strings copied users array
+    * Param [out] users - array of user name null-terminated strings
+    *
+    * Return - status
+    *       kBadParam - When any input pointer is NULL, or numUsers < real users number, or pSoundModel is keyword-only model
+    *       kSMVersionUnsupported - When pSoundModel is not 2.0 or 3.0 model
+    */
+DllFunc listen_status_enum CDECLARE getUserNames(
+        listen_model_type           *pSoundModel,
+        uint16_t                        *numUsers,
+        userId_t                        *users);
+
+    /*
+    * loadConfParams
+    *
+    * Load configurable parameters to the sound model library
+    *
+    * Param [in] pConfData - pointer to param data
+    * Param [in] confDataSize - size of memory allocated for param data
+    *
+    * Return - status
+    *       kBadParam - When any input pointer is NULL
+    */
+DllFunc listen_status_enum CDECLARE loadConfParams(
+        uint8_t                     *pConfData,
+        uint32_t                    confDataSize);
+    /*
+    * getBinaryModelSize
+    *
+    * Return binary model size
+    *
+    * Param[in] pListenModel - pointer to (user)keyword model data
+    * Param[out] nBinaryModelSize - return model size of binary model
+    *
+    * Return - status
+    *           kBadParam - When any input pointer is NULL
+    *           kSMVersionUnsupported - When pModel is not 2.0 or 3.0 model
+    *
+    */
+
+DllFunc listen_status_enum CDECLARE getBinaryModelSize(
+        listen_model_type           *pListenModel,
+        uint32_t                    *nBinaryModelSize);
+
+    /*
+    * getSortedKeywordStatesUserKeywordModelSize
+    *
+    * Return sorted model size
+    *
+    * Param[in] pModel - pointer to (user)keyword model data
+    * Param[out] nSortedModelSize - return model size of sorted keyword states model
+    *
+    * Return - status
+    *           kBadParam - When any input pointer is NULL
+    *
+    */
+
+DllFunc listen_status_enum CDECLARE getSortedKeywordStatesUserKeywordModelSize(
+    listen_model_type           *pModel,
+    uint32_t                    *nSortedModelSize);
+
+    /*
+    * sortKeywordStatesOfUserKeywordModel
+    *
+    * Return sorted model
+    *
+    * Param[in] pInputModel - pointer to (user)keyword model data
+    * Param[out] pSortedModel - pointer to sorted keyword states model data
+    *
+    * Return - status
+    *           kBadParam - When any input pointer is NULL
+    *           kSMVersionUnsupported - when pModel is not 2.0 model
+    *
+    */
+
+DllFunc listen_status_enum CDECLARE sortKeywordStatesOfUserKeywordModel(
+        listen_model_type           *pInputModel,
+        listen_model_type           *pSortedModel);
+
+
+#ifdef __cplusplus
+};
+#endif
+
+#endif /* __LISTEN_SOUND_MODEL_LIB_V3_H__ */
+
