Naresh Tanniru | f129015 | 2018-11-27 12:16:45 +0530 | [diff] [blame] | 1 | ifneq ($(AUDIO_USE_STUB_HAL), true) |
Ravi Kumar Alamanda | 2dfba2b | 2013-01-17 16:50:22 -0800 | [diff] [blame] | 2 | ifeq ($(strip $(BOARD_USES_ALSA_AUDIO)),true) |
| 3 | |
| 4 | LOCAL_PATH := $(call my-dir) |
| 5 | |
| 6 | include $(CLEAR_VARS) |
| 7 | |
| 8 | LOCAL_ARM_MODE := arm |
| 9 | |
Ajay Dudani | be3335a | 2013-08-19 18:47:21 -0700 | [diff] [blame] | 10 | AUDIO_PLATFORM := $(TARGET_BOARD_PLATFORM) |
Ravi Kumar Alamanda | 48c921d | 2013-10-29 06:07:44 -0700 | [diff] [blame] | 11 | |
Manisha Agarwal | 888e976 | 2019-02-27 22:18:49 +0530 | [diff] [blame] | 12 | ifneq ($(filter msm8974 msm8226 msm8084 msm8610 apq8084 msm8994 msm8992 msm8996 msm8998 apq8098_latv sdm845 sdm710 qcs605 msmnile kona $(MSMSTEPPE) $(TRINKET) lito,$(TARGET_BOARD_PLATFORM)),) |
Ajay Dudani | be3335a | 2013-08-19 18:47:21 -0700 | [diff] [blame] | 13 | # B-family platform uses msm8974 code base |
| 14 | AUDIO_PLATFORM = msm8974 |
Ravi Kumar Alamanda | 48c921d | 2013-10-29 06:07:44 -0700 | [diff] [blame] | 15 | MULTIPLE_HW_VARIANTS_ENABLED := true |
Aalique Grahame | 22e4910 | 2018-12-18 14:23:57 -0800 | [diff] [blame] | 16 | ifneq ($(filter msm8974,$(TARGET_BOARD_PLATFORM)),) |
| 17 | LOCAL_CFLAGS := -DPLATFORM_MSM8974 |
| 18 | LOCAL_CFLAGS += -DMAX_TARGET_SPECIFIC_CHANNEL_CNT="2" |
| 19 | endif |
Mingming Yin | 8e5a4f6 | 2013-10-07 15:23:41 -0700 | [diff] [blame] | 20 | ifneq ($(filter msm8610,$(TARGET_BOARD_PLATFORM)),) |
| 21 | LOCAL_CFLAGS := -DPLATFORM_MSM8610 |
| 22 | endif |
Shiv Maliyappanahalli | 34b585f | 2013-10-01 15:49:05 -0700 | [diff] [blame] | 23 | ifneq ($(filter msm8226,$(TARGET_BOARD_PLATFORM)),) |
| 24 | LOCAL_CFLAGS := -DPLATFORM_MSM8x26 |
Aalique Grahame | 22e4910 | 2018-12-18 14:23:57 -0800 | [diff] [blame] | 25 | LOCAL_CFLAGS += -DMAX_TARGET_SPECIFIC_CHANNEL_CNT="2" |
| 26 | endif |
| 27 | ifneq ($(filter msm8084,$(TARGET_BOARD_PLATFORM)),) |
| 28 | LOCAL_CFLAGS := -DPLATFORM_MSM8084 |
| 29 | LOCAL_CFLAGS += -DMAX_TARGET_SPECIFIC_CHANNEL_CNT="2" |
Shiv Maliyappanahalli | 34b585f | 2013-10-01 15:49:05 -0700 | [diff] [blame] | 30 | endif |
Vidyakumar Athota | d9d9ff3 | 2013-11-13 11:46:52 -0800 | [diff] [blame] | 31 | ifneq ($(filter apq8084,$(TARGET_BOARD_PLATFORM)),) |
| 32 | LOCAL_CFLAGS := -DPLATFORM_APQ8084 |
| 33 | endif |
Mingming Yin | 0e1b290 | 2014-05-19 18:20:59 -0700 | [diff] [blame] | 34 | ifneq ($(filter msm8994,$(TARGET_BOARD_PLATFORM)),) |
| 35 | LOCAL_CFLAGS := -DPLATFORM_MSM8994 |
Aalique Grahame | 22e4910 | 2018-12-18 14:23:57 -0800 | [diff] [blame] | 36 | LOCAL_CFLAGS += -DMAX_TARGET_SPECIFIC_CHANNEL_CNT="4" |
| 37 | LOCAL_CFLAGS += -DKPI_OPTIMIZE_ENABLED |
Mingming Yin | 0e1b290 | 2014-05-19 18:20:59 -0700 | [diff] [blame] | 38 | endif |
Fred Oh | 68ad1d3 | 2014-12-09 13:08:07 -0800 | [diff] [blame] | 39 | ifneq ($(filter msm8992,$(TARGET_BOARD_PLATFORM)),) |
| 40 | LOCAL_CFLAGS := -DPLATFORM_MSM8994 |
Aalique Grahame | 22e4910 | 2018-12-18 14:23:57 -0800 | [diff] [blame] | 41 | LOCAL_CFLAGS += -DMAX_TARGET_SPECIFIC_CHANNEL_CNT="4" |
| 42 | LOCAL_CFLAGS += -DKPI_OPTIMIZE_ENABLED |
Fred Oh | 68ad1d3 | 2014-12-09 13:08:07 -0800 | [diff] [blame] | 43 | endif |
Mingming Yin | 89c6a7f | 2015-03-24 11:56:14 -0700 | [diff] [blame] | 44 | ifneq ($(filter msm8996,$(TARGET_BOARD_PLATFORM)),) |
| 45 | LOCAL_CFLAGS := -DPLATFORM_MSM8996 |
Aalique Grahame | 22e4910 | 2018-12-18 14:23:57 -0800 | [diff] [blame] | 46 | LOCAL_CFLAGS += -DMAX_TARGET_SPECIFIC_CHANNEL_CNT="4" |
| 47 | LOCAL_CFLAGS += -DKPI_OPTIMIZE_ENABLED |
| 48 | LOCAL_CFLAGS += -DINCALL_MUSIC_ENABLED |
Banajit Goswami | 22582e7 | 2014-10-15 18:29:34 -0700 | [diff] [blame] | 49 | endif |
Venkataraman Nerellapalli | b8689ec | 2017-05-04 11:55:29 +0530 | [diff] [blame] | 50 | ifneq ($(filter msm8998 apq8098_latv,$(TARGET_BOARD_PLATFORM)),) |
Ben Romberger | 22d4123 | 2016-11-16 14:55:25 -0800 | [diff] [blame] | 51 | LOCAL_CFLAGS := -DPLATFORM_MSM8998 |
Aalique Grahame | 22e4910 | 2018-12-18 14:23:57 -0800 | [diff] [blame] | 52 | LOCAL_CFLAGS += -DMAX_TARGET_SPECIFIC_CHANNEL_CNT="4" |
| 53 | LOCAL_CFLAGS += -DINCALL_MUSIC_ENABLED |
Banajit Goswami | 4c0dff2 | 2016-03-04 18:31:22 -0800 | [diff] [blame] | 54 | endif |
Soumil | d9f5bfa | 2017-04-04 19:31:22 -0700 | [diff] [blame] | 55 | ifneq ($(filter sdm845,$(TARGET_BOARD_PLATFORM)),) |
Garmond Leung | 986024b | 2017-04-28 14:41:10 -0700 | [diff] [blame] | 56 | LOCAL_CFLAGS := -DPLATFORM_SDM845 |
Aalique Grahame | 22e4910 | 2018-12-18 14:23:57 -0800 | [diff] [blame] | 57 | LOCAL_CFLAGS += -DMAX_TARGET_SPECIFIC_CHANNEL_CNT="4" |
| 58 | LOCAL_CFLAGS += -DINCALL_MUSIC_ENABLED |
| 59 | LOCAL_CFLAGS += -DINCALL_STEREO_CAPTURE_ENABLED |
Xiaoyu Ye | 0afc923 | 2017-03-28 21:31:22 -0700 | [diff] [blame] | 60 | endif |
Naresh Tanniru | 42e0e60 | 2018-03-16 19:45:21 +0530 | [diff] [blame] | 61 | ifneq ($(filter sdm710,$(TARGET_BOARD_PLATFORM)),) |
| 62 | LOCAL_CFLAGS := -DPLATFORM_SDM710 |
Ramjee Singh | 970ad43 | 2019-03-13 10:28:43 +0530 | [diff] [blame] | 63 | LOCAL_CFLAGS += -DMAX_TARGET_SPECIFIC_CHANNEL_CNT="4" |
Sharad Sangle | d39232d | 2017-08-08 20:27:18 +0530 | [diff] [blame] | 64 | endif |
Ashok Sidipotu | 5accc8d | 2017-11-08 11:21:55 +0530 | [diff] [blame] | 65 | ifneq ($(filter qcs605,$(TARGET_BOARD_PLATFORM)),) |
| 66 | LOCAL_CFLAGS := -DPLATFORM_QCS605 |
| 67 | endif |
Xiaoyu Ye | 91553e6 | 2017-11-21 17:35:50 -0800 | [diff] [blame] | 68 | ifneq ($(filter msmnile,$(TARGET_BOARD_PLATFORM)),) |
| 69 | LOCAL_CFLAGS := -DPLATFORM_MSMNILE |
Aalique Grahame | 22e4910 | 2018-12-18 14:23:57 -0800 | [diff] [blame] | 70 | LOCAL_CFLAGS += -DMAX_TARGET_SPECIFIC_CHANNEL_CNT="4" |
| 71 | LOCAL_CFLAGS += -DINCALL_MUSIC_ENABLED |
| 72 | LOCAL_CFLAGS += -DINCALL_STEREO_CAPTURE_ENABLED |
Xiaoyu Ye | 91553e6 | 2017-11-21 17:35:50 -0800 | [diff] [blame] | 73 | endif |
Meng Wang | ef2f6e1 | 2018-10-08 13:06:05 +0800 | [diff] [blame] | 74 | ifneq ($(filter kona,$(TARGET_BOARD_PLATFORM)),) |
| 75 | LOCAL_CFLAGS := -DPLATFORM_KONA |
Aalique Grahame | ee8c0ed | 2019-02-26 14:15:52 -0800 | [diff] [blame] | 76 | LOCAL_CFLAGS += -DMAX_TARGET_SPECIFIC_CHANNEL_CNT="4" |
Meng Wang | ef2f6e1 | 2018-10-08 13:06:05 +0800 | [diff] [blame] | 77 | endif |
Tanya Dixit | 6e3bccc | 2018-04-05 13:42:18 +0530 | [diff] [blame] | 78 | ifneq ($(filter $(MSMSTEPPE) ,$(TARGET_BOARD_PLATFORM)),) |
| 79 | LOCAL_CFLAGS := -DPLATFORM_MSMSTEPPE |
Ramjee Singh | 970ad43 | 2019-03-13 10:28:43 +0530 | [diff] [blame] | 80 | LOCAL_CFLAGS += -DMAX_TARGET_SPECIFIC_CHANNEL_CNT="4" |
Tanya Dixit | 6e3bccc | 2018-04-05 13:42:18 +0530 | [diff] [blame] | 81 | endif |
Hari Veerubhotla | e56a5fa | 2018-10-14 16:52:10 +0530 | [diff] [blame] | 82 | ifneq ($(filter $(TRINKET) ,$(TARGET_BOARD_PLATFORM)),) |
| 83 | LOCAL_CFLAGS := -DPLATFORM_TRINKET |
Ramjee Singh | 970ad43 | 2019-03-13 10:28:43 +0530 | [diff] [blame] | 84 | LOCAL_CFLAGS += -DMAX_TARGET_SPECIFIC_CHANNEL_CNT="4" |
Hari Veerubhotla | e56a5fa | 2018-10-14 16:52:10 +0530 | [diff] [blame] | 85 | endif |
Manisha Agarwal | 888e976 | 2019-02-27 22:18:49 +0530 | [diff] [blame] | 86 | ifneq ($(filter lito,$(TARGET_BOARD_PLATFORM)),) |
| 87 | LOCAL_CFLAGS := -DPLATFORM_LITO |
| 88 | endif |
Ajay Dudani | be3335a | 2013-08-19 18:47:21 -0700 | [diff] [blame] | 89 | endif |
| 90 | |
Arusha Goyal | fda2915 | 2016-12-26 10:53:39 +0530 | [diff] [blame] | 91 | ifneq ($(filter msm8916 msm8909 msm8952 msm8937 thorium msm8953 msmgold sdm660,$(TARGET_BOARD_PLATFORM)),) |
Naresh Tanniru | db72d1e | 2014-03-05 17:33:47 +0530 | [diff] [blame] | 92 | AUDIO_PLATFORM = msm8916 |
| 93 | MULTIPLE_HW_VARIANTS_ENABLED := true |
| 94 | LOCAL_CFLAGS := -DPLATFORM_MSM8916 |
Aalique Grahame | 22e4910 | 2018-12-18 14:23:57 -0800 | [diff] [blame] | 95 | LOCAL_CFLAGS += -DMAX_TARGET_SPECIFIC_CHANNEL_CNT="2" |
| 96 | LOCAL_CFLAGS += -DKPI_OPTIMIZE_ENABLED |
padarshr | 04e7481 | 2014-09-17 13:34:31 +0530 | [diff] [blame] | 97 | ifneq ($(filter msm8909,$(TARGET_BOARD_PLATFORM)),) |
Dhananjay Kumar | 2bb2fc1 | 2014-07-11 19:14:23 +0530 | [diff] [blame] | 98 | LOCAL_CFLAGS := -DPLATFORM_MSM8909 |
| 99 | endif |
Arusha Goyal | fda2915 | 2016-12-26 10:53:39 +0530 | [diff] [blame] | 100 | ifneq ($(filter sdm660,$(TARGET_BOARD_PLATFORM)),) |
Dhananjay Kumar | d3ab9f4 | 2016-07-20 17:05:47 +0530 | [diff] [blame] | 101 | LOCAL_CFLAGS := -DPLATFORM_MSMFALCON |
| 102 | endif |
Naresh Tanniru | db72d1e | 2014-03-05 17:33:47 +0530 | [diff] [blame] | 103 | endif |
Naresh Tanniru | 8b919ac | 2014-01-30 19:12:53 +0530 | [diff] [blame] | 104 | |
Derek Chen | 3e5b30a | 2018-10-24 01:04:25 -0700 | [diff] [blame] | 105 | ifeq ($(TARGET_BOARD_AUTO),true) |
| 106 | LOCAL_CFLAGS += -DPLATFORM_AUTO |
| 107 | endif |
| 108 | |
Bruce Levy | cea5f17 | 2018-01-31 16:06:04 -0800 | [diff] [blame] | 109 | LOCAL_CFLAGS += -Wno-macro-redefined |
| 110 | |
Revathi Uddaraju | e8bd13c | 2018-04-02 21:27:54 +0530 | [diff] [blame] | 111 | LOCAL_HEADER_LIBRARIES := libhardware_headers |
| 112 | |
Ravi Kumar Alamanda | 2dfba2b | 2013-01-17 16:50:22 -0800 | [diff] [blame] | 113 | LOCAL_SRC_FILES := \ |
Weiyin Jiang | e6ce631 | 2019-01-28 18:28:22 +0800 | [diff] [blame] | 114 | audio_hw.c \ |
| 115 | voice.c \ |
| 116 | platform_info.c \ |
| 117 | $(AUDIO_PLATFORM)/platform.c \ |
| 118 | acdb.c \ |
| 119 | ahal_config_helper.cpp |
Ravi Kumar Alamanda | 2dfba2b | 2013-01-17 16:50:22 -0800 | [diff] [blame] | 120 | |
Subhash Chandra Bose Naripeddy | 19dc03b | 2014-03-10 14:43:05 -0700 | [diff] [blame] | 121 | LOCAL_SRC_FILES += audio_extn/audio_extn.c \ |
Arun Mirpuri | b1bec9c | 2019-01-29 16:42:45 -0800 | [diff] [blame] | 122 | audio_extn/audio_feature_manager.c \ |
Weiyin Jiang | e6ce631 | 2019-01-28 18:28:22 +0800 | [diff] [blame] | 123 | audio_extn/audio_hidl.cpp \ |
Arun Mirpuri | b1bec9c | 2019-01-29 16:42:45 -0800 | [diff] [blame] | 124 | audio_extn/utils.c \ |
| 125 | audio_extn/source_track.c \ |
| 126 | voice_extn/voice_extn.c \ |
| 127 | audio_extn/fm.c \ |
| 128 | voice_extn/compress_voip.c \ |
| 129 | audio_extn/keep_alive.c |
Arun Mirpuri | b1bec9c | 2019-01-29 16:42:45 -0800 | [diff] [blame] | 130 | LOCAL_C_INCLUDES += $(TARGET_OUT_INTERMEDIATES)/KERNEL_OBJ/usr/include |
Asish Bhattacharya | 0b9bfb0 | 2017-07-15 08:39:36 +0530 | [diff] [blame] | 131 | LOCAL_C_INCLUDES += $(TARGET_OUT_INTERMEDIATES)/KERNEL_OBJ/usr/techpack/audio/include |
Vidyakumar Athota | 21b3bb9 | 2014-04-25 11:08:08 -0700 | [diff] [blame] | 132 | LOCAL_ADDITIONAL_DEPENDENCIES += $(TARGET_OUT_INTERMEDIATES)/KERNEL_OBJ/usr |
Sharad Sangle | df0dd6f | 2018-04-04 19:07:39 +0530 | [diff] [blame] | 133 | |
| 134 | ifeq ($(strip $(AUDIO_FEATURE_ENABLED_DLKM)),true) |
Revathi Uddaraju | 3f4cfa4 | 2018-06-04 20:35:10 +0530 | [diff] [blame] | 135 | LOCAL_HEADER_LIBRARIES += audio_kernel_headers |
Asish Bhattacharya | d066587 | 2017-09-07 19:46:29 +0530 | [diff] [blame] | 136 | LOCAL_C_INCLUDES += $(TARGET_OUT_INTERMEDIATES)/vendor/qcom/opensource/audio-kernel/include |
Asish Bhattacharya | d066587 | 2017-09-07 19:46:29 +0530 | [diff] [blame] | 137 | endif |
| 138 | |
Divya Narayanan Poojary | 8fd98c8 | 2017-07-03 11:17:08 +0530 | [diff] [blame] | 139 | LOCAL_CFLAGS += -DUSE_VENDOR_EXTN |
Apoorv Raghuvanshi | 9eaf94e | 2013-10-04 16:13:44 -0700 | [diff] [blame] | 140 | |
Arun Mirpuri | b1bec9c | 2019-01-29 16:42:45 -0800 | [diff] [blame] | 141 | # ifeq ($(strip $(AUDIO_FEATURE_ENABLED_HDMI_EDID)),true) |
| 142 | # LOCAL_CFLAGS += -DHDMI_EDID |
| 143 | # LOCAL_SRC_FILES += edid.c |
| 144 | # endif |
Mingming Yin | 08c7e31 | 2015-03-16 18:10:58 -0700 | [diff] [blame] | 145 | |
Mingming Yin | a6dad60 | 2014-05-16 12:10:55 -0700 | [diff] [blame] | 146 | ifeq ($(strip $(AUDIO_FEATURE_ENABLED_PCM_OFFLOAD)),true) |
Mingming Yin | 67e3451 | 2014-04-03 17:47:22 -0700 | [diff] [blame] | 147 | LOCAL_CFLAGS += -DPCM_OFFLOAD_ENABLED |
| 148 | endif |
| 149 | |
Arun Mirpuri | b1bec9c | 2019-01-29 16:42:45 -0800 | [diff] [blame] | 150 | # ifeq ($(strip $(AUDIO_FEATURE_ENABLED_ANC_HEADSET)),true) |
| 151 | # LOCAL_CFLAGS += -DANC_HEADSET_ENABLED |
| 152 | # endif |
Apoorv Raghuvanshi | 9eaf94e | 2013-10-04 16:13:44 -0700 | [diff] [blame] | 153 | |
Arun Mirpuri | b1bec9c | 2019-01-29 16:42:45 -0800 | [diff] [blame] | 154 | # ifeq ($(strip $(AUDIO_FEATURE_ENABLED_HIFI_AUDIO)),true) |
| 155 | # LOCAL_CFLAGS += -DHIFI_AUDIO_ENABLED |
| 156 | # endif |
Venkata Narendra Kumar Gutta | 4bd09d0 | 2016-01-29 15:31:04 +0530 | [diff] [blame] | 157 | |
Arun Mirpuri | b1bec9c | 2019-01-29 16:42:45 -0800 | [diff] [blame] | 158 | # ifeq ($(strip $(AUDIO_FEATURE_ENABLED_RAS)),true) |
| 159 | # LOCAL_CFLAGS += -DRAS_ENABLED |
| 160 | # endif |
Srinivas Julakanti | 1ca769a | 2017-01-04 23:18:08 -0800 | [diff] [blame] | 161 | |
Arun Mirpuri | b1bec9c | 2019-01-29 16:42:45 -0800 | [diff] [blame] | 162 | #ifeq ($(strip $(AUDIO_FEATURE_ENABLED_VBAT_MONITOR)),true) |
| 163 | # LOCAL_CFLAGS += -DVBAT_MONITOR_ENABLED |
| 164 | #endif |
Banajit Goswami | 20cdd21 | 2015-09-11 01:11:30 -0700 | [diff] [blame] | 165 | |
Arun Mirpuri | b1bec9c | 2019-01-29 16:42:45 -0800 | [diff] [blame] | 166 | # ifeq ($(strip $(AUDIO_FEATURE_ENABLED_FLUENCE)),true) |
| 167 | # LOCAL_CFLAGS += -DFLUENCE_ENABLED |
| 168 | # endif |
Venkata Narendra Kumar Gutta | 88fd0bc | 2014-03-27 19:47:56 +0530 | [diff] [blame] | 169 | |
Mingming Yin | a6dad60 | 2014-05-16 12:10:55 -0700 | [diff] [blame] | 170 | ifeq ($(strip $(AUDIO_FEATURE_ENABLED_PROXY_DEVICE)),true) |
Apoorv Raghuvanshi | 9eaf94e | 2013-10-04 16:13:44 -0700 | [diff] [blame] | 171 | LOCAL_CFLAGS += -DAFE_PROXY_ENABLED |
| 172 | endif |
| 173 | |
Arun Mirpuri | b1bec9c | 2019-01-29 16:42:45 -0800 | [diff] [blame] | 174 | # ifeq ($(strip $(AUDIO_FEATURE_ENABLED_KPI_OPTIMIZE)),true) |
| 175 | # LOCAL_CFLAGS += -DKPI_OPTIMIZE_ENABLED |
| 176 | # endif |
Sudheer Papothi | 390bcf3 | 2014-12-04 01:25:17 +0530 | [diff] [blame] | 177 | |
Arun Mirpuri | b1bec9c | 2019-01-29 16:42:45 -0800 | [diff] [blame] | 178 | # ifeq ($(strip $(AUDIO_FEATURE_ENABLED_FM_POWER_OPT)),true) |
| 179 | # LOCAL_CFLAGS += -DFM_POWER_OPT |
| 180 | # LOCAL_SRC_FILES += audio_extn/fm.c |
| 181 | # endif |
Apoorv Raghuvanshi | 6e26284 | 2013-10-06 14:39:35 -0700 | [diff] [blame] | 182 | |
Arun Mirpuri | b1bec9c | 2019-01-29 16:42:45 -0800 | [diff] [blame] | 183 | |
| 184 | #ifeq ($(strip $(AUDIO_FEATURE_ENABLED_USB_TUNNEL)),true) |
| 185 | # LOCAL_CFLAGS += -DUSB_TUNNEL_ENABLED |
Apoorv Raghuvanshi | 5792d4b | 2013-10-07 18:40:05 -0700 | [diff] [blame] | 186 | LOCAL_SRC_FILES += audio_extn/usb.c |
Arun Mirpuri | b1bec9c | 2019-01-29 16:42:45 -0800 | [diff] [blame] | 187 | #endif |
Mingming Yin | a6dad60 | 2014-05-16 12:10:55 -0700 | [diff] [blame] | 188 | |
Arun Mirpuri | b1bec9c | 2019-01-29 16:42:45 -0800 | [diff] [blame] | 189 | #ifeq ($(strip $(AUDIO_FEATURE_ENABLED_USB_SIDETONE_VOLUME)),true) |
| 190 | # LOCAL_CFLAGS += -DUSB_SIDETONE_VOLUME |
| 191 | #endif |
| 192 | |
| 193 | #ifeq ($(strip $(AUDIO_FEATURE_ENABLED_USB_BURST_MODE)), true) |
| 194 | # LOCAL_CFLAGS += -DUSB_BURST_MODE_ENABLED |
| 195 | #endif |
Aalique Grahame | 22e4910 | 2018-12-18 14:23:57 -0800 | [diff] [blame] | 196 | |
Mingming Yin | a6dad60 | 2014-05-16 12:10:55 -0700 | [diff] [blame] | 197 | ifeq ($(strip $(AUDIO_FEATURE_ENABLED_HFP)),true) |
Vimal Puthanveed | 5b4d3f1 | 2013-11-05 15:57:39 -0800 | [diff] [blame] | 198 | LOCAL_CFLAGS += -DHFP_ENABLED |
| 199 | LOCAL_SRC_FILES += audio_extn/hfp.c |
| 200 | endif |
Apoorv Raghuvanshi | 5792d4b | 2013-10-07 18:40:05 -0700 | [diff] [blame] | 201 | |
Arun Mirpuri | b1bec9c | 2019-01-29 16:42:45 -0800 | [diff] [blame] | 202 | # ifeq ($(strip $(AUDIO_FEATURE_ENABLED_CUSTOMSTEREO)),true) |
| 203 | # LOCAL_CFLAGS += -DCUSTOM_STEREO_ENABLED |
| 204 | # endif |
Vidyakumar Athota | 21b3bb9 | 2014-04-25 11:08:08 -0700 | [diff] [blame] | 205 | |
Mingming Yin | a6dad60 | 2014-05-16 12:10:55 -0700 | [diff] [blame] | 206 | ifeq ($(strip $(AUDIO_FEATURE_ENABLED_INCALL_MUSIC)),true) |
Shiv Maliyappanahalli | 303f51d | 2013-10-25 16:24:27 -0700 | [diff] [blame] | 207 | LOCAL_CFLAGS += -DINCALL_MUSIC_ENABLED |
| 208 | endif |
Arun Mirpuri | b1bec9c | 2019-01-29 16:42:45 -0800 | [diff] [blame] | 209 | # ifeq ($(strip $(AUDIO_FEATURE_ENABLED_COMPRESS_VOIP)),true) |
| 210 | # LOCAL_CFLAGS += -DCOMPRESS_VOIP_ENABLED |
| 211 | # LOCAL_SRC_FILES += voice_extn/compress_voip.c |
| 212 | # endif |
Subhash Chandra Bose Naripeddy | 19dc03b | 2014-03-10 14:43:05 -0700 | [diff] [blame] | 213 | |
Arun Mirpuri | b1bec9c | 2019-01-29 16:42:45 -0800 | [diff] [blame] | 214 | # endif |
Subhash Chandra Bose Naripeddy | 19dc03b | 2014-03-10 14:43:05 -0700 | [diff] [blame] | 215 | |
Mingming Yin | a6dad60 | 2014-05-16 12:10:55 -0700 | [diff] [blame] | 216 | ifeq ($(strip $(AUDIO_FEATURE_ENABLED_EXTN_FORMATS)),true) |
Aalique Grahame | 22e4910 | 2018-12-18 14:23:57 -0800 | [diff] [blame] | 217 | LOCAL_CFLAGS += -DAUDIO_EXTN_FORMATS_ENABLED |
Gopikrishnaiah Anandan | f538cef | 2013-10-28 14:06:03 -0700 | [diff] [blame] | 218 | endif |
Shiv Maliyappanahalli | 303f51d | 2013-10-25 16:24:27 -0700 | [diff] [blame] | 219 | |
Arun Mirpuri | b1bec9c | 2019-01-29 16:42:45 -0800 | [diff] [blame] | 220 | #ifeq ($(strip $(AUDIO_FEATURE_ENABLED_SPKR_PROTECTION)),true) |
| 221 | # LOCAL_CFLAGS += -DSPKR_PROT_ENABLED |
| 222 | # LOCAL_SRC_FILES += audio_extn/spkr_protection.c |
| 223 | #endif |
Aalique Grahame | 22e4910 | 2018-12-18 14:23:57 -0800 | [diff] [blame] | 224 | |
| 225 | ifeq ($(strip $(AUDIO_FEATURE_ENABLED_BG_CAL)),true) |
| 226 | LOCAL_CFLAGS += -DBG_CODEC_CAL |
Gopikrishnaiah Anandan | f538cef | 2013-10-28 14:06:03 -0700 | [diff] [blame] | 227 | endif |
Shiv Maliyappanahalli | 303f51d | 2013-10-25 16:24:27 -0700 | [diff] [blame] | 228 | |
Arun Mirpuri | b1bec9c | 2019-01-29 16:42:45 -0800 | [diff] [blame] | 229 | # ifeq ($(strip $(AUDIO_FEATURE_ENABLED_CIRRUS_SPKR_PROTECTION)),true) |
| 230 | # LOCAL_CFLAGS += -DSPKR_PROT_ENABLED |
| 231 | # LOCAL_SRC_FILES += audio_extn/cirrus_playback.c |
| 232 | # endif |
| 233 | |
Ravi Kumar Alamanda | 48c921d | 2013-10-29 06:07:44 -0700 | [diff] [blame] | 234 | ifdef MULTIPLE_HW_VARIANTS_ENABLED |
| 235 | LOCAL_CFLAGS += -DHW_VARIANTS_ENABLED |
| 236 | LOCAL_SRC_FILES += $(AUDIO_PLATFORM)/hw_info.c |
| 237 | endif |
| 238 | |
Jitendra Naruka | 1b6513f | 2014-11-22 19:34:13 -0800 | [diff] [blame] | 239 | ifeq ($(strip $(AUDIO_FEATURE_ENABLED_DTS_EAGLE)),true) |
| 240 | LOCAL_CFLAGS += -DDTS_EAGLE |
| 241 | LOCAL_SRC_FILES += audio_extn/dts_eagle.c |
| 242 | endif |
| 243 | |
Mingming Yin | a6dad60 | 2014-05-16 12:10:55 -0700 | [diff] [blame] | 244 | ifeq ($(strip $(DOLBY_DDP)),true) |
Mingming Yin | 9031010 | 2013-11-13 16:57:00 -0800 | [diff] [blame] | 245 | LOCAL_CFLAGS += -DDS1_DOLBY_DDP_ENABLED |
Subhash Chandra Bose Naripeddy | 7690c56 | 2013-12-14 00:34:53 -0800 | [diff] [blame] | 246 | LOCAL_SRC_FILES += audio_extn/dolby.c |
Mingming Yin | 9031010 | 2013-11-13 16:57:00 -0800 | [diff] [blame] | 247 | endif |
| 248 | |
Pradnya Chaphekar | 73e2e8b | 2015-05-01 02:18:17 -0700 | [diff] [blame] | 249 | ifeq ($(strip $(DS1_DOLBY_DAP)),true) |
Subhash Chandra Bose Naripeddy | 7690c56 | 2013-12-14 00:34:53 -0800 | [diff] [blame] | 250 | LOCAL_CFLAGS += -DDS1_DOLBY_DAP_ENABLED |
Mingming Yin | a6dad60 | 2014-05-16 12:10:55 -0700 | [diff] [blame] | 251 | ifneq ($(strip $(DOLBY_DDP)),true) |
Subhash Chandra Bose Naripeddy | 7690c56 | 2013-12-14 00:34:53 -0800 | [diff] [blame] | 252 | LOCAL_SRC_FILES += audio_extn/dolby.c |
| 253 | endif |
| 254 | endif |
| 255 | |
Mingming Yin | 3ee55c6 | 2014-08-04 14:23:35 -0700 | [diff] [blame] | 256 | ifeq ($(strip $(AUDIO_FEATURE_ENABLED_EXTN_FLAC_DECODER)),true) |
Satya Krishna Pindiproli | 7047160 | 2015-04-24 19:12:43 +0530 | [diff] [blame] | 257 | LOCAL_CFLAGS += -DFLAC_OFFLOAD_ENABLED |
Arun Mirpuri | b1bec9c | 2019-01-29 16:42:45 -0800 | [diff] [blame] | 258 | # LOCAL_CFLAGS += -DCOMPRESS_METADATA_NEEDED |
Satya Krishna Pindiproli | 7047160 | 2015-04-24 19:12:43 +0530 | [diff] [blame] | 259 | endif |
| 260 | |
| 261 | ifeq ($(strip $(AUDIO_FEATURE_ENABLED_VORBIS_OFFLOAD)),true) |
| 262 | LOCAL_CFLAGS += -DVORBIS_OFFLOAD_ENABLED |
Arun Mirpuri | b1bec9c | 2019-01-29 16:42:45 -0800 | [diff] [blame] | 263 | # LOCAL_CFLAGS += -DCOMPRESS_METADATA_NEEDED |
Satya Krishna Pindiproli | 7047160 | 2015-04-24 19:12:43 +0530 | [diff] [blame] | 264 | endif |
| 265 | |
| 266 | ifeq ($(strip $(AUDIO_FEATURE_ENABLED_WMA_OFFLOAD)),true) |
| 267 | LOCAL_CFLAGS += -DWMA_OFFLOAD_ENABLED |
Arun Mirpuri | b1bec9c | 2019-01-29 16:42:45 -0800 | [diff] [blame] | 268 | # LOCAL_CFLAGS += -DCOMPRESS_METADATA_NEEDED |
Satya Krishna Pindiproli | 7047160 | 2015-04-24 19:12:43 +0530 | [diff] [blame] | 269 | endif |
| 270 | |
| 271 | ifeq ($(strip $(AUDIO_FEATURE_ENABLED_ALAC_OFFLOAD)),true) |
| 272 | LOCAL_CFLAGS += -DALAC_OFFLOAD_ENABLED |
Arun Mirpuri | b1bec9c | 2019-01-29 16:42:45 -0800 | [diff] [blame] | 273 | # LOCAL_CFLAGS += -DCOMPRESS_METADATA_NEEDED |
Satya Krishna Pindiproli | 7047160 | 2015-04-24 19:12:43 +0530 | [diff] [blame] | 274 | endif |
| 275 | |
| 276 | ifeq ($(strip $(AUDIO_FEATURE_ENABLED_APE_OFFLOAD)),true) |
| 277 | LOCAL_CFLAGS += -DAPE_OFFLOAD_ENABLED |
Arun Mirpuri | b1bec9c | 2019-01-29 16:42:45 -0800 | [diff] [blame] | 278 | # LOCAL_CFLAGS += -DCOMPRESS_METADATA_NEEDED |
Mingming Yin | 3ee55c6 | 2014-08-04 14:23:35 -0700 | [diff] [blame] | 279 | endif |
| 280 | |
Vidyakumar Athota | c1d39c9 | 2015-02-25 15:14:26 -0800 | [diff] [blame] | 281 | ifeq ($(strip $(AUDIO_FEATURE_ENABLED_PCM_OFFLOAD_24)),true) |
| 282 | LOCAL_CFLAGS += -DPCM_OFFLOAD_ENABLED_24 |
| 283 | endif |
| 284 | |
Manish Dewangan | a6fc544 | 2015-08-24 20:30:31 +0530 | [diff] [blame] | 285 | ifeq ($(strip $(AUDIO_FEATURE_ENABLED_AAC_ADTS_OFFLOAD)),true) |
| 286 | LOCAL_CFLAGS += -DAAC_ADTS_OFFLOAD_ENABLED |
| 287 | endif |
| 288 | |
Arun Mirpuri | b1bec9c | 2019-01-29 16:42:45 -0800 | [diff] [blame] | 289 | # # Removing flag as feature below is no longer needed |
| 290 | # ifeq ($(strip $(AUDIO_FEATURE_ENABLED_DEV_ARBI)),true) |
| 291 | # LOCAL_CFLAGS += -DDEV_ARBI_ENABLED |
| 292 | # LOCAL_SRC_FILES += audio_extn/dev_arbi.c |
| 293 | # endif |
Lior Barenboim | 0b61bc7 | 2014-05-13 13:01:37 +0300 | [diff] [blame] | 294 | |
Naresh Tanniru | c0517bc | 2014-10-26 15:30:55 +0530 | [diff] [blame] | 295 | ifeq ($(strip $(AUDIO_FEATURE_ENABLED_RECORD_PLAY_CONCURRENCY)),true) |
| 296 | LOCAL_CFLAGS += -DRECORD_PLAY_CONCURRENCY |
| 297 | endif |
| 298 | |
Arun Mirpuri | b1bec9c | 2019-01-29 16:42:45 -0800 | [diff] [blame] | 299 | # Removing following flag as dolby is not being used on mobile targets |
| 300 | # ifeq ($(strip $(AUDIO_FEATURE_ENABLED_ACDB_LICENSE)), true) |
| 301 | # LOCAL_CFLAGS += -DDOLBY_ACDB_LICENSE |
| 302 | # endif |
Ashish Jain | 8ec5047 | 2014-10-16 13:56:28 +0530 | [diff] [blame] | 303 | |
Pradnya Chaphekar | 8a9dcd8 | 2014-09-09 09:49:10 -0700 | [diff] [blame] | 304 | ifeq ($(strip $(AUDIO_FEATURE_ENABLED_DS2_DOLBY_DAP)),true) |
| 305 | LOCAL_CFLAGS += -DDS2_DOLBY_DAP_ENABLED |
Pradnya Chaphekar | 73e2e8b | 2015-05-01 02:18:17 -0700 | [diff] [blame] | 306 | LOCAL_CFLAGS += -DDS1_DOLBY_DDP_ENABLED |
Pradnya Chaphekar | 8a9dcd8 | 2014-09-09 09:49:10 -0700 | [diff] [blame] | 307 | ifneq ($(strip $(DOLBY_DDP)),true) |
Pradnya Chaphekar | 73e2e8b | 2015-05-01 02:18:17 -0700 | [diff] [blame] | 308 | ifneq ($(strip $(DS1_DOLBY_DAP)),true) |
Pradnya Chaphekar | 8a9dcd8 | 2014-09-09 09:49:10 -0700 | [diff] [blame] | 309 | LOCAL_SRC_FILES += audio_extn/dolby.c |
| 310 | endif |
| 311 | endif |
| 312 | endif |
| 313 | |
Pradnya Chaphekar | 80a8cfb | 2014-10-20 16:17:01 -0700 | [diff] [blame] | 314 | ifeq ($(strip $(AUDIO_FEATURE_ENABLED_HDMI_PASSTHROUGH)),true) |
| 315 | LOCAL_CFLAGS += -DHDMI_PASSTHROUGH_ENABLED |
Mingming Yin | 2185465 | 2016-04-13 11:54:02 -0700 | [diff] [blame] | 316 | LOCAL_SRC_FILES += audio_extn/passthru.c |
| 317 | endif |
| 318 | |
Arun Mirpuri | b1bec9c | 2019-01-29 16:42:45 -0800 | [diff] [blame] | 319 | # ifeq ($(strip $(AUDIO_FEATURE_ENABLED_KEEP_ALIVE)),true) |
| 320 | # LOCAL_CFLAGS += -DKEEP_ALIVE_ENABLED |
| 321 | # LOCAL_SRC_FILES += audio_extn/keep_alive.c |
| 322 | # endif |
Pradnya Chaphekar | 80a8cfb | 2014-10-20 16:17:01 -0700 | [diff] [blame] | 323 | |
Arun Mirpuri | b1bec9c | 2019-01-29 16:42:45 -0800 | [diff] [blame] | 324 | #This feature is depricated, file disabled |
| 325 | #ifeq ($(strip $(AUDIO_FEATURE_IP_HDLR_ENABLED)),true) |
| 326 | # LOCAL_CFLAGS += -DAUDIO_EXTN_IP_HDLR_ENABLED |
| 327 | # LOCAL_SRC_FILES += audio_extn/ip_hdlr_intf.c |
| 328 | #endif |
Ashish Jain | d569424 | 2017-09-05 20:09:06 +0530 | [diff] [blame] | 329 | |
Lakshman Chaluvaraju | 22ba9f1 | 2016-09-12 11:42:10 +0530 | [diff] [blame] | 330 | ifeq ($(strip $(AUDIO_FEATURE_ENABLED_QAF)),true) |
| 331 | LOCAL_CFLAGS += -DQAF_EXTN_ENABLED |
| 332 | LOCAL_C_INCLUDES += $(TARGET_OUT_HEADERS)/mm-audio/qaf/ |
| 333 | LOCAL_SRC_FILES += audio_extn/qaf.c |
| 334 | endif |
| 335 | |
Samyak Jain | 15fda66 | 2018-12-18 16:40:52 +0530 | [diff] [blame] | 336 | ifeq ($(strip $(AUDIO_FEATURE_ENABLED_CONCURRENT_CAPTURE)),true) |
| 337 | LOCAL_CFLAGS += -DCONCURRENT_CAPTURE_ENABLED |
| 338 | endif |
| 339 | |
Dhananjay Kumar | ee4d200 | 2016-10-25 18:02:58 +0530 | [diff] [blame] | 340 | ifeq ($(strip $(AUDIO_FEATURE_ENABLED_COMPRESS_INPUT)),true) |
| 341 | LOCAL_CFLAGS += -DCOMPRESS_INPUT_ENABLED |
| 342 | LOCAL_SRC_FILES += audio_extn/compress_in.c |
| 343 | endif |
| 344 | |
Samyak Jain | b3f3ca5 | 2019-01-02 18:24:35 +0530 | [diff] [blame] | 345 | ifeq ($(strip $(AUDIO_FEATURE_ENABLED_CONCURRENT_CAPTURE)),true) |
| 346 | LOCAL_CFLAGS += -DCONCURRENT_CAPTURE_ENABLED |
| 347 | endif |
| 348 | |
Dhananjay Kumar | ee4d200 | 2016-10-25 18:02:58 +0530 | [diff] [blame] | 349 | ifeq ($(strip $(BOARD_SUPPORTS_QAHW)),true) |
| 350 | LOCAL_CFLAGS += -DAUDIO_HW_EXTN_API_ENABLED |
| 351 | LOCAL_SRC_FILES += audio_hw_extn_api.c |
| 352 | endif |
| 353 | |
Bharath Gopal | 01310bb | 2016-12-05 15:39:32 +0530 | [diff] [blame] | 354 | ifeq ($(strip $(AUDIO_FEATURE_ENABLED_BT_HAL)),true) |
| 355 | LOCAL_CFLAGS += -DAUDIO_EXTN_BT_HAL_ENABLED |
| 356 | LOCAL_SRC_FILES += audio_extn/bt_hal.c |
| 357 | endif |
| 358 | |
Ravi Kumar Alamanda | 2dfba2b | 2013-01-17 16:50:22 -0800 | [diff] [blame] | 359 | LOCAL_SHARED_LIBRARIES := \ |
Aalique Grahame | 22e4910 | 2018-12-18 14:23:57 -0800 | [diff] [blame] | 360 | liblog \ |
| 361 | libcutils \ |
| 362 | libtinyalsa \ |
Arun Mirpuri | b1bec9c | 2019-01-29 16:42:45 -0800 | [diff] [blame] | 363 | libtinycompress \ |
Aalique Grahame | 22e4910 | 2018-12-18 14:23:57 -0800 | [diff] [blame] | 364 | libaudioroute \ |
| 365 | libdl \ |
| 366 | libaudioutils \ |
Aniket Kumar Lata | 808e8d6 | 2019-01-28 22:54:28 -0800 | [diff] [blame] | 367 | libexpat \ |
Weiyin Jiang | e6ce631 | 2019-01-28 18:28:22 +0800 | [diff] [blame] | 368 | libhwbinder \ |
| 369 | libhidlbase \ |
Divya Sharma | a5ec611 | 2019-01-29 15:41:23 -0800 | [diff] [blame] | 370 | libhidltransport \ |
| 371 | libprocessgroup |
Ravi Kumar Alamanda | 2dfba2b | 2013-01-17 16:50:22 -0800 | [diff] [blame] | 372 | |
| 373 | LOCAL_C_INCLUDES += \ |
Aalique Grahame | 22e4910 | 2018-12-18 14:23:57 -0800 | [diff] [blame] | 374 | external/tinyalsa/include \ |
| 375 | external/tinycompress/include \ |
| 376 | system/media/audio_utils/include \ |
| 377 | external/expat/lib \ |
Aniket Kumar Lata | 808e8d6 | 2019-01-28 22:54:28 -0800 | [diff] [blame] | 378 | vendor/qcom/opensource/core-utils/fwk-detect \ |
Aalique Grahame | 22e4910 | 2018-12-18 14:23:57 -0800 | [diff] [blame] | 379 | $(call include-path-for, audio-route) \ |
| 380 | $(call include-path-for, audio-effects) \ |
| 381 | $(LOCAL_PATH)/$(AUDIO_PLATFORM) \ |
| 382 | $(LOCAL_PATH)/audio_extn \ |
| 383 | $(LOCAL_PATH)/voice_extn |
Ravi Kumar Alamanda | 2dfba2b | 2013-01-17 16:50:22 -0800 | [diff] [blame] | 384 | |
Kiran Kandi | 910e186 | 2013-10-29 13:29:42 -0700 | [diff] [blame] | 385 | ifeq ($(strip $(AUDIO_FEATURE_ENABLED_LISTEN)),true) |
| 386 | LOCAL_CFLAGS += -DAUDIO_LISTEN_ENABLED |
| 387 | LOCAL_C_INCLUDES += $(TARGET_OUT_HEADERS)/mm-audio/audio-listen |
| 388 | LOCAL_SRC_FILES += audio_extn/listen.c |
| 389 | endif |
| 390 | |
Srinivas Rao Narne | 8ff4db5 | 2018-01-25 16:04:44 -0800 | [diff] [blame] | 391 | ifeq ($(TARGET_COMPILE_WITH_MSM_KERNEL),true) |
Aalique Grahame | 22e4910 | 2018-12-18 14:23:57 -0800 | [diff] [blame] | 392 | LOCAL_C_INCLUDES += $(TARGET_OUT_INTERMEDIATES)/KERNEL_OBJ/usr/include |
Srinivas Rao Narne | 8ff4db5 | 2018-01-25 16:04:44 -0800 | [diff] [blame] | 393 | LOCAL_C_INCLUDES += $(TARGET_OUT_INTERMEDIATES)/KERNEL_OBJ/usr/techpack/audio/include |
Satish Babu Patakokila | 1d3b15d | 2018-07-03 17:09:40 +0530 | [diff] [blame] | 394 | LOCAL_ADDITIONAL_DEPENDENCIES += $(TARGET_OUT_INTERMEDIATES)/KERNEL_OBJ/usr |
Srinivas Rao Narne | 8ff4db5 | 2018-01-25 16:04:44 -0800 | [diff] [blame] | 395 | endif |
| 396 | |
Aalique Grahame | 22e4910 | 2018-12-18 14:23:57 -0800 | [diff] [blame] | 397 | ifeq ($(strip $(AUDIO_FEATURE_SUPPORTED_EXTERNAL_BT)),true) |
| 398 | LOCAL_CFLAGS += -DEXTERNAL_BT_SUPPORTED |
| 399 | endif |
| 400 | |
| 401 | ifeq ($(strip $(AUDIO_FEATURE_FLICKER_SENSOR_INPUT)),true) |
| 402 | LOCAL_CFLAGS += -DFLICKER_SENSOR_INPUT |
| 403 | endif |
| 404 | |
| 405 | ifeq ($(strip $(AUDIO_FEATURE_NO_AUDIO_OUT)),true) |
| 406 | LOCAL_CFLAGS += -DNO_AUDIO_OUT |
| 407 | endif |
| 408 | |
Ashish Jain | 81eb2a8 | 2015-05-13 10:52:34 +0530 | [diff] [blame] | 409 | ifeq ($(strip $(AUDIO_FEATURE_ENABLED_EXT_HDMI)),true) |
| 410 | LOCAL_CFLAGS += -DAUDIO_EXTERNAL_HDMI_ENABLED |
| 411 | ifeq ($(strip $(AUDIO_FEATURE_ENABLED_HDMI_PASSTHROUGH)),true) |
| 412 | LOCAL_C_INCLUDES += $(TARGET_OUT_HEADERS)/mm-audio/audio-parsers |
| 413 | LOCAL_SHARED_LIBRARIES += libaudioparsers |
| 414 | endif |
| 415 | endif |
| 416 | |
Ravi Kumar Alamanda | 8fa6b19 | 2014-09-09 16:06:42 -0700 | [diff] [blame] | 417 | ifeq ($(strip $(BOARD_SUPPORTS_SOUND_TRIGGER)),true) |
Banajit Goswami | 710f353 | 2016-08-28 14:48:33 -0700 | [diff] [blame] | 418 | ST_FEATURE_ENABLE := true |
| 419 | endif |
| 420 | |
| 421 | ifeq ($(strip $(BOARD_SUPPORTS_SOUND_TRIGGER_HAL)),true) |
| 422 | ST_FEATURE_ENABLE := true |
| 423 | endif |
| 424 | |
| 425 | ifeq ($(ST_FEATURE_ENABLE), true) |
Ravi Kumar Alamanda | 8fa6b19 | 2014-09-09 16:06:42 -0700 | [diff] [blame] | 426 | LOCAL_CFLAGS += -DSOUND_TRIGGER_ENABLED |
| 427 | LOCAL_CFLAGS += -DSOUND_TRIGGER_PLATFORM_NAME=$(TARGET_BOARD_PLATFORM) |
| 428 | LOCAL_C_INCLUDES += $(TARGET_OUT_HEADERS)/mm-audio/sound_trigger |
| 429 | LOCAL_SRC_FILES += audio_extn/soundtrigger.c |
Aalique Grahame | 22e4910 | 2018-12-18 14:23:57 -0800 | [diff] [blame] | 430 | ifneq ($(filter msm8996,$(TARGET_BOARD_PLATFORM)),) |
| 431 | LOCAL_HEADER_LIBRARIES += sound_trigger.primary_headers |
| 432 | endif |
Ravi Kumar Alamanda | 8fa6b19 | 2014-09-09 16:06:42 -0700 | [diff] [blame] | 433 | endif |
| 434 | |
Damir Didjusto | f1d46c7 | 2013-11-06 17:59:04 -0800 | [diff] [blame] | 435 | ifeq ($(strip $(AUDIO_FEATURE_ENABLED_AUXPCM_BT)),true) |
| 436 | LOCAL_CFLAGS += -DAUXPCM_BT_ENABLED |
| 437 | endif |
| 438 | |
Preetam Singh Ranawat | 2d0e463 | 2015-02-02 12:40:59 +0530 | [diff] [blame] | 439 | ifeq ($(strip $(AUDIO_FEATURE_ENABLED_PM_SUPPORT)),true) |
| 440 | LOCAL_CFLAGS += -DPM_SUPPORT_ENABLED |
| 441 | LOCAL_SRC_FILES += audio_extn/pm.c |
| 442 | LOCAL_C_INCLUDES += $(TARGET_OUT_HEADERS)/libperipheralclient/inc |
| 443 | LOCAL_SHARED_LIBRARIES += libperipheral_client |
| 444 | endif |
| 445 | |
Arun Mirpuri | b1bec9c | 2019-01-29 16:42:45 -0800 | [diff] [blame] | 446 | # ifeq ($(strip $(AUDIO_FEATURE_ENABLED_DISPLAY_PORT)),true) |
| 447 | # LOCAL_CFLAGS += -DDISPLAY_PORT_ENABLED |
| 448 | # endif |
Shiv Maliyappanahalli | c065640 | 2016-09-03 14:13:26 -0700 | [diff] [blame] | 449 | |
Weiyin Jiang | aa80acd | 2016-09-21 16:42:11 +0800 | [diff] [blame] | 450 | ifeq ($(strip $(AUDIO_FEATURE_ENABLED_GEF_SUPPORT)),true) |
| 451 | LOCAL_CFLAGS += -DAUDIO_GENERIC_EFFECT_FRAMEWORK_ENABLED |
| 452 | LOCAL_SRC_FILES += audio_extn/gef.c |
| 453 | endif |
| 454 | |
Ben Romberger | d771a7c | 2017-02-22 18:05:17 -0800 | [diff] [blame] | 455 | ifeq ($(strip $($AUDIO_FEATURE_ADSP_HDLR_ENABLED)),true) |
| 456 | LOCAL_CFLAGS += -DAUDIO_EXTN_ADSP_HDLR_ENABLED |
| 457 | LOCAL_SRC_FILES += audio_extn/adsp_hdlr.c |
| 458 | endif |
| 459 | |
Revathi Uddaraju | 1eac8b0 | 2017-05-18 17:13:33 +0530 | [diff] [blame] | 460 | ifeq ($(strip $(AUDIO_FEATURE_ENABLED_DYNAMIC_LOG)), true) |
| 461 | LOCAL_CFLAGS += -DDYNAMIC_LOG_ENABLED |
| 462 | LOCAL_C_INCLUDES += $(TARGET_OUT_HEADERS)/mm-audio/audio-log-utils |
| 463 | LOCAL_SHARED_LIBRARIES += libaudio_log_utils |
| 464 | endif |
| 465 | |
Vikram Panduranga | a8932c2 | 2018-07-02 15:54:28 -0700 | [diff] [blame] | 466 | ifeq ($(strip $(AUDIO_FEATURE_ENABLED_DYNAMIC_ECNS)),true) |
Vikram Panduranga | df59cae | 2017-08-03 18:04:55 -0700 | [diff] [blame] | 467 | LOCAL_CFLAGS += -DDYNAMIC_ECNS_ENABLED |
| 468 | endif |
| 469 | |
Aditya Bavanari | 29bcea2 | 2017-10-03 20:10:35 +0530 | [diff] [blame] | 470 | ifeq ($(strip $(AUDIO_FEATURE_ENABLED_INSTANCE_ID)), true) |
| 471 | LOCAL_CFLAGS += -DINSTANCE_ID_ENABLED |
| 472 | endif |
| 473 | |
Haynes Mathew George | 01156f9 | 2018-04-13 15:29:54 -0700 | [diff] [blame] | 474 | ifeq ($(strip $(AUDIO_FEATURE_ENABLED_BATTERY_LISTENER)), true) |
| 475 | LOCAL_CFLAGS += -DBATTERY_LISTENER_ENABLED |
| 476 | LOCAL_SRC_FILES += audio_extn/battery_listener.cpp |
| 477 | LOCAL_SHARED_LIBRARIES += android.hardware.health@1.0 android.hardware.health@2.0 \ |
Weiyin Jiang | e6ce631 | 2019-01-28 18:28:22 +0800 | [diff] [blame] | 478 | libbase libutils android.hardware.power@1.2 |
Haynes Mathew George | 01156f9 | 2018-04-13 15:29:54 -0700 | [diff] [blame] | 479 | LOCAL_STATIC_LIBRARIES := libhealthhalutils |
| 480 | endif |
| 481 | |
Dhanalakshmi Siddani | 57b014e | 2018-04-23 12:52:02 +0530 | [diff] [blame] | 482 | ifeq ($(strip $(AUDIO_FEATURE_ENABLED_KEEP_ALIVE_ARM_FFV)), true) |
Dhanalakshmi Siddani | 30e06a2 | 2018-03-27 23:11:34 +0530 | [diff] [blame] | 483 | LOCAL_CFLAGS += -DRUN_KEEP_ALIVE_IN_ARM_FFV |
| 484 | endif |
| 485 | |
Dhanalakshmi Siddani | 57b014e | 2018-04-23 12:52:02 +0530 | [diff] [blame] | 486 | ifeq ($(strip $(AUDIO_FEATURE_ENABLED_FFV)), true) |
Dhanalakshmi Siddani | 30e06a2 | 2018-03-27 23:11:34 +0530 | [diff] [blame] | 487 | LOCAL_CFLAGS += -DFFV_ENABLED |
Dhanalakshmi Siddani | 57b014e | 2018-04-23 12:52:02 +0530 | [diff] [blame] | 488 | LOCAL_C_INCLUDES += $(TARGET_OUT_HEADERS)/mm-audio-noship/include/ffv |
Dhanalakshmi Siddani | 30e06a2 | 2018-03-27 23:11:34 +0530 | [diff] [blame] | 489 | LOCAL_SRC_FILES += audio_extn/ffv.c |
| 490 | endif |
| 491 | |
Weiyin Jiang | e6ce631 | 2019-01-28 18:28:22 +0800 | [diff] [blame] | 492 | ifeq ($(strip $(AUDIO_FEATURE_ENABLED_AHAL_EXT)),true) |
| 493 | LOCAL_CFLAGS += -DAHAL_EXT_ENABLED |
| 494 | LOCAL_SHARED_LIBRARIES += vendor.qti.hardware.audiohalext@1.0 |
| 495 | endif |
| 496 | |
Satya Krishna Pindiproli | f1cd92b | 2016-04-14 19:05:23 +0530 | [diff] [blame] | 497 | LOCAL_CFLAGS += -Wall -Werror |
Alexy Joseph | b137994 | 2016-01-29 15:49:38 -0800 | [diff] [blame] | 498 | |
Mingming Yin | 5b7c0b3 | 2014-08-04 15:49:24 -0700 | [diff] [blame] | 499 | LOCAL_COPY_HEADERS_TO := mm-audio |
| 500 | LOCAL_COPY_HEADERS := audio_extn/audio_defs.h |
| 501 | |
Arun Mirpuri | b1bec9c | 2019-01-29 16:42:45 -0800 | [diff] [blame] | 502 | # ifeq ($(strip $(AUDIO_FEATURE_ENABLED_SND_MONITOR)), true) |
| 503 | # LOCAL_CFLAGS += -DSND_MONITOR_ENABLED |
| 504 | # LOCAL_SRC_FILES += audio_extn/sndmonitor.c |
| 505 | # endif |
| 506 | |
| 507 | # ifeq ($(strip $(AUDIO_FEATURE_ENABLED_MAXX_AUDIO)), true) |
| 508 | # LOCAL_CFLAGS += -DMAXXAUDIO_QDSP_ENABLED |
| 509 | # LOCAL_SRC_FILES += audio_extn/maxxaudio.c |
| 510 | # endif |
Haynes Mathew George | 3a1f1fb | 2016-08-09 15:43:13 -0700 | [diff] [blame] | 511 | |
Vatsal Bucha | c09ae06 | 2018-11-14 13:25:08 +0530 | [diff] [blame] | 512 | ifeq ($(strip $(AUDIO_FEATURE_ENABLED_GCOV)),true) |
| 513 | LOCAL_CFLAGS += --coverage -fprofile-arcs -ftest-coverage |
| 514 | LOCAL_CPPFLAGS += --coverage -fprofile-arcs -ftest-coverage |
| 515 | LOCAL_STATIC_LIBRARIES += libprofile_rt |
| 516 | endif |
| 517 | |
Derek Chen | ae7b034 | 2019-02-08 15:17:04 -0800 | [diff] [blame] | 518 | ifeq ($(strip $(AUDIO_FEATURE_ENABLED_AUTO_HAL)),true) |
| 519 | LOCAL_CFLAGS += -DAUDIO_EXTN_AUTO_HAL_ENABLED |
| 520 | LOCAL_SRC_FILES += audio_extn/auto_hal.c |
| 521 | endif |
| 522 | |
Derek Chen | d253007 | 2014-11-24 12:39:14 -0800 | [diff] [blame] | 523 | ifeq ($(strip $(AUDIO_FEATURE_ENABLED_EXT_HW_PLUGIN)),true) |
| 524 | LOCAL_CFLAGS += -DEXT_HW_PLUGIN_ENABLED |
| 525 | LOCAL_SRC_FILES += audio_extn/ext_hw_plugin.c |
| 526 | endif |
| 527 | |
Mingming Yin | 8e5a4f6 | 2013-10-07 15:23:41 -0700 | [diff] [blame] | 528 | LOCAL_MODULE := audio.primary.$(TARGET_BOARD_PLATFORM) |
Ravi Kumar Alamanda | 2dfba2b | 2013-01-17 16:50:22 -0800 | [diff] [blame] | 529 | |
Apoorv Raghuvanshi | 1b555f7 | 2014-05-29 12:48:15 -0700 | [diff] [blame] | 530 | LOCAL_MODULE_RELATIVE_PATH := hw |
Ravi Kumar Alamanda | 2dfba2b | 2013-01-17 16:50:22 -0800 | [diff] [blame] | 531 | |
| 532 | LOCAL_MODULE_TAGS := optional |
| 533 | |
Aalique Grahame | 22e4910 | 2018-12-18 14:23:57 -0800 | [diff] [blame] | 534 | LOCAL_MODULE_OWNER := qti |
| 535 | |
Naresh Tanniru | 10758b6 | 2017-06-05 21:05:53 +0530 | [diff] [blame] | 536 | LOCAL_VENDOR_MODULE := true |
| 537 | |
Ravi Kumar Alamanda | 2dfba2b | 2013-01-17 16:50:22 -0800 | [diff] [blame] | 538 | include $(BUILD_SHARED_LIBRARY) |
| 539 | |
Soumil Shah | 196157e | 2018-01-22 17:39:48 -0800 | [diff] [blame] | 540 | LOCAL_CFLAGS += -Wno-unused-variable |
| 541 | LOCAL_CFLAGS += -Wno-sign-compare |
| 542 | LOCAL_CFLAGS += -Wno-unused-parameter |
| 543 | LOCAL_CFLAGS += -Wno-unused-label |
| 544 | LOCAL_CFLAGS += -Wno-gnu-designator |
| 545 | LOCAL_CFLAGS += -Wno-typedef-redefinition |
| 546 | LOCAL_CFLAGS += -Wno-shorten-64-to-32 |
| 547 | LOCAL_CFLAGS += -Wno-tautological-compare |
| 548 | LOCAL_CFLAGS += -Wno-unused-function |
| 549 | LOCAL_CFLAGS += -Wno-unused-local-typedef |
| 550 | |
Ravi Kumar Alamanda | 2dfba2b | 2013-01-17 16:50:22 -0800 | [diff] [blame] | 551 | endif |
Naresh Tanniru | f129015 | 2018-11-27 12:16:45 +0530 | [diff] [blame] | 552 | endif |