blob: f20105c562da0d622e52a5f28658b137e256e71d [file] [log] [blame]
Ravi Kumar Alamanda2dfba2b2013-01-17 16:50:22 -08001ifeq ($(strip $(BOARD_USES_ALSA_AUDIO)),true)
2
3LOCAL_PATH := $(call my-dir)
4
5include $(CLEAR_VARS)
6
7LOCAL_ARM_MODE := arm
8
Ajay Dudanibe3335a2013-08-19 18:47:21 -07009AUDIO_PLATFORM := $(TARGET_BOARD_PLATFORM)
Ravi Kumar Alamanda48c921d2013-10-29 06:07:44 -070010
David Nga5ad5ea2013-10-10 20:36:49 -070011ifneq ($(filter msm8974 msm8226 msm8610 apq8084,$(TARGET_BOARD_PLATFORM)),)
Ajay Dudanibe3335a2013-08-19 18:47:21 -070012 # B-family platform uses msm8974 code base
13 AUDIO_PLATFORM = msm8974
Ravi Kumar Alamanda48c921d2013-10-29 06:07:44 -070014 MULTIPLE_HW_VARIANTS_ENABLED := true
Mingming Yin8e5a4f62013-10-07 15:23:41 -070015ifneq ($(filter msm8610,$(TARGET_BOARD_PLATFORM)),)
16 LOCAL_CFLAGS := -DPLATFORM_MSM8610
17endif
Shiv Maliyappanahalli34b585f2013-10-01 15:49:05 -070018ifneq ($(filter msm8226,$(TARGET_BOARD_PLATFORM)),)
19 LOCAL_CFLAGS := -DPLATFORM_MSM8x26
20endif
Ajay Dudanibe3335a2013-08-19 18:47:21 -070021endif
22
Ravi Kumar Alamanda2dfba2b2013-01-17 16:50:22 -080023LOCAL_SRC_FILES := \
24 audio_hw.c \
Shiv Maliyappanahalli34b585f2013-10-01 15:49:05 -070025 voice.c \
Ajay Dudanibe3335a2013-08-19 18:47:21 -070026 $(AUDIO_PLATFORM)/platform.c
Ravi Kumar Alamanda2dfba2b2013-01-17 16:50:22 -080027
Apoorv Raghuvanshi9eaf94e2013-10-04 16:13:44 -070028LOCAL_SRC_FILES += audio_extn/audio_extn.c
29
30ifneq ($(strip $(AUDIO_FEATURE_DISABLED_ANC_HEADSET)),true)
31 LOCAL_CFLAGS += -DANC_HEADSET_ENABLED
32endif
33
34ifneq ($(strip $(AUDIO_FEATURE_DISABLED_PROXY_DEVICE)),true)
35 LOCAL_CFLAGS += -DAFE_PROXY_ENABLED
36endif
37
Apoorv Raghuvanshi6e262842013-10-06 14:39:35 -070038ifneq ($(strip $(AUDIO_FEATURE_DISABLED_FM)),true)
39 LOCAL_CFLAGS += -DFM_ENABLED
40 LOCAL_SRC_FILES += audio_extn/fm.c
41endif
42
Apoorv Raghuvanshi5792d4b2013-10-07 18:40:05 -070043ifneq ($(strip $(AUDIO_FEATURE_DISABLED_USBAUDIO)),true)
44 LOCAL_CFLAGS += -DUSB_HEADSET_ENABLED
45 LOCAL_SRC_FILES += audio_extn/usb.c
46endif
47
Apoorv Raghuvanshi6178a3f2013-10-19 12:38:54 -070048ifneq ($(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/
52endif
53
Shiv Maliyappanahalli303f51d2013-10-25 16:24:27 -070054ifneq ($(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
60ifneq ($(strip $(AUDIO_FEATURE_DISABLED_INCALL_MUSIC)),true)
61 LOCAL_CFLAGS += -DINCALL_MUSIC_ENABLED
62endif
63
64endif
65
Ravi Kumar Alamanda48c921d2013-10-29 06:07:44 -070066ifdef MULTIPLE_HW_VARIANTS_ENABLED
67 LOCAL_CFLAGS += -DHW_VARIANTS_ENABLED
68 LOCAL_SRC_FILES += $(AUDIO_PLATFORM)/hw_info.c
69endif
70
Ravi Kumar Alamanda2dfba2b2013-01-17 16:50:22 -080071LOCAL_SHARED_LIBRARIES := \
72 liblog \
73 libcutils \
74 libtinyalsa \
Ravi Kumar Alamanda4e02e552013-07-17 15:22:04 -070075 libtinycompress \
Ravi Kumar Alamanda2dfba2b2013-01-17 16:50:22 -080076 libaudioroute \
77 libdl
78
79LOCAL_C_INCLUDES += \
80 external/tinyalsa/include \
Ravi Kumar Alamanda4e02e552013-07-17 15:22:04 -070081 external/tinycompress/include \
Ravi Kumar Alamandaf70ffb42013-04-16 15:55:53 -070082 $(call include-path-for, audio-route) \
Eric Laurentb23d5282013-05-14 15:27:20 -070083 $(call include-path-for, audio-effects) \
Apoorv Raghuvanshi9eaf94e2013-10-04 16:13:44 -070084 $(LOCAL_PATH)/$(AUDIO_PLATFORM) \
85 $(LOCAL_PATH)/audio_extn
Ravi Kumar Alamanda2dfba2b2013-01-17 16:50:22 -080086
Kiran Kandi910e1862013-10-29 13:29:42 -070087ifeq ($(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
91endif
92
Damir Didjustof1d46c72013-11-06 17:59:04 -080093ifeq ($(strip $(AUDIO_FEATURE_ENABLED_AUXPCM_BT)),true)
94 LOCAL_CFLAGS += -DAUXPCM_BT_ENABLED
95endif
96
Mingming Yin8e5a4f62013-10-07 15:23:41 -070097LOCAL_MODULE := audio.primary.$(TARGET_BOARD_PLATFORM)
Ravi Kumar Alamanda2dfba2b2013-01-17 16:50:22 -080098
99LOCAL_MODULE_PATH := $(TARGET_OUT_SHARED_LIBRARIES)/hw
100
101LOCAL_MODULE_TAGS := optional
102
103include $(BUILD_SHARED_LIBRARY)
104
105endif