06183689db
Add support for SND event framework for helping with notifications among different audio modules/drivers. The SND event framework functions with a master/client mechanism, where each client and the master register with the framework, and then notifies its own status (UP/DOWN). Each master will share a list of clients it is interested in, and once all the clients are registered and notified UP, the framework's state will be UP. On the other hand, as and when any one of the client, or the master reports its state as DOWN while the framework is UP, the framework state would be changed to DOWN, and all clients and the master would be let know about the change. Change-Id: Ief6f26c5d5626c29246472ad71c247d71ee9e92f Signed-off-by: Banajit Goswami <bgoswami@codeaurora.org>
97 lines
3.5 KiB
Makefile
97 lines
3.5 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,sdm845),true)
|
|
AUDIO_SELECT := CONFIG_SND_SOC_SDM845=m
|
|
endif
|
|
|
|
ifeq ($(call is-board-platform-in-list,msm8953 sdm670 qcs605),true)
|
|
AUDIO_SELECT := CONFIG_SND_SOC_SDM670=m
|
|
endif
|
|
|
|
ifeq ($(call is-board-platform,msmnile),true)
|
|
AUDIO_SELECT := CONFIG_SND_SOC_SM8150=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,msm8953 sdm845 sdm670 qcs605 msmnile $(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 := $(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 <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=soc_dlkm
|
|
KBUILD_OPTIONS += BOARD_PLATFORM=$(TARGET_BOARD_PLATFORM)
|
|
KBUILD_OPTIONS += $(AUDIO_SELECT)
|
|
|
|
###########################################################
|
|
ifeq ($(call is-board-platform-in-list,msm8953 sdm670 qcs605 $(MSMSTEPPE)),true)
|
|
include $(CLEAR_VARS)
|
|
LOCAL_MODULE := $(AUDIO_CHIPSET)_pinctrl_lpi.ko
|
|
LOCAL_MODULE_KBUILD_NAME := pinctrl_lpi_dlkm.ko
|
|
LOCAL_MODULE_TAGS := optional
|
|
LOCAL_MODULE_DEBUG_ENABLE := true
|
|
LOCAL_MODULE_PATH := $(KERNEL_MODULES_OUT)
|
|
include $(DLKM_DIR)/AndroidKernelModule.mk
|
|
endif
|
|
###########################################################
|
|
include $(CLEAR_VARS)
|
|
LOCAL_MODULE := $(AUDIO_CHIPSET)_pinctrl_wcd.ko
|
|
LOCAL_MODULE_KBUILD_NAME := pinctrl_wcd_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)_swr.ko
|
|
LOCAL_MODULE_KBUILD_NAME := swr_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)_swr_ctrl.ko
|
|
LOCAL_MODULE_KBUILD_NAME := swr_ctrl_dlkm.ko
|
|
LOCAL_MODULE_TAGS := optional
|
|
LOCAL_MODULE_DEBUG_ENABLE := true
|
|
LOCAL_MODULE_PATH := $(KERNEL_MODULES_OUT)
|
|
include $(DLKM_DIR)/AndroidKernelModule.mk
|
|
###########################################################
|
|
ifeq ($(call is-board-platform-in-list, ),true)
|
|
include $(CLEAR_VARS)
|
|
LOCAL_MODULE := $(AUDIO_CHIPSET)_snd_event.ko
|
|
LOCAL_MODULE_KBUILD_NAME := snd_event_dlkm.ko
|
|
LOCAL_MODULE_TAGS := optional
|
|
LOCAL_MODULE_DEBUG_ENABLE := true
|
|
LOCAL_MODULE_PATH := $(KERNEL_MODULES_OUT)
|
|
include $(DLKM_DIR)/AndroidKernelModule.mk
|
|
endif
|
|
###########################################################
|
|
|
|
endif # DLKM check
|
|
endif # supported target check
|