• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1#
2# Copyright (c) 2021-2022 Huawei Device Co., Ltd.
3#
4# This software is licensed under the terms of the GNU General Public
5# License version 2, as published by the Free Software Foundation, and
6# may be copied, distributed, and modified under those terms.
7#
8# This program is distributed in the hope that it will be useful,
9# but WITHOUT ANY WARRANTY; without even the implied warranty of
10# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11# GNU General Public License for more details.
12#
13#
14
15KHDF_AUDIO_BASE_ROOT_DIR = ../../../../../../..
16KHDF_AUDIO_KHDF_ROOT_DIR = drivers/hdf/khdf
17KHDF_FRAMEWORK_ROOT_DIR = drivers/hdf/framework
18KHDF_AUDIO_ROOT_DIR = ../../../../../framework/model/audio
19KHDF_AUDIO_IMX8MM_DIR = $(KHDF_AUDIO_BASE_ROOT_DIR)/device/board/osware/$(DEVICE_NAME)/drivers/audio
20KHDF_AUDIO_IMX8MM_INC_DIR = drivers/hdf/framework/../../../device/board/osware/$(DEVICE_NAME)/drivers/audio
21KHDF_AUDIO_A311D_DIR = $(KHDF_AUDIO_BASE_ROOT_DIR)/device/board/unionman/$(DEVICE_NAME)/kernel/hdf/audio
22KHDF_AUDIO_A311D_INC_DIR = drivers/hdf/framework/../../../device/board/unionman/$(DEVICE_NAME)/kernel/hdf/audio
23
24obj-$(CONFIG_DRIVERS_HDF_AUDIO) += \
25          $(KHDF_AUDIO_ROOT_DIR)/core/src/audio_core.o \
26          $(KHDF_AUDIO_ROOT_DIR)/core/src/audio_host.o \
27          $(KHDF_AUDIO_ROOT_DIR)/core/src/audio_parse.o \
28          $(KHDF_AUDIO_ROOT_DIR)/common/src/audio_codec_base.o \
29          $(KHDF_AUDIO_ROOT_DIR)/common/src/audio_dsp_base.o \
30          $(KHDF_AUDIO_ROOT_DIR)/common/src/audio_dai_base.o \
31          $(KHDF_AUDIO_ROOT_DIR)/common/src/audio_platform_base.o \
32          $(KHDF_AUDIO_ROOT_DIR)/common/src/audio_dma_base.o \
33          $(KHDF_AUDIO_ROOT_DIR)/sapm/src/audio_sapm.o \
34          $(KHDF_AUDIO_ROOT_DIR)/dispatch/src/audio_stream_dispatch.o \
35          $(KHDF_AUDIO_ROOT_DIR)/dispatch/src/audio_control_dispatch.o
36
37obj-$(CONFIG_DRIVERS_HDF_AUDIO_HDMI) += \
38          $(KHDF_AUDIO_ROOT_DIR)/hdmi/src/audio_hdmi_codec_adapter.o \
39          $(KHDF_AUDIO_ROOT_DIR)/hdmi/src/audio_hdmi_codec_linux.o \
40          $(KHDF_AUDIO_ROOT_DIR)/hdmi/src/audio_hdmi_codec_ops.o
41
42obj-$(CONFIG_DRIVERS_HDF_AUDIO_USB) += \
43          $(KHDF_AUDIO_ROOT_DIR)/usb/src/audio_usb_linux.o \
44          $(KHDF_AUDIO_ROOT_DIR)/usb/src/audio_usb_codec_adapter.o \
45          $(KHDF_AUDIO_ROOT_DIR)/usb/src/audio_usb_codec_ops.o \
46          $(KHDF_AUDIO_ROOT_DIR)/usb/src/audio_usb_dma_adapter.o \
47          $(KHDF_AUDIO_ROOT_DIR)/usb/src/audio_usb_dma_ops.o \
48          $(KHDF_AUDIO_ROOT_DIR)/usb/src/audio_usb_endpoints.o \
49          $(KHDF_AUDIO_ROOT_DIR)/usb/src/audio_usb_parse_interface.o \
50          $(KHDF_AUDIO_ROOT_DIR)/usb/src/audio_usb_validate_desc.o \
51          $(KHDF_AUDIO_ROOT_DIR)/usb/src/audio_usb_mixer.o
52
53obj-$(CONFIG_DRIVERS_HDF_AUDIO_HI3516CODEC) += \
54          $(KHDF_AUDIO_BASE_ROOT_DIR)/device/board/hisilicon/hispark_taurus/audio_drivers/
55
56obj-$(CONFIG_DRIVERS_HDF_AUDIO_RK3568) += \
57          $(KHDF_AUDIO_BASE_ROOT_DIR)/device/board/hihope/rk3568/audio_drivers/
58
59obj-$(CONFIG_DRIVERS_HDF_AUDIO_RK3588) += \
60          $(KHDF_AUDIO_BASE_ROOT_DIR)/device/board/hihope/dayu210/audio_drivers/
61
62obj-$(CONFIG_DRIVERS_HDF_AUDIO_RK3566) += \
63          $(KHDF_AUDIO_BASE_ROOT_DIR)/device/board/kaihong/khdvk_3566b/kernel/audio/
64
65obj-$(CONFIG_DRIVERS_HDF_AUDIO_A311D) += \
66          $(KHDF_AUDIO_A311D_DIR)/codec/soc_codec/a311d_codec_adapter.o \
67          $(KHDF_AUDIO_A311D_DIR)/codec/soc_codec/a311d_codec_ops.o \
68          $(KHDF_AUDIO_A311D_DIR)/dsp/a311d_dsp_adapter.o \
69          $(KHDF_AUDIO_A311D_DIR)/dsp/a311d_dsp_ops.o \
70          $(KHDF_AUDIO_A311D_DIR)/dai/a311d_dai_adapter.o \
71          $(KHDF_AUDIO_A311D_DIR)/dai/a311d_dai_ops.o \
72          $(KHDF_AUDIO_A311D_DIR)/soc/a311d_dma_adapter.o \
73          $(KHDF_AUDIO_A311D_DIR)/soc/a311d_dma_ops.o \
74          $(KHDF_AUDIO_A311D_DIR)/linux_drv/src/axg_fifo.o \
75          $(KHDF_AUDIO_A311D_DIR)/linux_drv/src/axg_fifo_drv.o \
76          $(KHDF_AUDIO_A311D_DIR)/linux_drv/src/axg_tdmin.o \
77          $(KHDF_AUDIO_A311D_DIR)/linux_drv/src/axg_tdmout.o \
78          $(KHDF_AUDIO_A311D_DIR)/linux_drv/src/axg_tdm_formatter.o \
79          $(KHDF_AUDIO_A311D_DIR)/linux_drv/src/axg_tdm_interface.o \
80          $(KHDF_AUDIO_A311D_DIR)/linux_drv/src/g12a_toacodec.o \
81          $(KHDF_AUDIO_A311D_DIR)/linux_drv/src/g12a_tohdmitx.o \
82          $(KHDF_AUDIO_A311D_DIR)/linux_drv/src/meson_t9015.o \
83          $(KHDF_AUDIO_A311D_DIR)/linux_drv/src/axg_snd_card.o \
84          $(KHDF_AUDIO_A311D_DIR)/linux_drv/src/nau8540.o
85
86obj-$(CONFIG_DRIVERS_HDF_AUDIO_IMX8MM) += \
87          $(KHDF_AUDIO_IMX8MM_DIR)/soc/src/sai_driver.o \
88          $(KHDF_AUDIO_IMX8MM_DIR)/soc/src/dma_driver.o \
89          $(KHDF_AUDIO_IMX8MM_DIR)/soc/src/imx8mm_platform_ops.o \
90          $(KHDF_AUDIO_IMX8MM_DIR)/soc/src/imx8mm_dai_adapter.o \
91          $(KHDF_AUDIO_IMX8MM_DIR)/soc/src/imx8mm_platform_adapter.o \
92          $(KHDF_AUDIO_IMX8MM_DIR)/dsp/src/dsp_adapter.o \
93          $(KHDF_AUDIO_IMX8MM_DIR)/dsp/src/dsp_ops.o \
94          $(KHDF_AUDIO_IMX8MM_DIR)/codec/src/wm8904.o \
95          $(KHDF_AUDIO_IMX8MM_DIR)/codec/src/wm8904_impl.o
96
97ccflags-$(CONFIG_DRIVERS_HDF_AUDIO) += -lm -lc -lgcc -std=gnu99 -Werror\
98             -I$(srctree)/$(KHDF_AUDIO_KHDF_ROOT_DIR)/osal/include \
99             -I$(srctree)/$(KHDF_FRAMEWORK_ROOT_DIR)/include/core \
100             -I$(srctree)/$(KHDF_FRAMEWORK_ROOT_DIR)/include/utils \
101             -I$(srctree)/$(KHDF_FRAMEWORK_ROOT_DIR)/include/osal \
102             -I$(srctree)/drivers/hdf/inner_api/osal/shared \
103             -I$(srctree)/drivers/hdf/inner_api/utils \
104             -I$(srctree)/drivers/hdf/inner_api/core \
105             -I$(srctree)/drivers/hdf/inner_api/host/shared \
106             -I$(srctree)/$(KHDF_FRAMEWORK_ROOT_DIR)/include/platform \
107             -I$(srctree)/$(KHDF_FRAMEWORK_ROOT_DIR)/include/config \
108             -I$(srctree)/$(KHDF_FRAMEWORK_ROOT_DIR)/include/audio \
109             -I$(srctree)/$(KHDF_FRAMEWORK_ROOT_DIR)/ability/sbuf/include \
110             -I$(srctree)/$(KHDF_FRAMEWORK_ROOT_DIR)/core/common/include/host \
111             -I$(srctree)/$(KHDF_FRAMEWORK_ROOT_DIR)/core/host/include \
112             -I$(srctree)/$(KHDF_FRAMEWORK_ROOT_DIR)/core/shared/include \
113             -I$(srctree)/$(KHDF_FRAMEWORK_ROOT_DIR)/core/manager/include \
114             -I$(srctree)/$(KHDF_FRAMEWORK_ROOT_DIR)/utils/include \
115             -I$(srctree)/$(KHDF_FRAMEWORK_ROOT_DIR)/model/audio/core/include \
116             -I$(srctree)/$(KHDF_FRAMEWORK_ROOT_DIR)/model/audio/sapm/include \
117             -I$(srctree)/$(KHDF_FRAMEWORK_ROOT_DIR)/model/audio/dispatch/include \
118             -I$(srctree)/$(KHDF_FRAMEWORK_ROOT_DIR)/model/audio/common/include \
119             -I$(srctree)/$(KHDF_FRAMEWORK_ROOT_DIR)/model/audio/hdmi/include \
120             -I$(srctree)/$(KHDF_FRAMEWORK_ROOT_DIR)/model/audio/usb/include \
121             -I$(srctree)/bounds_checking_function/include
122
123ccflags-$(CONFIG_DRIVERS_HDF_AUDIO_A311D) += \
124             -I$(srctree)/$(KHDF_AUDIO_A311D_INC_DIR)/linux_drv/include
125
126ccflags-$(CONFIG_DRIVERS_HDF_AUDIO_IMX8MM) += \
127             -I$(srctree)/$(KHDF_AUDIO_IMX8MM_INC_DIR)/codec/include \
128             -I$(srctree)/$(KHDF_AUDIO_IMX8MM_INC_DIR)/soc/include \
129             -I$(srctree)/$(KHDF_AUDIO_IMX8MM_INC_DIR)/dsp/include \
130             -I$(srctree)/$(KHDF_AUDIO_IMX8MM_INC_DIR)/include
131