Merge "sdm845:Enable SSR recording."
diff --git a/configs/sdm845/sdm845.mk b/configs/sdm845/sdm845.mk
index 0d95a77..74ef4ec 100644
--- a/configs/sdm845/sdm845.mk
+++ b/configs/sdm845/sdm845.mk
@@ -240,4 +240,4 @@
     android.hardware.audio@2.0-service \
     android.hardware.audio@2.0-impl \
     android.hardware.audio.effect@2.0-impl \
-    android.hardware.soundtrigger@2.0-impl
+    android.hardware.soundtrigger@2.1-impl
diff --git a/hal/Android.mk b/hal/Android.mk
index a7a2193..996c8ad 100644
--- a/hal/Android.mk
+++ b/hal/Android.mk
@@ -78,7 +78,8 @@
 ifneq ($(filter msmnile,$(TARGET_BOARD_PLATFORM)),)
   LOCAL_HEADER_LIBRARIES += audio_kernel_headers
 endif
-ifneq ($(filter sdm710 qcs605 msmnile,$(TARGET_BOARD_PLATFORM)),)
+
+ifeq ($(strip $(AUDIO_FEATURE_ENABLED_DLKM)),true)
   LOCAL_HEADER_LIBRARIES := audio_kernel_headers
   LOCAL_C_INCLUDES += $(TARGET_OUT_INTERMEDIATES)/vendor/qcom/opensource/audio-kernel/include
   LOCAL_ADDITIONAL_DEPENDENCIES += $(BOARD_VENDOR_KERNEL_MODULES)
diff --git a/hal/audio_extn/soundtrigger.c b/hal/audio_extn/soundtrigger.c
index aa541f0..c49d779 100644
--- a/hal/audio_extn/soundtrigger.c
+++ b/hal/audio_extn/soundtrigger.c
@@ -151,10 +151,9 @@
 
 #define DLSYM(handle, ptr, symbol, err) \
 do {\
-    const char* error; \
-    *(void**)&ptr = dlsym(handle, #symbol); \
-    if ((error = dlerror())) {\
-        ALOGE("%s: ERROR. %s", __func__, error);\
+    ptr = dlsym(handle, #symbol); \
+    if (ptr == NULL) {\
+        ALOGW("%s: %s not found. %s", __func__, #symbol, dlerror());\
         err = -ENODEV;\
     }\
 } while(0)
@@ -633,7 +632,6 @@
     }
     ALOGI("%s: DLOPEN successful for %s", __func__, sound_trigger_lib);
 
-    dlerror();
     DLSYM(st_dev->lib_handle, st_dev->st_callback, sound_trigger_hw_call_back,
           status);
     if (status)