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