From d648dbbb5ffff765ce9afcf1d60337ee7d3d1400 Mon Sep 17 00:00:00 2001 From: huangys Date: Wed, 25 Apr 2018 13:41:02 +0800 Subject: [PATCH] ospl: fix build error of header files absence pippen and ali-shm2018 audo kernel directory is not same, include differenct header file directory according directory exist or not Change-Id: I721fe66e659945caa3cae39d579c6f3a754dc0f7 Signed-off-by: huangys Reviewed-on: https://gerrit.mot.com/1167714 SME-Granted: SME Approvals Granted SLTApproved: Slta Waiver Tested-by: Jira Key Reviewed-by: Guobin Zhang Submit-Approved: Jira Key --- sound/soc/codecs/Kbuild | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/sound/soc/codecs/Kbuild b/sound/soc/codecs/Kbuild index c701a4c81e02..0423ffaa15ea 100644 --- a/sound/soc/codecs/Kbuild +++ b/sound/soc/codecs/Kbuild @@ -1,8 +1,19 @@ # add -Wall to try to catch everything we can. EXTRA_CFLAGS += -Wall EXTRA_CFLAGS += -I$(TOP)/motorola/kernel/modules/include + +HAVE_AUDIO_KERNEL = $(shell test -d $(TOP)/vendor/qcom/opensource/audio-kernel && echo 1) + +ifeq ($(HAVE_AUDIO_KERNEL),1) +$(info audio kernel path exist) EXTRA_CFLAGS += -I$(TOP)/vendor/qcom/opensource/audio-kernel/include EXTRA_CFLAGS += -I$(TOP)/vendor/qcom/opensource/audio-kernel/include/uapi +else +$(info audio kernel path not exist, include techpack audio header) +EXTRA_CFLAGS += -I$(TOP)/kernel/techpack/audio/include +EXTRA_CFLAGS += -I$(TOP)/kernel/techpack/audio/include/uapi +endif + EXTRA_CFLAGS += -DCONFIG_SND_SOC_AOV_TRIGGER -DCONFIG_SND_SOC_OPALUM cirrus_madera-objs = madera.o madera-slimbus.o wm_adsp.o