summaryrefslogtreecommitdiff
path: root/Android.mk (plain)
blob: b58dac846bf7f96865143ebbf23143dfe4dadd51
1# Copyright (C) 2011 The Android Open Source Project
2#
3# Licensed under the Apache License, Version 2.0 (the "License");
4# you may not use this file except in compliance with the License.
5# You may obtain a copy of the License at
6#
7# http://www.apache.org/licenses/LICENSE-2.0
8#
9# Unless required by applicable law or agreed to in writing, software
10# distributed under the License is distributed on an "AS IS" BASIS,
11# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12# See the License for the specific language governing permissions and
13# limitations under the License.
14
15ifeq ($(strip $(BOARD_ALSA_AUDIO)),tiny)
16
17 LOCAL_PATH := $(call my-dir)
18
19# The default audio HAL module, which is a stub, that is loaded if no other
20# device specific modules are present. The exact load order can be seen in
21# libhardware/hardware.c
22#
23# The format of the name is audio.<type>.<hardware/etc>.so where the only
24# required type is 'primary'. Other possibilites are 'a2dp', 'usb', etc.
25 include $(CLEAR_VARS)
26
27 LOCAL_MODULE := audio.primary.amlogic
28 ifeq ($(shell test $(PLATFORM_SDK_VERSION) -ge 26 && echo OK),OK)
29 LOCAL_PROPRIETARY_MODULE := true
30 endif
31 LOCAL_MODULE_RELATIVE_PATH := hw
32 LOCAL_SRC_FILES := \
33 audio_hw.c \
34 audio_virtual_effect.c \
35 libTVaudio/audio/audio_effect_control.c \
36 audio_hw_utils.c \
37 audio_hwsync.c \
38 spdifenc_wrap.cpp \
39 audio_hw_profile.c
40 LOCAL_C_INCLUDES += \
41 external/tinyalsa/include \
42 system/media/audio_utils/include \
43 system/media/audio_effects/include \
44 system/media/audio_route/include \
45 frameworks/av/media/libeffects/lvm/lib/StereoWidening/lib \
46 frameworks/av/media/libeffects/lvm/lib/StereoWidening/src \
47 frameworks/av/media/libeffects/lvm/lib/Common/lib \
48 frameworks/av/media/libeffects/lvm/lib/Common/src \
49 libTVaudio/audio
50 LOCAL_STATIC_LIBRARIES += libmusicbundle
51
52 LOCAL_LDFLAGS_arm += $(LOCAL_PATH)/rcaudio/audio.bt.remote-arm.a
53 LOCAL_LDFLAGS_arm64 += $(LOCAL_PATH)/rcaudio/audio.bt.remote-arm64.a
54
55 LOCAL_SHARED_LIBRARIES := \
56 liblog libcutils libtinyalsa \
57 libaudioutils libdl libaudioroute libutils \
58 libaudiospdif
59 LOCAL_MODULE_TAGS := optional
60
61 include $(BUILD_SHARED_LIBRARY)
62
63#build for USB audio
64 ifeq ($(strip $(BOARD_USE_USB_AUDIO)),true)
65 include $(CLEAR_VARS)
66
67 LOCAL_MODULE := audio.usb.amlogic
68 ifeq ($(shell test $(PLATFORM_SDK_VERSION) -ge 26 && echo OK),OK)
69 LOCAL_PROPRIETARY_MODULE := true
70 endif
71 LOCAL_MODULE_RELATIVE_PATH := hw
72 LOCAL_SRC_FILES := \
73 usb_audio_hw.c \
74 audio_resampler.c
75 LOCAL_C_INCLUDES += \
76 external/tinyalsa/include \
77 system/media/audio_utils/include
78 LOCAL_SHARED_LIBRARIES := liblog libcutils libtinyalsa libaudioutils libutils
79 LOCAL_MODULE_TAGS := optional
80
81 include $(BUILD_SHARED_LIBRARY)
82 endif # BOARD_USE_USB_AUDIO
83
84#build for hdmi audio HAL
85 ifeq ($(strip $(BOARD_USE_HDMI_HAL)),true)
86 include $(CLEAR_VARS)
87
88 LOCAL_MODULE := audio.hdmi.amlogic
89 ifeq ($(shell test $(PLATFORM_SDK_VERSION) -ge 26 && echo OK),OK)
90 LOCAL_PROPRIETARY_MODULE := true
91 endif
92 LOCAL_MODULE_RELATIVE_PATH := hw
93 LOCAL_SRC_FILES := \
94 hdmi_audio_hw.c
95 LOCAL_C_INCLUDES += \
96 external/tinyalsa/include \
97 system/media/audio_effects/include \
98 system/media/audio_utils/include
99
100 LOCAL_SHARED_LIBRARIES := liblog libcutils libtinyalsa libaudioutils libutils
101#ifdef DOLBY_UDC_PASSTHROUGH_HDMI_PACK
102 LOCAL_SRC_FILES += spdifenc_wrap.cpp
103 LOCAL_C_INCLUDES += \
104 $(call include-path-for, audio-utils)
105 LOCAL_SHARED_LIBRARIES += \
106 libaudiospdif
107#endif # DOLBY_UDC_PASSTHROUGH_HDMI_PACK
108 ifdef DOLBY_EAC3_TO_AC3_CONVERTER
109 LOCAL_SHARED_LIBRARIES += \
110 libdlb_converter
111 endif # DOLBY_EAC3_TO_AC3_CONVERTER
112 LOCAL_SRC_FILES += audio_hw_profile.c
113 LOCAL_SRC_FILES += audio_hw_utils.c
114 LOCAL_SRC_FILES += audio_hwsync.c
115 LOCAL_MODULE_TAGS := optional
116 include $(BUILD_SHARED_LIBRARY)
117 endif # BOARD_USE_HDMI_HAL
118endif # BOARD_ALSA_AUDIO
119
120#########################################################
121# Audio Policy Manager
122ifeq ($(USE_CUSTOM_AUDIO_POLICY),1)
123include $(CLEAR_VARS)
124
125LOCAL_SRC_FILES := \
126 DLGAudioPolicyManager.cpp
127
128LOCAL_SHARED_LIBRARIES := \
129 libcutils \
130 liblog \
131 libutils \
132 libmedia \
133 libbinder \
134 libaudiopolicymanagerdefault \
135 libutils \
136 libaudioclient \
137 libmedia_helper
138
139LOCAL_C_INCLUDES := \
140 external/tinyalsa/include \
141 $(TOPDIR)frameworks/av/services/audiopolicy \
142 $(TOPDIR)frameworks/av/services/audiopolicy/managerdefault \
143 $(TOPDIR)frameworks/av/services/audiopolicy/engine/interface \
144 $(TOPDIR)frameworks/av/services/audiopolicy/common/managerdefinitions/include \
145 $(TOPDIR)frameworks/av/services/audiopolicy/common/include \
146 $(TOPDIR)frameworks/av/media/libaudioclient/include
147
148LOCAL_MODULE := libaudiopolicymanager
149LOCAL_MODULE_TAGS := optional
150ifeq ($(shell test $(PLATFORM_SDK_VERSION) -ge 26 && echo OK),OK)
151 LOCAL_PROPRIETARY_MODULE := true
152endif
153include $(BUILD_SHARED_LIBRARY)
154endif # USE_CUSTOM_AUDIO_POLICY
155
156include $(call all-makefiles-under,$(LOCAL_PATH))
157