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 | |
Mingming Yin | 0e1b290 | 2014-05-19 18:20:59 -0700 | [diff] [blame] | 11 | ifneq ($(filter msm8974 msm8226 msm8610 apq8084 msm8994,$(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 |
Ajay Dudani | be3335a | 2013-08-19 18:47:21 -0700 | [diff] [blame] | 27 | endif |
| 28 | |
Dhananjay Kumar | 2bb2fc1 | 2014-07-11 19:14:23 +0530 | [diff] [blame] | 29 | ifneq ($(filter msm8916 ferrum,$(TARGET_BOARD_PLATFORM)),) |
Naresh Tanniru | db72d1e | 2014-03-05 17:33:47 +0530 | [diff] [blame] | 30 | AUDIO_PLATFORM = msm8916 |
| 31 | MULTIPLE_HW_VARIANTS_ENABLED := true |
| 32 | LOCAL_CFLAGS := -DPLATFORM_MSM8916 |
Dhananjay Kumar | 2bb2fc1 | 2014-07-11 19:14:23 +0530 | [diff] [blame] | 33 | ifneq ($(filter ferrum,$(TARGET_BOARD_PLATFORM)),) |
| 34 | LOCAL_CFLAGS := -DPLATFORM_MSM8909 |
| 35 | endif |
Naresh Tanniru | db72d1e | 2014-03-05 17:33:47 +0530 | [diff] [blame] | 36 | endif |
Naresh Tanniru | 8b919ac | 2014-01-30 19:12:53 +0530 | [diff] [blame] | 37 | |
Ravi Kumar Alamanda | 2dfba2b | 2013-01-17 16:50:22 -0800 | [diff] [blame] | 38 | LOCAL_SRC_FILES := \ |
| 39 | audio_hw.c \ |
Shiv Maliyappanahalli | 34b585f | 2013-10-01 15:49:05 -0700 | [diff] [blame] | 40 | voice.c \ |
Ben Romberger | 61764e3 | 2014-01-10 13:49:02 -0800 | [diff] [blame] | 41 | platform_info.c \ |
Ajay Dudani | be3335a | 2013-08-19 18:47:21 -0700 | [diff] [blame] | 42 | $(AUDIO_PLATFORM)/platform.c |
Ravi Kumar Alamanda | 2dfba2b | 2013-01-17 16:50:22 -0800 | [diff] [blame] | 43 | |
Subhash Chandra Bose Naripeddy | 19dc03b | 2014-03-10 14:43:05 -0700 | [diff] [blame] | 44 | LOCAL_SRC_FILES += audio_extn/audio_extn.c \ |
| 45 | audio_extn/utils.c |
Vidyakumar Athota | 21b3bb9 | 2014-04-25 11:08:08 -0700 | [diff] [blame] | 46 | LOCAL_C_INCLUDES += $(TARGET_OUT_INTERMEDIATES)/KERNEL_OBJ/usr/include |
| 47 | LOCAL_ADDITIONAL_DEPENDENCIES += $(TARGET_OUT_INTERMEDIATES)/KERNEL_OBJ/usr |
Apoorv Raghuvanshi | 9eaf94e | 2013-10-04 16:13:44 -0700 | [diff] [blame] | 48 | |
Mingming Yin | a6dad60 | 2014-05-16 12:10:55 -0700 | [diff] [blame] | 49 | ifeq ($(strip $(AUDIO_FEATURE_ENABLED_PCM_OFFLOAD)),true) |
Mingming Yin | 67e3451 | 2014-04-03 17:47:22 -0700 | [diff] [blame] | 50 | LOCAL_CFLAGS += -DPCM_OFFLOAD_ENABLED |
| 51 | endif |
| 52 | |
Mingming Yin | a6dad60 | 2014-05-16 12:10:55 -0700 | [diff] [blame] | 53 | ifeq ($(strip $(AUDIO_FEATURE_ENABLED_ANC_HEADSET)),true) |
Apoorv Raghuvanshi | 9eaf94e | 2013-10-04 16:13:44 -0700 | [diff] [blame] | 54 | LOCAL_CFLAGS += -DANC_HEADSET_ENABLED |
| 55 | endif |
| 56 | |
Mingming Yin | a6dad60 | 2014-05-16 12:10:55 -0700 | [diff] [blame] | 57 | ifeq ($(strip $(AUDIO_FEATURE_ENABLED_FLUENCE)),true) |
Venkata Narendra Kumar Gutta | 88fd0bc | 2014-03-27 19:47:56 +0530 | [diff] [blame] | 58 | LOCAL_CFLAGS += -DFLUENCE_ENABLED |
| 59 | endif |
| 60 | |
Mingming Yin | a6dad60 | 2014-05-16 12:10:55 -0700 | [diff] [blame] | 61 | ifeq ($(strip $(AUDIO_FEATURE_ENABLED_PROXY_DEVICE)),true) |
Apoorv Raghuvanshi | 9eaf94e | 2013-10-04 16:13:44 -0700 | [diff] [blame] | 62 | LOCAL_CFLAGS += -DAFE_PROXY_ENABLED |
| 63 | endif |
| 64 | |
Mingming Yin | a6dad60 | 2014-05-16 12:10:55 -0700 | [diff] [blame] | 65 | ifeq ($(strip $(AUDIO_FEATURE_ENABLED_FM)),true) |
Apoorv Raghuvanshi | 6e26284 | 2013-10-06 14:39:35 -0700 | [diff] [blame] | 66 | LOCAL_CFLAGS += -DFM_ENABLED |
| 67 | LOCAL_SRC_FILES += audio_extn/fm.c |
| 68 | endif |
| 69 | |
Mingming Yin | a6dad60 | 2014-05-16 12:10:55 -0700 | [diff] [blame] | 70 | ifeq ($(strip $(AUDIO_FEATURE_ENABLED_USBAUDIO)),true) |
Apoorv Raghuvanshi | 5792d4b | 2013-10-07 18:40:05 -0700 | [diff] [blame] | 71 | LOCAL_CFLAGS += -DUSB_HEADSET_ENABLED |
| 72 | LOCAL_SRC_FILES += audio_extn/usb.c |
| 73 | endif |
Mingming Yin | a6dad60 | 2014-05-16 12:10:55 -0700 | [diff] [blame] | 74 | |
| 75 | ifeq ($(strip $(AUDIO_FEATURE_ENABLED_HFP)),true) |
Vimal Puthanveed | 5b4d3f1 | 2013-11-05 15:57:39 -0800 | [diff] [blame] | 76 | LOCAL_CFLAGS += -DHFP_ENABLED |
| 77 | LOCAL_SRC_FILES += audio_extn/hfp.c |
| 78 | endif |
Apoorv Raghuvanshi | 5792d4b | 2013-10-07 18:40:05 -0700 | [diff] [blame] | 79 | |
Mingming Yin | a6dad60 | 2014-05-16 12:10:55 -0700 | [diff] [blame] | 80 | ifeq ($(strip $(AUDIO_FEATURE_ENABLED_CUSTOMSTEREO)),true) |
Jitendra Singh Naruka | 9a6a8d4 | 2014-02-10 20:07:12 -0800 | [diff] [blame] | 81 | LOCAL_CFLAGS += -DCUSTOM_STEREO_ENABLED |
| 82 | endif |
| 83 | |
Mingming Yin | a6dad60 | 2014-05-16 12:10:55 -0700 | [diff] [blame] | 84 | ifeq ($(strip $(AUDIO_FEATURE_ENABLED_SSR)),true) |
Apoorv Raghuvanshi | 6178a3f | 2013-10-19 12:38:54 -0700 | [diff] [blame] | 85 | LOCAL_CFLAGS += -DSSR_ENABLED |
| 86 | LOCAL_SRC_FILES += audio_extn/ssr.c |
| 87 | LOCAL_C_INCLUDES += $(TARGET_OUT_HEADERS)/mm-audio/surround_sound/ |
Nagender Telkar | ca2b494 | 2014-03-24 12:25:42 -0600 | [diff] [blame] | 88 | LOCAL_C_INCLUDES += $(TARGET_OUT_HEADERS)/common/inc/ |
Apoorv Raghuvanshi | 6178a3f | 2013-10-19 12:38:54 -0700 | [diff] [blame] | 89 | endif |
| 90 | |
Mingming Yin | a6dad60 | 2014-05-16 12:10:55 -0700 | [diff] [blame] | 91 | ifeq ($(strip $(AUDIO_FEATURE_ENABLED_MULTI_VOICE_SESSIONS)),true) |
Shiv Maliyappanahalli | 303f51d | 2013-10-25 16:24:27 -0700 | [diff] [blame] | 92 | LOCAL_CFLAGS += -DMULTI_VOICE_SESSION_ENABLED |
| 93 | LOCAL_SRC_FILES += voice_extn/voice_extn.c |
Vidyakumar Athota | 21b3bb9 | 2014-04-25 11:08:08 -0700 | [diff] [blame] | 94 | |
Mingming Yin | a6dad60 | 2014-05-16 12:10:55 -0700 | [diff] [blame] | 95 | ifeq ($(strip $(AUDIO_FEATURE_ENABLED_INCALL_MUSIC)),true) |
Shiv Maliyappanahalli | 303f51d | 2013-10-25 16:24:27 -0700 | [diff] [blame] | 96 | LOCAL_CFLAGS += -DINCALL_MUSIC_ENABLED |
| 97 | endif |
Mingming Yin | a6dad60 | 2014-05-16 12:10:55 -0700 | [diff] [blame] | 98 | ifeq ($(strip $(AUDIO_FEATURE_ENABLED_COMPRESS_VOIP)),true) |
Narsinga Rao Chella | 05573b7 | 2013-11-15 15:21:40 -0800 | [diff] [blame] | 99 | LOCAL_CFLAGS += -DCOMPRESS_VOIP_ENABLED |
| 100 | LOCAL_SRC_FILES += voice_extn/compress_voip.c |
| 101 | endif |
Subhash Chandra Bose Naripeddy | 19dc03b | 2014-03-10 14:43:05 -0700 | [diff] [blame] | 102 | |
| 103 | endif |
| 104 | |
Mingming Yin | a6dad60 | 2014-05-16 12:10:55 -0700 | [diff] [blame] | 105 | ifeq ($(strip $(AUDIO_FEATURE_ENABLED_EXTN_FORMATS)),true) |
Subhash Chandra Bose Naripeddy | 19dc03b | 2014-03-10 14:43:05 -0700 | [diff] [blame] | 106 | LOCAL_CFLAGS += -DFORMATS_ENABLED |
Gopikrishnaiah Anandan | f538cef | 2013-10-28 14:06:03 -0700 | [diff] [blame] | 107 | endif |
Shiv Maliyappanahalli | 303f51d | 2013-10-25 16:24:27 -0700 | [diff] [blame] | 108 | |
Anish Kumar | d80a139 | 2014-07-16 16:18:51 -0700 | [diff] [blame] | 109 | ifeq ($(strip $(AUDIO_FEATURE_ENABLED_SPKR_PROTECTION)),true) |
Gopikrishnaiah Anandan | f538cef | 2013-10-28 14:06:03 -0700 | [diff] [blame] | 110 | LOCAL_CFLAGS += -DSPKR_PROT_ENABLED |
| 111 | LOCAL_SRC_FILES += audio_extn/spkr_protection.c |
Gopikrishnaiah Anandan | f538cef | 2013-10-28 14:06:03 -0700 | [diff] [blame] | 112 | endif |
Shiv Maliyappanahalli | 303f51d | 2013-10-25 16:24:27 -0700 | [diff] [blame] | 113 | |
Ravi Kumar Alamanda | 48c921d | 2013-10-29 06:07:44 -0700 | [diff] [blame] | 114 | ifdef MULTIPLE_HW_VARIANTS_ENABLED |
| 115 | LOCAL_CFLAGS += -DHW_VARIANTS_ENABLED |
| 116 | LOCAL_SRC_FILES += $(AUDIO_PLATFORM)/hw_info.c |
| 117 | endif |
| 118 | |
Mingming Yin | a6dad60 | 2014-05-16 12:10:55 -0700 | [diff] [blame] | 119 | ifeq ($(strip $(AUDIO_FEATURE_ENABLED_COMPRESS_CAPTURE)),true) |
Mingming Yin | e62d784 | 2013-10-25 16:26:03 -0700 | [diff] [blame] | 120 | LOCAL_CFLAGS += -DCOMPRESS_CAPTURE_ENABLED |
| 121 | LOCAL_SRC_FILES += audio_extn/compress_capture.c |
| 122 | endif |
| 123 | |
Mingming Yin | a6dad60 | 2014-05-16 12:10:55 -0700 | [diff] [blame] | 124 | ifeq ($(strip $(DOLBY_DDP)),true) |
Mingming Yin | 9031010 | 2013-11-13 16:57:00 -0800 | [diff] [blame] | 125 | LOCAL_CFLAGS += -DDS1_DOLBY_DDP_ENABLED |
Subhash Chandra Bose Naripeddy | 7690c56 | 2013-12-14 00:34:53 -0800 | [diff] [blame] | 126 | LOCAL_SRC_FILES += audio_extn/dolby.c |
Mingming Yin | 9031010 | 2013-11-13 16:57:00 -0800 | [diff] [blame] | 127 | endif |
| 128 | |
Mingming Yin | a6dad60 | 2014-05-16 12:10:55 -0700 | [diff] [blame] | 129 | ifeq ($(strip $(DOLBY_DAP)),true) |
Subhash Chandra Bose Naripeddy | 7690c56 | 2013-12-14 00:34:53 -0800 | [diff] [blame] | 130 | LOCAL_CFLAGS += -DDS1_DOLBY_DAP_ENABLED |
Mingming Yin | a6dad60 | 2014-05-16 12:10:55 -0700 | [diff] [blame] | 131 | ifneq ($(strip $(DOLBY_DDP)),true) |
Subhash Chandra Bose Naripeddy | 7690c56 | 2013-12-14 00:34:53 -0800 | [diff] [blame] | 132 | LOCAL_SRC_FILES += audio_extn/dolby.c |
| 133 | endif |
| 134 | endif |
| 135 | |
Subhash Chandra Bose Naripeddy | 16ff4f8 | 2014-04-01 21:03:10 -0700 | [diff] [blame] | 136 | ifeq ($(strip $(AUDIO_FEATURE_ENABLED_MULTIPLE_TUNNEL)), true) |
| 137 | LOCAL_CFLAGS += -DMULTIPLE_OFFLOAD_ENABLED |
| 138 | endif |
Subhash Chandra Bose Naripeddy | 7690c56 | 2013-12-14 00:34:53 -0800 | [diff] [blame] | 139 | |
Mingming Yin | 3ee55c6 | 2014-08-04 14:23:35 -0700 | [diff] [blame] | 140 | ifeq ($(strip $(AUDIO_FEATURE_ENABLED_EXTN_FLAC_DECODER)),true) |
| 141 | LOCAL_CFLAGS += -DQTI_FLAC_DECODER |
| 142 | endif |
| 143 | |
Ravi Kumar Alamanda | 2dfba2b | 2013-01-17 16:50:22 -0800 | [diff] [blame] | 144 | LOCAL_SHARED_LIBRARIES := \ |
| 145 | liblog \ |
| 146 | libcutils \ |
| 147 | libtinyalsa \ |
Ravi Kumar Alamanda | 4e02e55 | 2013-07-17 15:22:04 -0700 | [diff] [blame] | 148 | libtinycompress \ |
Ravi Kumar Alamanda | 2dfba2b | 2013-01-17 16:50:22 -0800 | [diff] [blame] | 149 | libaudioroute \ |
Ben Romberger | 61764e3 | 2014-01-10 13:49:02 -0800 | [diff] [blame] | 150 | libdl \ |
Vidyakumar Athota | 77327dd | 2014-08-07 16:44:25 -0700 | [diff] [blame^] | 151 | libexpat |
Ravi Kumar Alamanda | 2dfba2b | 2013-01-17 16:50:22 -0800 | [diff] [blame] | 152 | |
| 153 | LOCAL_C_INCLUDES += \ |
| 154 | external/tinyalsa/include \ |
Ravi Kumar Alamanda | 4e02e55 | 2013-07-17 15:22:04 -0700 | [diff] [blame] | 155 | external/tinycompress/include \ |
Ben Romberger | 61764e3 | 2014-01-10 13:49:02 -0800 | [diff] [blame] | 156 | external/expat/lib \ |
Ravi Kumar Alamanda | f70ffb4 | 2013-04-16 15:55:53 -0700 | [diff] [blame] | 157 | $(call include-path-for, audio-route) \ |
Eric Laurent | b23d528 | 2013-05-14 15:27:20 -0700 | [diff] [blame] | 158 | $(call include-path-for, audio-effects) \ |
Apoorv Raghuvanshi | 9eaf94e | 2013-10-04 16:13:44 -0700 | [diff] [blame] | 159 | $(LOCAL_PATH)/$(AUDIO_PLATFORM) \ |
Narsinga Rao Chella | 05573b7 | 2013-11-15 15:21:40 -0800 | [diff] [blame] | 160 | $(LOCAL_PATH)/audio_extn \ |
Vidyakumar Athota | 77327dd | 2014-08-07 16:44:25 -0700 | [diff] [blame^] | 161 | $(LOCAL_PATH)/voice_extn |
Ravi Kumar Alamanda | 2dfba2b | 2013-01-17 16:50:22 -0800 | [diff] [blame] | 162 | |
Kiran Kandi | 910e186 | 2013-10-29 13:29:42 -0700 | [diff] [blame] | 163 | ifeq ($(strip $(AUDIO_FEATURE_ENABLED_LISTEN)),true) |
| 164 | LOCAL_CFLAGS += -DAUDIO_LISTEN_ENABLED |
| 165 | LOCAL_C_INCLUDES += $(TARGET_OUT_HEADERS)/mm-audio/audio-listen |
| 166 | LOCAL_SRC_FILES += audio_extn/listen.c |
| 167 | endif |
| 168 | |
Damir Didjusto | f1d46c7 | 2013-11-06 17:59:04 -0800 | [diff] [blame] | 169 | ifeq ($(strip $(AUDIO_FEATURE_ENABLED_AUXPCM_BT)),true) |
| 170 | LOCAL_CFLAGS += -DAUXPCM_BT_ENABLED |
| 171 | endif |
| 172 | |
Mingming Yin | 5b7c0b3 | 2014-08-04 15:49:24 -0700 | [diff] [blame] | 173 | LOCAL_COPY_HEADERS_TO := mm-audio |
| 174 | LOCAL_COPY_HEADERS := audio_extn/audio_defs.h |
| 175 | |
Mingming Yin | 8e5a4f6 | 2013-10-07 15:23:41 -0700 | [diff] [blame] | 176 | LOCAL_MODULE := audio.primary.$(TARGET_BOARD_PLATFORM) |
Ravi Kumar Alamanda | 2dfba2b | 2013-01-17 16:50:22 -0800 | [diff] [blame] | 177 | |
Apoorv Raghuvanshi | 1b555f7 | 2014-05-29 12:48:15 -0700 | [diff] [blame] | 178 | LOCAL_MODULE_RELATIVE_PATH := hw |
Ravi Kumar Alamanda | 2dfba2b | 2013-01-17 16:50:22 -0800 | [diff] [blame] | 179 | |
| 180 | LOCAL_MODULE_TAGS := optional |
| 181 | |
| 182 | include $(BUILD_SHARED_LIBRARY) |
| 183 | |
| 184 | endif |