blob: a64bbd914a2c0ee0617a190bf25fa8a9a82f1ec1 [file] [log] [blame]
Naresh Tanniruf1290152018-11-27 12:16:45 +05301ifneq ($(AUDIO_USE_STUB_HAL), true)
Ravi Kumar Alamanda2dfba2b2013-01-17 16:50:22 -08002ifeq ($(strip $(BOARD_USES_ALSA_AUDIO)),true)
3
4LOCAL_PATH := $(call my-dir)
5
6include $(CLEAR_VARS)
7
8LOCAL_ARM_MODE := arm
9
Ajay Dudanibe3335a2013-08-19 18:47:21 -070010AUDIO_PLATFORM := $(TARGET_BOARD_PLATFORM)
Ravi Kumar Alamanda48c921d2013-10-29 06:07:44 -070011
Vijayakumar Badiger3c199ff2019-06-15 15:19:20 -070012ifneq ($(filter msm8974 msm8226 msm8084 msm8610 apq8084 msm8994 msm8992 msm8996 msm8998 apq8098_latv sdm845 sdm710 qcs605 sdmshrike msmnile kona sdm660 msm8937 $(MSMSTEPPE) $(TRINKET) lito atoll,$(TARGET_BOARD_PLATFORM)),)
Ajay Dudanibe3335a2013-08-19 18:47:21 -070013 # B-family platform uses msm8974 code base
14 AUDIO_PLATFORM = msm8974
Ravi Kumar Alamanda48c921d2013-10-29 06:07:44 -070015 MULTIPLE_HW_VARIANTS_ENABLED := true
Aalique Grahame22e49102018-12-18 14:23:57 -080016ifneq ($(filter msm8974,$(TARGET_BOARD_PLATFORM)),)
17 LOCAL_CFLAGS := -DPLATFORM_MSM8974
18 LOCAL_CFLAGS += -DMAX_TARGET_SPECIFIC_CHANNEL_CNT="2"
19endif
Mingming Yin8e5a4f62013-10-07 15:23:41 -070020ifneq ($(filter msm8610,$(TARGET_BOARD_PLATFORM)),)
21 LOCAL_CFLAGS := -DPLATFORM_MSM8610
22endif
Shiv Maliyappanahalli34b585f2013-10-01 15:49:05 -070023ifneq ($(filter msm8226,$(TARGET_BOARD_PLATFORM)),)
24 LOCAL_CFLAGS := -DPLATFORM_MSM8x26
Aalique Grahame22e49102018-12-18 14:23:57 -080025 LOCAL_CFLAGS += -DMAX_TARGET_SPECIFIC_CHANNEL_CNT="2"
26endif
27ifneq ($(filter msm8084,$(TARGET_BOARD_PLATFORM)),)
28 LOCAL_CFLAGS := -DPLATFORM_MSM8084
29 LOCAL_CFLAGS += -DMAX_TARGET_SPECIFIC_CHANNEL_CNT="2"
Shiv Maliyappanahalli34b585f2013-10-01 15:49:05 -070030endif
Vidyakumar Athotad9d9ff32013-11-13 11:46:52 -080031ifneq ($(filter apq8084,$(TARGET_BOARD_PLATFORM)),)
32 LOCAL_CFLAGS := -DPLATFORM_APQ8084
33endif
Mingming Yin0e1b2902014-05-19 18:20:59 -070034ifneq ($(filter msm8994,$(TARGET_BOARD_PLATFORM)),)
35 LOCAL_CFLAGS := -DPLATFORM_MSM8994
Aalique Grahame22e49102018-12-18 14:23:57 -080036 LOCAL_CFLAGS += -DMAX_TARGET_SPECIFIC_CHANNEL_CNT="4"
37 LOCAL_CFLAGS += -DKPI_OPTIMIZE_ENABLED
Mingming Yin0e1b2902014-05-19 18:20:59 -070038endif
Fred Oh68ad1d32014-12-09 13:08:07 -080039ifneq ($(filter msm8992,$(TARGET_BOARD_PLATFORM)),)
40 LOCAL_CFLAGS := -DPLATFORM_MSM8994
Aalique Grahame22e49102018-12-18 14:23:57 -080041 LOCAL_CFLAGS += -DMAX_TARGET_SPECIFIC_CHANNEL_CNT="4"
42 LOCAL_CFLAGS += -DKPI_OPTIMIZE_ENABLED
Fred Oh68ad1d32014-12-09 13:08:07 -080043endif
Mingming Yin89c6a7f2015-03-24 11:56:14 -070044ifneq ($(filter msm8996,$(TARGET_BOARD_PLATFORM)),)
45 LOCAL_CFLAGS := -DPLATFORM_MSM8996
Aalique Grahame22e49102018-12-18 14:23:57 -080046 LOCAL_CFLAGS += -DMAX_TARGET_SPECIFIC_CHANNEL_CNT="4"
47 LOCAL_CFLAGS += -DKPI_OPTIMIZE_ENABLED
48 LOCAL_CFLAGS += -DINCALL_MUSIC_ENABLED
Banajit Goswami22582e72014-10-15 18:29:34 -070049endif
Venkataraman Nerellapallib8689ec2017-05-04 11:55:29 +053050ifneq ($(filter msm8998 apq8098_latv,$(TARGET_BOARD_PLATFORM)),)
Ben Romberger22d41232016-11-16 14:55:25 -080051 LOCAL_CFLAGS := -DPLATFORM_MSM8998
Ramjee Singh26ff9582019-10-07 12:31:13 +053052 LOCAL_CFLAGS += -DMAX_TARGET_SPECIFIC_CHANNEL_CNT="8"
Aalique Grahame22e49102018-12-18 14:23:57 -080053 LOCAL_CFLAGS += -DINCALL_MUSIC_ENABLED
Banajit Goswami4c0dff22016-03-04 18:31:22 -080054endif
Soumild9f5bfa2017-04-04 19:31:22 -070055ifneq ($(filter sdm845,$(TARGET_BOARD_PLATFORM)),)
Garmond Leung986024b2017-04-28 14:41:10 -070056 LOCAL_CFLAGS := -DPLATFORM_SDM845
Ramjee Singh4752c892019-03-25 18:02:19 +053057 LOCAL_CFLAGS += -DMAX_TARGET_SPECIFIC_CHANNEL_CNT="8"
Aalique Grahame22e49102018-12-18 14:23:57 -080058 LOCAL_CFLAGS += -DINCALL_MUSIC_ENABLED
59 LOCAL_CFLAGS += -DINCALL_STEREO_CAPTURE_ENABLED
Xiaoyu Ye0afc9232017-03-28 21:31:22 -070060endif
Naresh Tanniru42e0e602018-03-16 19:45:21 +053061ifneq ($(filter sdm710,$(TARGET_BOARD_PLATFORM)),)
62 LOCAL_CFLAGS := -DPLATFORM_SDM710
Ramjee Singh4752c892019-03-25 18:02:19 +053063 LOCAL_CFLAGS += -DMAX_TARGET_SPECIFIC_CHANNEL_CNT="8"
Sharad Sangled39232d2017-08-08 20:27:18 +053064endif
Ashok Sidipotu5accc8d2017-11-08 11:21:55 +053065ifneq ($(filter qcs605,$(TARGET_BOARD_PLATFORM)),)
66 LOCAL_CFLAGS := -DPLATFORM_QCS605
Himanshu Agrawal05fda172019-10-01 17:24:36 +053067 LOCAL_CFLAGS += -DMAX_TARGET_SPECIFIC_CHANNEL_CNT="8"
Ashok Sidipotu5accc8d2017-11-08 11:21:55 +053068endif
Vijayakumar Badiger3c199ff2019-06-15 15:19:20 -070069ifneq ($(filter msmnile sdmshrike,$(TARGET_BOARD_PLATFORM)),)
Xiaoyu Ye91553e62017-11-21 17:35:50 -080070 LOCAL_CFLAGS := -DPLATFORM_MSMNILE
Aalique Grahame22e49102018-12-18 14:23:57 -080071 LOCAL_CFLAGS += -DMAX_TARGET_SPECIFIC_CHANNEL_CNT="4"
72 LOCAL_CFLAGS += -DINCALL_MUSIC_ENABLED
73 LOCAL_CFLAGS += -DINCALL_STEREO_CAPTURE_ENABLED
Xiaoyu Ye91553e62017-11-21 17:35:50 -080074endif
Meng Wangef2f6e12018-10-08 13:06:05 +080075ifneq ($(filter kona,$(TARGET_BOARD_PLATFORM)),)
76 LOCAL_CFLAGS := -DPLATFORM_KONA
Aalique Grahameee8c0ed2019-02-26 14:15:52 -080077 LOCAL_CFLAGS += -DMAX_TARGET_SPECIFIC_CHANNEL_CNT="4"
Aalique Grahameb14dfdd2019-04-29 11:36:37 -070078 LOCAL_CFLAGS += -DINCALL_STEREO_CAPTURE_ENABLED
Meng Wangef2f6e12018-10-08 13:06:05 +080079endif
Tanya Dixit6e3bccc2018-04-05 13:42:18 +053080ifneq ($(filter $(MSMSTEPPE) ,$(TARGET_BOARD_PLATFORM)),)
81 LOCAL_CFLAGS := -DPLATFORM_MSMSTEPPE
Ramjee Singh970ad432019-03-13 10:28:43 +053082 LOCAL_CFLAGS += -DMAX_TARGET_SPECIFIC_CHANNEL_CNT="4"
Tanya Dixit6e3bccc2018-04-05 13:42:18 +053083endif
Hari Veerubhotlae56a5fa2018-10-14 16:52:10 +053084ifneq ($(filter $(TRINKET) ,$(TARGET_BOARD_PLATFORM)),)
85 LOCAL_CFLAGS := -DPLATFORM_TRINKET
Ramjee Singh970ad432019-03-13 10:28:43 +053086 LOCAL_CFLAGS += -DMAX_TARGET_SPECIFIC_CHANNEL_CNT="4"
Hari Veerubhotlae56a5fa2018-10-14 16:52:10 +053087endif
Manisha Agarwal888e9762019-02-27 22:18:49 +053088ifneq ($(filter lito,$(TARGET_BOARD_PLATFORM)),)
89 LOCAL_CFLAGS := -DPLATFORM_LITO
Preetam Singh Ranawat7f875d42019-05-29 13:50:00 +053090 LOCAL_CFLAGS += -DMAX_TARGET_SPECIFIC_CHANNEL_CNT="4"
Kunlei Zhang86094562019-07-12 16:23:33 +080091 LOCAL_CFLAGS += -DINCALL_STEREO_CAPTURE_ENABLED
Manisha Agarwal888e9762019-02-27 22:18:49 +053092endif
Manisha Agarwal13c65ae2019-05-16 10:48:28 +080093ifneq ($(filter atoll,$(TARGET_BOARD_PLATFORM)),)
94 LOCAL_CFLAGS := -DPLATFORM_ATOLL
95 LOCAL_CFLAGS += -DMAX_TARGET_SPECIFIC_CHANNEL_CNT="4"
Faiz Nabi Kuchay536d7b92019-08-05 20:36:31 +053096 LOCAL_CFLAGS += -DINCALL_STEREO_CAPTURE_ENABLED
Manisha Agarwal13c65ae2019-05-16 10:48:28 +080097endif
Arusha Goyalfda29152016-12-26 10:53:39 +053098ifneq ($(filter sdm660,$(TARGET_BOARD_PLATFORM)),)
Dhananjay Kumard3ab9f42016-07-20 17:05:47 +053099 LOCAL_CFLAGS := -DPLATFORM_MSMFALCON
Sujin Panickerb904fbe2019-04-04 13:28:07 +0530100 LOCAL_CFLAGS += -DMAX_TARGET_SPECIFIC_CHANNEL_CNT="8"
101endif
102ifneq ($(filter msm8937,$(TARGET_BOARD_PLATFORM)),)
103 LOCAL_CFLAGS := -DPLATFORM_MSM8937
104 LOCAL_CFLAGS += -DMAX_TARGET_SPECIFIC_CHANNEL_CNT="8"
Dhananjay Kumard3ab9f42016-07-20 17:05:47 +0530105endif
Naresh Tannirudb72d1e2014-03-05 17:33:47 +0530106endif
Naresh Tanniru8b919ac2014-01-30 19:12:53 +0530107
Derek Chen3e5b30a2018-10-24 01:04:25 -0700108ifeq ($(TARGET_BOARD_AUTO),true)
109 LOCAL_CFLAGS += -DPLATFORM_AUTO
110endif
111
Bruce Levycea5f172018-01-31 16:06:04 -0800112LOCAL_CFLAGS += -Wno-macro-redefined
113
Pallavi009b5212020-10-01 22:53:09 +0530114LOCAL_HEADER_LIBRARIES := \
115 libhardware_headers \
116 libhardware_legacy_headers
Revathi Uddarajue8bd13c2018-04-02 21:27:54 +0530117
Ravi Kumar Alamanda2dfba2b2013-01-17 16:50:22 -0800118LOCAL_SRC_FILES := \
Weiyin Jiange6ce6312019-01-28 18:28:22 +0800119 audio_hw.c \
Arun Mirpurie008ed22019-03-21 11:21:04 -0700120 acdb.c \
Weiyin Jiange6ce6312019-01-28 18:28:22 +0800121 platform_info.c \
122 $(AUDIO_PLATFORM)/platform.c \
Arun Mirpurie008ed22019-03-21 11:21:04 -0700123 voice.c
Ravi Kumar Alamanda2dfba2b2013-01-17 16:50:22 -0800124
Subhash Chandra Bose Naripeddy19dc03b2014-03-10 14:43:05 -0700125LOCAL_SRC_FILES += audio_extn/audio_extn.c \
Weiyin Jiange6ce6312019-01-28 18:28:22 +0800126 audio_extn/audio_hidl.cpp \
Arun Mirpurie008ed22019-03-21 11:21:04 -0700127 audio_extn/compress_in.c \
Arun Mirpurib1bec9c2019-01-29 16:42:45 -0800128 audio_extn/fm.c \
Arun Mirpurie008ed22019-03-21 11:21:04 -0700129 audio_extn/keep_alive.c \
130 audio_extn/source_track.c \
131 audio_extn/usb.c \
132 audio_extn/utils.c \
Arun Mirpurib1bec9c2019-01-29 16:42:45 -0800133 voice_extn/compress_voip.c \
Arun Mirpurie008ed22019-03-21 11:21:04 -0700134 voice_extn/voice_extn.c
Bharath Gopal01310bb2016-12-05 15:39:32 +0530135
Ravi Kumar Alamanda2dfba2b2013-01-17 16:50:22 -0800136LOCAL_SHARED_LIBRARIES := \
Arun Mirpurie008ed22019-03-21 11:21:04 -0700137 libbase \
Aalique Grahame22e49102018-12-18 14:23:57 -0800138 liblog \
139 libcutils \
140 libtinyalsa \
Arun Mirpurib1bec9c2019-01-29 16:42:45 -0800141 libtinycompress \
Aalique Grahame22e49102018-12-18 14:23:57 -0800142 libaudioroute \
143 libdl \
144 libaudioutils \
Aniket Kumar Lata808e8d62019-01-28 22:54:28 -0800145 libexpat \
Weiyin Jiange6ce6312019-01-28 18:28:22 +0800146 libhidlbase \
Arun Mirpurie008ed22019-03-21 11:21:04 -0700147 libprocessgroup \
Pallavi009b5212020-10-01 22:53:09 +0530148 libutils \
149 libhardware_legacy
Ravi Kumar Alamanda2dfba2b2013-01-17 16:50:22 -0800150
151LOCAL_C_INCLUDES += \
Aalique Grahame22e49102018-12-18 14:23:57 -0800152 external/tinyalsa/include \
153 external/tinycompress/include \
154 system/media/audio_utils/include \
155 external/expat/lib \
Aniket Kumar Lata808e8d62019-01-28 22:54:28 -0800156 vendor/qcom/opensource/core-utils/fwk-detect \
Pallavi009b5212020-10-01 22:53:09 +0530157 $(TOP)/hardware/libhardware_legacy/include/hardware_legacy \
Aalique Grahame22e49102018-12-18 14:23:57 -0800158 $(call include-path-for, audio-route) \
159 $(call include-path-for, audio-effects) \
160 $(LOCAL_PATH)/$(AUDIO_PLATFORM) \
161 $(LOCAL_PATH)/audio_extn \
162 $(LOCAL_PATH)/voice_extn
Ravi Kumar Alamanda2dfba2b2013-01-17 16:50:22 -0800163
Arun Mirpurie008ed22019-03-21 11:21:04 -0700164LOCAL_C_INCLUDES += $(TARGET_OUT_INTERMEDIATES)/KERNEL_OBJ/usr/include
165LOCAL_C_INCLUDES += $(TARGET_OUT_INTERMEDIATES)/KERNEL_OBJ/usr/techpack/audio/include
166LOCAL_ADDITIONAL_DEPENDENCIES += $(TARGET_OUT_INTERMEDIATES)/KERNEL_OBJ/usr
167
168
169# Hardware specific feature
170ifeq ($(strip $(AUDIO_FEATURE_ENABLED_DLKM)),true)
171 LOCAL_HEADER_LIBRARIES += audio_kernel_headers
172 LOCAL_C_INCLUDES += $(TARGET_OUT_INTERMEDIATES)/vendor/qcom/opensource/audio-kernel/include
173endif
174
Weiyin Jiangebfa0502019-07-18 17:24:21 +0800175ifeq ($(strip $(AUDIO_FEATURE_ENABLED_EXTENDED_COMPRESS_FORMAT)),true)
176 LOCAL_CFLAGS += -DENABLE_EXTENDED_COMPRESS_FORMAT
177endif
178
Arun Mirpurie008ed22019-03-21 11:21:04 -0700179LOCAL_CFLAGS += -DUSE_VENDOR_EXTN
180
181# Legacy feature
182ifdef MULTIPLE_HW_VARIANTS_ENABLED
183 LOCAL_CFLAGS += -DHW_VARIANTS_ENABLED
184 LOCAL_SRC_FILES += $(AUDIO_PLATFORM)/hw_info.c
185endif
186
187# Legacy feature
188ifeq ($(strip $(AUDIO_FEATURE_ENABLED_DTS_EAGLE)),true)
189 LOCAL_CFLAGS += -DDTS_EAGLE
190 LOCAL_SRC_FILES += audio_extn/dts_eagle.c
191endif
192
193# Legacy feature
194ifeq ($(strip $(DOLBY_DDP)),true)
195 LOCAL_CFLAGS += -DDS1_DOLBY_DDP_ENABLED
196 LOCAL_SRC_FILES += audio_extn/dolby.c
197endif
198
199# Legacy feature
200ifeq ($(strip $(DS1_DOLBY_DAP)),true)
201 LOCAL_CFLAGS += -DDS1_DOLBY_DAP_ENABLED
202ifneq ($(strip $(DOLBY_DDP)),true)
203 LOCAL_SRC_FILES += audio_extn/dolby.c
204endif
205endif
206
207# Legacy feature
208ifeq ($(strip $(AUDIO_FEATURE_ENABLED_DS2_DOLBY_DAP)),true)
209 LOCAL_CFLAGS += -DDS2_DOLBY_DAP_ENABLED
210 LOCAL_CFLAGS += -DDS1_DOLBY_DDP_ENABLED
211ifneq ($(strip $(DOLBY_DDP)),true)
212 ifneq ($(strip $(DS1_DOLBY_DAP)),true)
213 LOCAL_SRC_FILES += audio_extn/dolby.c
214 endif
215endif
216endif
217
218# NonLA feature
219ifeq ($(strip $(AUDIO_FEATURE_ENABLED_QAF)),true)
220 LOCAL_CFLAGS += -DQAF_EXTN_ENABLED
221 LOCAL_C_INCLUDES += $(TARGET_OUT_HEADERS)/mm-audio/qaf/
222 LOCAL_SRC_FILES += audio_extn/qaf.c
223endif
224
225# Hardware specific feature
Sidipotu Ashokd2f10ba2019-05-06 15:41:56 +0530226ifeq ($(strip $(AUDIO_FEATURE_ENABLED_QAP)),true)
227LOCAL_CFLAGS += -DQAP_EXTN_ENABLED -Wno-tautological-pointer-compare
228LOCAL_SRC_FILES += audio_extn/qap.c
229LOCAL_C_INCLUDES += $(TARGET_OUT_HEADERS)/mm-audio/qap_wrapper/
230LOCAL_HEADER_LIBRARIES += audio_qaf_headers
231LOCAL_SHARED_LIBRARIES += libqap_wrapper liblog
Arun Mirpurie008ed22019-03-21 11:21:04 -0700232endif
233
Kiran Kandi910e1862013-10-29 13:29:42 -0700234ifeq ($(strip $(AUDIO_FEATURE_ENABLED_LISTEN)),true)
235 LOCAL_CFLAGS += -DAUDIO_LISTEN_ENABLED
236 LOCAL_C_INCLUDES += $(TARGET_OUT_HEADERS)/mm-audio/audio-listen
237 LOCAL_SRC_FILES += audio_extn/listen.c
238endif
239
Arun Mirpurie008ed22019-03-21 11:21:04 -0700240# Hardware specific feature
Srinivas Rao Narne8ff4db52018-01-25 16:04:44 -0800241ifeq ($(TARGET_COMPILE_WITH_MSM_KERNEL),true)
Aalique Grahame22e49102018-12-18 14:23:57 -0800242 LOCAL_C_INCLUDES += $(TARGET_OUT_INTERMEDIATES)/KERNEL_OBJ/usr/include
Srinivas Rao Narne8ff4db52018-01-25 16:04:44 -0800243 LOCAL_C_INCLUDES += $(TARGET_OUT_INTERMEDIATES)/KERNEL_OBJ/usr/techpack/audio/include
Satish Babu Patakokila1d3b15d2018-07-03 17:09:40 +0530244 LOCAL_ADDITIONAL_DEPENDENCIES += $(TARGET_OUT_INTERMEDIATES)/KERNEL_OBJ/usr
Srinivas Rao Narne8ff4db52018-01-25 16:04:44 -0800245endif
246
Arun Mirpurie008ed22019-03-21 11:21:04 -0700247# Legacy feature
Aalique Grahame22e49102018-12-18 14:23:57 -0800248ifeq ($(strip $(AUDIO_FEATURE_SUPPORTED_EXTERNAL_BT)),true)
249 LOCAL_CFLAGS += -DEXTERNAL_BT_SUPPORTED
250endif
251
Arun Mirpurie008ed22019-03-21 11:21:04 -0700252# Legacy feature
Aalique Grahame22e49102018-12-18 14:23:57 -0800253ifeq ($(strip $(AUDIO_FEATURE_FLICKER_SENSOR_INPUT)),true)
254 LOCAL_CFLAGS += -DFLICKER_SENSOR_INPUT
255endif
256
Arun Mirpurie008ed22019-03-21 11:21:04 -0700257# Legacy feature
Aalique Grahame22e49102018-12-18 14:23:57 -0800258ifeq ($(strip $(AUDIO_FEATURE_NO_AUDIO_OUT)),true)
259 LOCAL_CFLAGS += -DNO_AUDIO_OUT
260endif
261
Arun Mirpurie008ed22019-03-21 11:21:04 -0700262# NonLA feature
Ashish Jain81eb2a82015-05-13 10:52:34 +0530263ifeq ($(strip $(AUDIO_FEATURE_ENABLED_EXT_HDMI)),true)
264 LOCAL_CFLAGS += -DAUDIO_EXTERNAL_HDMI_ENABLED
Sujin Panickerb904fbe2019-04-04 13:28:07 +0530265 LOCAL_C_INCLUDES += $(TARGET_OUT_HEADERS)/mm-audio/audio-parsers
266 LOCAL_SHARED_LIBRARIES += libaudioparsers
Ashish Jain81eb2a82015-05-13 10:52:34 +0530267endif
268
Arun Mirpurie008ed22019-03-21 11:21:04 -0700269# Hardware specific feature
Ravi Kumar Alamanda8fa6b192014-09-09 16:06:42 -0700270ifeq ($(strip $(BOARD_SUPPORTS_SOUND_TRIGGER)),true)
Banajit Goswami710f3532016-08-28 14:48:33 -0700271 ST_FEATURE_ENABLE := true
272endif
273
Arun Mirpurie008ed22019-03-21 11:21:04 -0700274# Hardware specific feature
Banajit Goswami710f3532016-08-28 14:48:33 -0700275ifeq ($(strip $(BOARD_SUPPORTS_SOUND_TRIGGER_HAL)),true)
276 ST_FEATURE_ENABLE := true
277endif
278
Arun Mirpurie008ed22019-03-21 11:21:04 -0700279# Hardware specific feature
Banajit Goswami710f3532016-08-28 14:48:33 -0700280ifeq ($(ST_FEATURE_ENABLE), true)
Ravi Kumar Alamanda8fa6b192014-09-09 16:06:42 -0700281 LOCAL_CFLAGS += -DSOUND_TRIGGER_ENABLED
282 LOCAL_CFLAGS += -DSOUND_TRIGGER_PLATFORM_NAME=$(TARGET_BOARD_PLATFORM)
283 LOCAL_C_INCLUDES += $(TARGET_OUT_HEADERS)/mm-audio/sound_trigger
284 LOCAL_SRC_FILES += audio_extn/soundtrigger.c
Aalique Grahame22e49102018-12-18 14:23:57 -0800285ifneq ($(filter msm8996,$(TARGET_BOARD_PLATFORM)),)
286 LOCAL_HEADER_LIBRARIES += sound_trigger.primary_headers
287endif
Ravi Kumar Alamanda8fa6b192014-09-09 16:06:42 -0700288endif
289
Arun Mirpurie008ed22019-03-21 11:21:04 -0700290# Legacy feature
Damir Didjustof1d46c72013-11-06 17:59:04 -0800291ifeq ($(strip $(AUDIO_FEATURE_ENABLED_AUXPCM_BT)),true)
292 LOCAL_CFLAGS += -DAUXPCM_BT_ENABLED
293endif
294
Arun Mirpurie008ed22019-03-21 11:21:04 -0700295# Legacy feature
Preetam Singh Ranawat2d0e4632015-02-02 12:40:59 +0530296ifeq ($(strip $(AUDIO_FEATURE_ENABLED_PM_SUPPORT)),true)
297 LOCAL_CFLAGS += -DPM_SUPPORT_ENABLED
298 LOCAL_SRC_FILES += audio_extn/pm.c
299 LOCAL_C_INCLUDES += $(TARGET_OUT_HEADERS)/libperipheralclient/inc
300 LOCAL_SHARED_LIBRARIES += libperipheral_client
301endif
302
Shiv Maliyappanahallic0656402016-09-03 14:13:26 -0700303
Arun Mirpurie008ed22019-03-21 11:21:04 -0700304# Hardare specific featre
Weiyin Jiangaa80acd2016-09-21 16:42:11 +0800305ifeq ($(strip $(AUDIO_FEATURE_ENABLED_GEF_SUPPORT)),true)
306 LOCAL_CFLAGS += -DAUDIO_GENERIC_EFFECT_FRAMEWORK_ENABLED
307 LOCAL_SRC_FILES += audio_extn/gef.c
308endif
309
Arun Mirpurie008ed22019-03-21 11:21:04 -0700310# Hardware specific feature
Ben Rombergerd771a7c2017-02-22 18:05:17 -0800311ifeq ($(strip $($AUDIO_FEATURE_ADSP_HDLR_ENABLED)),true)
312 LOCAL_CFLAGS += -DAUDIO_EXTN_ADSP_HDLR_ENABLED
313 LOCAL_SRC_FILES += audio_extn/adsp_hdlr.c
314endif
315
Arun Mirpurie008ed22019-03-21 11:21:04 -0700316
Revathi Uddaraju1eac8b02017-05-18 17:13:33 +0530317ifeq ($(strip $(AUDIO_FEATURE_ENABLED_DYNAMIC_LOG)), true)
318 LOCAL_CFLAGS += -DDYNAMIC_LOG_ENABLED
319 LOCAL_C_INCLUDES += $(TARGET_OUT_HEADERS)/mm-audio/audio-log-utils
320 LOCAL_SHARED_LIBRARIES += libaudio_log_utils
321endif
322
Arun Mirpurie008ed22019-03-21 11:21:04 -0700323# Hardware specific feature
Aditya Bavanari29bcea22017-10-03 20:10:35 +0530324ifeq ($(strip $(AUDIO_FEATURE_ENABLED_INSTANCE_ID)), true)
325 LOCAL_CFLAGS += -DINSTANCE_ID_ENABLED
326endif
327
Arun Mirpurie008ed22019-03-21 11:21:04 -0700328# Legacy feature
Dhanalakshmi Siddani57b014e2018-04-23 12:52:02 +0530329ifeq ($(strip $(AUDIO_FEATURE_ENABLED_KEEP_ALIVE_ARM_FFV)), true)
Dhanalakshmi Siddani30e06a22018-03-27 23:11:34 +0530330 LOCAL_CFLAGS += -DRUN_KEEP_ALIVE_IN_ARM_FFV
331endif
332
Arun Mirpurie008ed22019-03-21 11:21:04 -0700333# Legacy feature
Dhanalakshmi Siddani57b014e2018-04-23 12:52:02 +0530334ifeq ($(strip $(AUDIO_FEATURE_ENABLED_FFV)), true)
Dhanalakshmi Siddani30e06a22018-03-27 23:11:34 +0530335 LOCAL_CFLAGS += -DFFV_ENABLED
Dhanalakshmi Siddani57b014e2018-04-23 12:52:02 +0530336 LOCAL_C_INCLUDES += $(TARGET_OUT_HEADERS)/mm-audio-noship/include/ffv
Dhanalakshmi Siddani30e06a22018-03-27 23:11:34 +0530337 LOCAL_SRC_FILES += audio_extn/ffv.c
338endif
339
Arun Mirpurie008ed22019-03-21 11:21:04 -0700340# Hardware Specific feature
Weiyin Jiange6ce6312019-01-28 18:28:22 +0800341ifeq ($(strip $(AUDIO_FEATURE_ENABLED_AHAL_EXT)),true)
342 LOCAL_CFLAGS += -DAHAL_EXT_ENABLED
343 LOCAL_SHARED_LIBRARIES += vendor.qti.hardware.audiohalext@1.0
344endif
345
Daniel Hillenbrandc16d8dd2013-05-23 10:10:00 +0530346ifneq ($(strip $(AUDIO_FEATURE_ENABLED_EXT_AMPLIFIER)),false)
347 LOCAL_CFLAGS += -DEXT_AMPLIFIER_ENABLED
348 LOCAL_SRC_FILES += audio_extn/audio_amplifier.c
349 LOCAL_SHARED_LIBRARIES += libhardware
350endif
351
Balázs Triszkaa68afd52017-05-11 03:19:29 +0200352ifeq ($(strip $(AUDIO_FEATURE_ELLIPTIC_ULTRASOUND_SUPPORT)),true)
353 LOCAL_CFLAGS += -DELLIPTIC_ULTRASOUND_ENABLED
354 LOCAL_SRC_FILES += audio_extn/ultrasound.c
355endif
356
Dhanalakshmi Siddani999d5642019-03-22 15:27:44 +0530357LOCAL_CFLAGS += -D_GNU_SOURCE
Satya Krishna Pindiprolif1cd92b2016-04-14 19:05:23 +0530358LOCAL_CFLAGS += -Wall -Werror
Alexy Josephb1379942016-01-29 15:49:38 -0800359
Piged65f582020-09-19 08:57:38 +0800360LOCAL_EXPORT_C_INCLUDE_DIRS := $(LOCAL_PATH)
Mingming Yin5b7c0b32014-08-04 15:49:24 -0700361
Vatsal Buchac09ae062018-11-14 13:25:08 +0530362ifeq ($(strip $(AUDIO_FEATURE_ENABLED_GCOV)),true)
363 LOCAL_CFLAGS += --coverage -fprofile-arcs -ftest-coverage
364 LOCAL_CPPFLAGS += --coverage -fprofile-arcs -ftest-coverage
365 LOCAL_STATIC_LIBRARIES += libprofile_rt
366endif
367
Arun Mirpurie008ed22019-03-21 11:21:04 -0700368#ifeq ($(strip $(AUDIO_FEATURE_ENABLED_AUTO_HAL)),true)
369# LOCAL_CFLAGS += -DAUDIO_EXTN_AUTO_HAL_ENABLED
370# LOCAL_SRC_FILES += audio_extn/auto_hal.c
371#endif
Derek Chend2530072014-11-24 12:39:14 -0800372
Steven Moreland49fcc632019-10-01 11:03:23 -0700373LOCAL_SHARED_LIBRARIES += libbase libhidlbase libutils android.hardware.power@1.2 liblog
Wei Wang16cc0942020-02-03 12:09:08 -0800374
Jeongik Chad36de3b2021-01-28 00:49:48 +0900375LOCAL_SHARED_LIBRARIES += android.hardware.power-V1-ndk_platform
Wei Wang16cc0942020-02-03 12:09:08 -0800376LOCAL_SHARED_LIBRARIES += libbinder_ndk
377
vivek mehtad15d2bf2019-05-17 13:35:10 -0700378LOCAL_SRC_FILES += audio_perf.cpp
Ravi Kumar Alamanda2dfba2b2013-01-17 16:50:22 -0800379
Rahul Sharma99770982019-03-06 17:05:26 +0530380ifeq ($(strip $(AUDIO_FEATURE_ENABLED_FM_TUNER_EXT)),true)
381 LOCAL_CFLAGS += -DFM_TUNER_EXT_ENABLED
382endif
383
Ravi Kumar Alamanda2dfba2b2013-01-17 16:50:22 -0800384LOCAL_MODULE := audio.primary.$(TARGET_BOARD_PLATFORM)
385
386LOCAL_MODULE_RELATIVE_PATH := hw
387
388LOCAL_MODULE_TAGS := optional
389
Aalique Grahame22e49102018-12-18 14:23:57 -0800390LOCAL_MODULE_OWNER := qti
391
Naresh Tanniru10758b62017-06-05 21:05:53 +0530392LOCAL_VENDOR_MODULE := true
393
Ravi Kumar Alamanda2dfba2b2013-01-17 16:50:22 -0800394include $(BUILD_SHARED_LIBRARY)
395
Soumil Shah196157e2018-01-22 17:39:48 -0800396LOCAL_CFLAGS += -Wno-unused-variable
397LOCAL_CFLAGS += -Wno-sign-compare
398LOCAL_CFLAGS += -Wno-unused-parameter
399LOCAL_CFLAGS += -Wno-unused-label
400LOCAL_CFLAGS += -Wno-gnu-designator
401LOCAL_CFLAGS += -Wno-typedef-redefinition
402LOCAL_CFLAGS += -Wno-shorten-64-to-32
403LOCAL_CFLAGS += -Wno-tautological-compare
404LOCAL_CFLAGS += -Wno-unused-function
405LOCAL_CFLAGS += -Wno-unused-local-typedef
406
Ravi Kumar Alamanda2dfba2b2013-01-17 16:50:22 -0800407endif
Naresh Tanniruf1290152018-11-27 12:16:45 +0530408endif