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 | |
Naresh Tanniru | db72d1e | 2014-03-05 17:33:47 +0530 | [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 | |
Naresh Tanniru | db72d1e | 2014-03-05 17:33:47 +0530 | [diff] [blame] | 26 | ifneq ($(filter msm8916,$(TARGET_BOARD_PLATFORM)),) |
| 27 | AUDIO_PLATFORM = msm8916 |
| 28 | MULTIPLE_HW_VARIANTS_ENABLED := true |
| 29 | LOCAL_CFLAGS := -DPLATFORM_MSM8916 |
| 30 | endif |
Naresh Tanniru | 8b919ac | 2014-01-30 19:12:53 +0530 | [diff] [blame] | 31 | |
Ravi Kumar Alamanda | 2dfba2b | 2013-01-17 16:50:22 -0800 | [diff] [blame] | 32 | LOCAL_SRC_FILES := \ |
| 33 | audio_hw.c \ |
Shiv Maliyappanahalli | 34b585f | 2013-10-01 15:49:05 -0700 | [diff] [blame] | 34 | voice.c \ |
Ben Romberger | 61764e3 | 2014-01-10 13:49:02 -0800 | [diff] [blame] | 35 | platform_info.c \ |
Ajay Dudani | be3335a | 2013-08-19 18:47:21 -0700 | [diff] [blame] | 36 | $(AUDIO_PLATFORM)/platform.c |
Ravi Kumar Alamanda | 2dfba2b | 2013-01-17 16:50:22 -0800 | [diff] [blame] | 37 | |
Apoorv Raghuvanshi | 9eaf94e | 2013-10-04 16:13:44 -0700 | [diff] [blame] | 38 | LOCAL_SRC_FILES += audio_extn/audio_extn.c |
| 39 | |
| 40 | ifneq ($(strip $(AUDIO_FEATURE_DISABLED_ANC_HEADSET)),true) |
| 41 | LOCAL_CFLAGS += -DANC_HEADSET_ENABLED |
| 42 | endif |
| 43 | |
Venkata Narendra Kumar Gutta | 88fd0bc | 2014-03-27 19:47:56 +0530 | [diff] [blame^] | 44 | ifneq ($(strip $(AUDIO_FEATURE_DISABLED_FLUENCE)),true) |
| 45 | LOCAL_CFLAGS += -DFLUENCE_ENABLED |
| 46 | endif |
| 47 | |
Apoorv Raghuvanshi | 9eaf94e | 2013-10-04 16:13:44 -0700 | [diff] [blame] | 48 | ifneq ($(strip $(AUDIO_FEATURE_DISABLED_PROXY_DEVICE)),true) |
| 49 | LOCAL_CFLAGS += -DAFE_PROXY_ENABLED |
| 50 | endif |
| 51 | |
Apoorv Raghuvanshi | 6e26284 | 2013-10-06 14:39:35 -0700 | [diff] [blame] | 52 | ifneq ($(strip $(AUDIO_FEATURE_DISABLED_FM)),true) |
| 53 | LOCAL_CFLAGS += -DFM_ENABLED |
| 54 | LOCAL_SRC_FILES += audio_extn/fm.c |
| 55 | endif |
| 56 | |
Apoorv Raghuvanshi | 5792d4b | 2013-10-07 18:40:05 -0700 | [diff] [blame] | 57 | ifneq ($(strip $(AUDIO_FEATURE_DISABLED_USBAUDIO)),true) |
| 58 | LOCAL_CFLAGS += -DUSB_HEADSET_ENABLED |
| 59 | LOCAL_SRC_FILES += audio_extn/usb.c |
| 60 | endif |
Vimal Puthanveed | 5b4d3f1 | 2013-11-05 15:57:39 -0800 | [diff] [blame] | 61 | ifneq ($(strip $(AUDIO_FEATURE_DISABLED_HFP)),true) |
| 62 | LOCAL_CFLAGS += -DHFP_ENABLED |
| 63 | LOCAL_SRC_FILES += audio_extn/hfp.c |
| 64 | endif |
Apoorv Raghuvanshi | 5792d4b | 2013-10-07 18:40:05 -0700 | [diff] [blame] | 65 | |
Jitendra Singh Naruka | 9a6a8d4 | 2014-02-10 20:07:12 -0800 | [diff] [blame] | 66 | ifneq ($(strip $(AUDIO_FEATURE_DISABLED_CUSTOMSTEREO)),true) |
| 67 | LOCAL_CFLAGS += -DCUSTOM_STEREO_ENABLED |
| 68 | endif |
| 69 | |
Apoorv Raghuvanshi | 6178a3f | 2013-10-19 12:38:54 -0700 | [diff] [blame] | 70 | ifneq ($(strip $(AUDIO_FEATURE_DISABLED_SSR)),true) |
| 71 | LOCAL_CFLAGS += -DSSR_ENABLED |
| 72 | LOCAL_SRC_FILES += audio_extn/ssr.c |
| 73 | LOCAL_C_INCLUDES += $(TARGET_OUT_HEADERS)/mm-audio/surround_sound/ |
| 74 | endif |
| 75 | |
Shiv Maliyappanahalli | 303f51d | 2013-10-25 16:24:27 -0700 | [diff] [blame] | 76 | ifneq ($(strip $(AUDIO_FEATURE_DISABLED_MULTI_VOICE_SESSIONS)),true) |
| 77 | LOCAL_CFLAGS += -DMULTI_VOICE_SESSION_ENABLED |
| 78 | LOCAL_SRC_FILES += voice_extn/voice_extn.c |
Shiv Maliyappanahalli | 303f51d | 2013-10-25 16:24:27 -0700 | [diff] [blame] | 79 | LOCAL_C_INCLUDES += $(TARGET_OUT_INTERMEDIATES)/KERNEL_OBJ/usr/include |
Nagender | 44733a4 | 2013-12-08 00:05:20 -0700 | [diff] [blame] | 80 | LOCAL_ADDITIONAL_DEPENDENCIES += $(TARGET_OUT_INTERMEDIATES)/KERNEL_OBJ/usr |
Shiv Maliyappanahalli | 303f51d | 2013-10-25 16:24:27 -0700 | [diff] [blame] | 81 | |
| 82 | ifneq ($(strip $(AUDIO_FEATURE_DISABLED_INCALL_MUSIC)),true) |
| 83 | LOCAL_CFLAGS += -DINCALL_MUSIC_ENABLED |
| 84 | endif |
Narsinga Rao Chella | 05573b7 | 2013-11-15 15:21:40 -0800 | [diff] [blame] | 85 | |
| 86 | ifneq ($(strip $(AUDIO_FEATURE_DISABLED_COMPRESS_VOIP)),true) |
| 87 | LOCAL_CFLAGS += -DCOMPRESS_VOIP_ENABLED |
| 88 | LOCAL_SRC_FILES += voice_extn/compress_voip.c |
| 89 | endif |
Gopikrishnaiah Anandan | f538cef | 2013-10-28 14:06:03 -0700 | [diff] [blame] | 90 | endif |
Shiv Maliyappanahalli | 303f51d | 2013-10-25 16:24:27 -0700 | [diff] [blame] | 91 | |
Gopikrishnaiah Anandan | f538cef | 2013-10-28 14:06:03 -0700 | [diff] [blame] | 92 | ifneq ($(strip, $(AUDIO_FEATURE_DISABLED_SPKR_PROTECTION)),true) |
| 93 | ifneq ($(filter msm8974,$(TARGET_BOARD_PLATFORM)),) |
| 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 | endif |
| 100 | |
Ravi Kumar Alamanda | 48c921d | 2013-10-29 06:07:44 -0700 | [diff] [blame] | 101 | ifdef MULTIPLE_HW_VARIANTS_ENABLED |
| 102 | LOCAL_CFLAGS += -DHW_VARIANTS_ENABLED |
| 103 | LOCAL_SRC_FILES += $(AUDIO_PLATFORM)/hw_info.c |
| 104 | endif |
| 105 | |
Mingming Yin | e62d784 | 2013-10-25 16:26:03 -0700 | [diff] [blame] | 106 | ifneq ($(strip $(AUDIO_FEATURE_DISABLED_COMPRESS_CAPTURE)),true) |
| 107 | LOCAL_CFLAGS += -DCOMPRESS_CAPTURE_ENABLED |
| 108 | LOCAL_SRC_FILES += audio_extn/compress_capture.c |
| 109 | endif |
| 110 | |
Mingming Yin | 9031010 | 2013-11-13 16:57:00 -0800 | [diff] [blame] | 111 | ifneq ($(strip $(AUDIO_FEATURE_DISABLED_DS1_DOLBY_DDP)),true) |
| 112 | LOCAL_CFLAGS += -DDS1_DOLBY_DDP_ENABLED |
| 113 | LOCAL_C_INCLUDES += $(TARGET_OUT_INTERMEDIATES)/KERNEL_OBJ/usr/include |
Nagender | 44733a4 | 2013-12-08 00:05:20 -0700 | [diff] [blame] | 114 | LOCAL_ADDITIONAL_DEPENDENCIES += $(TARGET_OUT_INTERMEDIATES)/KERNEL_OBJ/usr |
Subhash Chandra Bose Naripeddy | 7690c56 | 2013-12-14 00:34:53 -0800 | [diff] [blame] | 115 | LOCAL_SRC_FILES += audio_extn/dolby.c |
Mingming Yin | 9031010 | 2013-11-13 16:57:00 -0800 | [diff] [blame] | 116 | endif |
| 117 | |
Subhash Chandra Bose Naripeddy | 7690c56 | 2013-12-14 00:34:53 -0800 | [diff] [blame] | 118 | ifneq ($(strip $(AUDIO_FEATURE_DISABLED_DS1_DOLBY_DAP)),true) |
| 119 | LOCAL_CFLAGS += -DDS1_DOLBY_DAP_ENABLED |
| 120 | ifeq ($(strip $(AUDIO_FEATURE_DISABLED_DS1_DOLBY_DDP)),true) |
| 121 | LOCAL_SRC_FILES += audio_extn/dolby.c |
| 122 | endif |
| 123 | endif |
| 124 | |
| 125 | |
Ravi Kumar Alamanda | 2dfba2b | 2013-01-17 16:50:22 -0800 | [diff] [blame] | 126 | LOCAL_SHARED_LIBRARIES := \ |
| 127 | liblog \ |
| 128 | libcutils \ |
| 129 | libtinyalsa \ |
Ravi Kumar Alamanda | 4e02e55 | 2013-07-17 15:22:04 -0700 | [diff] [blame] | 130 | libtinycompress \ |
Ravi Kumar Alamanda | 2dfba2b | 2013-01-17 16:50:22 -0800 | [diff] [blame] | 131 | libaudioroute \ |
Ben Romberger | 61764e3 | 2014-01-10 13:49:02 -0800 | [diff] [blame] | 132 | libdl \ |
Helen Zeng | 008aebd | 2014-02-23 19:13:12 -0800 | [diff] [blame] | 133 | libexpat \ |
| 134 | libmdmdetect |
Ravi Kumar Alamanda | 2dfba2b | 2013-01-17 16:50:22 -0800 | [diff] [blame] | 135 | |
| 136 | LOCAL_C_INCLUDES += \ |
| 137 | external/tinyalsa/include \ |
Ravi Kumar Alamanda | 4e02e55 | 2013-07-17 15:22:04 -0700 | [diff] [blame] | 138 | external/tinycompress/include \ |
Ben Romberger | 61764e3 | 2014-01-10 13:49:02 -0800 | [diff] [blame] | 139 | external/expat/lib \ |
Ravi Kumar Alamanda | f70ffb4 | 2013-04-16 15:55:53 -0700 | [diff] [blame] | 140 | $(call include-path-for, audio-route) \ |
Eric Laurent | b23d528 | 2013-05-14 15:27:20 -0700 | [diff] [blame] | 141 | $(call include-path-for, audio-effects) \ |
Apoorv Raghuvanshi | 9eaf94e | 2013-10-04 16:13:44 -0700 | [diff] [blame] | 142 | $(LOCAL_PATH)/$(AUDIO_PLATFORM) \ |
Narsinga Rao Chella | 05573b7 | 2013-11-15 15:21:40 -0800 | [diff] [blame] | 143 | $(LOCAL_PATH)/audio_extn \ |
Helen Zeng | 008aebd | 2014-02-23 19:13:12 -0800 | [diff] [blame] | 144 | $(LOCAL_PATH)/voice_extn \ |
| 145 | $(TARGET_OUT_HEADERS)/libmdmdetect/inc |
Ravi Kumar Alamanda | 2dfba2b | 2013-01-17 16:50:22 -0800 | [diff] [blame] | 146 | |
Kiran Kandi | 910e186 | 2013-10-29 13:29:42 -0700 | [diff] [blame] | 147 | ifeq ($(strip $(AUDIO_FEATURE_ENABLED_LISTEN)),true) |
| 148 | LOCAL_CFLAGS += -DAUDIO_LISTEN_ENABLED |
| 149 | LOCAL_C_INCLUDES += $(TARGET_OUT_HEADERS)/mm-audio/audio-listen |
| 150 | LOCAL_SRC_FILES += audio_extn/listen.c |
| 151 | endif |
| 152 | |
Damir Didjusto | f1d46c7 | 2013-11-06 17:59:04 -0800 | [diff] [blame] | 153 | ifeq ($(strip $(AUDIO_FEATURE_ENABLED_AUXPCM_BT)),true) |
| 154 | LOCAL_CFLAGS += -DAUXPCM_BT_ENABLED |
| 155 | endif |
| 156 | |
Mingming Yin | 8e5a4f6 | 2013-10-07 15:23:41 -0700 | [diff] [blame] | 157 | LOCAL_MODULE := audio.primary.$(TARGET_BOARD_PLATFORM) |
Ravi Kumar Alamanda | 2dfba2b | 2013-01-17 16:50:22 -0800 | [diff] [blame] | 158 | |
| 159 | LOCAL_MODULE_PATH := $(TARGET_OUT_SHARED_LIBRARIES)/hw |
| 160 | |
| 161 | LOCAL_MODULE_TAGS := optional |
| 162 | |
| 163 | include $(BUILD_SHARED_LIBRARY) |
| 164 | |
| 165 | endif |