audio: qahw: Fix compilation errors

Fix compilation errors such as
- unused parameter
- multiple declaration.
Also modify makefile to install images
in vendor partition.

Change-Id: I3d998eef91a16a890993449e92ef8f5443558c78
diff --git a/qahw/Android.mk b/qahw/Android.mk
index c7df9e3..0b782f0 100644
--- a/qahw/Android.mk
+++ b/qahw/Android.mk
@@ -27,6 +27,7 @@
 LOCAL_COPY_HEADERS      += inc/qahw_effect_api.h
 
 LOCAL_PRELINK_MODULE    := false
+LOCAL_VENDOR_MODULE     := true
 
 include $(BUILD_SHARED_LIBRARY)
 
diff --git a/qahw/inc/qahw_effect_api.h b/qahw/inc/qahw_effect_api.h
index de53cd3..dbd61e2 100644
--- a/qahw/inc/qahw_effect_api.h
+++ b/qahw/inc/qahw_effect_api.h
@@ -31,8 +31,6 @@
 
 #include <system/audio.h>
 
-#include "qahw.h"
-
 __BEGIN_DECLS
 
 #define QAHW_EFFECT_API_VERSION_0_0 QAHW_MAKE_API_VERSION(0, 0)
diff --git a/qahw/src/qahw_effect.c b/qahw/src/qahw_effect.c
index cf7b3fd..2eff79f 100644
--- a/qahw/src/qahw_effect.c
+++ b/qahw/src/qahw_effect.c
@@ -38,6 +38,7 @@
 #include <hardware/audio_effect.h>
 #include <stdlib.h>
 
+#include "qahw.h"
 #include "qahw_effect_api.h"
 
 // The current effect API version.
diff --git a/qahw_api/Android.mk b/qahw_api/Android.mk
index ba402ba..fa4e6cb 100644
--- a/qahw_api/Android.mk
+++ b/qahw_api/Android.mk
@@ -34,6 +34,7 @@
 LOCAL_COPY_HEADERS      += inc/qahw_effect_visualizer.h
 
 LOCAL_PRELINK_MODULE    := false
+LOCAL_VENDOR_MODULE     := true
 
 include $(BUILD_SHARED_LIBRARY)
 
diff --git a/qahw_api/test/Android.mk b/qahw_api/test/Android.mk
index ec4e698..06e8a5a 100644
--- a/qahw_api/test/Android.mk
+++ b/qahw_api/test/Android.mk
@@ -20,10 +20,10 @@
     libutils \
     libcutils
 
-LOCAL_LDLIBS := -lpthread
 LOCAL_32_BIT_ONLY := true
 
 LOCAL_C_INCLUDES += $(hal-play-inc)
+LOCAL_VENDOR_MODULE := true
 
 include $(BUILD_EXECUTABLE)
 
@@ -43,4 +43,6 @@
 hal-rec-inc     = $(TARGET_OUT_HEADERS)/mm-audio/qahw_api/inc
 
 LOCAL_C_INCLUDES += $(hal-rec-inc)
+LOCAL_VENDOR_MODULE := true
+
 include $(BUILD_EXECUTABLE)
diff --git a/qahw_api/test/qahw_multi_record_test.c b/qahw_api/test/qahw_multi_record_test.c
index d618101..2e0a396 100644
--- a/qahw_api/test/qahw_multi_record_test.c
+++ b/qahw_api/test/qahw_multi_record_test.c
@@ -588,7 +588,7 @@
     printf("                                               For mono channel 16kHz rate for 30seconds\n\n");
 }
 
-static void qti_audio_server_death_notify_cb(void *ctxt) {
+static void qti_audio_server_death_notify_cb(void *ctxt __unused) {
     fprintf(log_file, "qas died\n");
     fprintf(stderr, "qas died\n");
     stop_record = true;
@@ -769,7 +769,7 @@
     /* set global setparams entered by user.
      * Also other global setparams can be concatenated if required.
      */
-    if (params[0].kvpairs != NULL) {
+    if (params[0].kvpairs[0] != 0) {
         size_t len;
         len = strcspn(params[0].kvpairs, ",");
         while (len < strlen(params[0].kvpairs)) {
diff --git a/qahw_api/test/qahw_playback_test.c b/qahw_api/test/qahw_playback_test.c
index 436572f..2469b3c 100644
--- a/qahw_api/test/qahw_playback_test.c
+++ b/qahw_api/test/qahw_playback_test.c
@@ -1199,7 +1199,7 @@
 int tigger_event(qahw_stream_handle_t* out_handle)
 {
     qahw_param_payload payload;
-    struct event_data event_payload = {0};
+    struct event_data event_payload = {0, 0, 0, 0, 0, 0, 0};
     int ret = 0;
 
     event_payload.num_events = 1;
diff --git a/qahw_api/test/qahw_playback_test.h b/qahw_api/test/qahw_playback_test.h
index 3ec8f25..b643c1d 100644
--- a/qahw_api/test/qahw_playback_test.h
+++ b/qahw_api/test/qahw_playback_test.h
@@ -159,8 +159,12 @@
 #define is_qap_session_active(argc, argv, kvp_string)                    (0)
 #define get_play_list(fp, stream_param, num_of_streams, kvp_str)         (0)
 #define check_for_playlist(kvp_string)                                   (0)
-#define start_playback_through_qap(kvp_string, num_of_streams,\
-                                         qap_out_hal_handle_t)           (0)
+inline int start_playback_through_qap(char * kvp_string __unused,
+                                      int num_of_streams __unused,
+                                      qahw_module_handle_t *qap_out_hal_handle_t __unused)
+{
+    return 0;
+}
 #define start_playback_through_qap_playlist(cmd_kvp_str, num_of_streams,\
                    kvp_string, stream_param, qap_wrapper_session_active,\
                    qap_out_hal_handle_t)                                 (0)