hikey/hikey960: Audio changes in prep for Treble

This patch provides audio changes that are needed
to work with FULL_TREBLE enabled

Credit for this patch goes to Vishal Bhoj <vishal.bhoj@linaro.org>
who basically was the original author and magician
who got things working.

I've only refactored and split up his changes to help
with the submissions.

Change-Id: Ib29b063cc1ac8c449b289d98ef06c32e0ab50c2c
Signed-off-by: John Stultz <john.stultz@linaro.org>
diff --git a/audio/Android.mk b/audio/Android.mk
index c1ba564..0a02789 100644
--- a/audio/Android.mk
+++ b/audio/Android.mk
@@ -22,8 +22,11 @@
 # required type is 'primary'. Other possibilites are 'a2dp', 'usb', etc.
 include $(CLEAR_VARS)
 
+LOCAL_HEADER_LIBRARIES += libhardware_headers
 LOCAL_MODULE := audio.primary.$(TARGET_BOARD_PLATFORM)
 LOCAL_MODULE_RELATIVE_PATH := hw
+LOCAL_VENDOR_MODULE := true
+
 LOCAL_SRC_FILES := audio_hw.c
 LOCAL_SHARED_LIBRARIES := liblog libcutils libtinyalsa
 LOCAL_CFLAGS := -Wno-unused-parameter
diff --git a/audio/audio_hw.c b/audio/audio_hw.c
index ceeea8c..56b3e14 100644
--- a/audio/audio_hw.c
+++ b/audio/audio_hw.c
@@ -23,8 +23,9 @@
 #include <stdint.h>
 #include <sys/time.h>
 #include <stdlib.h>
+#include <unistd.h>
 
-#include <cutils/log.h>
+#include <log/log.h>
 #include <cutils/str_parms.h>
 #include <cutils/properties.h>