summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNiranjan Yadla <nyadla@cadence.com>2018-09-19 10:30:49 -0700
committerAlistair Strachan <astrachan@google.com>2018-09-20 12:28:37 -0700
commitf1d64a87246fb0a4e39017489ef0a0f26ae6efc4 (patch)
tree1f3297b9dc48a86cb13a630340b553e2d9cd2ca7
parente113eccfd1c28e8b3ca1f969ec3cde1282576bd1 (diff)
downloadhikey-f1d64a87246fb0a4e39017489ef0a0f26ae6efc4.tar.gz
hikey960: Audio DSP changes in prep for Treble
This patch provides hifi changes that are needed to work with FULL_TREBLE enabled. As /system/bin does not support write permissions moved dec-out.pcm file to /data/dec-out.pcm Copied dhifimesg to /vendor/bin in order to capture hifi dsp logs Bug: 116226155 Change-Id: Ia90f09760198b3fefe5ef3dfbdf5d7e11dd67a4b Originally-by: Niranjan Yadla <nyadla@cadence.com> Signed-off-by: Alistair Strachan <astrachan@google.com>
-rw-r--r--hifi/xaf/host-apf/Android.mk5
-rw-r--r--hifi/xaf/host-apf/include/os/android/xf-osal.h2
-rw-r--r--hifi/xaf/host-apf/utest/xaf-dec-test.c4
-rw-r--r--hikey960/device-hikey960.mk3
4 files changed, 10 insertions, 4 deletions
diff --git a/hifi/xaf/host-apf/Android.mk b/hifi/xaf/host-apf/Android.mk
index 28e71011..2bce8cf0 100644
--- a/hifi/xaf/host-apf/Android.mk
+++ b/hifi/xaf/host-apf/Android.mk
@@ -4,6 +4,7 @@ LOCAL_PATH := $(call my-dir)
################################################################################
include $(CLEAR_VARS)
+LOCAL_VENDOR_MODULE := true
common_C_INCLUDES := \
$(LOCAL_PATH)/include \
$(LOCAL_PATH)/include/audio \
@@ -25,7 +26,9 @@ LOCAL_SRC_FILES := \
C_FLAGS := -DXF_TRACE=0 -Wall -Werror -Wno-everything
+LOCAL_SHARED_LIBRARIES := liblog
LOCAL_C_INCLUDES := $(common_C_INCLUDES)
+LOCAL_C_INCLUDES += external/expat/lib
LOCAL_CFLAGS := $(C_FLAGS)
LOCAL_MODULE := libxtensa_proxy
LOCAL_MODULE_TAGS := optional
@@ -36,6 +39,7 @@ include $(BUILD_STATIC_LIBRARY)
# xaf-dec-test: fileinput->ogg/pcm decoder->speaker output
################################################################################
include $(CLEAR_VARS)
+LOCAL_VENDOR_MODULE := true
LOCAL_MODULE := xaf-dec-test
LOCAL_SRC_FILES := \
@@ -52,6 +56,7 @@ include $(BUILD_EXECUTABLE)
# xaf-dec-mix-test: fileinput->ogg orpcm decoder->Mixer->speaker output
################################################################################
include $(CLEAR_VARS)
+LOCAL_VENDOR_MODULE := true
LOCAL_MODULE := xaf-dec-mix-test
LOCAL_SRC_FILES := \
diff --git a/hifi/xaf/host-apf/include/os/android/xf-osal.h b/hifi/xaf/host-apf/include/os/android/xf-osal.h
index 7d2f5a95..6286405e 100644
--- a/hifi/xaf/host-apf/include/os/android/xf-osal.h
+++ b/hifi/xaf/host-apf/include/os/android/xf-osal.h
@@ -34,7 +34,7 @@
#include <sys/mman.h>
#include <sys/ioctl.h>
#include <sys/time.h>
-#include <cutils/log.h>
+#include <log/log.h>
/*******************************************************************************
* Tracing primitive
diff --git a/hifi/xaf/host-apf/utest/xaf-dec-test.c b/hifi/xaf/host-apf/utest/xaf-dec-test.c
index 7e5d050a..b83a0f90 100644
--- a/hifi/xaf/host-apf/utest/xaf-dec-test.c
+++ b/hifi/xaf/host-apf/utest/xaf-dec-test.c
@@ -253,9 +253,9 @@ int main(int argc, const char **argv)
TRACE(ERROR, _x("Failed to open '%s': %d"), argv[1], errno);
exit(-1);
}
- if ((ofp = fopen("dec-out.pcm", "wb")) == NULL)
+ if ((ofp = fopen("/data/dec-out.pcm", "wb")) == NULL)
{
- TRACE(ERROR, _x("Failed to open '%s': %d"), "dec-out.pcm", errno);
+ TRACE(ERROR, _x("Failed to open '%s': %d"), "/data/dec-out.pcm", errno);
exit(-1);
}
p_input = fp;
diff --git a/hikey960/device-hikey960.mk b/hikey960/device-hikey960.mk
index 319f31aa..814dd64a 100644
--- a/hikey960/device-hikey960.mk
+++ b/hikey960/device-hikey960.mk
@@ -37,7 +37,8 @@ PRODUCT_COPY_FILES += \
# Copy hifi firmware
PRODUCT_COPY_FILES += \
- device/linaro/hikey/hifi/firmware/hifi-hikey960.img:$(TARGET_COPY_OUT_VENDOR)/firmware/hifi/hifi.img
+ device/linaro/hikey/hifi/firmware/hifi-hikey960.img:$(TARGET_COPY_OUT_VENDOR)/firmware/hifi/hifi.img \
+ device/linaro/hikey/hifi/xaf/host-apf/tools/dhifimesg:/vendor/bin/dhifimesg
# Build HiKey960 HDMI audio HAL. Experimental only may not work. FIXME