-
Notifications
You must be signed in to change notification settings - Fork 142
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Updating kernel opensource for U2Pro2S
Signed-off-by: liulina <[email protected]>
- Loading branch information
liulina
committed
Jun 3, 2019
1 parent
a6ccc9a
commit 70b4925
Showing
393 changed files
with
365,503 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
# Android makefile for audio kernel modules | ||
MY_LOCAL_PATH := $(call my-dir) | ||
|
||
UAPI_OUT := $(PRODUCT_OUT)/obj/vendor/qcom/opensource/audio-kernel/include | ||
|
||
ifeq ($(call is-board-platform-in-list,msm8953 sdm845 sdm670 qcs605 msmnile $(MSMSTEPPE) $(TRINKET)),true) | ||
$(shell mkdir -p $(UAPI_OUT)/linux;) | ||
$(shell mkdir -p $(UAPI_OUT)/sound;) | ||
$(shell rm -rf $(PRODUCT_OUT)/obj/vendor/qcom/opensource/audio-kernel/ipc/Module.symvers) | ||
$(shell rm -rf $(PRODUCT_OUT)/obj/vendor/qcom/opensource/audio-kernel/dsp/Module.symvers) | ||
$(shell rm -rf $(PRODUCT_OUT)/obj/vendor/qcom/opensource/audio-kernel/dsp/codecs/Module.symvers) | ||
$(shell rm -rf $(PRODUCT_OUT)/obj/vendor/qcom/opensource/audio-kernel/soc/Module.symvers) | ||
$(shell rm -rf $(PRODUCT_OUT)/obj/vendor/qcom/opensource/audio-kernel/asoc/Module.symvers) | ||
$(shell rm -rf $(PRODUCT_OUT)/obj/vendor/qcom/opensource/audio-kernel/asoc/codecs/Module.symvers) | ||
$(shell rm -rf $(PRODUCT_OUT)/obj/vendor/qcom/opensource/audio-kernel/asoc/codecs/wcd934x/Module.symvers) | ||
|
||
include $(MY_LOCAL_PATH)/include/uapi/Android.mk | ||
include $(MY_LOCAL_PATH)/ipc/Android.mk | ||
include $(MY_LOCAL_PATH)/dsp/Android.mk | ||
include $(MY_LOCAL_PATH)/dsp/codecs/Android.mk | ||
include $(MY_LOCAL_PATH)/soc/Android.mk | ||
include $(MY_LOCAL_PATH)/asoc/Android.mk | ||
include $(MY_LOCAL_PATH)/asoc/codecs/Android.mk | ||
include $(MY_LOCAL_PATH)/asoc/codecs/wcd934x/Android.mk | ||
endif | ||
|
||
ifeq ($(call is-board-platform-in-list,sdm670 msmnile),true) | ||
$(shell rm -rf $(PRODUCT_OUT)/obj/vendor/qcom/opensource/audio-kernel/asoc/codecs/aqt1000/Module.symvers) | ||
include $(MY_LOCAL_PATH)/asoc/codecs/aqt1000/Android.mk | ||
endif | ||
|
||
ifeq ($(call is-board-platform-in-list,$(MSMSTEPPE) $(TRINKET)),true) | ||
$(shell rm -rf $(PRODUCT_OUT)/obj/vendor/qcom/opensource/audio-kernel/asoc/codecs/bolero/Module.symvers) | ||
include $(MY_LOCAL_PATH)/asoc/codecs/bolero/Android.mk | ||
$(shell rm -rf $(PRODUCT_OUT)/obj/vendor/qcom/opensource/audio-kernel/asoc/codecs/wcd937x/Module.symvers) | ||
include $(MY_LOCAL_PATH)/asoc/codecs/wcd937x/Android.mk | ||
endif | ||
|
||
ifeq ($(call is-board-platform-in-list,msm8953 sdm670 qcs605),true) | ||
$(shell rm -rf $(PRODUCT_OUT)/obj/vendor/qcom/opensource/audio-kernel/asoc/codecs/sdm660_cdc/Module.symvers) | ||
$(shell rm -rf $(PRODUCT_OUT)/obj/vendor/qcom/opensource/audio-kernel/asoc/codecs/msm_sdw/Module.symvers) | ||
include $(MY_LOCAL_PATH)/asoc/codecs/sdm660_cdc/Android.mk | ||
include $(MY_LOCAL_PATH)/asoc/codecs/msm_sdw/Android.mk | ||
endif | ||
|
||
ifeq ($(call is-board-platform-in-list,msmnile),true) | ||
$(shell rm -rf $(PRODUCT_OUT)/obj/vendor/qcom/opensource/audio-kernel/asoc/codecs/wcd9360/Module.symvers) | ||
include $(MY_LOCAL_PATH)/asoc/codecs/wcd9360/Android.mk | ||
endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
# auto-detect subdirs | ||
ifeq ($(CONFIG_ARCH_SDM845), y) | ||
include $(srctree)/techpack/audio/config/sdm845auto.conf | ||
export | ||
endif | ||
ifeq ($(CONFIG_ARCH_SDM670), y) | ||
include $(srctree)/techpack/audio/config/sdm670auto_static.conf | ||
export | ||
endif | ||
ifeq ($(CONFIG_ARCH_SDXPOORWILLS), y) | ||
include $(srctree)/techpack/audio/config/sdxpoorwillsauto.conf | ||
export | ||
endif | ||
ifeq ($(CONFIG_ARCH_SM8150), y) | ||
include $(srctree)/techpack/audio/config/sm8150auto.conf | ||
export | ||
endif | ||
ifeq ($(CONFIG_ARCH_SDMSHRIKE), y) | ||
include $(srctree)/techpack/audio/config/sm8150auto.conf | ||
export | ||
endif | ||
|
||
# Use USERINCLUDE when you must reference the UAPI directories only. | ||
USERINCLUDE += \ | ||
-I$(srctree)/techpack/audio/include/uapi \ | ||
|
||
# Use LINUXINCLUDE when you must reference the include/ directory. | ||
# Needed to be compatible with the O= option | ||
LINUXINCLUDE += \ | ||
-I$(srctree)/techpack/audio/include/uapi \ | ||
-I$(srctree)/techpack/audio/include | ||
|
||
ifeq ($(CONFIG_ARCH_SDM845), y) | ||
LINUXINCLUDE += \ | ||
-include $(srctree)/techpack/audio/config/sdm845autoconf.h | ||
endif | ||
ifeq ($(CONFIG_ARCH_SDM670), y) | ||
LINUXINCLUDE += \ | ||
-include $(srctree)/techpack/audio/config/sdm670autoconf.h | ||
endif | ||
ifeq ($(CONFIG_ARCH_SDXPOORWILLS), y) | ||
LINUXINCLUDE += \ | ||
-include $(srctree)/techpack/audio/config/sdxpoorwillsautoconf.h | ||
endif | ||
ifeq ($(CONFIG_ARCH_SM8150), y) | ||
LINUXINCLUDE += \ | ||
-include $(srctree)/techpack/audio/config/sm8150autoconf.h | ||
endif | ||
ifeq ($(CONFIG_ARCH_SDMSHRIKE), y) | ||
LINUXINCLUDE += \ | ||
-include $(srctree)/techpack/audio/config/sm8150autoconf.h | ||
endif | ||
|
||
obj-y += soc/ | ||
obj-y += dsp/ | ||
obj-y += ipc/ | ||
obj-y += asoc/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,76 @@ | ||
AUDIO_ROOT=$(PWD) | ||
UAPI_OUT=$(PWD) | ||
HEADER_INSTALL_DIR=$(KERNEL_SRC)/scripts | ||
KERNEL_BINARY_DIR=$(KERNEL_SRC)/../kernel-build-artifacts | ||
|
||
KBUILD_OPTIONS := AUDIO_ROOT=$(PWD) | ||
KBUILD_OPTIONS += MODNAME=audio | ||
KBUILD_OPTIONS += UAPI_OUT=$(PWD) | ||
|
||
AUDIO_KERNEL_HEADERS_PATH1 = $(shell ls ./include/uapi/linux/*.h) | ||
AUDIO_KERNEL_HEADERS_PATH2 = $(shell ls ./include/uapi/linux/mfd/wcd9xxx/*.h) | ||
AUDIO_KERNEL_HEADERS_PATH3 = $(shell ls ./include/uapi/sound/*.h) | ||
|
||
ifeq ($(TARGET_SUPPORT), $(filter $(TARGET_SUPPORT), sdm670 qcs605)) | ||
KBUILD_OPTIONS += CONFIG_ARCH_SDM670=y | ||
endif | ||
ifeq ($(TARGET_SUPPORT),sdm845) | ||
KBUILD_OPTIONS += CONFIG_ARCH_SDM845=y | ||
endif | ||
ifeq ($(TARGET_SUPPORT),apq8053) | ||
KBUILD_OPTIONS += CONFIG_ARCH_SDM450=y | ||
endif | ||
ifeq ($(TARGET_SUPPORT),qcs40x) | ||
KBUILD_OPTIONS += CONFIG_ARCH_QCS405=y | ||
endif | ||
ifeq ($(TARGET_SUPPORT), sdmsteppe)) | ||
KBUILD_OPTIONS += CONFIG_ARCH_SM6150=y | ||
endif | ||
|
||
obj-m := ipc/ | ||
obj-m += dsp/ | ||
obj-m += dsp/codecs/ | ||
obj-m += soc/ | ||
obj-m += asoc/ | ||
obj-m += asoc/codecs/ | ||
ifeq ($(TARGET_SUPPORT), $(filter $(TARGET_SUPPORT), sdm670 qcs605 sdmsteppe)) | ||
obj-m += asoc/codecs/wcd934x/ | ||
endif | ||
ifeq ($(TARGET_SUPPORT), $(filter $(TARGET_SUPPORT), apq8053 sdm670 qcs605)) | ||
obj-m += asoc/codecs/sdm660_cdc/ | ||
endif | ||
ifeq ($(TARGET_SUPPORT), $(filter $(TARGET_SUPPORT), sdm670 qcs605)) | ||
obj-m += asoc/codecs/msm_sdw/ | ||
endif | ||
ifeq ($(TARGET_SUPPORT), $(filter $(TARGET_SUPPORT), qcs40x)) | ||
obj-m += asoc/codecs/bolero/ | ||
obj-m += asoc/codecs/csra66x0/ | ||
obj-m += asoc/codecs/ep92/ | ||
endif | ||
ifeq ($(TARGET_SUPPORT), sdmsteppe)) | ||
obj-m += asoc/codecs/bolero/ | ||
obj-m += asoc/codecs/wcd937x/ | ||
endif | ||
|
||
all: | ||
$(shell rm -fr $(shell pwd)/soc/core.h) | ||
$(shell ln -s $(KERNEL_SRC)/drivers/pinctrl/core.h $(shell pwd)/soc/core.h) | ||
$(shell rm -fr $(shell pwd)/include/soc/internal.h) | ||
$(shell ln -s $(KERNEL_SRC)/drivers/base/regmap/internal.h $(shell pwd)/include/soc/internal.h) | ||
$(shell rm -fr $(shell pwd)/soc/pinctrl-utils.h) | ||
$(shell ln -s $(KERNEL_SRC)/drivers/pinctrl/pinctrl-utils.h $(shell pwd)/soc/pinctrl-utils.h) | ||
$(shell mkdir $(shell pwd)/linux) | ||
$(shell mkdir $(shell pwd)/sound) | ||
$(shell mkdir $(shell pwd)/linux/mfd) | ||
$(shell mkdir $(shell pwd)/linux/mfd/wcd9xxx) | ||
$(shell cd $(KERNEL_BINARY_DIR) && $(KERNEL_SRC)/scripts/headers_install.sh $(UAPI_OUT)/linux/ $(AUDIO_ROOT)/include/uapi/linux/ $(notdir $(AUDIO_KERNEL_HEADERS_PATH1))) | ||
$(shell cd $(KERNEL_BINARY_DIR) && $(KERNEL_SRC)/scripts/headers_install.sh $(UAPI_OUT)/linux/mfd/wcd9xxx/ $(AUDIO_ROOT)/include/uapi/linux/mfd/wcd9xxx/ $(notdir $(AUDIO_KERNEL_HEADERS_PATH2))) | ||
$(shell cd $(KERNEL_BINARY_DIR) && $(KERNEL_SRC)/scripts/headers_install.sh $(UAPI_OUT)/sound/ $(AUDIO_ROOT)/include/uapi/sound/ $(notdir $(AUDIO_KERNEL_HEADERS_PATH3))) | ||
$(MAKE) -C $(KERNEL_SRC) M=$(shell pwd) modules $(KBUILD_OPTIONS) | ||
|
||
modules_install: | ||
$(MAKE) INSTALL_MOD_STRIP=1 -C $(KERNEL_SRC) M=$(shell pwd) modules_install | ||
|
||
clean: | ||
rm -f *.o *.ko *.mod.c *.mod.o *~ .*.cmd Module.symvers | ||
rm -rf .tmp_versions |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
Copyright (c) 2009-2017, The Linux Foundation. All rights reserved. | ||
|
||
This program is free software; you can redistribute it and/or modify | ||
it under the terms of the GNU General Public License version 2 and | ||
only version 2 as published by the Free Software Foundation. | ||
|
||
This program is distributed in the hope that it will be useful, | ||
but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
GNU General Public License for more details. | ||
________________________________________ | ||
|
||
Copyright (C) 2008 Google, Inc. | ||
Copyright (C) 2008 HTC Corporation | ||
Copyright (c) 2010-2017, The Linux Foundation. All rights reserved. | ||
|
||
This software is licensed under the terms of the GNU General Public | ||
License version 2, as published by the Free Software Foundation, and | ||
may be copied, distributed, and modified under those terms. | ||
|
||
This program is distributed in the hope that it will be useful, | ||
but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
GNU General Public License for more details. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,88 @@ | ||
# 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) | ||
TARGET := sdm845 | ||
AUDIO_SELECT := CONFIG_SND_SOC_SDM845=m | ||
endif | ||
|
||
ifeq ($(call is-board-platform-in-list,msm8953 sdm670 qcs605),true) | ||
TARGET := sdm670 | ||
AUDIO_SELECT := CONFIG_SND_SOC_SDM670=m | ||
endif | ||
|
||
ifeq ($(call is-board-platform,msmnile),true) | ||
TARGET := msmnile | ||
AUDIO_SELECT := CONFIG_SND_SOC_SM8150=m | ||
endif | ||
|
||
ifeq ($(call is-board-platform,$(MSMSTEPPE)),true) | ||
TARGET := talos | ||
AUDIO_SELECT := CONFIG_SND_SOC_SM6150=m | ||
endif | ||
|
||
ifeq ($(call is-board-platform,$(TRINKET)),true) | ||
TARGET := trinket | ||
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) $(TRINKET)),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=platform_dlkm | ||
KBUILD_OPTIONS += BOARD_PLATFORM=$(TARGET_BOARD_PLATFORM) | ||
KBUILD_OPTIONS += $(AUDIO_SELECT) | ||
|
||
########################################################### | ||
include $(CLEAR_VARS) | ||
LOCAL_MODULE := $(AUDIO_CHIPSET)_platform.ko | ||
LOCAL_MODULE_KBUILD_NAME := platform_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,msm8953 sdm670 qcs605 $(TRINKET)),true) | ||
include $(CLEAR_VARS) | ||
LOCAL_MODULE := $(AUDIO_CHIPSET)_cpe_lsm.ko | ||
LOCAL_MODULE_KBUILD_NAME := cpe_lsm_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)_machine_$(TARGET).ko | ||
LOCAL_MODULE_KBUILD_NAME := machine_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 |
Oops, something went wrong.