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 | |
| 33 | ifneq ($(strip $(AUDIO_FEATURE_DISABLED_ANC_HEADSET)),true) |
| 34 | LOCAL_CFLAGS += -DANC_HEADSET_ENABLED |
| 35 | endif |
| 36 | |
| 37 | ifneq ($(strip $(AUDIO_FEATURE_DISABLED_PROXY_DEVICE)),true) |
| 38 | LOCAL_CFLAGS += -DAFE_PROXY_ENABLED |
| 39 | endif |
| 40 | |
Apoorv Raghuvanshi | 6e26284 | 2013-10-06 14:39:35 -0700 | [diff] [blame] | 41 | ifneq ($(strip $(AUDIO_FEATURE_DISABLED_FM)),true) |
| 42 | LOCAL_CFLAGS += -DFM_ENABLED |
| 43 | LOCAL_SRC_FILES += audio_extn/fm.c |
| 44 | endif |
| 45 | |
Apoorv Raghuvanshi | 5792d4b | 2013-10-07 18:40:05 -0700 | [diff] [blame] | 46 | ifneq ($(strip $(AUDIO_FEATURE_DISABLED_USBAUDIO)),true) |
| 47 | LOCAL_CFLAGS += -DUSB_HEADSET_ENABLED |
| 48 | LOCAL_SRC_FILES += audio_extn/usb.c |
| 49 | endif |
| 50 | |
Apoorv Raghuvanshi | 6178a3f | 2013-10-19 12:38:54 -0700 | [diff] [blame] | 51 | ifneq ($(strip $(AUDIO_FEATURE_DISABLED_SSR)),true) |
| 52 | LOCAL_CFLAGS += -DSSR_ENABLED |
| 53 | LOCAL_SRC_FILES += audio_extn/ssr.c |
| 54 | LOCAL_C_INCLUDES += $(TARGET_OUT_HEADERS)/mm-audio/surround_sound/ |
| 55 | endif |
| 56 | |
Shiv Maliyappanahalli | 303f51d | 2013-10-25 16:24:27 -0700 | [diff] [blame] | 57 | ifneq ($(strip $(AUDIO_FEATURE_DISABLED_MULTI_VOICE_SESSIONS)),true) |
| 58 | LOCAL_CFLAGS += -DMULTI_VOICE_SESSION_ENABLED |
| 59 | LOCAL_SRC_FILES += voice_extn/voice_extn.c |
Shiv Maliyappanahalli | 303f51d | 2013-10-25 16:24:27 -0700 | [diff] [blame] | 60 | LOCAL_C_INCLUDES += $(TARGET_OUT_INTERMEDIATES)/KERNEL_OBJ/usr/include |
| 61 | |
| 62 | ifneq ($(strip $(AUDIO_FEATURE_DISABLED_INCALL_MUSIC)),true) |
| 63 | LOCAL_CFLAGS += -DINCALL_MUSIC_ENABLED |
| 64 | endif |
Narsinga Rao Chella | 05573b7 | 2013-11-15 15:21:40 -0800 | [diff] [blame] | 65 | |
| 66 | ifneq ($(strip $(AUDIO_FEATURE_DISABLED_COMPRESS_VOIP)),true) |
| 67 | LOCAL_CFLAGS += -DCOMPRESS_VOIP_ENABLED |
| 68 | LOCAL_SRC_FILES += voice_extn/compress_voip.c |
| 69 | endif |
Gopikrishnaiah Anandan | f538cef | 2013-10-28 14:06:03 -0700 | [diff] [blame] | 70 | endif |
Shiv Maliyappanahalli | 303f51d | 2013-10-25 16:24:27 -0700 | [diff] [blame] | 71 | |
Gopikrishnaiah Anandan | f538cef | 2013-10-28 14:06:03 -0700 | [diff] [blame] | 72 | ifneq ($(strip, $(AUDIO_FEATURE_DISABLED_SPKR_PROTECTION)),true) |
| 73 | ifneq ($(filter msm8974,$(TARGET_BOARD_PLATFORM)),) |
| 74 | LOCAL_CFLAGS += -DSPKR_PROT_ENABLED |
| 75 | LOCAL_SRC_FILES += audio_extn/spkr_protection.c |
| 76 | LOCAL_C_INCLUDES += $(TARGET_OUT_INTERMEDIATES)/KERNEL_OBJ/usr/include |
| 77 | endif |
Shiv Maliyappanahalli | 303f51d | 2013-10-25 16:24:27 -0700 | [diff] [blame] | 78 | endif |
| 79 | |
Ravi Kumar Alamanda | 48c921d | 2013-10-29 06:07:44 -0700 | [diff] [blame] | 80 | ifdef MULTIPLE_HW_VARIANTS_ENABLED |
| 81 | LOCAL_CFLAGS += -DHW_VARIANTS_ENABLED |
| 82 | LOCAL_SRC_FILES += $(AUDIO_PLATFORM)/hw_info.c |
| 83 | endif |
| 84 | |
Mingming Yin | e62d784 | 2013-10-25 16:26:03 -0700 | [diff] [blame^] | 85 | ifneq ($(strip $(AUDIO_FEATURE_DISABLED_COMPRESS_CAPTURE)),true) |
| 86 | LOCAL_CFLAGS += -DCOMPRESS_CAPTURE_ENABLED |
| 87 | LOCAL_SRC_FILES += audio_extn/compress_capture.c |
| 88 | endif |
| 89 | |
Ravi Kumar Alamanda | 2dfba2b | 2013-01-17 16:50:22 -0800 | [diff] [blame] | 90 | LOCAL_SHARED_LIBRARIES := \ |
| 91 | liblog \ |
| 92 | libcutils \ |
| 93 | libtinyalsa \ |
Ravi Kumar Alamanda | 4e02e55 | 2013-07-17 15:22:04 -0700 | [diff] [blame] | 94 | libtinycompress \ |
Ravi Kumar Alamanda | 2dfba2b | 2013-01-17 16:50:22 -0800 | [diff] [blame] | 95 | libaudioroute \ |
| 96 | libdl |
| 97 | |
| 98 | LOCAL_C_INCLUDES += \ |
| 99 | external/tinyalsa/include \ |
Ravi Kumar Alamanda | 4e02e55 | 2013-07-17 15:22:04 -0700 | [diff] [blame] | 100 | external/tinycompress/include \ |
Ravi Kumar Alamanda | f70ffb4 | 2013-04-16 15:55:53 -0700 | [diff] [blame] | 101 | $(call include-path-for, audio-route) \ |
Eric Laurent | b23d528 | 2013-05-14 15:27:20 -0700 | [diff] [blame] | 102 | $(call include-path-for, audio-effects) \ |
Apoorv Raghuvanshi | 9eaf94e | 2013-10-04 16:13:44 -0700 | [diff] [blame] | 103 | $(LOCAL_PATH)/$(AUDIO_PLATFORM) \ |
Narsinga Rao Chella | 05573b7 | 2013-11-15 15:21:40 -0800 | [diff] [blame] | 104 | $(LOCAL_PATH)/audio_extn \ |
| 105 | $(LOCAL_PATH)/voice_extn |
Ravi Kumar Alamanda | 2dfba2b | 2013-01-17 16:50:22 -0800 | [diff] [blame] | 106 | |
Kiran Kandi | 910e186 | 2013-10-29 13:29:42 -0700 | [diff] [blame] | 107 | ifeq ($(strip $(AUDIO_FEATURE_ENABLED_LISTEN)),true) |
| 108 | LOCAL_CFLAGS += -DAUDIO_LISTEN_ENABLED |
| 109 | LOCAL_C_INCLUDES += $(TARGET_OUT_HEADERS)/mm-audio/audio-listen |
| 110 | LOCAL_SRC_FILES += audio_extn/listen.c |
| 111 | endif |
| 112 | |
Damir Didjusto | f1d46c7 | 2013-11-06 17:59:04 -0800 | [diff] [blame] | 113 | ifeq ($(strip $(AUDIO_FEATURE_ENABLED_AUXPCM_BT)),true) |
| 114 | LOCAL_CFLAGS += -DAUXPCM_BT_ENABLED |
| 115 | endif |
| 116 | |
Mingming Yin | 8e5a4f6 | 2013-10-07 15:23:41 -0700 | [diff] [blame] | 117 | LOCAL_MODULE := audio.primary.$(TARGET_BOARD_PLATFORM) |
Ravi Kumar Alamanda | 2dfba2b | 2013-01-17 16:50:22 -0800 | [diff] [blame] | 118 | |
| 119 | LOCAL_MODULE_PATH := $(TARGET_OUT_SHARED_LIBRARIES)/hw |
| 120 | |
| 121 | LOCAL_MODULE_TAGS := optional |
| 122 | |
| 123 | include $(BUILD_SHARED_LIBRARY) |
| 124 | |
| 125 | endif |