Skip to content

Commit 70b4925

Browse files
author
liulina
committed
Updating kernel opensource for U2Pro2S
Signed-off-by: liulina <[email protected]>
1 parent a6ccc9a commit 70b4925

File tree

393 files changed

+365503
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

393 files changed

+365503
-0
lines changed

audio-kernel/Android.mk

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
# Android makefile for audio kernel modules
2+
MY_LOCAL_PATH := $(call my-dir)
3+
4+
UAPI_OUT := $(PRODUCT_OUT)/obj/vendor/qcom/opensource/audio-kernel/include
5+
6+
ifeq ($(call is-board-platform-in-list,msm8953 sdm845 sdm670 qcs605 msmnile $(MSMSTEPPE) $(TRINKET)),true)
7+
$(shell mkdir -p $(UAPI_OUT)/linux;)
8+
$(shell mkdir -p $(UAPI_OUT)/sound;)
9+
$(shell rm -rf $(PRODUCT_OUT)/obj/vendor/qcom/opensource/audio-kernel/ipc/Module.symvers)
10+
$(shell rm -rf $(PRODUCT_OUT)/obj/vendor/qcom/opensource/audio-kernel/dsp/Module.symvers)
11+
$(shell rm -rf $(PRODUCT_OUT)/obj/vendor/qcom/opensource/audio-kernel/dsp/codecs/Module.symvers)
12+
$(shell rm -rf $(PRODUCT_OUT)/obj/vendor/qcom/opensource/audio-kernel/soc/Module.symvers)
13+
$(shell rm -rf $(PRODUCT_OUT)/obj/vendor/qcom/opensource/audio-kernel/asoc/Module.symvers)
14+
$(shell rm -rf $(PRODUCT_OUT)/obj/vendor/qcom/opensource/audio-kernel/asoc/codecs/Module.symvers)
15+
$(shell rm -rf $(PRODUCT_OUT)/obj/vendor/qcom/opensource/audio-kernel/asoc/codecs/wcd934x/Module.symvers)
16+
17+
include $(MY_LOCAL_PATH)/include/uapi/Android.mk
18+
include $(MY_LOCAL_PATH)/ipc/Android.mk
19+
include $(MY_LOCAL_PATH)/dsp/Android.mk
20+
include $(MY_LOCAL_PATH)/dsp/codecs/Android.mk
21+
include $(MY_LOCAL_PATH)/soc/Android.mk
22+
include $(MY_LOCAL_PATH)/asoc/Android.mk
23+
include $(MY_LOCAL_PATH)/asoc/codecs/Android.mk
24+
include $(MY_LOCAL_PATH)/asoc/codecs/wcd934x/Android.mk
25+
endif
26+
27+
ifeq ($(call is-board-platform-in-list,sdm670 msmnile),true)
28+
$(shell rm -rf $(PRODUCT_OUT)/obj/vendor/qcom/opensource/audio-kernel/asoc/codecs/aqt1000/Module.symvers)
29+
include $(MY_LOCAL_PATH)/asoc/codecs/aqt1000/Android.mk
30+
endif
31+
32+
ifeq ($(call is-board-platform-in-list,$(MSMSTEPPE) $(TRINKET)),true)
33+
$(shell rm -rf $(PRODUCT_OUT)/obj/vendor/qcom/opensource/audio-kernel/asoc/codecs/bolero/Module.symvers)
34+
include $(MY_LOCAL_PATH)/asoc/codecs/bolero/Android.mk
35+
$(shell rm -rf $(PRODUCT_OUT)/obj/vendor/qcom/opensource/audio-kernel/asoc/codecs/wcd937x/Module.symvers)
36+
include $(MY_LOCAL_PATH)/asoc/codecs/wcd937x/Android.mk
37+
endif
38+
39+
ifeq ($(call is-board-platform-in-list,msm8953 sdm670 qcs605),true)
40+
$(shell rm -rf $(PRODUCT_OUT)/obj/vendor/qcom/opensource/audio-kernel/asoc/codecs/sdm660_cdc/Module.symvers)
41+
$(shell rm -rf $(PRODUCT_OUT)/obj/vendor/qcom/opensource/audio-kernel/asoc/codecs/msm_sdw/Module.symvers)
42+
include $(MY_LOCAL_PATH)/asoc/codecs/sdm660_cdc/Android.mk
43+
include $(MY_LOCAL_PATH)/asoc/codecs/msm_sdw/Android.mk
44+
endif
45+
46+
ifeq ($(call is-board-platform-in-list,msmnile),true)
47+
$(shell rm -rf $(PRODUCT_OUT)/obj/vendor/qcom/opensource/audio-kernel/asoc/codecs/wcd9360/Module.symvers)
48+
include $(MY_LOCAL_PATH)/asoc/codecs/wcd9360/Android.mk
49+
endif

audio-kernel/Makefile

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
# auto-detect subdirs
2+
ifeq ($(CONFIG_ARCH_SDM845), y)
3+
include $(srctree)/techpack/audio/config/sdm845auto.conf
4+
export
5+
endif
6+
ifeq ($(CONFIG_ARCH_SDM670), y)
7+
include $(srctree)/techpack/audio/config/sdm670auto_static.conf
8+
export
9+
endif
10+
ifeq ($(CONFIG_ARCH_SDXPOORWILLS), y)
11+
include $(srctree)/techpack/audio/config/sdxpoorwillsauto.conf
12+
export
13+
endif
14+
ifeq ($(CONFIG_ARCH_SM8150), y)
15+
include $(srctree)/techpack/audio/config/sm8150auto.conf
16+
export
17+
endif
18+
ifeq ($(CONFIG_ARCH_SDMSHRIKE), y)
19+
include $(srctree)/techpack/audio/config/sm8150auto.conf
20+
export
21+
endif
22+
23+
# Use USERINCLUDE when you must reference the UAPI directories only.
24+
USERINCLUDE += \
25+
-I$(srctree)/techpack/audio/include/uapi \
26+
27+
# Use LINUXINCLUDE when you must reference the include/ directory.
28+
# Needed to be compatible with the O= option
29+
LINUXINCLUDE += \
30+
-I$(srctree)/techpack/audio/include/uapi \
31+
-I$(srctree)/techpack/audio/include
32+
33+
ifeq ($(CONFIG_ARCH_SDM845), y)
34+
LINUXINCLUDE += \
35+
-include $(srctree)/techpack/audio/config/sdm845autoconf.h
36+
endif
37+
ifeq ($(CONFIG_ARCH_SDM670), y)
38+
LINUXINCLUDE += \
39+
-include $(srctree)/techpack/audio/config/sdm670autoconf.h
40+
endif
41+
ifeq ($(CONFIG_ARCH_SDXPOORWILLS), y)
42+
LINUXINCLUDE += \
43+
-include $(srctree)/techpack/audio/config/sdxpoorwillsautoconf.h
44+
endif
45+
ifeq ($(CONFIG_ARCH_SM8150), y)
46+
LINUXINCLUDE += \
47+
-include $(srctree)/techpack/audio/config/sm8150autoconf.h
48+
endif
49+
ifeq ($(CONFIG_ARCH_SDMSHRIKE), y)
50+
LINUXINCLUDE += \
51+
-include $(srctree)/techpack/audio/config/sm8150autoconf.h
52+
endif
53+
54+
obj-y += soc/
55+
obj-y += dsp/
56+
obj-y += ipc/
57+
obj-y += asoc/

audio-kernel/Makefile.am

Lines changed: 76 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,76 @@
1+
AUDIO_ROOT=$(PWD)
2+
UAPI_OUT=$(PWD)
3+
HEADER_INSTALL_DIR=$(KERNEL_SRC)/scripts
4+
KERNEL_BINARY_DIR=$(KERNEL_SRC)/../kernel-build-artifacts
5+
6+
KBUILD_OPTIONS := AUDIO_ROOT=$(PWD)
7+
KBUILD_OPTIONS += MODNAME=audio
8+
KBUILD_OPTIONS += UAPI_OUT=$(PWD)
9+
10+
AUDIO_KERNEL_HEADERS_PATH1 = $(shell ls ./include/uapi/linux/*.h)
11+
AUDIO_KERNEL_HEADERS_PATH2 = $(shell ls ./include/uapi/linux/mfd/wcd9xxx/*.h)
12+
AUDIO_KERNEL_HEADERS_PATH3 = $(shell ls ./include/uapi/sound/*.h)
13+
14+
ifeq ($(TARGET_SUPPORT), $(filter $(TARGET_SUPPORT), sdm670 qcs605))
15+
KBUILD_OPTIONS += CONFIG_ARCH_SDM670=y
16+
endif
17+
ifeq ($(TARGET_SUPPORT),sdm845)
18+
KBUILD_OPTIONS += CONFIG_ARCH_SDM845=y
19+
endif
20+
ifeq ($(TARGET_SUPPORT),apq8053)
21+
KBUILD_OPTIONS += CONFIG_ARCH_SDM450=y
22+
endif
23+
ifeq ($(TARGET_SUPPORT),qcs40x)
24+
KBUILD_OPTIONS += CONFIG_ARCH_QCS405=y
25+
endif
26+
ifeq ($(TARGET_SUPPORT), sdmsteppe))
27+
KBUILD_OPTIONS += CONFIG_ARCH_SM6150=y
28+
endif
29+
30+
obj-m := ipc/
31+
obj-m += dsp/
32+
obj-m += dsp/codecs/
33+
obj-m += soc/
34+
obj-m += asoc/
35+
obj-m += asoc/codecs/
36+
ifeq ($(TARGET_SUPPORT), $(filter $(TARGET_SUPPORT), sdm670 qcs605 sdmsteppe))
37+
obj-m += asoc/codecs/wcd934x/
38+
endif
39+
ifeq ($(TARGET_SUPPORT), $(filter $(TARGET_SUPPORT), apq8053 sdm670 qcs605))
40+
obj-m += asoc/codecs/sdm660_cdc/
41+
endif
42+
ifeq ($(TARGET_SUPPORT), $(filter $(TARGET_SUPPORT), sdm670 qcs605))
43+
obj-m += asoc/codecs/msm_sdw/
44+
endif
45+
ifeq ($(TARGET_SUPPORT), $(filter $(TARGET_SUPPORT), qcs40x))
46+
obj-m += asoc/codecs/bolero/
47+
obj-m += asoc/codecs/csra66x0/
48+
obj-m += asoc/codecs/ep92/
49+
endif
50+
ifeq ($(TARGET_SUPPORT), sdmsteppe))
51+
obj-m += asoc/codecs/bolero/
52+
obj-m += asoc/codecs/wcd937x/
53+
endif
54+
55+
all:
56+
$(shell rm -fr $(shell pwd)/soc/core.h)
57+
$(shell ln -s $(KERNEL_SRC)/drivers/pinctrl/core.h $(shell pwd)/soc/core.h)
58+
$(shell rm -fr $(shell pwd)/include/soc/internal.h)
59+
$(shell ln -s $(KERNEL_SRC)/drivers/base/regmap/internal.h $(shell pwd)/include/soc/internal.h)
60+
$(shell rm -fr $(shell pwd)/soc/pinctrl-utils.h)
61+
$(shell ln -s $(KERNEL_SRC)/drivers/pinctrl/pinctrl-utils.h $(shell pwd)/soc/pinctrl-utils.h)
62+
$(shell mkdir $(shell pwd)/linux)
63+
$(shell mkdir $(shell pwd)/sound)
64+
$(shell mkdir $(shell pwd)/linux/mfd)
65+
$(shell mkdir $(shell pwd)/linux/mfd/wcd9xxx)
66+
$(shell cd $(KERNEL_BINARY_DIR) && $(KERNEL_SRC)/scripts/headers_install.sh $(UAPI_OUT)/linux/ $(AUDIO_ROOT)/include/uapi/linux/ $(notdir $(AUDIO_KERNEL_HEADERS_PATH1)))
67+
$(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)))
68+
$(shell cd $(KERNEL_BINARY_DIR) && $(KERNEL_SRC)/scripts/headers_install.sh $(UAPI_OUT)/sound/ $(AUDIO_ROOT)/include/uapi/sound/ $(notdir $(AUDIO_KERNEL_HEADERS_PATH3)))
69+
$(MAKE) -C $(KERNEL_SRC) M=$(shell pwd) modules $(KBUILD_OPTIONS)
70+
71+
modules_install:
72+
$(MAKE) INSTALL_MOD_STRIP=1 -C $(KERNEL_SRC) M=$(shell pwd) modules_install
73+
74+
clean:
75+
rm -f *.o *.ko *.mod.c *.mod.o *~ .*.cmd Module.symvers
76+
rm -rf .tmp_versions

audio-kernel/NOTICE

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
Copyright (c) 2009-2017, The Linux Foundation. All rights reserved.
2+
3+
This program is free software; you can redistribute it and/or modify
4+
it under the terms of the GNU General Public License version 2 and
5+
only version 2 as published by the Free Software Foundation.
6+
7+
This program is distributed in the hope that it will be useful,
8+
but WITHOUT ANY WARRANTY; without even the implied warranty of
9+
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
10+
GNU General Public License for more details.
11+
________________________________________
12+
13+
Copyright (C) 2008 Google, Inc.
14+
Copyright (C) 2008 HTC Corporation
15+
Copyright (c) 2010-2017, The Linux Foundation. All rights reserved.
16+
17+
This software is licensed under the terms of the GNU General Public
18+
License version 2, as published by the Free Software Foundation, and
19+
may be copied, distributed, and modified under those terms.
20+
21+
This program is distributed in the hope that it will be useful,
22+
but WITHOUT ANY WARRANTY; without even the implied warranty of
23+
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
24+
GNU General Public License for more details.

audio-kernel/asoc/Android.mk

Lines changed: 88 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,88 @@
1+
# Android makefile for audio kernel modules
2+
3+
# Assume no targets will be supported
4+
5+
# Check if this driver needs be built for current target
6+
ifeq ($(call is-board-platform,sdm845),true)
7+
TARGET := sdm845
8+
AUDIO_SELECT := CONFIG_SND_SOC_SDM845=m
9+
endif
10+
11+
ifeq ($(call is-board-platform-in-list,msm8953 sdm670 qcs605),true)
12+
TARGET := sdm670
13+
AUDIO_SELECT := CONFIG_SND_SOC_SDM670=m
14+
endif
15+
16+
ifeq ($(call is-board-platform,msmnile),true)
17+
TARGET := msmnile
18+
AUDIO_SELECT := CONFIG_SND_SOC_SM8150=m
19+
endif
20+
21+
ifeq ($(call is-board-platform,$(MSMSTEPPE)),true)
22+
TARGET := talos
23+
AUDIO_SELECT := CONFIG_SND_SOC_SM6150=m
24+
endif
25+
26+
ifeq ($(call is-board-platform,$(TRINKET)),true)
27+
TARGET := trinket
28+
AUDIO_SELECT := CONFIG_SND_SOC_SM6150=m
29+
endif
30+
31+
AUDIO_CHIPSET := audio
32+
# Build/Package only in case of supported target
33+
ifeq ($(call is-board-platform-in-list,msm8953 sdm845 sdm670 qcs605 msmnile $(MSMSTEPPE) $(TRINKET)),true)
34+
35+
LOCAL_PATH := $(call my-dir)
36+
37+
# This makefile is only for DLKM
38+
ifneq ($(findstring vendor,$(LOCAL_PATH)),)
39+
40+
ifneq ($(findstring opensource,$(LOCAL_PATH)),)
41+
AUDIO_BLD_DIR := $(shell pwd)/vendor/qcom/opensource/audio-kernel
42+
endif # opensource
43+
44+
DLKM_DIR := $(TOP)/device/qcom/common/dlkm
45+
46+
# Build audio.ko as $(AUDIO_CHIPSET)_audio.ko
47+
###########################################################
48+
# This is set once per LOCAL_PATH, not per (kernel) module
49+
KBUILD_OPTIONS := AUDIO_ROOT=$(AUDIO_BLD_DIR)
50+
51+
# We are actually building audio.ko here, as per the
52+
# requirement we are specifying <chipset>_audio.ko as LOCAL_MODULE.
53+
# This means we need to rename the module to <chipset>_audio.ko
54+
# after audio.ko is built.
55+
KBUILD_OPTIONS += MODNAME=platform_dlkm
56+
KBUILD_OPTIONS += BOARD_PLATFORM=$(TARGET_BOARD_PLATFORM)
57+
KBUILD_OPTIONS += $(AUDIO_SELECT)
58+
59+
###########################################################
60+
include $(CLEAR_VARS)
61+
LOCAL_MODULE := $(AUDIO_CHIPSET)_platform.ko
62+
LOCAL_MODULE_KBUILD_NAME := platform_dlkm.ko
63+
LOCAL_MODULE_TAGS := optional
64+
LOCAL_MODULE_DEBUG_ENABLE := true
65+
LOCAL_MODULE_PATH := $(KERNEL_MODULES_OUT)
66+
include $(DLKM_DIR)/AndroidKernelModule.mk
67+
###########################################################
68+
ifeq ($(call is-board-platform-in-list,msm8953 sdm670 qcs605 $(TRINKET)),true)
69+
include $(CLEAR_VARS)
70+
LOCAL_MODULE := $(AUDIO_CHIPSET)_cpe_lsm.ko
71+
LOCAL_MODULE_KBUILD_NAME := cpe_lsm_dlkm.ko
72+
LOCAL_MODULE_TAGS := optional
73+
LOCAL_MODULE_DEBUG_ENABLE := true
74+
LOCAL_MODULE_PATH := $(KERNEL_MODULES_OUT)
75+
include $(DLKM_DIR)/AndroidKernelModule.mk
76+
endif
77+
###########################################################
78+
include $(CLEAR_VARS)
79+
LOCAL_MODULE := $(AUDIO_CHIPSET)_machine_$(TARGET).ko
80+
LOCAL_MODULE_KBUILD_NAME := machine_dlkm.ko
81+
LOCAL_MODULE_TAGS := optional
82+
LOCAL_MODULE_DEBUG_ENABLE := true
83+
LOCAL_MODULE_PATH := $(KERNEL_MODULES_OUT)
84+
include $(DLKM_DIR)/AndroidKernelModule.mk
85+
###########################################################
86+
87+
endif # DLKM check
88+
endif # supported target check

0 commit comments

Comments
 (0)