Revert "hal: audio-test: Move omx tests mm-audio-internal"

This reverts commit 2ce1027d13f23e34d6528968e94d6af876dc009c.

Also Fix NULL stream pointer LLVM issue by performing
NULL check before dereference the pointer

Change-Id: Ia2a8b3492b5424993e6c651555054d899f2ca3f2
diff --git a/mm-audio/aenc-g711/qdsp6/Android.mk b/mm-audio/aenc-g711/qdsp6/Android.mk
index 4a6cc03..62dc09a 100644
--- a/mm-audio/aenc-g711/qdsp6/Android.mk
+++ b/mm-audio/aenc-g711/qdsp6/Android.mk
@@ -44,6 +44,28 @@
 
 include $(BUILD_SHARED_LIBRARY)
 
+
+# ---------------------------------------------------------------------------------
+#             Make the apps-test (mm-aenc-omxg711-test)
+# ---------------------------------------------------------------------------------
+
+include $(CLEAR_VARS)
+
+mm-g711-enc-test-inc   := $(LOCAL_PATH)/inc
+mm-g711-enc-test-inc   += $(LOCAL_PATH)/test
+mm-g711-enc-test-inc   += $(TARGET_OUT_HEADERS)/mm-core/omxcore
+
+LOCAL_MODULE            := mm-aenc-omxg711-test
+LOCAL_MODULE_TAGS       := optional
+LOCAL_CFLAGS            := $(libOmxG711Enc-def)
+LOCAL_C_INCLUDES        := $(mm-g711-enc-test-inc)
+LOCAL_PRELINK_MODULE    := false
+LOCAL_SHARED_LIBRARIES  := libmm-omxcore
+LOCAL_SHARED_LIBRARIES  += libOmxG711Enc
+LOCAL_SRC_FILES         := test/omx_g711_enc_test.c
+
+include $(BUILD_EXECUTABLE)
+
 endif
 
 # ---------------------------------------------------------------------------------