############################################################################### # export variables ############################################################################### ifeq ($(CONFIG_SOCT_KMOD_CFLAGS),) ccflags-y += $(CONFIG_SOCT_KMOD_CFLAGS) endif ccflags-y += -D_FORTIFY_SOURCE=2 -O2 -fstack-protector-strong -Wl,-z,relro,-z,now -Wl,-z,noexecstack -g0 -s -Wformat ############################################################################### # local variables ############################################################################### adsp_path := drivers/drv/adsp aiao_path := drivers/drv/aiao ccflags-y += -Idrivers/drv/ioctl_inc/generic \ -Idrivers/drv/ioctl_inc/common \ -Idrivers/drv/ioctl_inc/video \ -Idrivers/drv/ioctl_inc/panel \ -Idrivers/drv/ioctl_inc/audio \ -Idrivers/drv/ioctl_inc/ao \ -Idrivers/drv/ioctl_inc/ai \ -Idrivers/drv/ioctl_inc/gpio \ -Idrivers/drv/ioctl_inc/pdm \ -Idrivers/drv/ioctl_inc/stat \ -Idrivers/drv/ioctl_inc/gpio \ -Idrivers/drv/ioctl_inc/i2c \ -Idrivers/drv/ioctl_inc/vo \ -Idrivers/drv/ioctl_inc/memc \ -Idrivers/drv/ioctl_inc/panel \ -Idrivers/drv/ext_inc/base \ -Idrivers/drv/ext_inc/osal \ -Idrivers/drv/ext_inc/adsp \ -Idrivers/drv/ext_inc/common \ -Idrivers/drv/ext_inc/lsadc \ -Idrivers/drv/ext_inc/aiao \ -Idrivers/drv/ext_inc/gpio \ -Idrivers/drv/ext_inc/pdm \ -Idrivers/drv/ext_inc/panel \ -Idrivers/drv/ext_inc/stat \ -Idrivers/drv/ext_inc/i2c \ -Idrivers/drv/ext_inc/amp \ -Idrivers/drv/common/include \ -I$(adsp_path)/include \ -Idrivers/drv/dip_inc/ao ccflags-y += -I$(aiao_path)/ai \ -I$(aiao_path)/ao \ -I$(aiao_path)/osal \ -I$(aiao_path)/common/include ifneq ($(findstring $(CONFIG_SOCT_CHIP_TYPE), "reserved13", "reserved6", "reserved9", "reserved8"),) ccflags-y += -I$(aiao_path)/common/reserved9 endif ccflags-y += -I$(aiao_path)/fault_check ccflags-y += -Idrivers/drv/ext_inc/dftevent ifneq ($(findstring $(CONFIG_SOCT_CHIP_TYPE), "reserved5"),) ccflags-y += -I$(aiao_path)/common/reserved5 endif ifneq ($(findstring $(CONFIG_SOCT_CHIP_TYPE), "reserved19", "reserved17"),) ccflags-y += -I$(aiao_path)/common/reserved17 endif ifneq ($(findstring $(CONFIG_SOCT_CHIP_TYPE), "hi3751v811"),) ccflags-y += -I$(aiao_path)/common/hi3751v811 endif #=============================================================================== ifeq ($(CONFIG_SOCT_AUDIO_EXTERNAL_AMP),y) ccflags-y += -DCONFIG_SOCT_AUDIO_EXTERNAL_AMP endif ifeq ($(CONFIG_SOCT_AUDIO_INTERNAL_AMP),y) ccflags-y += -DCONFIG_SOCT_AUDIO_INTERNAL_AMP endif ifeq ($(CONFIG_SOCT_AUDIO_AMP_AUTO_SELECT_MODE),y) ccflags-y += -DCONFIG_SOCT_AUDIO_AMP_AUTO_SELECT_MODE endif #=============================================================================== ifeq ($(CONFIG_SOCT_SND_MUTECTL_SUPPORT),y) ccflags-y += -DCONFIG_SOCT_SND_MUTECTL_GPIO=$(CONFIG_SOCT_SND_MUTECTL_GPIO) ccflags-y += -DCONFIG_SOCT_SND_MUTECTL_LEVEL=$(CONFIG_SOCT_SND_MUTECTL_LEVEL) endif ifeq ($(CONFIG_SOCT_SND_PORT_DELAY_SUPPORT),y) ccflags-y += -DCONFIG_SOCT_SOUND_PORT_DELAY_SUPPORT endif #=============================================================================== ccflags-y += -DCONFIG_SOCT_SND_DRV_SUSPEND_SUPPORT ccflags-y += -DCONFIG_SOCT_SND_HDMI_PASSTHROUGH_USE_I2S_ONLY ifeq ($(CONFIG_SOCT_SND_HBRA_PASSTHROUGH_SUPPORT),y) ccflags-y += -DCONFIG_SOCT_SND_HBRA_PASSTHROUGH_SUPPORT endif #=============================================================================== MODNAME := soc_aiao ifeq ($(CONFIG_SOCT_DRV_BUILDIN),y) obj-y += $(MODNAME).o else obj-m += $(MODNAME).o endif $(MODNAME)-objs-y += \ drv_aiao_module.o \ osal/audio_mem.o \ common/src/audio_util.o \ common/src/hal_aiao.o \ common/src/hal_aiao_func.o \ common/src/hal_aiao_priv.o \ common/src/hal_tianlai_adac.o \ common/src/drv_aiao_hal_mad.o \ common/hi3751v811/drv_aiao_hi3751v811_cfg.o \ $(MODNAME)-objs-y += \ ao/drv_ao.o \ ao/drv_ao_engine.o \ ao/hal_aoe_func.o \ ao/hal_aoe.o \ ao/drv_ao_intf.o \ ao/drv_ao_ext.o #=============================================================================== include $(aiao_path)/ao/ao.mak include $(aiao_path)/ai/ai.mak include $(aiao_path)/alsa/alsa.mak #=============================================================================== ifeq ($(CONFIG_SOCT_AIAO_VERIFICATION_SUPPORT),y) ccflags-y += -DCONFIG_SOCT_AIAO_VERIFICATION_SUPPORT $(MODNAME)-objs-y += common/src/drv_aiao_veri.o endif #=============================================================================== ccflags-y += -DCONFIG_SOCT_TIANLAI_SV100 $(MODNAME)-objs-y += \ common/src/hal_tianlai_adac_sv100.o \ common/src/drv_aiao_tianlai_adac_v760.o \ common/src/drv_aiao_tianlai_adac_v650.o #=============================================================================== $(MODNAME)-objs-y += \ fault_check/underload_detect.o #=============================================================================== $(MODNAME)-objs := $($(MODNAME)-objs-y)