123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181 |
- ifeq ($(MODNAME),)
- KERNEL_BUILD := 1
- else
- KERNEL_BUILD := 0
- endif
- TARGET_KERNEL_VERSION := 4.9
- ifeq ($(CONFIG_ARCH_SDM845), y)
- TARGET_KERNEL_VERSION := 4.9
- endif
- ifeq ($(CONFIG_ARCH_SDM670), y)
- TARGET_KERNEL_VERSION := 4.9
- endif
- ifeq ($(CONFIG_ARCH_SDM855), y)
- TARGET_KERNEL_VERSION := 4.14
- endif
- KDIR := $(TOP)/kernel/msm-$(TARGET_KERNEL_VERSION)
- ifeq ($(KERNEL_BUILD), 1)
- AUDIO_ROOT := $(KDIR)/techpack/audio
- endif
- ifeq ($(KERNEL_BUILD), 0)
- ifeq ($(CONFIG_ARCH_SDM845), y)
- include $(AUDIO_ROOT)/config/sdm845auto.conf
- export
- INCS += -include $(AUDIO_ROOT)/config/sdm845autoconf.h
- endif
- ifeq ($(CONFIG_ARCH_SDM670), y)
- include $(AUDIO_ROOT)/config/sdm670auto.conf
- export
- INCS += -include $(AUDIO_ROOT)/config/sdm670autoconf.h
- endif
- ifeq ($(CONFIG_ARCH_SDM450), y)
- include $(AUDIO_ROOT)/config/sdm670auto.conf
- export
- INCS += -include $(AUDIO_ROOT)/config/sdm670autoconf.h
- endif
- ifeq ($(CONFIG_ARCH_SDM855), y)
- include $(AUDIO_ROOT)/config/sdm855auto.conf
- export
- INCS += -include $(AUDIO_ROOT)/config/sdm855autoconf.h
- endif
- endif
- UAPI_DIR := uapi
- UAPI_INC := -I$(AUDIO_ROOT)/include/$(UAPI_DIR)
- COMMON_DIR := include
- COMMON_INC := -I$(AUDIO_ROOT)/$(COMMON_DIR)
- ifdef CONFIG_MSM_QDSP6_APRV2_RPMSG
- APRV_GLINK += apr.o
- APRV_GLINK += apr_v2.o
- APRV_GLINK += apr_tal_rpmsg.o
- endif
- ifdef CONFIG_MSM_QDSP6_APRV3_RPMSG
- APRV_GLINK += apr.o
- APRV_GLINK += apr_v3.o
- APRV_GLINK += apr_tal_rpmsg.o
- endif
- ifdef CONFIG_WCD_DSP_GLINK
- WDSP_GLINK += wcd-dsp-glink.o
- endif
- LINUX_INC += -Iinclude/linux
- INCS += $(COMMON_INC) \
- $(UAPI_INC)
- EXTRA_CFLAGS += $(INCS)
- CDEFINES += -DANI_LITTLE_BYTE_ENDIAN \
- -DANI_LITTLE_BIT_ENDIAN \
- -DDOT11F_LITTLE_ENDIAN_HOST \
- -DANI_COMPILER_TYPE_GCC \
- -DANI_OS_TYPE_ANDROID=6 \
- -DPTT_SOCK_SVC_ENABLE \
- -Wall\
- -Werror\
- -D__linux__
- KBUILD_CPPFLAGS += $(CDEFINES)
- ifeq ($(KERNEL_BUILD), 0)
- HEADER_INSTALL_DIR := $(TOP)/kernel/msm-$(TARGET_KERNEL_VERSION)/scripts
- UAPI_OUT := $(PRODUCT_OUT)/obj/vendor/qcom/opensource/audio-kernel/include
- $(shell $(HEADER_INSTALL_DIR)/headers_install.sh $(UAPI_OUT)/linux/ $(AUDIO_ROOT)/include/uapi/linux/ avtimer.h;)
- $(shell $(HEADER_INSTALL_DIR)/headers_install.sh $(UAPI_OUT)/linux/ $(AUDIO_ROOT)/include/uapi/linux/ msm_audio.h;)
- $(shell $(HEADER_INSTALL_DIR)/headers_install.sh $(UAPI_OUT)/linux/ $(AUDIO_ROOT)/include/uapi/linux/ msm_audio_aac.h;)
- $(shell $(HEADER_INSTALL_DIR)/headers_install.sh $(UAPI_OUT)/linux/ $(AUDIO_ROOT)/include/uapi/linux/ msm_audio_ac3.h;)
- $(shell $(HEADER_INSTALL_DIR)/headers_install.sh $(UAPI_OUT)/linux/ $(AUDIO_ROOT)/include/uapi/linux/ msm_audio_alac.h;)
- $(shell $(HEADER_INSTALL_DIR)/headers_install.sh $(UAPI_OUT)/linux/ $(AUDIO_ROOT)/include/uapi/linux/ msm_audio_amrnb.h;)
- $(shell $(HEADER_INSTALL_DIR)/headers_install.sh $(UAPI_OUT)/linux/ $(AUDIO_ROOT)/include/uapi/linux/ msm_audio_amrwb.h;)
- $(shell $(HEADER_INSTALL_DIR)/headers_install.sh $(UAPI_OUT)/linux/ $(AUDIO_ROOT)/include/uapi/linux/ msm_audio_amrwbplus.h;)
- $(shell $(HEADER_INSTALL_DIR)/headers_install.sh $(UAPI_OUT)/linux/ $(AUDIO_ROOT)/include/uapi/linux/ msm_audio_ape.h;)
- $(shell $(HEADER_INSTALL_DIR)/headers_install.sh $(UAPI_OUT)/linux/ $(AUDIO_ROOT)/include/uapi/linux/ msm_audio_calibration.h;)
- $(shell $(HEADER_INSTALL_DIR)/headers_install.sh $(UAPI_OUT)/linux/ $(AUDIO_ROOT)/include/uapi/linux/ msm_audio_g711_dec.h;)
- $(shell $(HEADER_INSTALL_DIR)/headers_install.sh $(UAPI_OUT)/linux/ $(AUDIO_ROOT)/include/uapi/linux/ msm_audio_g711.h;)
- $(shell $(HEADER_INSTALL_DIR)/headers_install.sh $(UAPI_OUT)/linux/ $(AUDIO_ROOT)/include/uapi/linux/ msm_audio_mvs.h;)
- $(shell $(HEADER_INSTALL_DIR)/headers_install.sh $(UAPI_OUT)/linux/ $(AUDIO_ROOT)/include/uapi/linux/ msm_audio_qcp.h;)
- $(shell $(HEADER_INSTALL_DIR)/headers_install.sh $(UAPI_OUT)/linux/ $(AUDIO_ROOT)/include/uapi/linux/ msm_audio_sbc.h;)
- $(shell $(HEADER_INSTALL_DIR)/headers_install.sh $(UAPI_OUT)/linux/ $(AUDIO_ROOT)/include/uapi/linux/ msm_audio_voicememo.h;)
- $(shell $(HEADER_INSTALL_DIR)/headers_install.sh $(UAPI_OUT)/linux/ $(AUDIO_ROOT)/include/uapi/linux/ msm_audio_wma.h;)
- $(shell $(HEADER_INSTALL_DIR)/headers_install.sh $(UAPI_OUT)/linux/ $(AUDIO_ROOT)/include/uapi/linux/ msm_audio_wmapro.h;)
- $(shell $(HEADER_INSTALL_DIR)/headers_install.sh $(UAPI_OUT)/sound/ $(AUDIO_ROOT)/include/uapi/sound/ audio_effects.h;)
- $(shell $(HEADER_INSTALL_DIR)/headers_install.sh $(UAPI_OUT)/sound/ $(AUDIO_ROOT)/include/uapi/sound/ audio_slimslave.h;)
- $(shell $(HEADER_INSTALL_DIR)/headers_install.sh $(UAPI_OUT)/sound/ $(AUDIO_ROOT)/include/uapi/sound/ devdep_params.h;)
- $(shell $(HEADER_INSTALL_DIR)/headers_install.sh $(UAPI_OUT)/sound/ $(AUDIO_ROOT)/include/uapi/sound/ lsm_params.h;)
- $(shell $(HEADER_INSTALL_DIR)/headers_install.sh $(UAPI_OUT)/sound/ $(AUDIO_ROOT)/include/uapi/sound/ msmcal-hwdep.h;)
- $(shell $(HEADER_INSTALL_DIR)/headers_install.sh $(UAPI_OUT)/sound/ $(AUDIO_ROOT)/include/uapi/sound/ voice_params.h;)
- $(shell $(HEADER_INSTALL_DIR)/headers_install.sh $(UAPI_OUT)/sound/ $(AUDIO_ROOT)/include/uapi/sound/ wcd-dsp-glink.h;)
- KBUILD_EXTRA_SYMBOLS +=$(PRODUCT_OUT)/obj/vendor/qcom/opensource/audio-kernel/dsp/Module.symvers
- endif
- ifeq ($(call cc-option-yn, -Wmaybe-uninitialized),y)
- EXTRA_CFLAGS += -Wmaybe-uninitialized
- endif
- ifeq ($(call cc-option-yn, -Wheader-guard),y)
- EXTRA_CFLAGS += -Wheader-guard
- endif
- ifneq ($(MODNAME), qdsp6v2)
- CHIP_NAME ?= $(MODNAME)
- CDEFINES += -DMULTI_IF_NAME=\"$(CHIP_NAME)\"
- endif
- # Module information used by KBuild framework
- obj-$(CONFIG_MSM_QDSP6_APRV2_RPMSG) += apr_dlkm.o
- obj-$(CONFIG_MSM_QDSP6_APRV3_RPMSG) += apr_dlkm.o
- apr_dlkm-y := $(APRV_GLINK)
- obj-$(CONFIG_WCD_DSP_GLINK) += wglink_dlkm.o
- wglink_dlkm-y := $(WDSP_GLINK)
- # inject some build related information
- CDEFINES += -DBUILD_TIMESTAMP=\"$(shell date -u +'%Y-%m-%dT%H:%M:%SZ')\"
|