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 | |
Deepthi Gunturi | 81a7f80 | 2019-04-22 11:33:05 +0530 | [diff] [blame] | 12 | ifneq ($(filter msm8974 msm8226 msm8084 msm8610 apq8084 msm8994 msm8992 msm8996 msm8998 apq8098_latv sdm845 sdm710 qcs605 msmnile kona sdm660 msm8937 $(MSMSTEPPE) $(TRINKET) lito atoll,$(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 |
Ramjee Singh | 4752c89 | 2019-03-25 18:02:19 +0530 | [diff] [blame] | 57 | LOCAL_CFLAGS += -DMAX_TARGET_SPECIFIC_CHANNEL_CNT="8" |
Aalique Grahame | 22e4910 | 2018-12-18 14:23:57 -0800 | [diff] [blame] | 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 | 4752c89 | 2019-03-25 18:02:19 +0530 | [diff] [blame] | 63 | LOCAL_CFLAGS += -DMAX_TARGET_SPECIFIC_CHANNEL_CNT="8" |
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 |
Arusha Goyal | fda2915 | 2016-12-26 10:53:39 +0530 | [diff] [blame] | 89 | ifneq ($(filter sdm660,$(TARGET_BOARD_PLATFORM)),) |
Dhananjay Kumar | d3ab9f4 | 2016-07-20 17:05:47 +0530 | [diff] [blame] | 90 | LOCAL_CFLAGS := -DPLATFORM_MSMFALCON |
Sujin Panicker | b904fbe | 2019-04-04 13:28:07 +0530 | [diff] [blame] | 91 | LOCAL_CFLAGS += -DMAX_TARGET_SPECIFIC_CHANNEL_CNT="8" |
| 92 | endif |
| 93 | ifneq ($(filter msm8937,$(TARGET_BOARD_PLATFORM)),) |
| 94 | LOCAL_CFLAGS := -DPLATFORM_MSM8937 |
| 95 | LOCAL_CFLAGS += -DMAX_TARGET_SPECIFIC_CHANNEL_CNT="8" |
Dhananjay Kumar | d3ab9f4 | 2016-07-20 17:05:47 +0530 | [diff] [blame] | 96 | endif |
Naresh Tanniru | db72d1e | 2014-03-05 17:33:47 +0530 | [diff] [blame] | 97 | endif |
Naresh Tanniru | 8b919ac | 2014-01-30 19:12:53 +0530 | [diff] [blame] | 98 | |
Derek Chen | 3e5b30a | 2018-10-24 01:04:25 -0700 | [diff] [blame] | 99 | ifeq ($(TARGET_BOARD_AUTO),true) |
| 100 | LOCAL_CFLAGS += -DPLATFORM_AUTO |
| 101 | endif |
| 102 | |
Bruce Levy | cea5f17 | 2018-01-31 16:06:04 -0800 | [diff] [blame] | 103 | LOCAL_CFLAGS += -Wno-macro-redefined |
| 104 | |
Revathi Uddaraju | e8bd13c | 2018-04-02 21:27:54 +0530 | [diff] [blame] | 105 | LOCAL_HEADER_LIBRARIES := libhardware_headers |
| 106 | |
Ravi Kumar Alamanda | 2dfba2b | 2013-01-17 16:50:22 -0800 | [diff] [blame] | 107 | LOCAL_SRC_FILES := \ |
Arun Mirpuri | e008ed2 | 2019-03-21 11:21:04 -0700 | [diff] [blame] | 108 | ahal_config_helper.cpp \ |
Weiyin Jiang | e6ce631 | 2019-01-28 18:28:22 +0800 | [diff] [blame] | 109 | audio_hw.c \ |
Arun Mirpuri | e008ed2 | 2019-03-21 11:21:04 -0700 | [diff] [blame] | 110 | acdb.c \ |
Weiyin Jiang | e6ce631 | 2019-01-28 18:28:22 +0800 | [diff] [blame] | 111 | platform_info.c \ |
| 112 | $(AUDIO_PLATFORM)/platform.c \ |
Arun Mirpuri | e008ed2 | 2019-03-21 11:21:04 -0700 | [diff] [blame] | 113 | voice.c |
Ravi Kumar Alamanda | 2dfba2b | 2013-01-17 16:50:22 -0800 | [diff] [blame] | 114 | |
Subhash Chandra Bose Naripeddy | 19dc03b | 2014-03-10 14:43:05 -0700 | [diff] [blame] | 115 | LOCAL_SRC_FILES += audio_extn/audio_extn.c \ |
Arun Mirpuri | b1bec9c | 2019-01-29 16:42:45 -0800 | [diff] [blame] | 116 | audio_extn/audio_feature_manager.c \ |
Weiyin Jiang | e6ce631 | 2019-01-28 18:28:22 +0800 | [diff] [blame] | 117 | audio_extn/audio_hidl.cpp \ |
Arun Mirpuri | e008ed2 | 2019-03-21 11:21:04 -0700 | [diff] [blame] | 118 | audio_extn/compress_in.c \ |
Arun Mirpuri | b1bec9c | 2019-01-29 16:42:45 -0800 | [diff] [blame] | 119 | audio_extn/fm.c \ |
Arun Mirpuri | e008ed2 | 2019-03-21 11:21:04 -0700 | [diff] [blame] | 120 | audio_extn/keep_alive.c \ |
| 121 | audio_extn/source_track.c \ |
| 122 | audio_extn/usb.c \ |
| 123 | audio_extn/utils.c \ |
Arun Mirpuri | b1bec9c | 2019-01-29 16:42:45 -0800 | [diff] [blame] | 124 | voice_extn/compress_voip.c \ |
Arun Mirpuri | e008ed2 | 2019-03-21 11:21:04 -0700 | [diff] [blame] | 125 | voice_extn/voice_extn.c |
Bharath Gopal | 01310bb | 2016-12-05 15:39:32 +0530 | [diff] [blame] | 126 | |
Ravi Kumar Alamanda | 2dfba2b | 2013-01-17 16:50:22 -0800 | [diff] [blame] | 127 | LOCAL_SHARED_LIBRARIES := \ |
Arun Mirpuri | e008ed2 | 2019-03-21 11:21:04 -0700 | [diff] [blame] | 128 | libbase \ |
Aalique Grahame | 22e4910 | 2018-12-18 14:23:57 -0800 | [diff] [blame] | 129 | liblog \ |
| 130 | libcutils \ |
| 131 | libtinyalsa \ |
Arun Mirpuri | b1bec9c | 2019-01-29 16:42:45 -0800 | [diff] [blame] | 132 | libtinycompress \ |
Aalique Grahame | 22e4910 | 2018-12-18 14:23:57 -0800 | [diff] [blame] | 133 | libaudioroute \ |
| 134 | libdl \ |
| 135 | libaudioutils \ |
Aniket Kumar Lata | 808e8d6 | 2019-01-28 22:54:28 -0800 | [diff] [blame] | 136 | libexpat \ |
Weiyin Jiang | e6ce631 | 2019-01-28 18:28:22 +0800 | [diff] [blame] | 137 | libhwbinder \ |
| 138 | libhidlbase \ |
Divya Sharma | a5ec611 | 2019-01-29 15:41:23 -0800 | [diff] [blame] | 139 | libhidltransport \ |
Arun Mirpuri | e008ed2 | 2019-03-21 11:21:04 -0700 | [diff] [blame] | 140 | libprocessgroup \ |
| 141 | libutils |
Ravi Kumar Alamanda | 2dfba2b | 2013-01-17 16:50:22 -0800 | [diff] [blame] | 142 | |
| 143 | LOCAL_C_INCLUDES += \ |
Aalique Grahame | 22e4910 | 2018-12-18 14:23:57 -0800 | [diff] [blame] | 144 | external/tinyalsa/include \ |
| 145 | external/tinycompress/include \ |
| 146 | system/media/audio_utils/include \ |
| 147 | external/expat/lib \ |
Aniket Kumar Lata | 808e8d6 | 2019-01-28 22:54:28 -0800 | [diff] [blame] | 148 | vendor/qcom/opensource/core-utils/fwk-detect \ |
Aalique Grahame | 22e4910 | 2018-12-18 14:23:57 -0800 | [diff] [blame] | 149 | $(call include-path-for, audio-route) \ |
| 150 | $(call include-path-for, audio-effects) \ |
| 151 | $(LOCAL_PATH)/$(AUDIO_PLATFORM) \ |
| 152 | $(LOCAL_PATH)/audio_extn \ |
| 153 | $(LOCAL_PATH)/voice_extn |
Ravi Kumar Alamanda | 2dfba2b | 2013-01-17 16:50:22 -0800 | [diff] [blame] | 154 | |
Arun Mirpuri | e008ed2 | 2019-03-21 11:21:04 -0700 | [diff] [blame] | 155 | LOCAL_C_INCLUDES += $(TARGET_OUT_INTERMEDIATES)/KERNEL_OBJ/usr/include |
| 156 | LOCAL_C_INCLUDES += $(TARGET_OUT_INTERMEDIATES)/KERNEL_OBJ/usr/techpack/audio/include |
| 157 | LOCAL_ADDITIONAL_DEPENDENCIES += $(TARGET_OUT_INTERMEDIATES)/KERNEL_OBJ/usr |
| 158 | |
| 159 | |
| 160 | # Hardware specific feature |
| 161 | ifeq ($(strip $(AUDIO_FEATURE_ENABLED_DLKM)),true) |
| 162 | LOCAL_HEADER_LIBRARIES += audio_kernel_headers |
| 163 | LOCAL_C_INCLUDES += $(TARGET_OUT_INTERMEDIATES)/vendor/qcom/opensource/audio-kernel/include |
| 164 | endif |
| 165 | |
| 166 | LOCAL_CFLAGS += -DUSE_VENDOR_EXTN |
| 167 | |
| 168 | # Legacy feature |
| 169 | ifdef MULTIPLE_HW_VARIANTS_ENABLED |
| 170 | LOCAL_CFLAGS += -DHW_VARIANTS_ENABLED |
| 171 | LOCAL_SRC_FILES += $(AUDIO_PLATFORM)/hw_info.c |
| 172 | endif |
| 173 | |
| 174 | # Legacy feature |
| 175 | ifeq ($(strip $(AUDIO_FEATURE_ENABLED_DTS_EAGLE)),true) |
| 176 | LOCAL_CFLAGS += -DDTS_EAGLE |
| 177 | LOCAL_SRC_FILES += audio_extn/dts_eagle.c |
| 178 | endif |
| 179 | |
| 180 | # Legacy feature |
| 181 | ifeq ($(strip $(DOLBY_DDP)),true) |
| 182 | LOCAL_CFLAGS += -DDS1_DOLBY_DDP_ENABLED |
| 183 | LOCAL_SRC_FILES += audio_extn/dolby.c |
| 184 | endif |
| 185 | |
| 186 | # Legacy feature |
| 187 | ifeq ($(strip $(DS1_DOLBY_DAP)),true) |
| 188 | LOCAL_CFLAGS += -DDS1_DOLBY_DAP_ENABLED |
| 189 | ifneq ($(strip $(DOLBY_DDP)),true) |
| 190 | LOCAL_SRC_FILES += audio_extn/dolby.c |
| 191 | endif |
| 192 | endif |
| 193 | |
| 194 | # Legacy feature |
| 195 | ifeq ($(strip $(AUDIO_FEATURE_ENABLED_DS2_DOLBY_DAP)),true) |
| 196 | LOCAL_CFLAGS += -DDS2_DOLBY_DAP_ENABLED |
| 197 | LOCAL_CFLAGS += -DDS1_DOLBY_DDP_ENABLED |
| 198 | ifneq ($(strip $(DOLBY_DDP)),true) |
| 199 | ifneq ($(strip $(DS1_DOLBY_DAP)),true) |
| 200 | LOCAL_SRC_FILES += audio_extn/dolby.c |
| 201 | endif |
| 202 | endif |
| 203 | endif |
| 204 | |
| 205 | # NonLA feature |
| 206 | ifeq ($(strip $(AUDIO_FEATURE_ENABLED_QAF)),true) |
| 207 | LOCAL_CFLAGS += -DQAF_EXTN_ENABLED |
| 208 | LOCAL_C_INCLUDES += $(TARGET_OUT_HEADERS)/mm-audio/qaf/ |
| 209 | LOCAL_SRC_FILES += audio_extn/qaf.c |
| 210 | endif |
| 211 | |
| 212 | # Hardware specific feature |
| 213 | ifeq ($(strip $(BOARD_SUPPORTS_QAHW)),true) |
| 214 | LOCAL_CFLAGS += -DAUDIO_HW_EXTN_API_ENABLED |
| 215 | LOCAL_SRC_FILES += audio_hw_extn_api.c |
| 216 | endif |
| 217 | |
| 218 | # Hardware specific feature |
Kiran Kandi | 910e186 | 2013-10-29 13:29:42 -0700 | [diff] [blame] | 219 | ifeq ($(strip $(AUDIO_FEATURE_ENABLED_LISTEN)),true) |
| 220 | LOCAL_CFLAGS += -DAUDIO_LISTEN_ENABLED |
| 221 | LOCAL_C_INCLUDES += $(TARGET_OUT_HEADERS)/mm-audio/audio-listen |
| 222 | LOCAL_SRC_FILES += audio_extn/listen.c |
| 223 | endif |
| 224 | |
Arun Mirpuri | e008ed2 | 2019-03-21 11:21:04 -0700 | [diff] [blame] | 225 | # Hardware specific feature |
Srinivas Rao Narne | 8ff4db5 | 2018-01-25 16:04:44 -0800 | [diff] [blame] | 226 | ifeq ($(TARGET_COMPILE_WITH_MSM_KERNEL),true) |
Aalique Grahame | 22e4910 | 2018-12-18 14:23:57 -0800 | [diff] [blame] | 227 | LOCAL_C_INCLUDES += $(TARGET_OUT_INTERMEDIATES)/KERNEL_OBJ/usr/include |
Srinivas Rao Narne | 8ff4db5 | 2018-01-25 16:04:44 -0800 | [diff] [blame] | 228 | 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] | 229 | LOCAL_ADDITIONAL_DEPENDENCIES += $(TARGET_OUT_INTERMEDIATES)/KERNEL_OBJ/usr |
Srinivas Rao Narne | 8ff4db5 | 2018-01-25 16:04:44 -0800 | [diff] [blame] | 230 | endif |
| 231 | |
Arun Mirpuri | e008ed2 | 2019-03-21 11:21:04 -0700 | [diff] [blame] | 232 | # Legacy feature |
Aalique Grahame | 22e4910 | 2018-12-18 14:23:57 -0800 | [diff] [blame] | 233 | ifeq ($(strip $(AUDIO_FEATURE_SUPPORTED_EXTERNAL_BT)),true) |
| 234 | LOCAL_CFLAGS += -DEXTERNAL_BT_SUPPORTED |
| 235 | endif |
| 236 | |
Arun Mirpuri | e008ed2 | 2019-03-21 11:21:04 -0700 | [diff] [blame] | 237 | # Legacy feature |
Aalique Grahame | 22e4910 | 2018-12-18 14:23:57 -0800 | [diff] [blame] | 238 | ifeq ($(strip $(AUDIO_FEATURE_FLICKER_SENSOR_INPUT)),true) |
| 239 | LOCAL_CFLAGS += -DFLICKER_SENSOR_INPUT |
| 240 | endif |
| 241 | |
Arun Mirpuri | e008ed2 | 2019-03-21 11:21:04 -0700 | [diff] [blame] | 242 | # Legacy feature |
Aalique Grahame | 22e4910 | 2018-12-18 14:23:57 -0800 | [diff] [blame] | 243 | ifeq ($(strip $(AUDIO_FEATURE_NO_AUDIO_OUT)),true) |
| 244 | LOCAL_CFLAGS += -DNO_AUDIO_OUT |
| 245 | endif |
| 246 | |
Arun Mirpuri | e008ed2 | 2019-03-21 11:21:04 -0700 | [diff] [blame] | 247 | # NonLA feature |
Ashish Jain | 81eb2a8 | 2015-05-13 10:52:34 +0530 | [diff] [blame] | 248 | ifeq ($(strip $(AUDIO_FEATURE_ENABLED_EXT_HDMI)),true) |
| 249 | LOCAL_CFLAGS += -DAUDIO_EXTERNAL_HDMI_ENABLED |
Sujin Panicker | b904fbe | 2019-04-04 13:28:07 +0530 | [diff] [blame] | 250 | LOCAL_C_INCLUDES += $(TARGET_OUT_HEADERS)/mm-audio/audio-parsers |
| 251 | LOCAL_SHARED_LIBRARIES += libaudioparsers |
Ashish Jain | 81eb2a8 | 2015-05-13 10:52:34 +0530 | [diff] [blame] | 252 | endif |
| 253 | |
Arun Mirpuri | e008ed2 | 2019-03-21 11:21:04 -0700 | [diff] [blame] | 254 | # Hardware specific feature |
Ravi Kumar Alamanda | 8fa6b19 | 2014-09-09 16:06:42 -0700 | [diff] [blame] | 255 | ifeq ($(strip $(BOARD_SUPPORTS_SOUND_TRIGGER)),true) |
Banajit Goswami | 710f353 | 2016-08-28 14:48:33 -0700 | [diff] [blame] | 256 | ST_FEATURE_ENABLE := true |
| 257 | endif |
| 258 | |
Arun Mirpuri | e008ed2 | 2019-03-21 11:21:04 -0700 | [diff] [blame] | 259 | # Hardware specific feature |
Banajit Goswami | 710f353 | 2016-08-28 14:48:33 -0700 | [diff] [blame] | 260 | ifeq ($(strip $(BOARD_SUPPORTS_SOUND_TRIGGER_HAL)),true) |
| 261 | ST_FEATURE_ENABLE := true |
| 262 | endif |
| 263 | |
Arun Mirpuri | e008ed2 | 2019-03-21 11:21:04 -0700 | [diff] [blame] | 264 | # Hardware specific feature |
Banajit Goswami | 710f353 | 2016-08-28 14:48:33 -0700 | [diff] [blame] | 265 | ifeq ($(ST_FEATURE_ENABLE), true) |
Ravi Kumar Alamanda | 8fa6b19 | 2014-09-09 16:06:42 -0700 | [diff] [blame] | 266 | LOCAL_CFLAGS += -DSOUND_TRIGGER_ENABLED |
| 267 | LOCAL_CFLAGS += -DSOUND_TRIGGER_PLATFORM_NAME=$(TARGET_BOARD_PLATFORM) |
| 268 | LOCAL_C_INCLUDES += $(TARGET_OUT_HEADERS)/mm-audio/sound_trigger |
| 269 | LOCAL_SRC_FILES += audio_extn/soundtrigger.c |
Aalique Grahame | 22e4910 | 2018-12-18 14:23:57 -0800 | [diff] [blame] | 270 | ifneq ($(filter msm8996,$(TARGET_BOARD_PLATFORM)),) |
| 271 | LOCAL_HEADER_LIBRARIES += sound_trigger.primary_headers |
| 272 | endif |
Ravi Kumar Alamanda | 8fa6b19 | 2014-09-09 16:06:42 -0700 | [diff] [blame] | 273 | endif |
| 274 | |
Arun Mirpuri | e008ed2 | 2019-03-21 11:21:04 -0700 | [diff] [blame] | 275 | # Legacy feature |
Damir Didjusto | f1d46c7 | 2013-11-06 17:59:04 -0800 | [diff] [blame] | 276 | ifeq ($(strip $(AUDIO_FEATURE_ENABLED_AUXPCM_BT)),true) |
| 277 | LOCAL_CFLAGS += -DAUXPCM_BT_ENABLED |
| 278 | endif |
| 279 | |
Arun Mirpuri | e008ed2 | 2019-03-21 11:21:04 -0700 | [diff] [blame] | 280 | # Legacy feature |
Preetam Singh Ranawat | 2d0e463 | 2015-02-02 12:40:59 +0530 | [diff] [blame] | 281 | ifeq ($(strip $(AUDIO_FEATURE_ENABLED_PM_SUPPORT)),true) |
| 282 | LOCAL_CFLAGS += -DPM_SUPPORT_ENABLED |
| 283 | LOCAL_SRC_FILES += audio_extn/pm.c |
| 284 | LOCAL_C_INCLUDES += $(TARGET_OUT_HEADERS)/libperipheralclient/inc |
| 285 | LOCAL_SHARED_LIBRARIES += libperipheral_client |
| 286 | endif |
| 287 | |
Shiv Maliyappanahalli | c065640 | 2016-09-03 14:13:26 -0700 | [diff] [blame] | 288 | |
Arun Mirpuri | e008ed2 | 2019-03-21 11:21:04 -0700 | [diff] [blame] | 289 | # Hardare specific featre |
Weiyin Jiang | aa80acd | 2016-09-21 16:42:11 +0800 | [diff] [blame] | 290 | ifeq ($(strip $(AUDIO_FEATURE_ENABLED_GEF_SUPPORT)),true) |
| 291 | LOCAL_CFLAGS += -DAUDIO_GENERIC_EFFECT_FRAMEWORK_ENABLED |
| 292 | LOCAL_SRC_FILES += audio_extn/gef.c |
| 293 | endif |
| 294 | |
Arun Mirpuri | e008ed2 | 2019-03-21 11:21:04 -0700 | [diff] [blame] | 295 | # Hardware specific feature |
Ben Romberger | d771a7c | 2017-02-22 18:05:17 -0800 | [diff] [blame] | 296 | ifeq ($(strip $($AUDIO_FEATURE_ADSP_HDLR_ENABLED)),true) |
| 297 | LOCAL_CFLAGS += -DAUDIO_EXTN_ADSP_HDLR_ENABLED |
| 298 | LOCAL_SRC_FILES += audio_extn/adsp_hdlr.c |
| 299 | endif |
| 300 | |
Arun Mirpuri | e008ed2 | 2019-03-21 11:21:04 -0700 | [diff] [blame] | 301 | |
Revathi Uddaraju | 1eac8b0 | 2017-05-18 17:13:33 +0530 | [diff] [blame] | 302 | ifeq ($(strip $(AUDIO_FEATURE_ENABLED_DYNAMIC_LOG)), true) |
| 303 | LOCAL_CFLAGS += -DDYNAMIC_LOG_ENABLED |
| 304 | LOCAL_C_INCLUDES += $(TARGET_OUT_HEADERS)/mm-audio/audio-log-utils |
| 305 | LOCAL_SHARED_LIBRARIES += libaudio_log_utils |
| 306 | endif |
| 307 | |
Arun Mirpuri | e008ed2 | 2019-03-21 11:21:04 -0700 | [diff] [blame] | 308 | # Hardware specific feature |
Aditya Bavanari | 29bcea2 | 2017-10-03 20:10:35 +0530 | [diff] [blame] | 309 | ifeq ($(strip $(AUDIO_FEATURE_ENABLED_INSTANCE_ID)), true) |
| 310 | LOCAL_CFLAGS += -DINSTANCE_ID_ENABLED |
| 311 | endif |
| 312 | |
Arun Mirpuri | e008ed2 | 2019-03-21 11:21:04 -0700 | [diff] [blame] | 313 | # Legacy feature |
Dhanalakshmi Siddani | 57b014e | 2018-04-23 12:52:02 +0530 | [diff] [blame] | 314 | ifeq ($(strip $(AUDIO_FEATURE_ENABLED_KEEP_ALIVE_ARM_FFV)), true) |
Dhanalakshmi Siddani | 30e06a2 | 2018-03-27 23:11:34 +0530 | [diff] [blame] | 315 | LOCAL_CFLAGS += -DRUN_KEEP_ALIVE_IN_ARM_FFV |
| 316 | endif |
| 317 | |
Arun Mirpuri | e008ed2 | 2019-03-21 11:21:04 -0700 | [diff] [blame] | 318 | # Legacy feature |
Dhanalakshmi Siddani | 57b014e | 2018-04-23 12:52:02 +0530 | [diff] [blame] | 319 | ifeq ($(strip $(AUDIO_FEATURE_ENABLED_FFV)), true) |
Dhanalakshmi Siddani | 30e06a2 | 2018-03-27 23:11:34 +0530 | [diff] [blame] | 320 | LOCAL_CFLAGS += -DFFV_ENABLED |
Dhanalakshmi Siddani | 57b014e | 2018-04-23 12:52:02 +0530 | [diff] [blame] | 321 | LOCAL_C_INCLUDES += $(TARGET_OUT_HEADERS)/mm-audio-noship/include/ffv |
Dhanalakshmi Siddani | 30e06a2 | 2018-03-27 23:11:34 +0530 | [diff] [blame] | 322 | LOCAL_SRC_FILES += audio_extn/ffv.c |
| 323 | endif |
| 324 | |
Arun Mirpuri | e008ed2 | 2019-03-21 11:21:04 -0700 | [diff] [blame] | 325 | # Hardware Specific feature |
Weiyin Jiang | e6ce631 | 2019-01-28 18:28:22 +0800 | [diff] [blame] | 326 | ifeq ($(strip $(AUDIO_FEATURE_ENABLED_AHAL_EXT)),true) |
| 327 | LOCAL_CFLAGS += -DAHAL_EXT_ENABLED |
| 328 | LOCAL_SHARED_LIBRARIES += vendor.qti.hardware.audiohalext@1.0 |
| 329 | endif |
| 330 | |
Dhanalakshmi Siddani | 999d564 | 2019-03-22 15:27:44 +0530 | [diff] [blame] | 331 | LOCAL_CFLAGS += -D_GNU_SOURCE |
Satya Krishna Pindiproli | f1cd92b | 2016-04-14 19:05:23 +0530 | [diff] [blame] | 332 | LOCAL_CFLAGS += -Wall -Werror |
Alexy Joseph | b137994 | 2016-01-29 15:49:38 -0800 | [diff] [blame] | 333 | |
Mingming Yin | 5b7c0b3 | 2014-08-04 15:49:24 -0700 | [diff] [blame] | 334 | LOCAL_COPY_HEADERS_TO := mm-audio |
| 335 | LOCAL_COPY_HEADERS := audio_extn/audio_defs.h |
| 336 | |
Vatsal Bucha | c09ae06 | 2018-11-14 13:25:08 +0530 | [diff] [blame] | 337 | ifeq ($(strip $(AUDIO_FEATURE_ENABLED_GCOV)),true) |
| 338 | LOCAL_CFLAGS += --coverage -fprofile-arcs -ftest-coverage |
| 339 | LOCAL_CPPFLAGS += --coverage -fprofile-arcs -ftest-coverage |
| 340 | LOCAL_STATIC_LIBRARIES += libprofile_rt |
| 341 | endif |
| 342 | |
justinweng | 20fb6d8 | 2019-02-21 18:49:00 -0700 | [diff] [blame] | 343 | ifeq ($(strip $(AUDIO_FEATURE_ENABLED_AUDIO_ZOOM)), true) |
| 344 | LOCAL_CFLAGS += -DAUDIOZOOM_QDSP_ENABLED |
| 345 | LOCAL_SRC_FILES += audio_extn/audiozoom.c |
| 346 | endif |
| 347 | |
| 348 | |
Arun Mirpuri | e008ed2 | 2019-03-21 11:21:04 -0700 | [diff] [blame] | 349 | #ifeq ($(strip $(AUDIO_FEATURE_ENABLED_AUTO_HAL)),true) |
| 350 | # LOCAL_CFLAGS += -DAUDIO_EXTN_AUTO_HAL_ENABLED |
| 351 | # LOCAL_SRC_FILES += audio_extn/auto_hal.c |
| 352 | #endif |
Derek Chen | d253007 | 2014-11-24 12:39:14 -0800 | [diff] [blame] | 353 | |
Mingming Yin | 8e5a4f6 | 2013-10-07 15:23:41 -0700 | [diff] [blame] | 354 | LOCAL_MODULE := audio.primary.$(TARGET_BOARD_PLATFORM) |
Ravi Kumar Alamanda | 2dfba2b | 2013-01-17 16:50:22 -0800 | [diff] [blame] | 355 | |
Apoorv Raghuvanshi | 1b555f7 | 2014-05-29 12:48:15 -0700 | [diff] [blame] | 356 | LOCAL_MODULE_RELATIVE_PATH := hw |
Ravi Kumar Alamanda | 2dfba2b | 2013-01-17 16:50:22 -0800 | [diff] [blame] | 357 | |
| 358 | LOCAL_MODULE_TAGS := optional |
| 359 | |
Aalique Grahame | 22e4910 | 2018-12-18 14:23:57 -0800 | [diff] [blame] | 360 | LOCAL_MODULE_OWNER := qti |
| 361 | |
Naresh Tanniru | 10758b6 | 2017-06-05 21:05:53 +0530 | [diff] [blame] | 362 | LOCAL_VENDOR_MODULE := true |
| 363 | |
Ravi Kumar Alamanda | 2dfba2b | 2013-01-17 16:50:22 -0800 | [diff] [blame] | 364 | include $(BUILD_SHARED_LIBRARY) |
| 365 | |
Soumil Shah | 196157e | 2018-01-22 17:39:48 -0800 | [diff] [blame] | 366 | LOCAL_CFLAGS += -Wno-unused-variable |
| 367 | LOCAL_CFLAGS += -Wno-sign-compare |
| 368 | LOCAL_CFLAGS += -Wno-unused-parameter |
| 369 | LOCAL_CFLAGS += -Wno-unused-label |
| 370 | LOCAL_CFLAGS += -Wno-gnu-designator |
| 371 | LOCAL_CFLAGS += -Wno-typedef-redefinition |
| 372 | LOCAL_CFLAGS += -Wno-shorten-64-to-32 |
| 373 | LOCAL_CFLAGS += -Wno-tautological-compare |
| 374 | LOCAL_CFLAGS += -Wno-unused-function |
| 375 | LOCAL_CFLAGS += -Wno-unused-local-typedef |
| 376 | |
Ravi Kumar Alamanda | 2dfba2b | 2013-01-17 16:50:22 -0800 | [diff] [blame] | 377 | endif |
Naresh Tanniru | f129015 | 2018-11-27 12:16:45 +0530 | [diff] [blame] | 378 | endif |