blob: 43cd094b4d2f2f2258871948531ae464b8fe6d04 [file] [log] [blame]
Naresh Tanniruf1290152018-11-27 12:16:45 +05301ifneq ($(AUDIO_USE_STUB_HAL), true)
Subhash Chandra Bose Naripeddy3eedc002013-11-12 20:45:15 -08002LOCAL_PATH:= $(call my-dir)
3
4include $(CLEAR_VARS)
5
Arun Mirpurib1bec9c2019-01-29 16:42:45 -08006LOCAL_CFLAGS := -DLIB_AUDIO_HAL="/vendor/lib/hw/audio.primary."$(TARGET_BOARD_PLATFORM)".so"
Soumil Shah196157e2018-01-22 17:39:48 -08007LOCAL_CFLAGS += -Wno-unused-variable
8LOCAL_CFLAGS += -Wno-sign-compare
9LOCAL_CFLAGS += -Wno-unused-parameter
10LOCAL_CFLAGS += -Wno-unused-label
11LOCAL_CFLAGS += -Wno-gnu-designator
12LOCAL_CFLAGS += -Wno-typedef-redefinition
13LOCAL_CFLAGS += -Wno-shorten-64-to-32
14LOCAL_CFLAGS += -Wno-tautological-compare
15LOCAL_CFLAGS += -Wno-unused-function
16LOCAL_CFLAGS += -Wno-unused-local-typedef
17LOCAL_CFLAGS += -Wno-format
Abhishek Arpurece112352018-01-31 21:29:03 +053018LOCAL_CFLAGS += -Wno-unused-value
Aalique Grahame22e49102018-12-18 14:23:57 -080019LOCAL_CFLAGS += -Wall
20LOCAL_CFLAGS += -Werror
Soumil Shah196157e2018-01-22 17:39:48 -080021
Mingming Yina6dad602014-05-16 12:10:55 -070022ifeq ($(strip $(AUDIO_FEATURE_ENABLED_PROXY_DEVICE)),true)
Mingming Yin67e34512014-04-03 17:47:22 -070023 LOCAL_CFLAGS += -DAFE_PROXY_ENABLED
24endif
25
Akhil Karuturi60c23472020-05-19 22:19:00 -070026ifeq ($(strip $(AUDIO_FEATURE_ENABLED_GKI)),true)
27 LOCAL_CFLAGS += -DAUDIO_GKI_ENABLED
28endif
29
Subhash Chandra Bose Naripeddy3eedc002013-11-12 20:45:15 -080030LOCAL_SRC_FILES:= \
Aniket Kumar Lataf56b6402016-10-27 12:03:18 -070031 bundle.c \
32 equalizer.c \
33 bass_boost.c \
34 virtualizer.c \
35 reverb.c \
36 effect_api.c \
Weiyin Jiangfd19e982019-07-05 11:20:28 +080037 effect_util.c
Mingming Yin497419f2015-07-01 16:57:32 -070038
Arun Mirpurib1bec9c2019-01-29 16:42:45 -080039# HW_ACCELERATED has been disabled by default since msm8996. File doesn't
40# compile cleanly on tip so don't want to include it, but keeping this
41# as a reference.
42# LOCAL_SRC_FILES += hw_accelerator.c
Dhananjay Kumar1c978df2015-09-04 13:44:59 +053043
Vignesh Kulothunganbbf44972018-09-17 15:12:07 -070044ifeq ($(strip $(AUDIO_FEATURE_ENABLED_INSTANCE_ID)), true)
45 LOCAL_CFLAGS += -DINSTANCE_ID_ENABLED
46endif
47
Vatsal Buchac09ae062018-11-14 13:25:08 +053048ifeq ($(strip $(AUDIO_FEATURE_ENABLED_GCOV)),true)
49 LOCAL_CFLAGS += --coverage -fprofile-arcs -ftest-coverage
50 LOCAL_CPPFLAGS += --coverage -fprofile-arcs -ftest-coverage
51 LOCAL_STATIC_LIBRARIES += libprofile_rt
52endif
53
Vignesh Kulothungan9f86d7a2018-09-17 15:12:07 -070054ifeq ($(strip $(AUDIO_FEATURE_ENABLED_INSTANCE_ID)), true)
55 LOCAL_CFLAGS += -DINSTANCE_ID_ENABLED
56endif
57
Subhash Chandra Bose Naripeddy3eedc002013-11-12 20:45:15 -080058LOCAL_CFLAGS+= -O2 -fvisibility=hidden
59
Jitendra Naruka1b6513f2014-11-22 19:34:13 -080060ifneq ($(strip $(AUDIO_FEATURE_DISABLED_DTS_EAGLE)),true)
61 LOCAL_CFLAGS += -DDTS_EAGLE
62endif
63
Revathi Uddarajue8bd13c2018-04-02 21:27:54 +053064LOCAL_HEADER_LIBRARIES := libhardware_headers \
65 libsystem_headers \
66 libutils_headers
67
Subhash Chandra Bose Naripeddy3eedc002013-11-12 20:45:15 -080068LOCAL_SHARED_LIBRARIES := \
Aniket Kumar Lataf56b6402016-10-27 12:03:18 -070069 libcutils \
70 liblog \
71 libtinyalsa \
72 libdl
Subhash Chandra Bose Naripeddy3eedc002013-11-12 20:45:15 -080073
74LOCAL_MODULE_TAGS := optional
75
Apoorv Raghuvanshi1b555f72014-05-29 12:48:15 -070076LOCAL_MODULE_RELATIVE_PATH := soundfx
Subhash Chandra Bose Naripeddy3eedc002013-11-12 20:45:15 -080077LOCAL_MODULE:= libqcompostprocbundle
Naresh Tanniru10758b62017-06-05 21:05:53 +053078LOCAL_VENDOR_MODULE := true
Aalique Grahame22e49102018-12-18 14:23:57 -080079LOCAL_MODULE_OWNER := qti
Subhash Chandra Bose Naripeddy3eedc002013-11-12 20:45:15 -080080
Subhash Chandra Bose Naripeddye40a7cd2014-06-03 19:42:41 -070081LOCAL_ADDITIONAL_DEPENDENCIES += $(TARGET_OUT_INTERMEDIATES)/KERNEL_OBJ/usr
82
Subhash Chandra Bose Naripeddy3eedc002013-11-12 20:45:15 -080083LOCAL_C_INCLUDES := \
Aniket Kumar Lataf56b6402016-10-27 12:03:18 -070084 external/tinyalsa/include \
Subhash Chandra Bose Naripeddy090a2aa2014-01-30 14:03:12 -080085 $(TARGET_OUT_INTERMEDIATES)/KERNEL_OBJ/usr/include \
Vignesh Kulothunganc49bdfa2020-01-08 14:24:17 -080086 $(TARGET_OUT_INTERMEDIATES)/KERNEL_OBJ/usr/include/audio \
Naveen S Nairc2b10532021-05-27 15:56:48 +053087 $(TARGET_OUT_INTERMEDIATES)/KERNEL_OBJ/usr/techpack/audio/include \
88 $(call include-path-for, audio-effects)
89ifneq ($(BOARD_OPENSOURCE_DIR), )
90 LOCAL_C_INCLUDES += $(BOARD_OPENSOURCE_DIR)/audio-hal/primary-hal/hal \
91 $(BOARD_OPENSOURCE_DIR)/audio-hal/primary-hal/hal/audio_extn/
92else
93 LOCAL_C_INCLUDES += vendor/qcom/opensource/audio-hal/primary-hal/hal \
94 vendor/qcom/opensource/audio-hal/primary-hal/hal/audio_extn/
95endif # BOARD_OPENSOURCE_DIR
Subhash Chandra Bose Naripeddy3eedc002013-11-12 20:45:15 -080096
Satish Babu Patakokila2787cee2018-03-22 11:18:42 +053097ifeq ($(strip $(AUDIO_FEATURE_ENABLED_DLKM)),true)
Revathi Uddaraju3f4cfa42018-06-04 20:35:10 +053098 LOCAL_HEADER_LIBRARIES += audio_kernel_headers
Naveen S Nairc2b10532021-05-27 15:56:48 +053099 ifneq ($(BOARD_OPENSOURCE_DIR), )
100 LOCAL_C_INCLUDES += $(TARGET_OUT_INTERMEDIATES)/$(BOARD_OPENSOURCE_DIR)/audio-kernel/include
101 else
102 LOCAL_C_INCLUDES += $(TARGET_OUT_INTERMEDIATES)/vendor/qcom/opensource/audio-kernel/include
103 endif # BOARD_OPENSOURCE_DIR
Asish Bhattacharyad0665872017-09-07 19:46:29 +0530104endif
105
Srinivas Rao Narne8ff4db52018-01-25 16:04:44 -0800106ifeq ($(TARGET_COMPILE_WITH_MSM_KERNEL),true)
107 LOCAL_C_INCLUDES += $(TARGET_OUT_INTERMEDIATES)/KERNEL_OBJ/usr/techpack/audio/include
Satish Babu Patakokila1d3b15d2018-07-03 17:09:40 +0530108 LOCAL_ADDITIONAL_DEPENDENCIES += $(TARGET_OUT_INTERMEDIATES)/KERNEL_OBJ/usr
Srinivas Rao Narne8ff4db52018-01-25 16:04:44 -0800109endif
110
sasevsde8f7392022-03-29 18:47:07 +0530111ifeq ($(ENABLE_AUDIO_LEGACY_TECHPACK),true)
112LOCAL_HEADER_LIBRARIES += qti_legacy_audio_kernel_uapi
113endif
114
Deepthi Gunturi6167e2b2020-04-10 09:52:53 +0530115ifneq ($(filter kona lahaina holi,$(TARGET_BOARD_PLATFORM)),)
Vikram Panduranga6ff1c952019-08-07 13:33:01 -0700116LOCAL_SANITIZE := integer_overflow
117endif
Subhash Chandra Bose Naripeddy3eedc002013-11-12 20:45:15 -0800118include $(BUILD_SHARED_LIBRARY)
Subhash Chandra Bose Naripeddye40a7cd2014-06-03 19:42:41 -0700119
120
121ifeq ($(strip $(AUDIO_FEATURE_ENABLED_HW_ACCELERATED_EFFECTS)),true)
122include $(CLEAR_VARS)
123
Soumil Shah196157e2018-01-22 17:39:48 -0800124LOCAL_CFLAGS += -Wno-unused-variable
125LOCAL_CFLAGS += -Wno-sign-compare
126LOCAL_CFLAGS += -Wno-unused-parameter
127LOCAL_CFLAGS += -Wno-unused-label
128LOCAL_CFLAGS += -Wno-gnu-designator
129LOCAL_CFLAGS += -Wno-typedef-redefinition
130LOCAL_CFLAGS += -Wno-shorten-64-to-32
131LOCAL_CFLAGS += -Wno-tautological-compare
132LOCAL_CFLAGS += -Wno-unused-function
133LOCAL_CFLAGS += -Wno-unused-local-typedef
134LOCAL_CFLAGS += -Wno-format
Subhash Chandra Bose Naripeddye40a7cd2014-06-03 19:42:41 -0700135LOCAL_SRC_FILES := EffectsHwAcc.cpp
136
137LOCAL_C_INCLUDES := \
138 $(call include-path-for, audio-effects)
139
Revathi Uddarajue8bd13c2018-04-02 21:27:54 +0530140LOCAL_HEADER_LIBRARIES := libhardware_headers \
141 libsystem_headers \
142 libutils_headers
143
Subhash Chandra Bose Naripeddye40a7cd2014-06-03 19:42:41 -0700144LOCAL_SHARED_LIBRARIES := \
145 liblog \
146 libeffects
147
148LOCAL_MODULE_TAGS := optional
149
150LOCAL_CFLAGS += -O2 -fvisibility=hidden
151
Alexy Josephd464f3b2014-11-18 16:14:41 -0800152ifeq ($(strip $(AUDIO_FEATURE_ENABLED_DTS_EAGLE)), true)
153LOCAL_CFLAGS += -DHW_ACC_HPX
154endif
155
Subhash Chandra Bose Naripeddye40a7cd2014-06-03 19:42:41 -0700156LOCAL_MODULE:= libhwacceffectswrapper
Naresh Tanniru10758b62017-06-05 21:05:53 +0530157LOCAL_VENDOR_MODULE := true
Subhash Chandra Bose Naripeddye40a7cd2014-06-03 19:42:41 -0700158
Deepthi Gunturi6167e2b2020-04-10 09:52:53 +0530159ifneq ($(filter kona lahaina holi,$(TARGET_BOARD_PLATFORM)),)
Vikram Panduranga6ff1c952019-08-07 13:33:01 -0700160LOCAL_SANITIZE := unsigned-integer-overflow signed-integer-overflow
161endif
Subhash Chandra Bose Naripeddye40a7cd2014-06-03 19:42:41 -0700162include $(BUILD_STATIC_LIBRARY)
163endif
vivek mehta341b6f02015-06-15 16:16:11 -0700164
165
Soumil Shah196157e2018-01-22 17:39:48 -0800166
vivek mehta341b6f02015-06-15 16:16:11 -0700167################################################################################
168
Deepthi Gunturi6167e2b2020-04-10 09:52:53 +0530169ifneq ($(filter msm8992 msm8994 msm8996 msm8998 sdm660 sdm845 apq8098_latv sdm710 msm8953 msm8937 qcs605 sdmshrike msmnile kona lahaina holi atoll $(MSMSTEPPE) $(TRINKET) lito,$(TARGET_BOARD_PLATFORM)),)
vivek mehta341b6f02015-06-15 16:16:11 -0700170
171include $(CLEAR_VARS)
172
Naresh Tanniru10758b62017-06-05 21:05:53 +0530173LOCAL_CFLAGS := -DLIB_AUDIO_HAL="/vendor/lib/hw/audio.primary."$(TARGET_BOARD_PLATFORM)".so"
Soumil Shah196157e2018-01-22 17:39:48 -0800174LOCAL_CFLAGS += -Wno-unused-variable
175LOCAL_CFLAGS += -Wno-sign-compare
176LOCAL_CFLAGS += -Wno-unused-parameter
177LOCAL_CFLAGS += -Wno-unused-label
178LOCAL_CFLAGS += -Wno-gnu-designator
179LOCAL_CFLAGS += -Wno-typedef-redefinition
180LOCAL_CFLAGS += -Wno-shorten-64-to-32
181LOCAL_CFLAGS += -Wno-tautological-compare
182LOCAL_CFLAGS += -Wno-unused-function
183LOCAL_CFLAGS += -Wno-unused-local-typedef
184LOCAL_CFLAGS += -Wno-format
Aalique Grahame22e49102018-12-18 14:23:57 -0800185LOCAL_CFLAGS += -Wall
186LOCAL_CFLAGS += -Werror
vivek mehta341b6f02015-06-15 16:16:11 -0700187
188LOCAL_SRC_FILES:= \
189 volume_listener.c
190
191LOCAL_CFLAGS+= -O2 -fvisibility=hidden
192
Revathi Uddarajue8bd13c2018-04-02 21:27:54 +0530193LOCAL_HEADER_LIBRARIES := libhardware_headers \
194 libsystem_headers \
195 libutils_headers
196
vivek mehta341b6f02015-06-15 16:16:11 -0700197LOCAL_SHARED_LIBRARIES := \
198 libcutils \
199 liblog \
Aalique Grahame22e49102018-12-18 14:23:57 -0800200 libdl \
201 libaudioutils
vivek mehta341b6f02015-06-15 16:16:11 -0700202
203LOCAL_MODULE_RELATIVE_PATH := soundfx
204LOCAL_MODULE:= libvolumelistener
Naresh Tanniru10758b62017-06-05 21:05:53 +0530205LOCAL_VENDOR_MODULE := true
Aalique Grahame22e49102018-12-18 14:23:57 -0800206LOCAL_MODULE_OWNER := qti
vivek mehta341b6f02015-06-15 16:16:11 -0700207
Aniket Kumar Lata8e743e62017-08-14 12:36:47 -0700208LOCAL_ADDITIONAL_DEPENDENCIES += $(TARGET_OUT_INTERMEDIATES)/KERNEL_OBJ/usr
209
vivek mehta341b6f02015-06-15 16:16:11 -0700210LOCAL_C_INCLUDES := \
Aniket Kumar Lataf56b6402016-10-27 12:03:18 -0700211 $(TARGET_OUT_INTERMEDIATES)/KERNEL_OBJ/usr/include \
Vignesh Kulothunganc49bdfa2020-01-08 14:24:17 -0800212 $(TARGET_OUT_INTERMEDIATES)/KERNEL_OBJ/usr/include/audio \
Aniket Kumar Lata8e743e62017-08-14 12:36:47 -0700213 $(TARGET_OUT_INTERMEDIATES)/KERNEL_OBJ/usr/techpack/audio/include \
Aniket Kumar Lataf56b6402016-10-27 12:03:18 -0700214 external/tinyalsa/include \
215 $(call include-path-for, audio-effects) \
216 $(call include-path-for, audio-route) \
Aalique Grahame22e49102018-12-18 14:23:57 -0800217 external/tinycompress/include \
218 system/media/audio_utils/include
Naveen S Nairc2b10532021-05-27 15:56:48 +0530219ifneq ($(BOARD_OPENSOURCE_DIR), )
220 LOCAL_C_INCLUDES += $(BOARD_OPENSOURCE_DIR)/audio-hal/primary-hal/hal \
221 $(BOARD_OPENSOURCE_DIR)/audio-hal/primary-hal/hal/audio_extn
222else
223 LOCAL_C_INCLUDES += vendor/qcom/opensource/audio-hal/primary-hal/hal \
224 vendor/qcom/opensource/audio-hal/primary-hal/hal/audio_extn
225endif # BOARD_OPENSOURCE_DIR
vivek mehta341b6f02015-06-15 16:16:11 -0700226
Satish Babu Patakokila2787cee2018-03-22 11:18:42 +0530227ifeq ($(strip $(AUDIO_FEATURE_ENABLED_DLKM)),true)
Revathi Uddaraju3f4cfa42018-06-04 20:35:10 +0530228 LOCAL_HEADER_LIBRARIES += audio_kernel_headers
Naveen S Nairc2b10532021-05-27 15:56:48 +0530229 ifneq ($(BOARD_OPENSOURCE_DIR), )
230 LOCAL_C_INCLUDES += $(TARGET_OUT_INTERMEDIATES)/$(BOARD_OPENSOURCE_DIR)/audio-kernel/include
231 else
232 LOCAL_C_INCLUDES += $(TARGET_OUT_INTERMEDIATES)/vendor/qcom/opensource/audio-kernel/include
233 endif # BOARD_OPENSOURCE_DIR
Asish Bhattacharyad0665872017-09-07 19:46:29 +0530234endif
235
Srinivas Rao Narne8ff4db52018-01-25 16:04:44 -0800236ifeq ($(TARGET_COMPILE_WITH_MSM_KERNEL),true)
237 LOCAL_C_INCLUDES += $(TARGET_OUT_INTERMEDIATES)/KERNEL_OBJ/usr/techpack/audio/include
Satish Babu Patakokila1d3b15d2018-07-03 17:09:40 +0530238 LOCAL_ADDITIONAL_DEPENDENCIES += $(TARGET_OUT_INTERMEDIATES)/KERNEL_OBJ/usr
Srinivas Rao Narne8ff4db52018-01-25 16:04:44 -0800239endif
240
Deepthi Gunturi6167e2b2020-04-10 09:52:53 +0530241ifneq ($(filter kona lahaina holi,$(TARGET_BOARD_PLATFORM)),)
Vikram Panduranga6ff1c952019-08-07 13:33:01 -0700242LOCAL_SANITIZE := integer_overflow
243endif
vivek mehta341b6f02015-06-15 16:16:11 -0700244include $(BUILD_SHARED_LIBRARY)
245
246endif
jasmine cha75fa6f02018-03-30 15:41:33 +0800247
248################################################################################
249ifeq ($(strip $(AUDIO_FEATURE_ENABLED_MAXX_AUDIO)), true)
250
251include $(CLEAR_VARS)
252
253LOCAL_CFLAGS := -D HAL_LIB_NAME=\"audio.primary."$(TARGET_BOARD_PLATFORM)".so\"
254
255LOCAL_SRC_FILES:= \
Aalique Grahame5ce7fbe2019-01-28 12:08:13 -0800256 ma_listener.c
jasmine cha75fa6f02018-03-30 15:41:33 +0800257
258LOCAL_CFLAGS += $(qcom_post_proc_common_cflags)
259
260LOCAL_SHARED_LIBRARIES := \
Aalique Grahame5ce7fbe2019-01-28 12:08:13 -0800261 libcutils \
262 liblog \
263 libdl
jasmine cha75fa6f02018-03-30 15:41:33 +0800264
265LOCAL_MODULE_RELATIVE_PATH := soundfx
266LOCAL_MODULE:= libmalistener
267LOCAL_MODULE_OWNER := google
268LOCAL_PROPRIETARY_MODULE := true
269
270LOCAL_C_INCLUDES := \
Aalique Grahame5ce7fbe2019-01-28 12:08:13 -0800271 hardware/qcom/audio/hal \
272 system/media/audio/include/system \
273 $(call include-path-for, audio-effects)
jasmine cha75fa6f02018-03-30 15:41:33 +0800274
275LOCAL_HEADER_LIBRARIES += libhardware_headers
276LOCAL_HEADER_LIBRARIES += libsystem_headers
Deepthi Gunturi6167e2b2020-04-10 09:52:53 +0530277ifneq ($(filter kona lahaina holi,$(TARGET_BOARD_PLATFORM)),)
Vikram Panduranga6ff1c952019-08-07 13:33:01 -0700278LOCAL_SANITIZE := integer_overflow
279endif
jasmine cha75fa6f02018-03-30 15:41:33 +0800280include $(BUILD_SHARED_LIBRARY)
281
282endif
Naresh Tanniruf1290152018-11-27 12:16:45 +0530283endif