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 | |
Banajit Goswami | 4c0dff2 | 2016-03-04 18:31:22 -0800 | [diff] [blame] | 11 | ifneq ($(filter msm8974 msm8226 msm8610 apq8084 msm8994 msm8992 msm8996 msmcobalt,$(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 |
Banajit Goswami | 4c0dff2 | 2016-03-04 18:31:22 -0800 | [diff] [blame] | 33 | ifneq ($(filter msmcobalt,$(TARGET_BOARD_PLATFORM)),) |
| 34 | LOCAL_CFLAGS := -DPLATFORM_MSMCOBALT |
| 35 | endif |
Ajay Dudani | be3335a | 2013-08-19 18:47:21 -0700 | [diff] [blame] | 36 | endif |
| 37 | |
Dhananjay Kumar | d3ab9f4 | 2016-07-20 17:05:47 +0530 | [diff] [blame] | 38 | ifneq ($(filter msm8916 msm8909 msm8952 msm8937 thorium msm8953 msmgold msmfalcon,$(TARGET_BOARD_PLATFORM)),) |
Naresh Tanniru | db72d1e | 2014-03-05 17:33:47 +0530 | [diff] [blame] | 39 | AUDIO_PLATFORM = msm8916 |
| 40 | MULTIPLE_HW_VARIANTS_ENABLED := true |
| 41 | LOCAL_CFLAGS := -DPLATFORM_MSM8916 |
padarshr | 04e7481 | 2014-09-17 13:34:31 +0530 | [diff] [blame] | 42 | ifneq ($(filter msm8909,$(TARGET_BOARD_PLATFORM)),) |
Dhananjay Kumar | 2bb2fc1 | 2014-07-11 19:14:23 +0530 | [diff] [blame] | 43 | LOCAL_CFLAGS := -DPLATFORM_MSM8909 |
| 44 | endif |
Dhananjay Kumar | d3ab9f4 | 2016-07-20 17:05:47 +0530 | [diff] [blame] | 45 | ifneq ($(filter msmfalcon,$(TARGET_BOARD_PLATFORM)),) |
| 46 | LOCAL_CFLAGS := -DPLATFORM_MSMFALCON |
| 47 | endif |
Naresh Tanniru | db72d1e | 2014-03-05 17:33:47 +0530 | [diff] [blame] | 48 | endif |
Naresh Tanniru | 8b919ac | 2014-01-30 19:12:53 +0530 | [diff] [blame] | 49 | |
Ravi Kumar Alamanda | 2dfba2b | 2013-01-17 16:50:22 -0800 | [diff] [blame] | 50 | LOCAL_SRC_FILES := \ |
| 51 | audio_hw.c \ |
Shiv Maliyappanahalli | 34b585f | 2013-10-01 15:49:05 -0700 | [diff] [blame] | 52 | voice.c \ |
Ben Romberger | 61764e3 | 2014-01-10 13:49:02 -0800 | [diff] [blame] | 53 | platform_info.c \ |
Ajay Dudani | be3335a | 2013-08-19 18:47:21 -0700 | [diff] [blame] | 54 | $(AUDIO_PLATFORM)/platform.c |
Ravi Kumar Alamanda | 2dfba2b | 2013-01-17 16:50:22 -0800 | [diff] [blame] | 55 | |
Subhash Chandra Bose Naripeddy | 19dc03b | 2014-03-10 14:43:05 -0700 | [diff] [blame] | 56 | LOCAL_SRC_FILES += audio_extn/audio_extn.c \ |
| 57 | audio_extn/utils.c |
Vidyakumar Athota | 21b3bb9 | 2014-04-25 11:08:08 -0700 | [diff] [blame] | 58 | LOCAL_C_INCLUDES += $(TARGET_OUT_INTERMEDIATES)/KERNEL_OBJ/usr/include |
| 59 | LOCAL_ADDITIONAL_DEPENDENCIES += $(TARGET_OUT_INTERMEDIATES)/KERNEL_OBJ/usr |
Apoorv Raghuvanshi | 9eaf94e | 2013-10-04 16:13:44 -0700 | [diff] [blame] | 60 | |
Mingming Yin | e5bf837 | 2015-02-26 15:03:10 -0800 | [diff] [blame] | 61 | ifeq ($(strip $(AUDIO_FEATURE_ENABLED_HDMI_EDID)),true) |
Mingming Yin | 497419f | 2015-07-01 16:57:32 -0700 | [diff] [blame] | 62 | LOCAL_CFLAGS += -DHDMI_EDID |
Pradnya Chaphekar | 4403bd7 | 2014-09-09 09:50:01 -0700 | [diff] [blame] | 63 | LOCAL_SRC_FILES += edid.c |
| 64 | endif |
| 65 | |
Mingming Yin | 08c7e31 | 2015-03-16 18:10:58 -0700 | [diff] [blame] | 66 | ifeq ($(strip $(AUDIO_USE_LL_AS_PRIMARY_OUTPUT)),true) |
| 67 | LOCAL_CFLAGS += -DUSE_LL_AS_PRIMARY_OUTPUT |
| 68 | endif |
| 69 | |
Mingming Yin | a6dad60 | 2014-05-16 12:10:55 -0700 | [diff] [blame] | 70 | ifeq ($(strip $(AUDIO_FEATURE_ENABLED_PCM_OFFLOAD)),true) |
Mingming Yin | 67e3451 | 2014-04-03 17:47:22 -0700 | [diff] [blame] | 71 | LOCAL_CFLAGS += -DPCM_OFFLOAD_ENABLED |
| 72 | endif |
| 73 | |
Mingming Yin | a6dad60 | 2014-05-16 12:10:55 -0700 | [diff] [blame] | 74 | ifeq ($(strip $(AUDIO_FEATURE_ENABLED_ANC_HEADSET)),true) |
Apoorv Raghuvanshi | 9eaf94e | 2013-10-04 16:13:44 -0700 | [diff] [blame] | 75 | LOCAL_CFLAGS += -DANC_HEADSET_ENABLED |
| 76 | endif |
| 77 | |
Venkata Narendra Kumar Gutta | 4bd09d0 | 2016-01-29 15:31:04 +0530 | [diff] [blame] | 78 | ifeq ($(strip $(AUDIO_FEATURE_ENABLED_HIFI_AUDIO)),true) |
| 79 | LOCAL_CFLAGS += -DHIFI_AUDIO_ENABLED |
| 80 | endif |
| 81 | |
Banajit Goswami | 20cdd21 | 2015-09-11 01:11:30 -0700 | [diff] [blame] | 82 | ifeq ($(strip $(AUDIO_FEATURE_ENABLED_VBAT_MONITOR)),true) |
| 83 | LOCAL_CFLAGS += -DVBAT_MONITOR_ENABLED |
| 84 | endif |
| 85 | |
Mingming Yin | a6dad60 | 2014-05-16 12:10:55 -0700 | [diff] [blame] | 86 | ifeq ($(strip $(AUDIO_FEATURE_ENABLED_FLUENCE)),true) |
Venkata Narendra Kumar Gutta | 88fd0bc | 2014-03-27 19:47:56 +0530 | [diff] [blame] | 87 | LOCAL_CFLAGS += -DFLUENCE_ENABLED |
| 88 | endif |
| 89 | |
Mingming Yin | a6dad60 | 2014-05-16 12:10:55 -0700 | [diff] [blame] | 90 | ifeq ($(strip $(AUDIO_FEATURE_ENABLED_PROXY_DEVICE)),true) |
Apoorv Raghuvanshi | 9eaf94e | 2013-10-04 16:13:44 -0700 | [diff] [blame] | 91 | LOCAL_CFLAGS += -DAFE_PROXY_ENABLED |
| 92 | endif |
| 93 | |
Sudheer Papothi | 390bcf3 | 2014-12-04 01:25:17 +0530 | [diff] [blame] | 94 | ifeq ($(strip $(AUDIO_FEATURE_ENABLED_KPI_OPTIMIZE)),true) |
| 95 | LOCAL_CFLAGS += -DKPI_OPTIMIZE_ENABLED |
| 96 | endif |
| 97 | |
Mingming Yin | 12125e8 | 2015-10-26 20:40:36 -0700 | [diff] [blame] | 98 | ifeq ($(strip $(AUDIO_FEATURE_ENABLED_FM_POWER_OPT)),true) |
| 99 | LOCAL_CFLAGS += -DFM_POWER_OPT |
Apoorv Raghuvanshi | 6e26284 | 2013-10-06 14:39:35 -0700 | [diff] [blame] | 100 | LOCAL_SRC_FILES += audio_extn/fm.c |
| 101 | endif |
| 102 | |
Kuirong Wang | 357e0b1 | 2016-07-06 00:29:15 -0700 | [diff] [blame] | 103 | ifeq ($(strip $(AUDIO_FEATURE_ENABLED_USB_TUNNEL_AUDIO)),true) |
Apoorv Raghuvanshi | 5792d4b | 2013-10-07 18:40:05 -0700 | [diff] [blame] | 104 | LOCAL_CFLAGS += -DUSB_HEADSET_ENABLED |
| 105 | LOCAL_SRC_FILES += audio_extn/usb.c |
| 106 | endif |
Mingming Yin | a6dad60 | 2014-05-16 12:10:55 -0700 | [diff] [blame] | 107 | |
| 108 | ifeq ($(strip $(AUDIO_FEATURE_ENABLED_HFP)),true) |
Vimal Puthanveed | 5b4d3f1 | 2013-11-05 15:57:39 -0800 | [diff] [blame] | 109 | LOCAL_CFLAGS += -DHFP_ENABLED |
| 110 | LOCAL_SRC_FILES += audio_extn/hfp.c |
| 111 | endif |
Apoorv Raghuvanshi | 5792d4b | 2013-10-07 18:40:05 -0700 | [diff] [blame] | 112 | |
Mingming Yin | a6dad60 | 2014-05-16 12:10:55 -0700 | [diff] [blame] | 113 | ifeq ($(strip $(AUDIO_FEATURE_ENABLED_CUSTOMSTEREO)),true) |
Jitendra Singh Naruka | 9a6a8d4 | 2014-02-10 20:07:12 -0800 | [diff] [blame] | 114 | LOCAL_CFLAGS += -DCUSTOM_STEREO_ENABLED |
| 115 | endif |
| 116 | |
Mingming Yin | a6dad60 | 2014-05-16 12:10:55 -0700 | [diff] [blame] | 117 | ifeq ($(strip $(AUDIO_FEATURE_ENABLED_SSR)),true) |
Apoorv Raghuvanshi | 6178a3f | 2013-10-19 12:38:54 -0700 | [diff] [blame] | 118 | LOCAL_CFLAGS += -DSSR_ENABLED |
| 119 | LOCAL_SRC_FILES += audio_extn/ssr.c |
Shiv Maliyappanahalli | 5a10aea | 2015-07-02 10:36:23 -0700 | [diff] [blame] | 120 | LOCAL_C_INCLUDES += $(TARGET_OUT_HEADERS)/mm-audio/surround_sound_3mic/ |
Nagender Telkar | ca2b494 | 2014-03-24 12:25:42 -0600 | [diff] [blame] | 121 | LOCAL_C_INCLUDES += $(TARGET_OUT_HEADERS)/common/inc/ |
Apoorv Raghuvanshi | 6178a3f | 2013-10-19 12:38:54 -0700 | [diff] [blame] | 122 | endif |
| 123 | |
Mingming Yin | a6dad60 | 2014-05-16 12:10:55 -0700 | [diff] [blame] | 124 | ifeq ($(strip $(AUDIO_FEATURE_ENABLED_MULTI_VOICE_SESSIONS)),true) |
Shiv Maliyappanahalli | 303f51d | 2013-10-25 16:24:27 -0700 | [diff] [blame] | 125 | LOCAL_CFLAGS += -DMULTI_VOICE_SESSION_ENABLED |
| 126 | LOCAL_SRC_FILES += voice_extn/voice_extn.c |
Vidyakumar Athota | 21b3bb9 | 2014-04-25 11:08:08 -0700 | [diff] [blame] | 127 | |
Mingming Yin | a6dad60 | 2014-05-16 12:10:55 -0700 | [diff] [blame] | 128 | ifeq ($(strip $(AUDIO_FEATURE_ENABLED_INCALL_MUSIC)),true) |
Shiv Maliyappanahalli | 303f51d | 2013-10-25 16:24:27 -0700 | [diff] [blame] | 129 | LOCAL_CFLAGS += -DINCALL_MUSIC_ENABLED |
| 130 | endif |
Mingming Yin | a6dad60 | 2014-05-16 12:10:55 -0700 | [diff] [blame] | 131 | ifeq ($(strip $(AUDIO_FEATURE_ENABLED_COMPRESS_VOIP)),true) |
Narsinga Rao Chella | 05573b7 | 2013-11-15 15:21:40 -0800 | [diff] [blame] | 132 | LOCAL_CFLAGS += -DCOMPRESS_VOIP_ENABLED |
| 133 | LOCAL_SRC_FILES += voice_extn/compress_voip.c |
| 134 | endif |
Subhash Chandra Bose Naripeddy | 19dc03b | 2014-03-10 14:43:05 -0700 | [diff] [blame] | 135 | |
| 136 | endif |
| 137 | |
Mingming Yin | a6dad60 | 2014-05-16 12:10:55 -0700 | [diff] [blame] | 138 | ifeq ($(strip $(AUDIO_FEATURE_ENABLED_EXTN_FORMATS)),true) |
Satya Krishna Pindiproli | 5d82d01 | 2015-08-12 18:21:25 +0530 | [diff] [blame] | 139 | LOCAL_CFLAGS += -DAUDIO_EXTN_FORMATS_ENABLED |
Gopikrishnaiah Anandan | f538cef | 2013-10-28 14:06:03 -0700 | [diff] [blame] | 140 | endif |
Shiv Maliyappanahalli | 303f51d | 2013-10-25 16:24:27 -0700 | [diff] [blame] | 141 | |
Anish Kumar | d80a139 | 2014-07-16 16:18:51 -0700 | [diff] [blame] | 142 | ifeq ($(strip $(AUDIO_FEATURE_ENABLED_SPKR_PROTECTION)),true) |
Gopikrishnaiah Anandan | f538cef | 2013-10-28 14:06:03 -0700 | [diff] [blame] | 143 | LOCAL_CFLAGS += -DSPKR_PROT_ENABLED |
| 144 | LOCAL_SRC_FILES += audio_extn/spkr_protection.c |
Gopikrishnaiah Anandan | f538cef | 2013-10-28 14:06:03 -0700 | [diff] [blame] | 145 | endif |
Shiv Maliyappanahalli | 303f51d | 2013-10-25 16:24:27 -0700 | [diff] [blame] | 146 | |
Ravi Kumar Alamanda | 48c921d | 2013-10-29 06:07:44 -0700 | [diff] [blame] | 147 | ifdef MULTIPLE_HW_VARIANTS_ENABLED |
| 148 | LOCAL_CFLAGS += -DHW_VARIANTS_ENABLED |
| 149 | LOCAL_SRC_FILES += $(AUDIO_PLATFORM)/hw_info.c |
| 150 | endif |
| 151 | |
Mingming Yin | a6dad60 | 2014-05-16 12:10:55 -0700 | [diff] [blame] | 152 | ifeq ($(strip $(AUDIO_FEATURE_ENABLED_COMPRESS_CAPTURE)),true) |
Mingming Yin | e62d784 | 2013-10-25 16:26:03 -0700 | [diff] [blame] | 153 | LOCAL_CFLAGS += -DCOMPRESS_CAPTURE_ENABLED |
| 154 | LOCAL_SRC_FILES += audio_extn/compress_capture.c |
| 155 | endif |
| 156 | |
Jitendra Naruka | 1b6513f | 2014-11-22 19:34:13 -0800 | [diff] [blame] | 157 | ifeq ($(strip $(AUDIO_FEATURE_ENABLED_DTS_EAGLE)),true) |
| 158 | LOCAL_CFLAGS += -DDTS_EAGLE |
| 159 | LOCAL_SRC_FILES += audio_extn/dts_eagle.c |
| 160 | endif |
| 161 | |
Mingming Yin | a6dad60 | 2014-05-16 12:10:55 -0700 | [diff] [blame] | 162 | ifeq ($(strip $(DOLBY_DDP)),true) |
Mingming Yin | 9031010 | 2013-11-13 16:57:00 -0800 | [diff] [blame] | 163 | LOCAL_CFLAGS += -DDS1_DOLBY_DDP_ENABLED |
Subhash Chandra Bose Naripeddy | 7690c56 | 2013-12-14 00:34:53 -0800 | [diff] [blame] | 164 | LOCAL_SRC_FILES += audio_extn/dolby.c |
Mingming Yin | 9031010 | 2013-11-13 16:57:00 -0800 | [diff] [blame] | 165 | endif |
| 166 | |
Pradnya Chaphekar | 73e2e8b | 2015-05-01 02:18:17 -0700 | [diff] [blame] | 167 | ifeq ($(strip $(DS1_DOLBY_DAP)),true) |
Subhash Chandra Bose Naripeddy | 7690c56 | 2013-12-14 00:34:53 -0800 | [diff] [blame] | 168 | LOCAL_CFLAGS += -DDS1_DOLBY_DAP_ENABLED |
Mingming Yin | a6dad60 | 2014-05-16 12:10:55 -0700 | [diff] [blame] | 169 | ifneq ($(strip $(DOLBY_DDP)),true) |
Subhash Chandra Bose Naripeddy | 7690c56 | 2013-12-14 00:34:53 -0800 | [diff] [blame] | 170 | LOCAL_SRC_FILES += audio_extn/dolby.c |
| 171 | endif |
| 172 | endif |
| 173 | |
Mingming Yin | 3ee55c6 | 2014-08-04 14:23:35 -0700 | [diff] [blame] | 174 | ifeq ($(strip $(AUDIO_FEATURE_ENABLED_EXTN_FLAC_DECODER)),true) |
Satya Krishna Pindiproli | 7047160 | 2015-04-24 19:12:43 +0530 | [diff] [blame] | 175 | LOCAL_CFLAGS += -DFLAC_OFFLOAD_ENABLED |
| 176 | LOCAL_CFLAGS += -DCOMPRESS_METADATA_NEEDED |
| 177 | endif |
| 178 | |
| 179 | ifeq ($(strip $(AUDIO_FEATURE_ENABLED_VORBIS_OFFLOAD)),true) |
| 180 | LOCAL_CFLAGS += -DVORBIS_OFFLOAD_ENABLED |
| 181 | LOCAL_CFLAGS += -DCOMPRESS_METADATA_NEEDED |
| 182 | |
| 183 | endif |
| 184 | |
| 185 | ifeq ($(strip $(AUDIO_FEATURE_ENABLED_WMA_OFFLOAD)),true) |
| 186 | LOCAL_CFLAGS += -DWMA_OFFLOAD_ENABLED |
| 187 | LOCAL_CFLAGS += -DCOMPRESS_METADATA_NEEDED |
| 188 | endif |
| 189 | |
| 190 | ifeq ($(strip $(AUDIO_FEATURE_ENABLED_ALAC_OFFLOAD)),true) |
| 191 | LOCAL_CFLAGS += -DALAC_OFFLOAD_ENABLED |
| 192 | LOCAL_CFLAGS += -DCOMPRESS_METADATA_NEEDED |
| 193 | endif |
| 194 | |
| 195 | ifeq ($(strip $(AUDIO_FEATURE_ENABLED_APE_OFFLOAD)),true) |
| 196 | LOCAL_CFLAGS += -DAPE_OFFLOAD_ENABLED |
| 197 | LOCAL_CFLAGS += -DCOMPRESS_METADATA_NEEDED |
Mingming Yin | 3ee55c6 | 2014-08-04 14:23:35 -0700 | [diff] [blame] | 198 | endif |
| 199 | |
Vidyakumar Athota | c1d39c9 | 2015-02-25 15:14:26 -0800 | [diff] [blame] | 200 | ifeq ($(strip $(AUDIO_FEATURE_ENABLED_PCM_OFFLOAD_24)),true) |
| 201 | LOCAL_CFLAGS += -DPCM_OFFLOAD_ENABLED_24 |
| 202 | endif |
| 203 | |
Manish Dewangan | a6fc544 | 2015-08-24 20:30:31 +0530 | [diff] [blame] | 204 | ifeq ($(strip $(AUDIO_FEATURE_ENABLED_AAC_ADTS_OFFLOAD)),true) |
| 205 | LOCAL_CFLAGS += -DAAC_ADTS_OFFLOAD_ENABLED |
| 206 | endif |
| 207 | |
Lior Barenboim | 0b61bc7 | 2014-05-13 13:01:37 +0300 | [diff] [blame] | 208 | ifeq ($(strip $(AUDIO_FEATURE_ENABLED_DEV_ARBI)),true) |
| 209 | LOCAL_CFLAGS += -DDEV_ARBI_ENABLED |
| 210 | LOCAL_SRC_FILES += audio_extn/dev_arbi.c |
| 211 | endif |
| 212 | |
Naresh Tanniru | c0517bc | 2014-10-26 15:30:55 +0530 | [diff] [blame] | 213 | ifeq ($(strip $(AUDIO_FEATURE_ENABLED_RECORD_PLAY_CONCURRENCY)),true) |
| 214 | LOCAL_CFLAGS += -DRECORD_PLAY_CONCURRENCY |
| 215 | endif |
| 216 | |
Ashish Jain | 8ec5047 | 2014-10-16 13:56:28 +0530 | [diff] [blame] | 217 | ifeq ($(strip $(AUDIO_FEATURE_ENABLED_ACDB_LICENSE)), true) |
| 218 | LOCAL_CFLAGS += -DDOLBY_ACDB_LICENSE |
| 219 | endif |
| 220 | |
Pradnya Chaphekar | 8a9dcd8 | 2014-09-09 09:49:10 -0700 | [diff] [blame] | 221 | ifeq ($(strip $(AUDIO_FEATURE_ENABLED_DS2_DOLBY_DAP)),true) |
| 222 | LOCAL_CFLAGS += -DDS2_DOLBY_DAP_ENABLED |
Pradnya Chaphekar | 73e2e8b | 2015-05-01 02:18:17 -0700 | [diff] [blame] | 223 | LOCAL_CFLAGS += -DDS1_DOLBY_DDP_ENABLED |
Pradnya Chaphekar | 8a9dcd8 | 2014-09-09 09:49:10 -0700 | [diff] [blame] | 224 | ifneq ($(strip $(DOLBY_DDP)),true) |
Pradnya Chaphekar | 73e2e8b | 2015-05-01 02:18:17 -0700 | [diff] [blame] | 225 | ifneq ($(strip $(DS1_DOLBY_DAP)),true) |
Pradnya Chaphekar | 8a9dcd8 | 2014-09-09 09:49:10 -0700 | [diff] [blame] | 226 | LOCAL_SRC_FILES += audio_extn/dolby.c |
| 227 | endif |
| 228 | endif |
| 229 | endif |
| 230 | |
Pradnya Chaphekar | 80a8cfb | 2014-10-20 16:17:01 -0700 | [diff] [blame] | 231 | ifeq ($(strip $(AUDIO_FEATURE_ENABLED_HDMI_PASSTHROUGH)),true) |
| 232 | LOCAL_CFLAGS += -DHDMI_PASSTHROUGH_ENABLED |
Mingming Yin | 2185465 | 2016-04-13 11:54:02 -0700 | [diff] [blame] | 233 | LOCAL_SRC_FILES += audio_extn/passthru.c |
| 234 | endif |
| 235 | |
| 236 | ifeq ($(strip $(AUDIO_FEATURE_ENABLED_KEEP_ALIVE)),true) |
| 237 | LOCAL_CFLAGS += -DKEEP_ALIVE_ENABLED |
| 238 | LOCAL_SRC_FILES += audio_extn/keep_alive.c |
Pradnya Chaphekar | 80a8cfb | 2014-10-20 16:17:01 -0700 | [diff] [blame] | 239 | endif |
| 240 | |
Narsinga Rao Chella | f928a98 | 2015-03-06 14:57:35 -0800 | [diff] [blame] | 241 | ifeq ($(strip $(AUDIO_FEATURE_ENABLED_SOURCE_TRACKING)),true) |
| 242 | LOCAL_CFLAGS += -DSOURCE_TRACKING_ENABLED |
| 243 | LOCAL_SRC_FILES += audio_extn/source_track.c |
| 244 | endif |
| 245 | |
Naresh Tanniru | 9d027a6 | 2015-03-13 01:32:10 +0530 | [diff] [blame^] | 246 | ifeq ($(strip $(AUDIO_FEATURE_ENABLED_SPLIT_A2DP)),true) |
| 247 | LOCAL_CFLAGS += -DSPLIT_A2DP_ENABLED |
| 248 | LOCAL_SRC_FILES += audio_extn/a2dp.c |
| 249 | endif |
| 250 | |
Ravi Kumar Alamanda | 2dfba2b | 2013-01-17 16:50:22 -0800 | [diff] [blame] | 251 | LOCAL_SHARED_LIBRARIES := \ |
| 252 | liblog \ |
| 253 | libcutils \ |
| 254 | libtinyalsa \ |
Ravi Kumar Alamanda | 4e02e55 | 2013-07-17 15:22:04 -0700 | [diff] [blame] | 255 | libtinycompress \ |
Ravi Kumar Alamanda | 2dfba2b | 2013-01-17 16:50:22 -0800 | [diff] [blame] | 256 | libaudioroute \ |
Ben Romberger | 61764e3 | 2014-01-10 13:49:02 -0800 | [diff] [blame] | 257 | libdl \ |
Ashish Jain | f1eaa58 | 2016-05-23 20:54:24 +0530 | [diff] [blame] | 258 | libaudioutils \ |
Naresh Tanniru | 9d027a6 | 2015-03-13 01:32:10 +0530 | [diff] [blame^] | 259 | libhardware \ |
Vidyakumar Athota | 77327dd | 2014-08-07 16:44:25 -0700 | [diff] [blame] | 260 | libexpat |
Ravi Kumar Alamanda | 2dfba2b | 2013-01-17 16:50:22 -0800 | [diff] [blame] | 261 | |
| 262 | LOCAL_C_INCLUDES += \ |
| 263 | external/tinyalsa/include \ |
Ravi Kumar Alamanda | 4e02e55 | 2013-07-17 15:22:04 -0700 | [diff] [blame] | 264 | external/tinycompress/include \ |
Ashish Jain | f1eaa58 | 2016-05-23 20:54:24 +0530 | [diff] [blame] | 265 | system/media/audio_utils/include \ |
Ben Romberger | 61764e3 | 2014-01-10 13:49:02 -0800 | [diff] [blame] | 266 | external/expat/lib \ |
Ravi Kumar Alamanda | f70ffb4 | 2013-04-16 15:55:53 -0700 | [diff] [blame] | 267 | $(call include-path-for, audio-route) \ |
Eric Laurent | b23d528 | 2013-05-14 15:27:20 -0700 | [diff] [blame] | 268 | $(call include-path-for, audio-effects) \ |
Apoorv Raghuvanshi | 9eaf94e | 2013-10-04 16:13:44 -0700 | [diff] [blame] | 269 | $(LOCAL_PATH)/$(AUDIO_PLATFORM) \ |
Narsinga Rao Chella | 05573b7 | 2013-11-15 15:21:40 -0800 | [diff] [blame] | 270 | $(LOCAL_PATH)/audio_extn \ |
Vidyakumar Athota | 77327dd | 2014-08-07 16:44:25 -0700 | [diff] [blame] | 271 | $(LOCAL_PATH)/voice_extn |
Ravi Kumar Alamanda | 2dfba2b | 2013-01-17 16:50:22 -0800 | [diff] [blame] | 272 | |
Kiran Kandi | 910e186 | 2013-10-29 13:29:42 -0700 | [diff] [blame] | 273 | ifeq ($(strip $(AUDIO_FEATURE_ENABLED_LISTEN)),true) |
| 274 | LOCAL_CFLAGS += -DAUDIO_LISTEN_ENABLED |
| 275 | LOCAL_C_INCLUDES += $(TARGET_OUT_HEADERS)/mm-audio/audio-listen |
| 276 | LOCAL_SRC_FILES += audio_extn/listen.c |
| 277 | endif |
| 278 | |
Ashish Jain | 81eb2a8 | 2015-05-13 10:52:34 +0530 | [diff] [blame] | 279 | ifeq ($(strip $(AUDIO_FEATURE_ENABLED_EXT_HDMI)),true) |
| 280 | LOCAL_CFLAGS += -DAUDIO_EXTERNAL_HDMI_ENABLED |
| 281 | ifeq ($(strip $(AUDIO_FEATURE_ENABLED_HDMI_PASSTHROUGH)),true) |
| 282 | LOCAL_C_INCLUDES += $(TARGET_OUT_HEADERS)/mm-audio/audio-parsers |
| 283 | LOCAL_SHARED_LIBRARIES += libaudioparsers |
| 284 | endif |
| 285 | endif |
| 286 | |
Ravi Kumar Alamanda | 8fa6b19 | 2014-09-09 16:06:42 -0700 | [diff] [blame] | 287 | ifeq ($(strip $(BOARD_SUPPORTS_SOUND_TRIGGER)),true) |
| 288 | LOCAL_CFLAGS += -DSOUND_TRIGGER_ENABLED |
| 289 | LOCAL_CFLAGS += -DSOUND_TRIGGER_PLATFORM_NAME=$(TARGET_BOARD_PLATFORM) |
| 290 | LOCAL_C_INCLUDES += $(TARGET_OUT_HEADERS)/mm-audio/sound_trigger |
| 291 | LOCAL_SRC_FILES += audio_extn/soundtrigger.c |
| 292 | endif |
| 293 | |
Damir Didjusto | f1d46c7 | 2013-11-06 17:59:04 -0800 | [diff] [blame] | 294 | ifeq ($(strip $(AUDIO_FEATURE_ENABLED_AUXPCM_BT)),true) |
| 295 | LOCAL_CFLAGS += -DAUXPCM_BT_ENABLED |
| 296 | endif |
| 297 | |
Preetam Singh Ranawat | 2d0e463 | 2015-02-02 12:40:59 +0530 | [diff] [blame] | 298 | ifeq ($(strip $(AUDIO_FEATURE_ENABLED_PM_SUPPORT)),true) |
| 299 | LOCAL_CFLAGS += -DPM_SUPPORT_ENABLED |
| 300 | LOCAL_SRC_FILES += audio_extn/pm.c |
| 301 | LOCAL_C_INCLUDES += $(TARGET_OUT_HEADERS)/libperipheralclient/inc |
| 302 | LOCAL_SHARED_LIBRARIES += libperipheral_client |
| 303 | endif |
| 304 | |
Satya Krishna Pindiproli | f1cd92b | 2016-04-14 19:05:23 +0530 | [diff] [blame] | 305 | LOCAL_CFLAGS += -Wall -Werror |
Alexy Joseph | b137994 | 2016-01-29 15:49:38 -0800 | [diff] [blame] | 306 | |
Mingming Yin | 5b7c0b3 | 2014-08-04 15:49:24 -0700 | [diff] [blame] | 307 | LOCAL_COPY_HEADERS_TO := mm-audio |
| 308 | LOCAL_COPY_HEADERS := audio_extn/audio_defs.h |
| 309 | |
Mingming Yin | 8e5a4f6 | 2013-10-07 15:23:41 -0700 | [diff] [blame] | 310 | LOCAL_MODULE := audio.primary.$(TARGET_BOARD_PLATFORM) |
Ravi Kumar Alamanda | 2dfba2b | 2013-01-17 16:50:22 -0800 | [diff] [blame] | 311 | |
Apoorv Raghuvanshi | 1b555f7 | 2014-05-29 12:48:15 -0700 | [diff] [blame] | 312 | LOCAL_MODULE_RELATIVE_PATH := hw |
Ravi Kumar Alamanda | 2dfba2b | 2013-01-17 16:50:22 -0800 | [diff] [blame] | 313 | |
| 314 | LOCAL_MODULE_TAGS := optional |
| 315 | |
| 316 | include $(BUILD_SHARED_LIBRARY) |
| 317 | |
| 318 | endif |