From 8b1366a648d53416d16f94dee0c33d4249018f92 Mon Sep 17 00:00:00 2001 From: Laxminath Kasam Date: Thu, 5 Oct 2017 01:44:16 +0530 Subject: Audio: DLKM support for all audio modules Switch to DLKM for all audio kernel modules. Change-Id: I6a96023a21f655f873531af9ace81f2b01eb0f58 Signed-off-by: Laxminath Kasam --- asoc/codecs/msm_sdw/Android.mk | 46 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) create mode 100644 asoc/codecs/msm_sdw/Android.mk (limited to 'asoc/codecs/msm_sdw/Android.mk') diff --git a/asoc/codecs/msm_sdw/Android.mk b/asoc/codecs/msm_sdw/Android.mk new file mode 100644 index 00000000..421420b8 --- /dev/null +++ b/asoc/codecs/msm_sdw/Android.mk @@ -0,0 +1,46 @@ +# Android makefile for audio kernel modules + +# Assume no targets will be supported + +AUDIO_CHIPSET := audio +# Build/Package only in case of supported target +ifeq ($(call is-board-platform,sdm670),true) +AUDIO_SELECT := CONFIG_SND_SOC_SDM670=m + +LOCAL_PATH := $(call my-dir) + +# This makefile is only for DLKM +ifneq ($(findstring vendor,$(LOCAL_PATH)),) + +ifneq ($(findstring opensource,$(LOCAL_PATH)),) + AUDIO_BLD_DIR := $(ANDROID_BUILD_TOP)/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 _audio.ko as LOCAL_MODULE. +# This means we need to rename the module to _audio.ko +# after audio.ko is built. +KBUILD_OPTIONS += MODNAME=msm_sdw_dlkm +KBUILD_OPTIONS += BOARD_PLATFORM=$(TARGET_BOARD_PLATFORM) +KBUILD_OPTIONS += $(AUDIO_SELECT) + +########################################################### +include $(CLEAR_VARS) +LOCAL_MODULE := $(AUDIO_CHIPSET)_msm_sdw.ko +LOCAL_MODULE_KBUILD_NAME := msm_sdw_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 -- cgit v1.2.3