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