-
Notifications
You must be signed in to change notification settings - Fork 0
/
Android.mk
204 lines (168 loc) · 5.94 KB
/
Android.mk
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
ifneq ($(AUDIO_USE_STUB_HAL), true)
ifeq ($(TARGET_USES_QCOM_MM_AUDIO), true)
LOCAL_PATH := $(call my-dir)
PAL_BASE_PATH := $(call my-dir)
include $(CLEAR_VARS)
LOCAL_MODULE := libarpal_headers
LOCAL_VENDOR_MODULE := true
LOCAL_EXPORT_C_INCLUDE_DIRS := \
$(LOCAL_PATH) \
$(LOCAL_PATH)/stream/inc \
$(LOCAL_PATH)/device/inc \
$(LOCAL_PATH)/session/inc \
$(LOCAL_PATH)/resource_manager/inc \
$(LOCAL_PATH)/context_manager/inc \
$(LOCAL_PATH)/utils/inc \
$(LOCAL_PATH)/plugins/codecs
include $(BUILD_HEADER_LIBRARY)
ifneq ($(QCPATH),)
include $(CLEAR_VARS)
LOCAL_MODULE := libar-pal
LOCAL_MODULE_OWNER := qti
LOCAL_MODULE_TAGS := optional
LOCAL_VENDOR_MODULE := true
LOCAL_CFLAGS := -D_ANDROID_
LOCAL_CFLAGS += -Wno-macro-redefined
LOCAL_CFLAGS += -Wall -Werror -Wno-unused-variable -Wno-unused-parameter
LOCAL_CFLAGS += -DCONFIG_GSL
LOCAL_CFLAGS += -D_GNU_SOURCE
LOCAL_CFLAGS += -DPAL_SP_TEMP_PATH=\"/data/vendor/audio/audio.cal\"
LOCAL_CFLAGS += -DACD_SM_FILEPATH=\"/vendor/etc/models/acd/\"
LOCAL_CPPFLAGS += -fexceptions -frtti
LOCAL_C_INCLUDES := \
$(TOP)/system/media/audio_route/include \
$(TOP)/system/media/audio/include
ifneq ($(TARGET_KERNEL_VERSION), 3.18)
ifneq ($(TARGET_KERNEL_VERSION), 4.14)
ifneq ($(TARGET_KERNEL_VERSION), 4.19)
ifneq ($(TARGET_KERNEL_VERSION), 4.4)
ifneq ($(TARGET_KERNEL_VERSION), 4.9)
ifneq ($(TARGET_KERNEL_VERSION), 5.4)
LOCAL_CFLAGS += -DADSP_SLEEP_MONITOR
LOCAL_C_INCLUDES += $(TOP)/kernel_platform/msm-kernel/include/uapi/misc
endif
endif
endif
endif
endif
endif
ifeq ($(strip $(AUDIO_FEATURE_ENABLED_EC_REF_CAPTURE)),true)
LOCAL_CFLAGS += -DEC_REF_CAPTURE_ENABLED
endif
LOCAL_C_INCLUDES += $(TARGET_OUT_INTERMEDIATES)/KERNEL_OBJ/usr/include
LOCAL_C_INCLUDES += $(TARGET_OUT_INTERMEDIATES)/KERNEL_OBJ/usr/techpack/audio/include
LOCAL_ADDITIONAL_DEPENDENCIES += $(TARGET_OUT_INTERMEDIATES)/KERNEL_OBJ/usr
LOCAL_EXPORT_C_INCLUDE_DIRS := $(LOCAL_PATH)
LOCAL_SRC_FILES := \
Pal.cpp \
stream/src/Stream.cpp \
stream/src/StreamCompress.cpp \
stream/src/StreamPCM.cpp \
stream/src/StreamInCall.cpp \
stream/src/StreamNonTunnel.cpp \
stream/src/StreamSoundTrigger.cpp \
stream/src/StreamACD.cpp \
stream/src/StreamCommon.cpp \
stream/src/StreamContextProxy.cpp \
stream/src/StreamUltraSound.cpp \
stream/src/StreamSensorPCMData.cpp\
device/src/Headphone.cpp \
device/src/USBAudio.cpp \
device/src/Device.cpp \
device/src/Speaker.cpp \
device/src/Bluetooth.cpp \
device/src/SpeakerMic.cpp \
device/src/HeadsetMic.cpp \
device/src/HandsetMic.cpp \
device/src/Handset.cpp \
device/src/HandsetVaMic.cpp \
device/src/DisplayPort.cpp \
device/src/HeadsetVaMic.cpp \
device/src/RTProxy.cpp \
device/src/SpeakerProtection.cpp \
device/src/FMDevice.cpp \
device/src/ExtEC.cpp \
device/src/HapticsDev.cpp \
device/src/UltrasoundDevice.cpp \
session/src/Session.cpp \
session/src/PayloadBuilder.cpp \
session/src/SessionAlsaPcm.cpp \
session/src/SessionAgm.cpp \
session/src/SessionAlsaUtils.cpp \
session/src/SessionAlsaCompress.cpp \
session/src/SessionAlsaVoice.cpp \
session/src/SoundTriggerEngine.cpp \
session/src/SoundTriggerEngineCapi.cpp \
session/src/SoundTriggerEngineGsl.cpp \
session/src/ContextDetectionEngine.cpp \
context_manager/src/ContextManager.cpp \
session/src/ACDEngine.cpp \
resource_manager/src/ResourceManager.cpp \
resource_manager/src/SndCardMonitor.cpp \
utils/src/SoundTriggerXmlParser.cpp \
utils/src/SoundTriggerPlatformInfo.cpp \
utils/src/ACDPlatformInfo.cpp \
utils/src/PalRingBuffer.cpp \
utils/src/SoundTriggerUtils.cpp \
utils/src/SignalHandler.cpp
ifeq ($(strip $(AUDIO_FEATURE_ENABLED_EC_REF_CAPTURE)),true)
LOCAL_SRC_FILES += device/src/ECRefDevice.cpp
endif
LOCAL_HEADER_LIBRARIES := \
libspf-headers \
libcapiv2_headers \
libagm_headers \
libacdb_headers \
libpal_headers
LOCAL_SHARED_LIBRARIES := \
libar-gsl\
liblog\
libexpat\
liblx-osal\
libaudioroute\
libcutils \
libagmclient
#if android version is R, use qtitinyxxx headers & libs, otherwise use upstream ones
#This assumes we would be using AR code only for Android R and subsequent versions.
ifneq ($(filter 11 R, $(PLATFORM_VERSION)),)
LOCAL_C_INCLUDES += $(TOP)/vendor/qcom/opensource/tinyalsa/include
LOCAL_C_INCLUDES += $(TOP)/vendor/qcom/opensource/tinycompress/include
LOCAL_SHARED_LIBRARIES += libqti-tinyalsa libqti-tinycompress
else
LOCAL_C_INCLUDES += $(TOP)/external/tinycompress/include
LOCAL_SHARED_LIBRARIES += libtinyalsa libtinycompress
endif
include $(BUILD_SHARED_LIBRARY)
endif
#-------------------------------------------
# Build CHARGER_LISTENER LIB
#-------------------------------------------
include $(CLEAR_VARS)
LOCAL_MODULE := libaudiochargerlistener
LOCAL_MODULE_OWNER := qti
LOCAL_MODULE_TAGS := optional
LOCAL_VENDOR_MODULE := true
LOCAL_SRC_FILES:= utils/src/ChargerListener.cpp
LOCAL_CFLAGS += -Wall -Werror -Wno-unused-function -Wno-unused-variable
LOCAL_SHARED_LIBRARIES += libcutils liblog
LOCAL_C_INCLUDES := $(LOCAL_PATH)/utils/inc
include $(BUILD_SHARED_LIBRARY)
include $(CLEAR_VARS)
LOCAL_USE_VNDK := true
LOCAL_C_INCLUDES := $(call project-path-for,qcom-audio)/pal
LOCAL_CFLAGS += -Wno-tautological-compare
LOCAL_CFLAGS += -Wno-macro-redefined
LOCAL_SRC_FILES := test/PalUsecaseTest.c \
test/PalTest_main.c
LOCAL_MODULE := PalTest
LOCAL_MODULE_OWNER := qti
LOCAL_MODULE_TAGS := optional
LOCAL_SHARED_LIBRARIES := \
libpalclient
LOCAL_VENDOR_MODULE := true
include $(BUILD_EXECUTABLE)
include $(CLEAR_VARS)
include $(PAL_BASE_PATH)/plugins/Android.mk
include $(PAL_BASE_PATH)/ipc/HwBinders/Android.mk
endif #TARGET_USES_QCOM_MM_AUDIO
endif #AUDIO_USE_STUB_HAL