blob: 96d4c6b2776baf504387f0a6cd02b8188fb27a74 [file] [log] [blame]
Ravi Kumar Alamanda2dfba2b2013-01-17 16:50:22 -08001ifeq ($(strip $(BOARD_USES_ALSA_AUDIO)),true)
2
3LOCAL_PATH := $(call my-dir)
4
5include $(CLEAR_VARS)
6
7LOCAL_ARM_MODE := arm
8
Ajay Dudanibe3335a2013-08-19 18:47:21 -07009AUDIO_PLATFORM := $(TARGET_BOARD_PLATFORM)
Ravi Kumar Alamanda48c921d2013-10-29 06:07:44 -070010
Ashok Sidipotu5accc8d2017-11-08 11:21:55 +053011ifneq ($(filter msm8974 msm8226 msm8610 apq8084 msm8994 msm8992 msm8996 msm8998 apq8098_latv sdm845 sdm670 qcs605,$(TARGET_BOARD_PLATFORM)),)
Ajay Dudanibe3335a2013-08-19 18:47:21 -070012 # B-family platform uses msm8974 code base
13 AUDIO_PLATFORM = msm8974
Ravi Kumar Alamanda48c921d2013-10-29 06:07:44 -070014 MULTIPLE_HW_VARIANTS_ENABLED := true
Mingming Yin8e5a4f62013-10-07 15:23:41 -070015ifneq ($(filter msm8610,$(TARGET_BOARD_PLATFORM)),)
16 LOCAL_CFLAGS := -DPLATFORM_MSM8610
17endif
Shiv Maliyappanahalli34b585f2013-10-01 15:49:05 -070018ifneq ($(filter msm8226,$(TARGET_BOARD_PLATFORM)),)
19 LOCAL_CFLAGS := -DPLATFORM_MSM8x26
20endif
Vidyakumar Athotad9d9ff32013-11-13 11:46:52 -080021ifneq ($(filter apq8084,$(TARGET_BOARD_PLATFORM)),)
22 LOCAL_CFLAGS := -DPLATFORM_APQ8084
23endif
Mingming Yin0e1b2902014-05-19 18:20:59 -070024ifneq ($(filter msm8994,$(TARGET_BOARD_PLATFORM)),)
25 LOCAL_CFLAGS := -DPLATFORM_MSM8994
26endif
Fred Oh68ad1d32014-12-09 13:08:07 -080027ifneq ($(filter msm8992,$(TARGET_BOARD_PLATFORM)),)
28 LOCAL_CFLAGS := -DPLATFORM_MSM8994
29endif
Mingming Yin89c6a7f2015-03-24 11:56:14 -070030ifneq ($(filter msm8996,$(TARGET_BOARD_PLATFORM)),)
31 LOCAL_CFLAGS := -DPLATFORM_MSM8996
Banajit Goswami22582e72014-10-15 18:29:34 -070032endif
Venkataraman Nerellapallib8689ec2017-05-04 11:55:29 +053033ifneq ($(filter msm8998 apq8098_latv,$(TARGET_BOARD_PLATFORM)),)
Ben Romberger22d41232016-11-16 14:55:25 -080034 LOCAL_CFLAGS := -DPLATFORM_MSM8998
Banajit Goswami4c0dff22016-03-04 18:31:22 -080035endif
Soumild9f5bfa2017-04-04 19:31:22 -070036ifneq ($(filter sdm845,$(TARGET_BOARD_PLATFORM)),)
Garmond Leung986024b2017-04-28 14:41:10 -070037 LOCAL_CFLAGS := -DPLATFORM_SDM845
Xiaoyu Ye0afc9232017-03-28 21:31:22 -070038endif
Ben Romberger62b698e2017-09-28 15:12:04 -070039ifneq ($(filter sdm670,$(TARGET_BOARD_PLATFORM)),)
Sharad Sangled39232d2017-08-08 20:27:18 +053040 LOCAL_CFLAGS := -DPLATFORM_SDM670
41endif
Ashok Sidipotu5accc8d2017-11-08 11:21:55 +053042ifneq ($(filter qcs605,$(TARGET_BOARD_PLATFORM)),)
43 LOCAL_CFLAGS := -DPLATFORM_QCS605
44endif
Ajay Dudanibe3335a2013-08-19 18:47:21 -070045endif
46
Arusha Goyalfda29152016-12-26 10:53:39 +053047ifneq ($(filter msm8916 msm8909 msm8952 msm8937 thorium msm8953 msmgold sdm660,$(TARGET_BOARD_PLATFORM)),)
Naresh Tannirudb72d1e2014-03-05 17:33:47 +053048 AUDIO_PLATFORM = msm8916
49 MULTIPLE_HW_VARIANTS_ENABLED := true
50 LOCAL_CFLAGS := -DPLATFORM_MSM8916
padarshr04e74812014-09-17 13:34:31 +053051ifneq ($(filter msm8909,$(TARGET_BOARD_PLATFORM)),)
Dhananjay Kumar2bb2fc12014-07-11 19:14:23 +053052 LOCAL_CFLAGS := -DPLATFORM_MSM8909
53endif
Arusha Goyalfda29152016-12-26 10:53:39 +053054ifneq ($(filter sdm660,$(TARGET_BOARD_PLATFORM)),)
Dhananjay Kumard3ab9f42016-07-20 17:05:47 +053055 LOCAL_CFLAGS := -DPLATFORM_MSMFALCON
56endif
Naresh Tannirudb72d1e2014-03-05 17:33:47 +053057endif
Naresh Tanniru8b919ac2014-01-30 19:12:53 +053058
Bruce Levycea5f172018-01-31 16:06:04 -080059LOCAL_CFLAGS += -Wno-macro-redefined
60
Ravi Kumar Alamanda2dfba2b2013-01-17 16:50:22 -080061LOCAL_SRC_FILES := \
62 audio_hw.c \
Shiv Maliyappanahalli34b585f2013-10-01 15:49:05 -070063 voice.c \
Ben Romberger61764e32014-01-10 13:49:02 -080064 platform_info.c \
Vignesh Kulothungan55396882017-04-20 14:37:02 -070065 $(AUDIO_PLATFORM)/platform.c \
66 acdb.c
Ravi Kumar Alamanda2dfba2b2013-01-17 16:50:22 -080067
Subhash Chandra Bose Naripeddy19dc03b2014-03-10 14:43:05 -070068LOCAL_SRC_FILES += audio_extn/audio_extn.c \
69 audio_extn/utils.c
Vidyakumar Athota21b3bb92014-04-25 11:08:08 -070070LOCAL_C_INCLUDES += $(TARGET_OUT_INTERMEDIATES)/KERNEL_OBJ/usr/include
Asish Bhattacharya0b9bfb02017-07-15 08:39:36 +053071LOCAL_C_INCLUDES += $(TARGET_OUT_INTERMEDIATES)/KERNEL_OBJ/usr/techpack/audio/include
Vidyakumar Athota21b3bb92014-04-25 11:08:08 -070072LOCAL_ADDITIONAL_DEPENDENCIES += $(TARGET_OUT_INTERMEDIATES)/KERNEL_OBJ/usr
Ashok Sidipotu5accc8d2017-11-08 11:21:55 +053073ifneq ($(filter sdm670 qcs605,$(TARGET_BOARD_PLATFORM)),)
Asish Bhattacharyad0665872017-09-07 19:46:29 +053074 LOCAL_C_INCLUDES += $(TARGET_OUT_INTERMEDIATES)/vendor/qcom/opensource/audio-kernel/include
75 LOCAL_ADDITIONAL_DEPENDENCIES += $(BOARD_VENDOR_KERNEL_MODULES)
76endif
77
Divya Narayanan Poojary8fd98c82017-07-03 11:17:08 +053078LOCAL_CFLAGS += -DUSE_VENDOR_EXTN
Apoorv Raghuvanshi9eaf94e2013-10-04 16:13:44 -070079
Mingming Yine5bf8372015-02-26 15:03:10 -080080ifeq ($(strip $(AUDIO_FEATURE_ENABLED_HDMI_EDID)),true)
Mingming Yin497419f2015-07-01 16:57:32 -070081 LOCAL_CFLAGS += -DHDMI_EDID
Pradnya Chaphekar4403bd72014-09-09 09:50:01 -070082 LOCAL_SRC_FILES += edid.c
83endif
84
Mingming Yin08c7e312015-03-16 18:10:58 -070085ifeq ($(strip $(AUDIO_USE_LL_AS_PRIMARY_OUTPUT)),true)
86 LOCAL_CFLAGS += -DUSE_LL_AS_PRIMARY_OUTPUT
87endif
88
Mingming Yina6dad602014-05-16 12:10:55 -070089ifeq ($(strip $(AUDIO_FEATURE_ENABLED_PCM_OFFLOAD)),true)
Mingming Yin67e34512014-04-03 17:47:22 -070090 LOCAL_CFLAGS += -DPCM_OFFLOAD_ENABLED
91endif
92
Mingming Yina6dad602014-05-16 12:10:55 -070093ifeq ($(strip $(AUDIO_FEATURE_ENABLED_ANC_HEADSET)),true)
Apoorv Raghuvanshi9eaf94e2013-10-04 16:13:44 -070094 LOCAL_CFLAGS += -DANC_HEADSET_ENABLED
95endif
96
Venkata Narendra Kumar Gutta4bd09d02016-01-29 15:31:04 +053097ifeq ($(strip $(AUDIO_FEATURE_ENABLED_HIFI_AUDIO)),true)
98 LOCAL_CFLAGS += -DHIFI_AUDIO_ENABLED
99endif
100
Srinivas Julakanti1ca769a2017-01-04 23:18:08 -0800101ifeq ($(strip $(AUDIO_FEATURE_ENABLED_RAS)),true)
102 LOCAL_CFLAGS += -DRAS_ENABLED
103endif
104
Banajit Goswami20cdd212015-09-11 01:11:30 -0700105ifeq ($(strip $(AUDIO_FEATURE_ENABLED_VBAT_MONITOR)),true)
106 LOCAL_CFLAGS += -DVBAT_MONITOR_ENABLED
107endif
108
Mingming Yina6dad602014-05-16 12:10:55 -0700109ifeq ($(strip $(AUDIO_FEATURE_ENABLED_FLUENCE)),true)
Venkata Narendra Kumar Gutta88fd0bc2014-03-27 19:47:56 +0530110 LOCAL_CFLAGS += -DFLUENCE_ENABLED
111endif
112
Mingming Yina6dad602014-05-16 12:10:55 -0700113ifeq ($(strip $(AUDIO_FEATURE_ENABLED_PROXY_DEVICE)),true)
Apoorv Raghuvanshi9eaf94e2013-10-04 16:13:44 -0700114 LOCAL_CFLAGS += -DAFE_PROXY_ENABLED
115endif
116
Sudheer Papothi390bcf32014-12-04 01:25:17 +0530117ifeq ($(strip $(AUDIO_FEATURE_ENABLED_KPI_OPTIMIZE)),true)
118 LOCAL_CFLAGS += -DKPI_OPTIMIZE_ENABLED
119endif
120
Mingming Yin12125e82015-10-26 20:40:36 -0700121ifeq ($(strip $(AUDIO_FEATURE_ENABLED_FM_POWER_OPT)),true)
122 LOCAL_CFLAGS += -DFM_POWER_OPT
Apoorv Raghuvanshi6e262842013-10-06 14:39:35 -0700123 LOCAL_SRC_FILES += audio_extn/fm.c
124endif
125
Kuirong Wang357e0b12016-07-06 00:29:15 -0700126ifeq ($(strip $(AUDIO_FEATURE_ENABLED_USB_TUNNEL_AUDIO)),true)
Apoorv Raghuvanshi5792d4b2013-10-07 18:40:05 -0700127 LOCAL_CFLAGS += -DUSB_HEADSET_ENABLED
128 LOCAL_SRC_FILES += audio_extn/usb.c
129endif
Mingming Yina6dad602014-05-16 12:10:55 -0700130
131ifeq ($(strip $(AUDIO_FEATURE_ENABLED_HFP)),true)
Vimal Puthanveed5b4d3f12013-11-05 15:57:39 -0800132 LOCAL_CFLAGS += -DHFP_ENABLED
133 LOCAL_SRC_FILES += audio_extn/hfp.c
134endif
Apoorv Raghuvanshi5792d4b2013-10-07 18:40:05 -0700135
Mingming Yina6dad602014-05-16 12:10:55 -0700136ifeq ($(strip $(AUDIO_FEATURE_ENABLED_CUSTOMSTEREO)),true)
Jitendra Singh Naruka9a6a8d42014-02-10 20:07:12 -0800137 LOCAL_CFLAGS += -DCUSTOM_STEREO_ENABLED
138endif
139
Mingming Yina6dad602014-05-16 12:10:55 -0700140ifeq ($(strip $(AUDIO_FEATURE_ENABLED_SSR)),true)
Apoorv Raghuvanshi6178a3f2013-10-19 12:38:54 -0700141 LOCAL_CFLAGS += -DSSR_ENABLED
142 LOCAL_SRC_FILES += audio_extn/ssr.c
Shiv Maliyappanahalli5a10aea2015-07-02 10:36:23 -0700143 LOCAL_C_INCLUDES += $(TARGET_OUT_HEADERS)/mm-audio/surround_sound_3mic/
Nagender Telkarca2b4942014-03-24 12:25:42 -0600144 LOCAL_C_INCLUDES += $(TARGET_OUT_HEADERS)/common/inc/
Apoorv Raghuvanshi6178a3f2013-10-19 12:38:54 -0700145endif
146
Mingming Yina6dad602014-05-16 12:10:55 -0700147ifeq ($(strip $(AUDIO_FEATURE_ENABLED_MULTI_VOICE_SESSIONS)),true)
Shiv Maliyappanahalli303f51d2013-10-25 16:24:27 -0700148 LOCAL_CFLAGS += -DMULTI_VOICE_SESSION_ENABLED
149 LOCAL_SRC_FILES += voice_extn/voice_extn.c
Vidyakumar Athota21b3bb92014-04-25 11:08:08 -0700150
Mingming Yina6dad602014-05-16 12:10:55 -0700151ifeq ($(strip $(AUDIO_FEATURE_ENABLED_INCALL_MUSIC)),true)
Shiv Maliyappanahalli303f51d2013-10-25 16:24:27 -0700152 LOCAL_CFLAGS += -DINCALL_MUSIC_ENABLED
153endif
Mingming Yina6dad602014-05-16 12:10:55 -0700154ifeq ($(strip $(AUDIO_FEATURE_ENABLED_COMPRESS_VOIP)),true)
Narsinga Rao Chella05573b72013-11-15 15:21:40 -0800155 LOCAL_CFLAGS += -DCOMPRESS_VOIP_ENABLED
156 LOCAL_SRC_FILES += voice_extn/compress_voip.c
157endif
Subhash Chandra Bose Naripeddy19dc03b2014-03-10 14:43:05 -0700158
159endif
160
Mingming Yina6dad602014-05-16 12:10:55 -0700161ifeq ($(strip $(AUDIO_FEATURE_ENABLED_EXTN_FORMATS)),true)
Satya Krishna Pindiproli5d82d012015-08-12 18:21:25 +0530162LOCAL_CFLAGS += -DAUDIO_EXTN_FORMATS_ENABLED
Gopikrishnaiah Anandanf538cef2013-10-28 14:06:03 -0700163endif
Shiv Maliyappanahalli303f51d2013-10-25 16:24:27 -0700164
Anish Kumard80a1392014-07-16 16:18:51 -0700165ifeq ($(strip $(AUDIO_FEATURE_ENABLED_SPKR_PROTECTION)),true)
Gopikrishnaiah Anandanf538cef2013-10-28 14:06:03 -0700166 LOCAL_CFLAGS += -DSPKR_PROT_ENABLED
167 LOCAL_SRC_FILES += audio_extn/spkr_protection.c
Gopikrishnaiah Anandanf538cef2013-10-28 14:06:03 -0700168endif
Shiv Maliyappanahalli303f51d2013-10-25 16:24:27 -0700169
Ravi Kumar Alamanda48c921d2013-10-29 06:07:44 -0700170ifdef MULTIPLE_HW_VARIANTS_ENABLED
171 LOCAL_CFLAGS += -DHW_VARIANTS_ENABLED
172 LOCAL_SRC_FILES += $(AUDIO_PLATFORM)/hw_info.c
173endif
174
Mingming Yina6dad602014-05-16 12:10:55 -0700175ifeq ($(strip $(AUDIO_FEATURE_ENABLED_COMPRESS_CAPTURE)),true)
Mingming Yine62d7842013-10-25 16:26:03 -0700176 LOCAL_CFLAGS += -DCOMPRESS_CAPTURE_ENABLED
177 LOCAL_SRC_FILES += audio_extn/compress_capture.c
178endif
179
Jitendra Naruka1b6513f2014-11-22 19:34:13 -0800180ifeq ($(strip $(AUDIO_FEATURE_ENABLED_DTS_EAGLE)),true)
181 LOCAL_CFLAGS += -DDTS_EAGLE
182 LOCAL_SRC_FILES += audio_extn/dts_eagle.c
183endif
184
Mingming Yina6dad602014-05-16 12:10:55 -0700185ifeq ($(strip $(DOLBY_DDP)),true)
Mingming Yin90310102013-11-13 16:57:00 -0800186 LOCAL_CFLAGS += -DDS1_DOLBY_DDP_ENABLED
Subhash Chandra Bose Naripeddy7690c562013-12-14 00:34:53 -0800187 LOCAL_SRC_FILES += audio_extn/dolby.c
Mingming Yin90310102013-11-13 16:57:00 -0800188endif
189
Pradnya Chaphekar73e2e8b2015-05-01 02:18:17 -0700190ifeq ($(strip $(DS1_DOLBY_DAP)),true)
Subhash Chandra Bose Naripeddy7690c562013-12-14 00:34:53 -0800191 LOCAL_CFLAGS += -DDS1_DOLBY_DAP_ENABLED
Mingming Yina6dad602014-05-16 12:10:55 -0700192ifneq ($(strip $(DOLBY_DDP)),true)
Subhash Chandra Bose Naripeddy7690c562013-12-14 00:34:53 -0800193 LOCAL_SRC_FILES += audio_extn/dolby.c
194endif
195endif
196
Mingming Yin3ee55c62014-08-04 14:23:35 -0700197ifeq ($(strip $(AUDIO_FEATURE_ENABLED_EXTN_FLAC_DECODER)),true)
Satya Krishna Pindiproli70471602015-04-24 19:12:43 +0530198 LOCAL_CFLAGS += -DFLAC_OFFLOAD_ENABLED
199 LOCAL_CFLAGS += -DCOMPRESS_METADATA_NEEDED
200endif
201
202ifeq ($(strip $(AUDIO_FEATURE_ENABLED_VORBIS_OFFLOAD)),true)
203 LOCAL_CFLAGS += -DVORBIS_OFFLOAD_ENABLED
204 LOCAL_CFLAGS += -DCOMPRESS_METADATA_NEEDED
205
206endif
207
208ifeq ($(strip $(AUDIO_FEATURE_ENABLED_WMA_OFFLOAD)),true)
209 LOCAL_CFLAGS += -DWMA_OFFLOAD_ENABLED
210 LOCAL_CFLAGS += -DCOMPRESS_METADATA_NEEDED
211endif
212
213ifeq ($(strip $(AUDIO_FEATURE_ENABLED_ALAC_OFFLOAD)),true)
214 LOCAL_CFLAGS += -DALAC_OFFLOAD_ENABLED
215 LOCAL_CFLAGS += -DCOMPRESS_METADATA_NEEDED
216endif
217
218ifeq ($(strip $(AUDIO_FEATURE_ENABLED_APE_OFFLOAD)),true)
219 LOCAL_CFLAGS += -DAPE_OFFLOAD_ENABLED
220 LOCAL_CFLAGS += -DCOMPRESS_METADATA_NEEDED
Mingming Yin3ee55c62014-08-04 14:23:35 -0700221endif
222
Vidyakumar Athotac1d39c92015-02-25 15:14:26 -0800223ifeq ($(strip $(AUDIO_FEATURE_ENABLED_PCM_OFFLOAD_24)),true)
224 LOCAL_CFLAGS += -DPCM_OFFLOAD_ENABLED_24
225endif
226
Manish Dewangana6fc5442015-08-24 20:30:31 +0530227ifeq ($(strip $(AUDIO_FEATURE_ENABLED_AAC_ADTS_OFFLOAD)),true)
228 LOCAL_CFLAGS += -DAAC_ADTS_OFFLOAD_ENABLED
229endif
230
Lior Barenboim0b61bc72014-05-13 13:01:37 +0300231ifeq ($(strip $(AUDIO_FEATURE_ENABLED_DEV_ARBI)),true)
232 LOCAL_CFLAGS += -DDEV_ARBI_ENABLED
233 LOCAL_SRC_FILES += audio_extn/dev_arbi.c
234endif
235
Naresh Tanniruc0517bc2014-10-26 15:30:55 +0530236ifeq ($(strip $(AUDIO_FEATURE_ENABLED_RECORD_PLAY_CONCURRENCY)),true)
237 LOCAL_CFLAGS += -DRECORD_PLAY_CONCURRENCY
238endif
239
Ashish Jain8ec50472014-10-16 13:56:28 +0530240ifeq ($(strip $(AUDIO_FEATURE_ENABLED_ACDB_LICENSE)), true)
241 LOCAL_CFLAGS += -DDOLBY_ACDB_LICENSE
242endif
243
Pradnya Chaphekar8a9dcd82014-09-09 09:49:10 -0700244ifeq ($(strip $(AUDIO_FEATURE_ENABLED_DS2_DOLBY_DAP)),true)
245 LOCAL_CFLAGS += -DDS2_DOLBY_DAP_ENABLED
Pradnya Chaphekar73e2e8b2015-05-01 02:18:17 -0700246 LOCAL_CFLAGS += -DDS1_DOLBY_DDP_ENABLED
Pradnya Chaphekar8a9dcd82014-09-09 09:49:10 -0700247ifneq ($(strip $(DOLBY_DDP)),true)
Pradnya Chaphekar73e2e8b2015-05-01 02:18:17 -0700248 ifneq ($(strip $(DS1_DOLBY_DAP)),true)
Pradnya Chaphekar8a9dcd82014-09-09 09:49:10 -0700249 LOCAL_SRC_FILES += audio_extn/dolby.c
250 endif
251endif
252endif
253
Pradnya Chaphekar80a8cfb2014-10-20 16:17:01 -0700254ifeq ($(strip $(AUDIO_FEATURE_ENABLED_HDMI_PASSTHROUGH)),true)
255 LOCAL_CFLAGS += -DHDMI_PASSTHROUGH_ENABLED
Mingming Yin21854652016-04-13 11:54:02 -0700256 LOCAL_SRC_FILES += audio_extn/passthru.c
257endif
258
259ifeq ($(strip $(AUDIO_FEATURE_ENABLED_KEEP_ALIVE)),true)
260 LOCAL_CFLAGS += -DKEEP_ALIVE_ENABLED
261 LOCAL_SRC_FILES += audio_extn/keep_alive.c
Pradnya Chaphekar80a8cfb2014-10-20 16:17:01 -0700262endif
263
Narsinga Rao Chellaf928a982015-03-06 14:57:35 -0800264ifeq ($(strip $(AUDIO_FEATURE_ENABLED_SOURCE_TRACKING)),true)
265 LOCAL_CFLAGS += -DSOURCE_TRACKING_ENABLED
266 LOCAL_SRC_FILES += audio_extn/source_track.c
267endif
268
Naresh Tanniru9d027a62015-03-13 01:32:10 +0530269ifeq ($(strip $(AUDIO_FEATURE_ENABLED_SPLIT_A2DP)),true)
270 LOCAL_CFLAGS += -DSPLIT_A2DP_ENABLED
271 LOCAL_SRC_FILES += audio_extn/a2dp.c
272endif
273
Ashish Jaind5694242017-09-05 20:09:06 +0530274ifeq ($(strip $(AUDIO_FEATURE_IP_HDLR_ENABLED)),true)
275 LOCAL_CFLAGS += -DAUDIO_EXTN_IP_HDLR_ENABLED
276 LOCAL_SRC_FILES += audio_extn/ip_hdlr_intf.c
277endif
278
Lakshman Chaluvaraju22ba9f12016-09-12 11:42:10 +0530279ifeq ($(strip $(AUDIO_FEATURE_ENABLED_QAF)),true)
280 LOCAL_CFLAGS += -DQAF_EXTN_ENABLED
281 LOCAL_C_INCLUDES += $(TARGET_OUT_HEADERS)/mm-audio/qaf/
282 LOCAL_SRC_FILES += audio_extn/qaf.c
283endif
284
Dhananjay Kumaree4d2002016-10-25 18:02:58 +0530285ifeq ($(strip $(AUDIO_FEATURE_ENABLED_COMPRESS_INPUT)),true)
286 LOCAL_CFLAGS += -DCOMPRESS_INPUT_ENABLED
287 LOCAL_SRC_FILES += audio_extn/compress_in.c
288endif
289
290ifeq ($(strip $(BOARD_SUPPORTS_QAHW)),true)
291 LOCAL_CFLAGS += -DAUDIO_HW_EXTN_API_ENABLED
292 LOCAL_SRC_FILES += audio_hw_extn_api.c
293endif
294
Bharath Gopal01310bb2016-12-05 15:39:32 +0530295ifeq ($(strip $(AUDIO_FEATURE_ENABLED_BT_HAL)),true)
296 LOCAL_CFLAGS += -DAUDIO_EXTN_BT_HAL_ENABLED
297 LOCAL_SRC_FILES += audio_extn/bt_hal.c
298endif
299
Ravi Kumar Alamanda2dfba2b2013-01-17 16:50:22 -0800300LOCAL_SHARED_LIBRARIES := \
301 liblog \
302 libcutils \
303 libtinyalsa \
Divya Narayanan Poojary8fd98c82017-07-03 11:17:08 +0530304 libtinycompress_vendor \
Ravi Kumar Alamanda2dfba2b2013-01-17 16:50:22 -0800305 libaudioroute \
Ben Romberger61764e32014-01-10 13:49:02 -0800306 libdl \
Ashish Jainf1eaa582016-05-23 20:54:24 +0530307 libaudioutils \
Vidyakumar Athota77327dd2014-08-07 16:44:25 -0700308 libexpat
Ravi Kumar Alamanda2dfba2b2013-01-17 16:50:22 -0800309
310LOCAL_C_INCLUDES += \
311 external/tinyalsa/include \
Ravi Kumar Alamanda4e02e552013-07-17 15:22:04 -0700312 external/tinycompress/include \
Ashish Jainf1eaa582016-05-23 20:54:24 +0530313 system/media/audio_utils/include \
Ben Romberger61764e32014-01-10 13:49:02 -0800314 external/expat/lib \
Ravi Kumar Alamandaf70ffb42013-04-16 15:55:53 -0700315 $(call include-path-for, audio-route) \
Eric Laurentb23d5282013-05-14 15:27:20 -0700316 $(call include-path-for, audio-effects) \
Apoorv Raghuvanshi9eaf94e2013-10-04 16:13:44 -0700317 $(LOCAL_PATH)/$(AUDIO_PLATFORM) \
Narsinga Rao Chella05573b72013-11-15 15:21:40 -0800318 $(LOCAL_PATH)/audio_extn \
Vidyakumar Athota77327dd2014-08-07 16:44:25 -0700319 $(LOCAL_PATH)/voice_extn
Ravi Kumar Alamanda2dfba2b2013-01-17 16:50:22 -0800320
Kiran Kandi910e1862013-10-29 13:29:42 -0700321ifeq ($(strip $(AUDIO_FEATURE_ENABLED_LISTEN)),true)
322 LOCAL_CFLAGS += -DAUDIO_LISTEN_ENABLED
323 LOCAL_C_INCLUDES += $(TARGET_OUT_HEADERS)/mm-audio/audio-listen
324 LOCAL_SRC_FILES += audio_extn/listen.c
325endif
326
Ashish Jain81eb2a82015-05-13 10:52:34 +0530327ifeq ($(strip $(AUDIO_FEATURE_ENABLED_EXT_HDMI)),true)
328 LOCAL_CFLAGS += -DAUDIO_EXTERNAL_HDMI_ENABLED
329ifeq ($(strip $(AUDIO_FEATURE_ENABLED_HDMI_PASSTHROUGH)),true)
330 LOCAL_C_INCLUDES += $(TARGET_OUT_HEADERS)/mm-audio/audio-parsers
331 LOCAL_SHARED_LIBRARIES += libaudioparsers
332endif
333endif
334
Ravi Kumar Alamanda8fa6b192014-09-09 16:06:42 -0700335ifeq ($(strip $(BOARD_SUPPORTS_SOUND_TRIGGER)),true)
Banajit Goswami710f3532016-08-28 14:48:33 -0700336 ST_FEATURE_ENABLE := true
337endif
338
339ifeq ($(strip $(BOARD_SUPPORTS_SOUND_TRIGGER_HAL)),true)
340 ST_FEATURE_ENABLE := true
341endif
342
343ifeq ($(ST_FEATURE_ENABLE), true)
Ravi Kumar Alamanda8fa6b192014-09-09 16:06:42 -0700344 LOCAL_CFLAGS += -DSOUND_TRIGGER_ENABLED
345 LOCAL_CFLAGS += -DSOUND_TRIGGER_PLATFORM_NAME=$(TARGET_BOARD_PLATFORM)
346 LOCAL_C_INCLUDES += $(TARGET_OUT_HEADERS)/mm-audio/sound_trigger
347 LOCAL_SRC_FILES += audio_extn/soundtrigger.c
348endif
349
Damir Didjustof1d46c72013-11-06 17:59:04 -0800350ifeq ($(strip $(AUDIO_FEATURE_ENABLED_AUXPCM_BT)),true)
351 LOCAL_CFLAGS += -DAUXPCM_BT_ENABLED
352endif
353
Preetam Singh Ranawat2d0e4632015-02-02 12:40:59 +0530354ifeq ($(strip $(AUDIO_FEATURE_ENABLED_PM_SUPPORT)),true)
355 LOCAL_CFLAGS += -DPM_SUPPORT_ENABLED
356 LOCAL_SRC_FILES += audio_extn/pm.c
357 LOCAL_C_INCLUDES += $(TARGET_OUT_HEADERS)/libperipheralclient/inc
358 LOCAL_SHARED_LIBRARIES += libperipheral_client
359endif
360
Shiv Maliyappanahallic0656402016-09-03 14:13:26 -0700361ifeq ($(strip $(AUDIO_FEATURE_ENABLED_DISPLAY_PORT)),true)
362 LOCAL_CFLAGS += -DDISPLAY_PORT_ENABLED
363endif
364
Weiyin Jiangaa80acd2016-09-21 16:42:11 +0800365ifeq ($(strip $(AUDIO_FEATURE_ENABLED_GEF_SUPPORT)),true)
366 LOCAL_CFLAGS += -DAUDIO_GENERIC_EFFECT_FRAMEWORK_ENABLED
367 LOCAL_SRC_FILES += audio_extn/gef.c
368endif
369
Ben Rombergerd771a7c2017-02-22 18:05:17 -0800370ifeq ($(strip $($AUDIO_FEATURE_ADSP_HDLR_ENABLED)),true)
371 LOCAL_CFLAGS += -DAUDIO_EXTN_ADSP_HDLR_ENABLED
372 LOCAL_SRC_FILES += audio_extn/adsp_hdlr.c
373endif
374
Revathi Uddaraju1eac8b02017-05-18 17:13:33 +0530375ifeq ($(strip $(AUDIO_FEATURE_ENABLED_DYNAMIC_LOG)), true)
376 LOCAL_CFLAGS += -DDYNAMIC_LOG_ENABLED
377 LOCAL_C_INCLUDES += $(TARGET_OUT_HEADERS)/mm-audio/audio-log-utils
378 LOCAL_SHARED_LIBRARIES += libaudio_log_utils
379endif
380
Vikram Pandurangadf59cae2017-08-03 18:04:55 -0700381ifeq ($(strip $($AUDIO_FEATURE_ENABLED_DYNAMIC_ECNS)),true)
382 LOCAL_CFLAGS += -DDYNAMIC_ECNS_ENABLED
383endif
384
Satya Krishna Pindiprolif1cd92b2016-04-14 19:05:23 +0530385LOCAL_CFLAGS += -Wall -Werror
Alexy Josephb1379942016-01-29 15:49:38 -0800386
Mingming Yin5b7c0b32014-08-04 15:49:24 -0700387LOCAL_COPY_HEADERS_TO := mm-audio
388LOCAL_COPY_HEADERS := audio_extn/audio_defs.h
389
Haynes Mathew George3a1f1fb2016-08-09 15:43:13 -0700390ifeq ($(strip $(AUDIO_FEATURE_ENABLED_SND_MONITOR)), true)
391 LOCAL_CFLAGS += -DSND_MONITOR_ENABLED
392 LOCAL_SRC_FILES += audio_extn/sndmonitor.c
393endif
394
Mingming Yin8e5a4f62013-10-07 15:23:41 -0700395LOCAL_MODULE := audio.primary.$(TARGET_BOARD_PLATFORM)
Ravi Kumar Alamanda2dfba2b2013-01-17 16:50:22 -0800396
Apoorv Raghuvanshi1b555f72014-05-29 12:48:15 -0700397LOCAL_MODULE_RELATIVE_PATH := hw
Ravi Kumar Alamanda2dfba2b2013-01-17 16:50:22 -0800398
399LOCAL_MODULE_TAGS := optional
400
Naresh Tanniru10758b62017-06-05 21:05:53 +0530401LOCAL_VENDOR_MODULE := true
402
Ravi Kumar Alamanda2dfba2b2013-01-17 16:50:22 -0800403include $(BUILD_SHARED_LIBRARY)
404
Soumil Shah196157e2018-01-22 17:39:48 -0800405LOCAL_CFLAGS += -Wno-unused-variable
406LOCAL_CFLAGS += -Wno-sign-compare
407LOCAL_CFLAGS += -Wno-unused-parameter
408LOCAL_CFLAGS += -Wno-unused-label
409LOCAL_CFLAGS += -Wno-gnu-designator
410LOCAL_CFLAGS += -Wno-typedef-redefinition
411LOCAL_CFLAGS += -Wno-shorten-64-to-32
412LOCAL_CFLAGS += -Wno-tautological-compare
413LOCAL_CFLAGS += -Wno-unused-function
414LOCAL_CFLAGS += -Wno-unused-local-typedef
415
Ravi Kumar Alamanda2dfba2b2013-01-17 16:50:22 -0800416endif