audio: Apply app type gain at start of stream am: 4a824779a3
am: 923acb1474

Change-Id: I8585336ff6b630fd3db5054838907e88128acbaa
diff --git a/hal/audio_hw.c b/hal/audio_hw.c
index 3ad965e..cab1ffe 100644
--- a/hal/audio_hw.c
+++ b/hal/audio_hw.c
@@ -3745,7 +3745,7 @@
 
     // power_log may be null if the format is not supported
     // or not a userdebug or eng build.
-    if (false /* is_userdebug_or_eng_build() */) {
+    if (is_userdebug_or_eng_build()) {
         const size_t POWER_LOG_FRAMES_PER_ENTRY =
                 (long long)config->sample_rate * POWER_LOG_SAMPLING_INTERVAL_MS / 1000;
 
diff --git a/post_proc/Android.mk b/post_proc/Android.mk
index 493f2cc..f1174a0 100644
--- a/post_proc/Android.mk
+++ b/post_proc/Android.mk
@@ -30,6 +30,8 @@
 	external/tinyalsa/include \
 	$(call include-path-for, audio-effects)
 
+LOCAL_HEADER_LIBRARIES += libhardware_headers
+LOCAL_HEADER_LIBRARIES += libsystem_headers
 include $(BUILD_SHARED_LIBRARY)
 endif
 
@@ -60,6 +62,8 @@
         hardware/qcom/audio/hal \
 	$(call include-path-for, audio-effects)
 
+LOCAL_HEADER_LIBRARIES += libhardware_headers
+LOCAL_HEADER_LIBRARIES += libsystem_headers
 include $(BUILD_SHARED_LIBRARY)
 
 endif
diff --git a/visualizer/Android.mk b/visualizer/Android.mk
index e318214..29a093e 100644
--- a/visualizer/Android.mk
+++ b/visualizer/Android.mk
@@ -36,4 +36,5 @@
 	external/tinyalsa/include \
 	$(call include-path-for, audio-effects)
 
+LOCAL_HEADER_LIBRARIES += libsystem_headers
 include $(BUILD_SHARED_LIBRARY)
diff --git a/voice_processing/Android.mk b/voice_processing/Android.mk
index e8878ee..7ebeb70 100644
--- a/voice_processing/Android.mk
+++ b/voice_processing/Android.mk
@@ -23,4 +23,5 @@
 
 LOCAL_CFLAGS += -fvisibility=hidden
 
+LOCAL_HEADER_LIBRARIES += libhardware_headers
 include $(BUILD_SHARED_LIBRARY)