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