Files
kernel_xiaomi_raphael/4.0/asoc/codecs/wcd938x/Android.mk
Faiz Nabi Kuchay 0063af2294 audio-kernel: Add new audio kernel folder for atoll
Add new folder 4.0 which contains files exclusively used by
atoll target for compilation.
Reference change ID of 4.0 branch:
I1e5ceb39f031ea7f7efdd38706845b71b093a479

Change-Id: I9af32ff7cbb3df2b88577d0417fb10b2776601a6
Signed-off-by: Faiz Nabi Kuchay <fkuchay@codeaurora.org>
2019-08-26 21:06:20 +05:30

70 lines
2.3 KiB
Makefile

# Android makefile for audio kernel modules
# Assume no targets will be supported
# Check if this driver needs be built for current target
ifeq ($(call is-board-platform,kona),true)
AUDIO_SELECT := CONFIG_SND_SOC_KONA=m
endif
ifeq ($(call is-board-platform,lito),true)
AUDIO_SELECT := CONFIG_SND_SOC_LITO=m
endif
ifeq ($(call is-board-platform,atoll),true)
AUDIO_SELECT := CONFIG_SND_SOC_ATOLL=m
endif
ifeq ($(call is-board-platform,$(MSMSTEPPE)),true)
AUDIO_SELECT := CONFIG_SND_SOC_SM6150=m
endif
AUDIO_CHIPSET := audio
# Build/Package only in case of supported target
ifeq ($(call is-board-platform-in-list,kona lito atoll $(MSMSTEPPE)),true)
LOCAL_PATH := $(call my-dir)
# This makefile is only for DLKM
ifneq ($(findstring vendor,$(LOCAL_PATH)),)
ifneq ($(findstring opensource,$(LOCAL_PATH)),)
AUDIO_BLD_DIR := $(shell pwd)/vendor/qcom/opensource/audio-kernel
endif # opensource
DLKM_DIR := $(TOP)/device/qcom/common/dlkm
# Build audio.ko as $(AUDIO_CHIPSET)_audio.ko
###########################################################
# This is set once per LOCAL_PATH, not per (kernel) module
KBUILD_OPTIONS := AUDIO_ROOT=$(AUDIO_BLD_DIR)
# We are actually building audio.ko here, as per the
# requirement we are specifying <chipset>_audio.ko as LOCAL_MODULE.
# This means we need to rename the module to <chipset>_audio.ko
# after audio.ko is built.
KBUILD_OPTIONS += MODNAME=wcd938x_dlkm
KBUILD_OPTIONS += BOARD_PLATFORM=$(TARGET_BOARD_PLATFORM)
KBUILD_OPTIONS += $(AUDIO_SELECT)
###########################################################
include $(CLEAR_VARS)
LOCAL_MODULE := $(AUDIO_CHIPSET)_wcd938x.ko
LOCAL_MODULE_KBUILD_NAME := wcd938x_dlkm.ko
LOCAL_MODULE_TAGS := optional
LOCAL_MODULE_DEBUG_ENABLE := true
LOCAL_MODULE_PATH := $(KERNEL_MODULES_OUT)
include $(DLKM_DIR)/AndroidKernelModule.mk
###########################################################
include $(CLEAR_VARS)
LOCAL_MODULE := $(AUDIO_CHIPSET)_wcd938x_slave.ko
LOCAL_MODULE_KBUILD_NAME := wcd938x_slave_dlkm.ko
LOCAL_MODULE_TAGS := optional
LOCAL_MODULE_DEBUG_ENABLE := true
LOCAL_MODULE_PATH := $(KERNEL_MODULES_OUT)
include $(DLKM_DIR)/AndroidKernelModule.mk
###########################################################
endif # DLKM check
endif # supported target check