hdmi_in_test: Add support for Android

Add support for Android make file.
Fixed compiler warnings.

Change-Id: I7781cc16dc35f9b3498d02a3f60763cdd59b7e6f
diff --git a/Makefile.am b/Makefile.am
index bd08211..d4aef58 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -1,7 +1,11 @@
 SUBDIRS = hal post_proc
 
 if QAHW_SUPPORT
-SUBDIRS += qahw_api qahw_api/test hdmi_in_test
+SUBDIRS += qahw_api qahw_api/test
+endif
+
+if AUDIO_HW_LOOPBACK
+SUBDIRS += hdmi_in_test
 endif
 
 ACLOCAL_AMFLAGS = -I m4
diff --git a/hdmi_in_test/Android.mk b/hdmi_in_test/Android.mk
new file mode 100644
index 0000000..0530372
--- /dev/null
+++ b/hdmi_in_test/Android.mk
@@ -0,0 +1,15 @@
+LOCAL_PATH := $(call my-dir)
+include $(CLEAR_VARS)
+
+LOCAL_MODULE := hdmi_in_test
+LOCAL_MODULE_TAGS := optional
+LOCAL_MODULE_OWNER := qti
+
+LOCAL_SRC_FILES := \
+    src/hdmi_in_event_test.c
+
+LOCAL_SHARED_LIBRARIES := \
+    liblog \
+    libcutils
+
+include $(BUILD_EXECUTABLE)
diff --git a/hdmi_in_test/src/hdmi_in_event_test.c b/hdmi_in_test/src/hdmi_in_event_test.c
index 4dd7568..93fea29 100644
--- a/hdmi_in_test/src/hdmi_in_event_test.c
+++ b/hdmi_in_test/src/hdmi_in_event_test.c
@@ -35,6 +35,7 @@
 #include <poll.h>
 #include <stdio.h>
 #include <string.h>
+#include <stdlib.h>
 #include <sys/prctl.h>
 #include <sys/stat.h>
 #include <sys/socket.h>
@@ -124,9 +125,9 @@
     read_data_from_fd(hdmi_in_audio_channel_sys_path, &hdmi_num_channels);
 
     ALOGI("HDMI In state: %d, audio_state: %d, audio_format: %d,",
-		hdmi_conn_state, hdmi_audio_state, hdmi_audio_format);
+           hdmi_conn_state, hdmi_audio_state, hdmi_audio_format);
     ALOGI(" hdmi_sample_rate: %d, hdmi_num_channels: %d\n",
-		hdmi_sample_rate, hdmi_num_channels);
+            hdmi_sample_rate, hdmi_num_channels);
 }
 
 int poll_event_init()
@@ -157,7 +158,7 @@
     return (soc > 0);
 }
 
-void listen_uevent(void *ptr)
+void listen_uevent(void *ptr __unused)
 {
     char buffer[64*1024];
     struct pollfd fds;