Ravi Kumar Alamanda | 2dfba2b | 2013-01-17 16:50:22 -0800 | [diff] [blame] | 1 | ifeq ($(strip $(BOARD_USES_ALSA_AUDIO)),true) |
| 2 | |
| 3 | LOCAL_PATH := $(call my-dir) |
| 4 | |
| 5 | include $(CLEAR_VARS) |
| 6 | |
| 7 | LOCAL_ARM_MODE := arm |
| 8 | |
Ajay Dudani | be3335a | 2013-08-19 18:47:21 -0700 | [diff] [blame] | 9 | AUDIO_PLATFORM := $(TARGET_BOARD_PLATFORM) |
Ravi Kumar Alamanda | 48c921d | 2013-10-29 06:07:44 -0700 | [diff] [blame] | 10 | |
Ashok Sidipotu | 5accc8d | 2017-11-08 11:21:55 +0530 | [diff] [blame] | 11 | ifneq ($(filter msm8974 msm8226 msm8610 apq8084 msm8994 msm8992 msm8996 msm8998 apq8098_latv sdm845 sdm670 qcs605,$(TARGET_BOARD_PLATFORM)),) |
Ajay Dudani | be3335a | 2013-08-19 18:47:21 -0700 | [diff] [blame] | 12 | # B-family platform uses msm8974 code base |
| 13 | AUDIO_PLATFORM = msm8974 |
Ravi Kumar Alamanda | 48c921d | 2013-10-29 06:07:44 -0700 | [diff] [blame] | 14 | MULTIPLE_HW_VARIANTS_ENABLED := true |
Mingming Yin | 8e5a4f6 | 2013-10-07 15:23:41 -0700 | [diff] [blame] | 15 | ifneq ($(filter msm8610,$(TARGET_BOARD_PLATFORM)),) |
| 16 | LOCAL_CFLAGS := -DPLATFORM_MSM8610 |
| 17 | endif |
Shiv Maliyappanahalli | 34b585f | 2013-10-01 15:49:05 -0700 | [diff] [blame] | 18 | ifneq ($(filter msm8226,$(TARGET_BOARD_PLATFORM)),) |
| 19 | LOCAL_CFLAGS := -DPLATFORM_MSM8x26 |
| 20 | endif |
Vidyakumar Athota | d9d9ff3 | 2013-11-13 11:46:52 -0800 | [diff] [blame] | 21 | ifneq ($(filter apq8084,$(TARGET_BOARD_PLATFORM)),) |
| 22 | LOCAL_CFLAGS := -DPLATFORM_APQ8084 |
| 23 | endif |
Mingming Yin | 0e1b290 | 2014-05-19 18:20:59 -0700 | [diff] [blame] | 24 | ifneq ($(filter msm8994,$(TARGET_BOARD_PLATFORM)),) |
| 25 | LOCAL_CFLAGS := -DPLATFORM_MSM8994 |
| 26 | endif |
Fred Oh | 68ad1d3 | 2014-12-09 13:08:07 -0800 | [diff] [blame] | 27 | ifneq ($(filter msm8992,$(TARGET_BOARD_PLATFORM)),) |
| 28 | LOCAL_CFLAGS := -DPLATFORM_MSM8994 |
| 29 | endif |
Mingming Yin | 89c6a7f | 2015-03-24 11:56:14 -0700 | [diff] [blame] | 30 | ifneq ($(filter msm8996,$(TARGET_BOARD_PLATFORM)),) |
| 31 | LOCAL_CFLAGS := -DPLATFORM_MSM8996 |
Banajit Goswami | 22582e7 | 2014-10-15 18:29:34 -0700 | [diff] [blame] | 32 | endif |
Venkataraman Nerellapalli | b8689ec | 2017-05-04 11:55:29 +0530 | [diff] [blame] | 33 | ifneq ($(filter msm8998 apq8098_latv,$(TARGET_BOARD_PLATFORM)),) |
Ben Romberger | 22d4123 | 2016-11-16 14:55:25 -0800 | [diff] [blame] | 34 | LOCAL_CFLAGS := -DPLATFORM_MSM8998 |
Banajit Goswami | 4c0dff2 | 2016-03-04 18:31:22 -0800 | [diff] [blame] | 35 | endif |
Soumil | d9f5bfa | 2017-04-04 19:31:22 -0700 | [diff] [blame] | 36 | ifneq ($(filter sdm845,$(TARGET_BOARD_PLATFORM)),) |
Garmond Leung | 986024b | 2017-04-28 14:41:10 -0700 | [diff] [blame] | 37 | LOCAL_CFLAGS := -DPLATFORM_SDM845 |
Xiaoyu Ye | 0afc923 | 2017-03-28 21:31:22 -0700 | [diff] [blame] | 38 | endif |
Ben Romberger | 62b698e | 2017-09-28 15:12:04 -0700 | [diff] [blame] | 39 | ifneq ($(filter sdm670,$(TARGET_BOARD_PLATFORM)),) |
Sharad Sangle | d39232d | 2017-08-08 20:27:18 +0530 | [diff] [blame] | 40 | LOCAL_CFLAGS := -DPLATFORM_SDM670 |
| 41 | endif |
Ashok Sidipotu | 5accc8d | 2017-11-08 11:21:55 +0530 | [diff] [blame] | 42 | ifneq ($(filter qcs605,$(TARGET_BOARD_PLATFORM)),) |
| 43 | LOCAL_CFLAGS := -DPLATFORM_QCS605 |
| 44 | endif |
Ajay Dudani | be3335a | 2013-08-19 18:47:21 -0700 | [diff] [blame] | 45 | endif |
| 46 | |
Arusha Goyal | fda2915 | 2016-12-26 10:53:39 +0530 | [diff] [blame] | 47 | 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] | 48 | AUDIO_PLATFORM = msm8916 |
| 49 | MULTIPLE_HW_VARIANTS_ENABLED := true |
| 50 | LOCAL_CFLAGS := -DPLATFORM_MSM8916 |
padarshr | 04e7481 | 2014-09-17 13:34:31 +0530 | [diff] [blame] | 51 | ifneq ($(filter msm8909,$(TARGET_BOARD_PLATFORM)),) |
Dhananjay Kumar | 2bb2fc1 | 2014-07-11 19:14:23 +0530 | [diff] [blame] | 52 | LOCAL_CFLAGS := -DPLATFORM_MSM8909 |
| 53 | endif |
Arusha Goyal | fda2915 | 2016-12-26 10:53:39 +0530 | [diff] [blame] | 54 | ifneq ($(filter sdm660,$(TARGET_BOARD_PLATFORM)),) |
Dhananjay Kumar | d3ab9f4 | 2016-07-20 17:05:47 +0530 | [diff] [blame] | 55 | LOCAL_CFLAGS := -DPLATFORM_MSMFALCON |
| 56 | endif |
Naresh Tanniru | db72d1e | 2014-03-05 17:33:47 +0530 | [diff] [blame] | 57 | endif |
Naresh Tanniru | 8b919ac | 2014-01-30 19:12:53 +0530 | [diff] [blame] | 58 | |
Ravi Kumar Alamanda | 2dfba2b | 2013-01-17 16:50:22 -0800 | [diff] [blame] | 59 | LOCAL_SRC_FILES := \ |
| 60 | audio_hw.c \ |
Shiv Maliyappanahalli | 34b585f | 2013-10-01 15:49:05 -0700 | [diff] [blame] | 61 | voice.c \ |
Ben Romberger | 61764e3 | 2014-01-10 13:49:02 -0800 | [diff] [blame] | 62 | platform_info.c \ |
Vignesh Kulothungan | 5539688 | 2017-04-20 14:37:02 -0700 | [diff] [blame] | 63 | $(AUDIO_PLATFORM)/platform.c \ |
| 64 | acdb.c |
Ravi Kumar Alamanda | 2dfba2b | 2013-01-17 16:50:22 -0800 | [diff] [blame] | 65 | |
Subhash Chandra Bose Naripeddy | 19dc03b | 2014-03-10 14:43:05 -0700 | [diff] [blame] | 66 | LOCAL_SRC_FILES += audio_extn/audio_extn.c \ |
| 67 | audio_extn/utils.c |
Vidyakumar Athota | 21b3bb9 | 2014-04-25 11:08:08 -0700 | [diff] [blame] | 68 | LOCAL_C_INCLUDES += $(TARGET_OUT_INTERMEDIATES)/KERNEL_OBJ/usr/include |
Asish Bhattacharya | 0b9bfb0 | 2017-07-15 08:39:36 +0530 | [diff] [blame] | 69 | LOCAL_C_INCLUDES += $(TARGET_OUT_INTERMEDIATES)/KERNEL_OBJ/usr/techpack/audio/include |
Vidyakumar Athota | 21b3bb9 | 2014-04-25 11:08:08 -0700 | [diff] [blame] | 70 | LOCAL_ADDITIONAL_DEPENDENCIES += $(TARGET_OUT_INTERMEDIATES)/KERNEL_OBJ/usr |
Ashok Sidipotu | 5accc8d | 2017-11-08 11:21:55 +0530 | [diff] [blame] | 71 | ifneq ($(filter sdm670 qcs605,$(TARGET_BOARD_PLATFORM)),) |
Asish Bhattacharya | d066587 | 2017-09-07 19:46:29 +0530 | [diff] [blame] | 72 | LOCAL_C_INCLUDES += $(TARGET_OUT_INTERMEDIATES)/vendor/qcom/opensource/audio-kernel/include |
| 73 | LOCAL_ADDITIONAL_DEPENDENCIES += $(BOARD_VENDOR_KERNEL_MODULES) |
| 74 | endif |
| 75 | |
Divya Narayanan Poojary | 8fd98c8 | 2017-07-03 11:17:08 +0530 | [diff] [blame] | 76 | LOCAL_CFLAGS += -DUSE_VENDOR_EXTN |
Apoorv Raghuvanshi | 9eaf94e | 2013-10-04 16:13:44 -0700 | [diff] [blame] | 77 | |
Mingming Yin | e5bf837 | 2015-02-26 15:03:10 -0800 | [diff] [blame] | 78 | ifeq ($(strip $(AUDIO_FEATURE_ENABLED_HDMI_EDID)),true) |
Mingming Yin | 497419f | 2015-07-01 16:57:32 -0700 | [diff] [blame] | 79 | LOCAL_CFLAGS += -DHDMI_EDID |
Pradnya Chaphekar | 4403bd7 | 2014-09-09 09:50:01 -0700 | [diff] [blame] | 80 | LOCAL_SRC_FILES += edid.c |
| 81 | endif |
| 82 | |
Mingming Yin | 08c7e31 | 2015-03-16 18:10:58 -0700 | [diff] [blame] | 83 | ifeq ($(strip $(AUDIO_USE_LL_AS_PRIMARY_OUTPUT)),true) |
| 84 | LOCAL_CFLAGS += -DUSE_LL_AS_PRIMARY_OUTPUT |
| 85 | endif |
| 86 | |
Mingming Yin | a6dad60 | 2014-05-16 12:10:55 -0700 | [diff] [blame] | 87 | ifeq ($(strip $(AUDIO_FEATURE_ENABLED_PCM_OFFLOAD)),true) |
Mingming Yin | 67e3451 | 2014-04-03 17:47:22 -0700 | [diff] [blame] | 88 | LOCAL_CFLAGS += -DPCM_OFFLOAD_ENABLED |
| 89 | endif |
| 90 | |
Mingming Yin | a6dad60 | 2014-05-16 12:10:55 -0700 | [diff] [blame] | 91 | ifeq ($(strip $(AUDIO_FEATURE_ENABLED_ANC_HEADSET)),true) |
Apoorv Raghuvanshi | 9eaf94e | 2013-10-04 16:13:44 -0700 | [diff] [blame] | 92 | LOCAL_CFLAGS += -DANC_HEADSET_ENABLED |
| 93 | endif |
| 94 | |
Venkata Narendra Kumar Gutta | 4bd09d0 | 2016-01-29 15:31:04 +0530 | [diff] [blame] | 95 | ifeq ($(strip $(AUDIO_FEATURE_ENABLED_HIFI_AUDIO)),true) |
| 96 | LOCAL_CFLAGS += -DHIFI_AUDIO_ENABLED |
| 97 | endif |
| 98 | |
Srinivas Julakanti | 1ca769a | 2017-01-04 23:18:08 -0800 | [diff] [blame] | 99 | ifeq ($(strip $(AUDIO_FEATURE_ENABLED_RAS)),true) |
| 100 | LOCAL_CFLAGS += -DRAS_ENABLED |
| 101 | endif |
| 102 | |
Banajit Goswami | 20cdd21 | 2015-09-11 01:11:30 -0700 | [diff] [blame] | 103 | ifeq ($(strip $(AUDIO_FEATURE_ENABLED_VBAT_MONITOR)),true) |
| 104 | LOCAL_CFLAGS += -DVBAT_MONITOR_ENABLED |
| 105 | endif |
| 106 | |
Mingming Yin | a6dad60 | 2014-05-16 12:10:55 -0700 | [diff] [blame] | 107 | ifeq ($(strip $(AUDIO_FEATURE_ENABLED_FLUENCE)),true) |
Venkata Narendra Kumar Gutta | 88fd0bc | 2014-03-27 19:47:56 +0530 | [diff] [blame] | 108 | LOCAL_CFLAGS += -DFLUENCE_ENABLED |
| 109 | endif |
| 110 | |
Mingming Yin | a6dad60 | 2014-05-16 12:10:55 -0700 | [diff] [blame] | 111 | ifeq ($(strip $(AUDIO_FEATURE_ENABLED_PROXY_DEVICE)),true) |
Apoorv Raghuvanshi | 9eaf94e | 2013-10-04 16:13:44 -0700 | [diff] [blame] | 112 | LOCAL_CFLAGS += -DAFE_PROXY_ENABLED |
| 113 | endif |
| 114 | |
Sudheer Papothi | 390bcf3 | 2014-12-04 01:25:17 +0530 | [diff] [blame] | 115 | ifeq ($(strip $(AUDIO_FEATURE_ENABLED_KPI_OPTIMIZE)),true) |
| 116 | LOCAL_CFLAGS += -DKPI_OPTIMIZE_ENABLED |
| 117 | endif |
| 118 | |
Mingming Yin | 12125e8 | 2015-10-26 20:40:36 -0700 | [diff] [blame] | 119 | ifeq ($(strip $(AUDIO_FEATURE_ENABLED_FM_POWER_OPT)),true) |
| 120 | LOCAL_CFLAGS += -DFM_POWER_OPT |
Apoorv Raghuvanshi | 6e26284 | 2013-10-06 14:39:35 -0700 | [diff] [blame] | 121 | LOCAL_SRC_FILES += audio_extn/fm.c |
| 122 | endif |
| 123 | |
Kuirong Wang | 357e0b1 | 2016-07-06 00:29:15 -0700 | [diff] [blame] | 124 | ifeq ($(strip $(AUDIO_FEATURE_ENABLED_USB_TUNNEL_AUDIO)),true) |
Apoorv Raghuvanshi | 5792d4b | 2013-10-07 18:40:05 -0700 | [diff] [blame] | 125 | LOCAL_CFLAGS += -DUSB_HEADSET_ENABLED |
| 126 | LOCAL_SRC_FILES += audio_extn/usb.c |
| 127 | endif |
Mingming Yin | a6dad60 | 2014-05-16 12:10:55 -0700 | [diff] [blame] | 128 | |
| 129 | ifeq ($(strip $(AUDIO_FEATURE_ENABLED_HFP)),true) |
Vimal Puthanveed | 5b4d3f1 | 2013-11-05 15:57:39 -0800 | [diff] [blame] | 130 | LOCAL_CFLAGS += -DHFP_ENABLED |
| 131 | LOCAL_SRC_FILES += audio_extn/hfp.c |
| 132 | endif |
Apoorv Raghuvanshi | 5792d4b | 2013-10-07 18:40:05 -0700 | [diff] [blame] | 133 | |
Mingming Yin | a6dad60 | 2014-05-16 12:10:55 -0700 | [diff] [blame] | 134 | ifeq ($(strip $(AUDIO_FEATURE_ENABLED_CUSTOMSTEREO)),true) |
Jitendra Singh Naruka | 9a6a8d4 | 2014-02-10 20:07:12 -0800 | [diff] [blame] | 135 | LOCAL_CFLAGS += -DCUSTOM_STEREO_ENABLED |
| 136 | endif |
| 137 | |
Mingming Yin | a6dad60 | 2014-05-16 12:10:55 -0700 | [diff] [blame] | 138 | ifeq ($(strip $(AUDIO_FEATURE_ENABLED_SSR)),true) |
Apoorv Raghuvanshi | 6178a3f | 2013-10-19 12:38:54 -0700 | [diff] [blame] | 139 | LOCAL_CFLAGS += -DSSR_ENABLED |
| 140 | LOCAL_SRC_FILES += audio_extn/ssr.c |
Shiv Maliyappanahalli | 5a10aea | 2015-07-02 10:36:23 -0700 | [diff] [blame] | 141 | LOCAL_C_INCLUDES += $(TARGET_OUT_HEADERS)/mm-audio/surround_sound_3mic/ |
Nagender Telkar | ca2b494 | 2014-03-24 12:25:42 -0600 | [diff] [blame] | 142 | LOCAL_C_INCLUDES += $(TARGET_OUT_HEADERS)/common/inc/ |
Apoorv Raghuvanshi | 6178a3f | 2013-10-19 12:38:54 -0700 | [diff] [blame] | 143 | endif |
| 144 | |
Mingming Yin | a6dad60 | 2014-05-16 12:10:55 -0700 | [diff] [blame] | 145 | ifeq ($(strip $(AUDIO_FEATURE_ENABLED_MULTI_VOICE_SESSIONS)),true) |
Shiv Maliyappanahalli | 303f51d | 2013-10-25 16:24:27 -0700 | [diff] [blame] | 146 | LOCAL_CFLAGS += -DMULTI_VOICE_SESSION_ENABLED |
| 147 | LOCAL_SRC_FILES += voice_extn/voice_extn.c |
Vidyakumar Athota | 21b3bb9 | 2014-04-25 11:08:08 -0700 | [diff] [blame] | 148 | |
Mingming Yin | a6dad60 | 2014-05-16 12:10:55 -0700 | [diff] [blame] | 149 | ifeq ($(strip $(AUDIO_FEATURE_ENABLED_INCALL_MUSIC)),true) |
Shiv Maliyappanahalli | 303f51d | 2013-10-25 16:24:27 -0700 | [diff] [blame] | 150 | LOCAL_CFLAGS += -DINCALL_MUSIC_ENABLED |
| 151 | endif |
Mingming Yin | a6dad60 | 2014-05-16 12:10:55 -0700 | [diff] [blame] | 152 | ifeq ($(strip $(AUDIO_FEATURE_ENABLED_COMPRESS_VOIP)),true) |
Narsinga Rao Chella | 05573b7 | 2013-11-15 15:21:40 -0800 | [diff] [blame] | 153 | LOCAL_CFLAGS += -DCOMPRESS_VOIP_ENABLED |
| 154 | LOCAL_SRC_FILES += voice_extn/compress_voip.c |
| 155 | endif |
Subhash Chandra Bose Naripeddy | 19dc03b | 2014-03-10 14:43:05 -0700 | [diff] [blame] | 156 | |
| 157 | endif |
| 158 | |
Mingming Yin | a6dad60 | 2014-05-16 12:10:55 -0700 | [diff] [blame] | 159 | ifeq ($(strip $(AUDIO_FEATURE_ENABLED_EXTN_FORMATS)),true) |
Satya Krishna Pindiproli | 5d82d01 | 2015-08-12 18:21:25 +0530 | [diff] [blame] | 160 | LOCAL_CFLAGS += -DAUDIO_EXTN_FORMATS_ENABLED |
Gopikrishnaiah Anandan | f538cef | 2013-10-28 14:06:03 -0700 | [diff] [blame] | 161 | endif |
Shiv Maliyappanahalli | 303f51d | 2013-10-25 16:24:27 -0700 | [diff] [blame] | 162 | |
Anish Kumar | d80a139 | 2014-07-16 16:18:51 -0700 | [diff] [blame] | 163 | ifeq ($(strip $(AUDIO_FEATURE_ENABLED_SPKR_PROTECTION)),true) |
Gopikrishnaiah Anandan | f538cef | 2013-10-28 14:06:03 -0700 | [diff] [blame] | 164 | LOCAL_CFLAGS += -DSPKR_PROT_ENABLED |
| 165 | LOCAL_SRC_FILES += audio_extn/spkr_protection.c |
Gopikrishnaiah Anandan | f538cef | 2013-10-28 14:06:03 -0700 | [diff] [blame] | 166 | endif |
Shiv Maliyappanahalli | 303f51d | 2013-10-25 16:24:27 -0700 | [diff] [blame] | 167 | |
Ravi Kumar Alamanda | 48c921d | 2013-10-29 06:07:44 -0700 | [diff] [blame] | 168 | ifdef MULTIPLE_HW_VARIANTS_ENABLED |
| 169 | LOCAL_CFLAGS += -DHW_VARIANTS_ENABLED |
| 170 | LOCAL_SRC_FILES += $(AUDIO_PLATFORM)/hw_info.c |
| 171 | endif |
| 172 | |
Mingming Yin | a6dad60 | 2014-05-16 12:10:55 -0700 | [diff] [blame] | 173 | ifeq ($(strip $(AUDIO_FEATURE_ENABLED_COMPRESS_CAPTURE)),true) |
Mingming Yin | e62d784 | 2013-10-25 16:26:03 -0700 | [diff] [blame] | 174 | LOCAL_CFLAGS += -DCOMPRESS_CAPTURE_ENABLED |
| 175 | LOCAL_SRC_FILES += audio_extn/compress_capture.c |
| 176 | endif |
| 177 | |
Jitendra Naruka | 1b6513f | 2014-11-22 19:34:13 -0800 | [diff] [blame] | 178 | ifeq ($(strip $(AUDIO_FEATURE_ENABLED_DTS_EAGLE)),true) |
| 179 | LOCAL_CFLAGS += -DDTS_EAGLE |
| 180 | LOCAL_SRC_FILES += audio_extn/dts_eagle.c |
| 181 | endif |
| 182 | |
Mingming Yin | a6dad60 | 2014-05-16 12:10:55 -0700 | [diff] [blame] | 183 | ifeq ($(strip $(DOLBY_DDP)),true) |
Mingming Yin | 9031010 | 2013-11-13 16:57:00 -0800 | [diff] [blame] | 184 | LOCAL_CFLAGS += -DDS1_DOLBY_DDP_ENABLED |
Subhash Chandra Bose Naripeddy | 7690c56 | 2013-12-14 00:34:53 -0800 | [diff] [blame] | 185 | LOCAL_SRC_FILES += audio_extn/dolby.c |
Mingming Yin | 9031010 | 2013-11-13 16:57:00 -0800 | [diff] [blame] | 186 | endif |
| 187 | |
Pradnya Chaphekar | 73e2e8b | 2015-05-01 02:18:17 -0700 | [diff] [blame] | 188 | ifeq ($(strip $(DS1_DOLBY_DAP)),true) |
Subhash Chandra Bose Naripeddy | 7690c56 | 2013-12-14 00:34:53 -0800 | [diff] [blame] | 189 | LOCAL_CFLAGS += -DDS1_DOLBY_DAP_ENABLED |
Mingming Yin | a6dad60 | 2014-05-16 12:10:55 -0700 | [diff] [blame] | 190 | ifneq ($(strip $(DOLBY_DDP)),true) |
Subhash Chandra Bose Naripeddy | 7690c56 | 2013-12-14 00:34:53 -0800 | [diff] [blame] | 191 | LOCAL_SRC_FILES += audio_extn/dolby.c |
| 192 | endif |
| 193 | endif |
| 194 | |
Mingming Yin | 3ee55c6 | 2014-08-04 14:23:35 -0700 | [diff] [blame] | 195 | ifeq ($(strip $(AUDIO_FEATURE_ENABLED_EXTN_FLAC_DECODER)),true) |
Satya Krishna Pindiproli | 7047160 | 2015-04-24 19:12:43 +0530 | [diff] [blame] | 196 | LOCAL_CFLAGS += -DFLAC_OFFLOAD_ENABLED |
| 197 | LOCAL_CFLAGS += -DCOMPRESS_METADATA_NEEDED |
| 198 | endif |
| 199 | |
| 200 | ifeq ($(strip $(AUDIO_FEATURE_ENABLED_VORBIS_OFFLOAD)),true) |
| 201 | LOCAL_CFLAGS += -DVORBIS_OFFLOAD_ENABLED |
| 202 | LOCAL_CFLAGS += -DCOMPRESS_METADATA_NEEDED |
| 203 | |
| 204 | endif |
| 205 | |
| 206 | ifeq ($(strip $(AUDIO_FEATURE_ENABLED_WMA_OFFLOAD)),true) |
| 207 | LOCAL_CFLAGS += -DWMA_OFFLOAD_ENABLED |
| 208 | LOCAL_CFLAGS += -DCOMPRESS_METADATA_NEEDED |
| 209 | endif |
| 210 | |
| 211 | ifeq ($(strip $(AUDIO_FEATURE_ENABLED_ALAC_OFFLOAD)),true) |
| 212 | LOCAL_CFLAGS += -DALAC_OFFLOAD_ENABLED |
| 213 | LOCAL_CFLAGS += -DCOMPRESS_METADATA_NEEDED |
| 214 | endif |
| 215 | |
| 216 | ifeq ($(strip $(AUDIO_FEATURE_ENABLED_APE_OFFLOAD)),true) |
| 217 | LOCAL_CFLAGS += -DAPE_OFFLOAD_ENABLED |
| 218 | LOCAL_CFLAGS += -DCOMPRESS_METADATA_NEEDED |
Mingming Yin | 3ee55c6 | 2014-08-04 14:23:35 -0700 | [diff] [blame] | 219 | endif |
| 220 | |
Vidyakumar Athota | c1d39c9 | 2015-02-25 15:14:26 -0800 | [diff] [blame] | 221 | ifeq ($(strip $(AUDIO_FEATURE_ENABLED_PCM_OFFLOAD_24)),true) |
| 222 | LOCAL_CFLAGS += -DPCM_OFFLOAD_ENABLED_24 |
| 223 | endif |
| 224 | |
Manish Dewangan | a6fc544 | 2015-08-24 20:30:31 +0530 | [diff] [blame] | 225 | ifeq ($(strip $(AUDIO_FEATURE_ENABLED_AAC_ADTS_OFFLOAD)),true) |
| 226 | LOCAL_CFLAGS += -DAAC_ADTS_OFFLOAD_ENABLED |
| 227 | endif |
| 228 | |
Lior Barenboim | 0b61bc7 | 2014-05-13 13:01:37 +0300 | [diff] [blame] | 229 | ifeq ($(strip $(AUDIO_FEATURE_ENABLED_DEV_ARBI)),true) |
| 230 | LOCAL_CFLAGS += -DDEV_ARBI_ENABLED |
| 231 | LOCAL_SRC_FILES += audio_extn/dev_arbi.c |
| 232 | endif |
| 233 | |
Naresh Tanniru | c0517bc | 2014-10-26 15:30:55 +0530 | [diff] [blame] | 234 | ifeq ($(strip $(AUDIO_FEATURE_ENABLED_RECORD_PLAY_CONCURRENCY)),true) |
| 235 | LOCAL_CFLAGS += -DRECORD_PLAY_CONCURRENCY |
| 236 | endif |
| 237 | |
Ashish Jain | 8ec5047 | 2014-10-16 13:56:28 +0530 | [diff] [blame] | 238 | ifeq ($(strip $(AUDIO_FEATURE_ENABLED_ACDB_LICENSE)), true) |
| 239 | LOCAL_CFLAGS += -DDOLBY_ACDB_LICENSE |
| 240 | endif |
| 241 | |
Pradnya Chaphekar | 8a9dcd8 | 2014-09-09 09:49:10 -0700 | [diff] [blame] | 242 | ifeq ($(strip $(AUDIO_FEATURE_ENABLED_DS2_DOLBY_DAP)),true) |
| 243 | LOCAL_CFLAGS += -DDS2_DOLBY_DAP_ENABLED |
Pradnya Chaphekar | 73e2e8b | 2015-05-01 02:18:17 -0700 | [diff] [blame] | 244 | LOCAL_CFLAGS += -DDS1_DOLBY_DDP_ENABLED |
Pradnya Chaphekar | 8a9dcd8 | 2014-09-09 09:49:10 -0700 | [diff] [blame] | 245 | ifneq ($(strip $(DOLBY_DDP)),true) |
Pradnya Chaphekar | 73e2e8b | 2015-05-01 02:18:17 -0700 | [diff] [blame] | 246 | ifneq ($(strip $(DS1_DOLBY_DAP)),true) |
Pradnya Chaphekar | 8a9dcd8 | 2014-09-09 09:49:10 -0700 | [diff] [blame] | 247 | LOCAL_SRC_FILES += audio_extn/dolby.c |
| 248 | endif |
| 249 | endif |
| 250 | endif |
| 251 | |
Pradnya Chaphekar | 80a8cfb | 2014-10-20 16:17:01 -0700 | [diff] [blame] | 252 | ifeq ($(strip $(AUDIO_FEATURE_ENABLED_HDMI_PASSTHROUGH)),true) |
| 253 | LOCAL_CFLAGS += -DHDMI_PASSTHROUGH_ENABLED |
Mingming Yin | 2185465 | 2016-04-13 11:54:02 -0700 | [diff] [blame] | 254 | LOCAL_SRC_FILES += audio_extn/passthru.c |
| 255 | endif |
| 256 | |
| 257 | ifeq ($(strip $(AUDIO_FEATURE_ENABLED_KEEP_ALIVE)),true) |
| 258 | LOCAL_CFLAGS += -DKEEP_ALIVE_ENABLED |
| 259 | LOCAL_SRC_FILES += audio_extn/keep_alive.c |
Pradnya Chaphekar | 80a8cfb | 2014-10-20 16:17:01 -0700 | [diff] [blame] | 260 | endif |
| 261 | |
Narsinga Rao Chella | f928a98 | 2015-03-06 14:57:35 -0800 | [diff] [blame] | 262 | ifeq ($(strip $(AUDIO_FEATURE_ENABLED_SOURCE_TRACKING)),true) |
| 263 | LOCAL_CFLAGS += -DSOURCE_TRACKING_ENABLED |
| 264 | LOCAL_SRC_FILES += audio_extn/source_track.c |
| 265 | endif |
| 266 | |
Naresh Tanniru | 9d027a6 | 2015-03-13 01:32:10 +0530 | [diff] [blame] | 267 | ifeq ($(strip $(AUDIO_FEATURE_ENABLED_SPLIT_A2DP)),true) |
| 268 | LOCAL_CFLAGS += -DSPLIT_A2DP_ENABLED |
| 269 | LOCAL_SRC_FILES += audio_extn/a2dp.c |
| 270 | endif |
| 271 | |
Ashish Jain | d569424 | 2017-09-05 20:09:06 +0530 | [diff] [blame] | 272 | ifeq ($(strip $(AUDIO_FEATURE_IP_HDLR_ENABLED)),true) |
| 273 | LOCAL_CFLAGS += -DAUDIO_EXTN_IP_HDLR_ENABLED |
| 274 | LOCAL_SRC_FILES += audio_extn/ip_hdlr_intf.c |
| 275 | endif |
| 276 | |
Lakshman Chaluvaraju | 22ba9f1 | 2016-09-12 11:42:10 +0530 | [diff] [blame] | 277 | ifeq ($(strip $(AUDIO_FEATURE_ENABLED_QAF)),true) |
| 278 | LOCAL_CFLAGS += -DQAF_EXTN_ENABLED |
| 279 | LOCAL_C_INCLUDES += $(TARGET_OUT_HEADERS)/mm-audio/qaf/ |
| 280 | LOCAL_SRC_FILES += audio_extn/qaf.c |
| 281 | endif |
| 282 | |
Dhananjay Kumar | ee4d200 | 2016-10-25 18:02:58 +0530 | [diff] [blame] | 283 | ifeq ($(strip $(AUDIO_FEATURE_ENABLED_COMPRESS_INPUT)),true) |
| 284 | LOCAL_CFLAGS += -DCOMPRESS_INPUT_ENABLED |
| 285 | LOCAL_SRC_FILES += audio_extn/compress_in.c |
| 286 | endif |
| 287 | |
| 288 | ifeq ($(strip $(BOARD_SUPPORTS_QAHW)),true) |
| 289 | LOCAL_CFLAGS += -DAUDIO_HW_EXTN_API_ENABLED |
| 290 | LOCAL_SRC_FILES += audio_hw_extn_api.c |
| 291 | endif |
| 292 | |
Bharath Gopal | 01310bb | 2016-12-05 15:39:32 +0530 | [diff] [blame] | 293 | ifeq ($(strip $(AUDIO_FEATURE_ENABLED_BT_HAL)),true) |
| 294 | LOCAL_CFLAGS += -DAUDIO_EXTN_BT_HAL_ENABLED |
| 295 | LOCAL_SRC_FILES += audio_extn/bt_hal.c |
| 296 | endif |
| 297 | |
Ravi Kumar Alamanda | 2dfba2b | 2013-01-17 16:50:22 -0800 | [diff] [blame] | 298 | LOCAL_SHARED_LIBRARIES := \ |
| 299 | liblog \ |
| 300 | libcutils \ |
| 301 | libtinyalsa \ |
Divya Narayanan Poojary | 8fd98c8 | 2017-07-03 11:17:08 +0530 | [diff] [blame] | 302 | libtinycompress_vendor \ |
Ravi Kumar Alamanda | 2dfba2b | 2013-01-17 16:50:22 -0800 | [diff] [blame] | 303 | libaudioroute \ |
Ben Romberger | 61764e3 | 2014-01-10 13:49:02 -0800 | [diff] [blame] | 304 | libdl \ |
Ashish Jain | f1eaa58 | 2016-05-23 20:54:24 +0530 | [diff] [blame] | 305 | libaudioutils \ |
Vidyakumar Athota | 77327dd | 2014-08-07 16:44:25 -0700 | [diff] [blame] | 306 | libexpat |
Ravi Kumar Alamanda | 2dfba2b | 2013-01-17 16:50:22 -0800 | [diff] [blame] | 307 | |
| 308 | LOCAL_C_INCLUDES += \ |
| 309 | external/tinyalsa/include \ |
Ravi Kumar Alamanda | 4e02e55 | 2013-07-17 15:22:04 -0700 | [diff] [blame] | 310 | external/tinycompress/include \ |
Ashish Jain | f1eaa58 | 2016-05-23 20:54:24 +0530 | [diff] [blame] | 311 | system/media/audio_utils/include \ |
Ben Romberger | 61764e3 | 2014-01-10 13:49:02 -0800 | [diff] [blame] | 312 | external/expat/lib \ |
Ravi Kumar Alamanda | f70ffb4 | 2013-04-16 15:55:53 -0700 | [diff] [blame] | 313 | $(call include-path-for, audio-route) \ |
Eric Laurent | b23d528 | 2013-05-14 15:27:20 -0700 | [diff] [blame] | 314 | $(call include-path-for, audio-effects) \ |
Apoorv Raghuvanshi | 9eaf94e | 2013-10-04 16:13:44 -0700 | [diff] [blame] | 315 | $(LOCAL_PATH)/$(AUDIO_PLATFORM) \ |
Narsinga Rao Chella | 05573b7 | 2013-11-15 15:21:40 -0800 | [diff] [blame] | 316 | $(LOCAL_PATH)/audio_extn \ |
Vidyakumar Athota | 77327dd | 2014-08-07 16:44:25 -0700 | [diff] [blame] | 317 | $(LOCAL_PATH)/voice_extn |
Ravi Kumar Alamanda | 2dfba2b | 2013-01-17 16:50:22 -0800 | [diff] [blame] | 318 | |
Kiran Kandi | 910e186 | 2013-10-29 13:29:42 -0700 | [diff] [blame] | 319 | ifeq ($(strip $(AUDIO_FEATURE_ENABLED_LISTEN)),true) |
| 320 | LOCAL_CFLAGS += -DAUDIO_LISTEN_ENABLED |
| 321 | LOCAL_C_INCLUDES += $(TARGET_OUT_HEADERS)/mm-audio/audio-listen |
| 322 | LOCAL_SRC_FILES += audio_extn/listen.c |
| 323 | endif |
| 324 | |
Ashish Jain | 81eb2a8 | 2015-05-13 10:52:34 +0530 | [diff] [blame] | 325 | ifeq ($(strip $(AUDIO_FEATURE_ENABLED_EXT_HDMI)),true) |
| 326 | LOCAL_CFLAGS += -DAUDIO_EXTERNAL_HDMI_ENABLED |
| 327 | ifeq ($(strip $(AUDIO_FEATURE_ENABLED_HDMI_PASSTHROUGH)),true) |
| 328 | LOCAL_C_INCLUDES += $(TARGET_OUT_HEADERS)/mm-audio/audio-parsers |
| 329 | LOCAL_SHARED_LIBRARIES += libaudioparsers |
| 330 | endif |
| 331 | endif |
| 332 | |
Ravi Kumar Alamanda | 8fa6b19 | 2014-09-09 16:06:42 -0700 | [diff] [blame] | 333 | ifeq ($(strip $(BOARD_SUPPORTS_SOUND_TRIGGER)),true) |
Banajit Goswami | 710f353 | 2016-08-28 14:48:33 -0700 | [diff] [blame] | 334 | ST_FEATURE_ENABLE := true |
| 335 | endif |
| 336 | |
| 337 | ifeq ($(strip $(BOARD_SUPPORTS_SOUND_TRIGGER_HAL)),true) |
| 338 | ST_FEATURE_ENABLE := true |
| 339 | endif |
| 340 | |
| 341 | ifeq ($(ST_FEATURE_ENABLE), true) |
Ravi Kumar Alamanda | 8fa6b19 | 2014-09-09 16:06:42 -0700 | [diff] [blame] | 342 | LOCAL_CFLAGS += -DSOUND_TRIGGER_ENABLED |
| 343 | LOCAL_CFLAGS += -DSOUND_TRIGGER_PLATFORM_NAME=$(TARGET_BOARD_PLATFORM) |
| 344 | LOCAL_C_INCLUDES += $(TARGET_OUT_HEADERS)/mm-audio/sound_trigger |
| 345 | LOCAL_SRC_FILES += audio_extn/soundtrigger.c |
| 346 | endif |
| 347 | |
Damir Didjusto | f1d46c7 | 2013-11-06 17:59:04 -0800 | [diff] [blame] | 348 | ifeq ($(strip $(AUDIO_FEATURE_ENABLED_AUXPCM_BT)),true) |
| 349 | LOCAL_CFLAGS += -DAUXPCM_BT_ENABLED |
| 350 | endif |
| 351 | |
Preetam Singh Ranawat | 2d0e463 | 2015-02-02 12:40:59 +0530 | [diff] [blame] | 352 | ifeq ($(strip $(AUDIO_FEATURE_ENABLED_PM_SUPPORT)),true) |
| 353 | LOCAL_CFLAGS += -DPM_SUPPORT_ENABLED |
| 354 | LOCAL_SRC_FILES += audio_extn/pm.c |
| 355 | LOCAL_C_INCLUDES += $(TARGET_OUT_HEADERS)/libperipheralclient/inc |
| 356 | LOCAL_SHARED_LIBRARIES += libperipheral_client |
| 357 | endif |
| 358 | |
Shiv Maliyappanahalli | c065640 | 2016-09-03 14:13:26 -0700 | [diff] [blame] | 359 | ifeq ($(strip $(AUDIO_FEATURE_ENABLED_DISPLAY_PORT)),true) |
| 360 | LOCAL_CFLAGS += -DDISPLAY_PORT_ENABLED |
| 361 | endif |
| 362 | |
Weiyin Jiang | aa80acd | 2016-09-21 16:42:11 +0800 | [diff] [blame] | 363 | ifeq ($(strip $(AUDIO_FEATURE_ENABLED_GEF_SUPPORT)),true) |
| 364 | LOCAL_CFLAGS += -DAUDIO_GENERIC_EFFECT_FRAMEWORK_ENABLED |
| 365 | LOCAL_SRC_FILES += audio_extn/gef.c |
| 366 | endif |
| 367 | |
Ben Romberger | d771a7c | 2017-02-22 18:05:17 -0800 | [diff] [blame] | 368 | ifeq ($(strip $($AUDIO_FEATURE_ADSP_HDLR_ENABLED)),true) |
| 369 | LOCAL_CFLAGS += -DAUDIO_EXTN_ADSP_HDLR_ENABLED |
| 370 | LOCAL_SRC_FILES += audio_extn/adsp_hdlr.c |
| 371 | endif |
| 372 | |
Revathi Uddaraju | 1eac8b0 | 2017-05-18 17:13:33 +0530 | [diff] [blame] | 373 | ifeq ($(strip $(AUDIO_FEATURE_ENABLED_DYNAMIC_LOG)), true) |
| 374 | LOCAL_CFLAGS += -DDYNAMIC_LOG_ENABLED |
| 375 | LOCAL_C_INCLUDES += $(TARGET_OUT_HEADERS)/mm-audio/audio-log-utils |
| 376 | LOCAL_SHARED_LIBRARIES += libaudio_log_utils |
| 377 | endif |
| 378 | |
Vikram Panduranga | df59cae | 2017-08-03 18:04:55 -0700 | [diff] [blame] | 379 | ifeq ($(strip $($AUDIO_FEATURE_ENABLED_DYNAMIC_ECNS)),true) |
| 380 | LOCAL_CFLAGS += -DDYNAMIC_ECNS_ENABLED |
| 381 | endif |
| 382 | |
Satya Krishna Pindiproli | f1cd92b | 2016-04-14 19:05:23 +0530 | [diff] [blame] | 383 | LOCAL_CFLAGS += -Wall -Werror |
Alexy Joseph | b137994 | 2016-01-29 15:49:38 -0800 | [diff] [blame] | 384 | |
Mingming Yin | 5b7c0b3 | 2014-08-04 15:49:24 -0700 | [diff] [blame] | 385 | LOCAL_COPY_HEADERS_TO := mm-audio |
| 386 | LOCAL_COPY_HEADERS := audio_extn/audio_defs.h |
| 387 | |
Haynes Mathew George | 3a1f1fb | 2016-08-09 15:43:13 -0700 | [diff] [blame] | 388 | ifeq ($(strip $(AUDIO_FEATURE_ENABLED_SND_MONITOR)), true) |
| 389 | LOCAL_CFLAGS += -DSND_MONITOR_ENABLED |
| 390 | LOCAL_SRC_FILES += audio_extn/sndmonitor.c |
| 391 | endif |
| 392 | |
Mingming Yin | 8e5a4f6 | 2013-10-07 15:23:41 -0700 | [diff] [blame] | 393 | LOCAL_MODULE := audio.primary.$(TARGET_BOARD_PLATFORM) |
Ravi Kumar Alamanda | 2dfba2b | 2013-01-17 16:50:22 -0800 | [diff] [blame] | 394 | |
Apoorv Raghuvanshi | 1b555f7 | 2014-05-29 12:48:15 -0700 | [diff] [blame] | 395 | LOCAL_MODULE_RELATIVE_PATH := hw |
Ravi Kumar Alamanda | 2dfba2b | 2013-01-17 16:50:22 -0800 | [diff] [blame] | 396 | |
| 397 | LOCAL_MODULE_TAGS := optional |
| 398 | |
Naresh Tanniru | 10758b6 | 2017-06-05 21:05:53 +0530 | [diff] [blame] | 399 | LOCAL_VENDOR_MODULE := true |
| 400 | |
Ravi Kumar Alamanda | 2dfba2b | 2013-01-17 16:50:22 -0800 | [diff] [blame] | 401 | include $(BUILD_SHARED_LIBRARY) |
| 402 | |
| 403 | endif |