blob: 076faed574646f2da2b0e9fd02a5eb9ebd4bc7ba [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)
Ajay Dudani89541032015-03-30 17:39:24 -070010ifneq ($(filter msm8974 msm8226 msm8084 msm8992 msm8994,$(TARGET_BOARD_PLATFORM)),)
Ajay Dudanibe3335a2013-08-19 18:47:21 -070011 # B-family platform uses msm8974 code base
12 AUDIO_PLATFORM = msm8974
Ravi Kumar Alamanda8e6e98f2013-11-05 15:57:39 -080013ifneq ($(filter msm8226,$(TARGET_BOARD_PLATFORM)),)
14 LOCAL_CFLAGS := -DPLATFORM_MSM8x26
15endif
Ravi Kumar Alamanda83281a92014-05-19 18:14:57 -070016ifneq ($(filter msm8084,$(TARGET_BOARD_PLATFORM)),)
17 LOCAL_CFLAGS := -DPLATFORM_MSM8084
18endif
Patrick Tjin11c2e2d2015-03-12 11:44:18 -070019ifneq ($(filter msm8992,$(TARGET_BOARD_PLATFORM)),)
20 LOCAL_CFLAGS := -DPLATFORM_MSM8994
21endif
22ifneq ($(filter msm8994,$(TARGET_BOARD_PLATFORM)),)
23 LOCAL_CFLAGS := -DPLATFORM_MSM8994
24endif
Ajay Dudanibe3335a2013-08-19 18:47:21 -070025endif
26
Ravi Kumar Alamanda2dfba2b2013-01-17 16:50:22 -080027LOCAL_SRC_FILES := \
28 audio_hw.c \
Vineeta Srivastava4b89e372014-06-19 14:21:42 -070029 voice.c \
Haynes Mathew George5bc18842014-06-16 16:36:20 -070030 platform_info.c \
Eric Laurent0499d4f2014-08-25 22:39:29 -050031 audio_extn/ext_speaker.c \
Ajay Dudanibe3335a2013-08-19 18:47:21 -070032 $(AUDIO_PLATFORM)/platform.c
Ravi Kumar Alamanda2dfba2b2013-01-17 16:50:22 -080033
34LOCAL_SHARED_LIBRARIES := \
35 liblog \
36 libcutils \
37 libtinyalsa \
Ravi Kumar Alamanda4e02e552013-07-17 15:22:04 -070038 libtinycompress \
Ravi Kumar Alamanda2dfba2b2013-01-17 16:50:22 -080039 libaudioroute \
Haynes Mathew George5bc18842014-06-16 16:36:20 -070040 libdl \
41 libexpat
Ravi Kumar Alamanda2dfba2b2013-01-17 16:50:22 -080042
43LOCAL_C_INCLUDES += \
44 external/tinyalsa/include \
Ravi Kumar Alamanda4e02e552013-07-17 15:22:04 -070045 external/tinycompress/include \
Ravi Kumar Alamandaf70ffb42013-04-16 15:55:53 -070046 $(call include-path-for, audio-route) \
Eric Laurentb23d5282013-05-14 15:27:20 -070047 $(call include-path-for, audio-effects) \
Ravi Kumar Alamanda8e6e98f2013-11-05 15:57:39 -080048 $(LOCAL_PATH)/$(AUDIO_PLATFORM) \
Vineeta Srivastava4b89e372014-06-19 14:21:42 -070049 $(LOCAL_PATH)/audio_extn \
Haynes Mathew George5bc18842014-06-16 16:36:20 -070050 $(LOCAL_PATH)/voice_extn \
51 external/expat/lib
Ravi Kumar Alamanda2dfba2b2013-01-17 16:50:22 -080052
Vineeta Srivastava4b89e372014-06-19 14:21:42 -070053ifeq ($(strip $(AUDIO_FEATURE_ENABLED_MULTI_VOICE_SESSIONS)),true)
54 LOCAL_CFLAGS += -DMULTI_VOICE_SESSION_ENABLED
55 LOCAL_SRC_FILES += voice_extn/voice_extn.c
56endif
57
Ravi Kumar Alamanda8e6e98f2013-11-05 15:57:39 -080058ifeq ($(strip $(AUDIO_FEATURE_ENABLED_HFP)),true)
59 LOCAL_CFLAGS += -DHFP_ENABLED
60 LOCAL_SRC_FILES += audio_extn/hfp.c
61endif
62
Uday Kishore Pasupuleti075842f2015-07-28 15:18:31 -070063ifeq ($(strip $(AUDIO_FEATURE_SUPPORTED_EXTERNAL_BT)),true)
64 LOCAL_CFLAGS += -DEXTERNAL_BT_SUPPORTED
65endif
66
Uday Kishore Pasupuleticec8ad82015-04-15 10:34:06 -070067ifeq ($(strip $(AUDIO_FEATURE_NO_AUDIO_OUT)),true)
68 LOCAL_CFLAGS += -DNO_AUDIO_OUT
69endif
70
Ravi Kumar Alamandaa417cc52015-05-01 16:41:56 -070071ifeq ($(strip $(BOARD_SUPPORTS_SOUND_TRIGGER)),true)
72 LOCAL_CFLAGS += -DSOUND_TRIGGER_ENABLED
73 LOCAL_CFLAGS += -DSOUND_TRIGGER_PLATFORM_NAME=$(TARGET_BOARD_PLATFORM)
74 LOCAL_C_INCLUDES += $(TARGET_OUT_HEADERS)/mm-audio/sound_trigger
75 LOCAL_SRC_FILES += audio_extn/soundtrigger.c
76endif
77
Ravi Kumar Alamanda63863002015-04-22 11:15:25 -070078ifeq ($(strip $(AUDIO_FEATURE_ENABLED_SPKR_PROTECTION)),true)
79 LOCAL_CFLAGS += -DSPKR_PROT_ENABLED
80 LOCAL_SRC_FILES += audio_extn/spkr_protection.c
81endif
82
zhaoyang yin4211fad2015-06-04 21:13:25 +080083ifeq ($(strip $(AUDIO_FEATURE_ENABLED_DSM_FEEDBACK)),true)
84 LOCAL_CFLAGS += -DDSM_FEEDBACK_ENABLED
85 LOCAL_SRC_FILES += audio_extn/dsm_feedback.c
86endif
87
Ravi Kumar Alamanda76315572015-04-23 13:13:56 -070088ifneq ($(filter msm8992 msm8994,$(TARGET_BOARD_PLATFORM)),)
89 # push codec/mad calibration to HW dep node
90 # applicable to msm8992/8994 or newer platforms
91 LOCAL_CFLAGS += -DHWDEP_CAL_ENABLED
92 LOCAL_SRC_FILES += audio_extn/hwdep_cal.c
93endif
94
Ravi Kumar Alamanda80e2d862014-05-05 16:00:33 -070095LOCAL_MODULE := audio.primary.$(TARGET_BOARD_PLATFORM)
Ravi Kumar Alamanda2dfba2b2013-01-17 16:50:22 -080096
Pat Tjin54f1e882015-04-13 14:19:21 -070097LOCAL_MODULE_RELATIVE_PATH := hw
Ravi Kumar Alamanda2dfba2b2013-01-17 16:50:22 -080098
99LOCAL_MODULE_TAGS := optional
100
101include $(BUILD_SHARED_LIBRARY)
102
103endif