summaryrefslogtreecommitdiff
path: root/Android.mk (plain)
blob: 3263e7ea9b55aaaf690cf606e5ea8ead50183857
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
51 LOCAL_STATIC_LIBRARIES += libmusicbundle
52
53 LOCAL_SHARED_LIBRARIES := \
54 liblog libcutils libtinyalsa \
55 libaudioutils libdl libaudioroute libutils \
56 libaudiospdif
57 LOCAL_MODULE_TAGS := optional
58
59 include $(BUILD_SHARED_LIBRARY)
60
61#build for USB audio
62 ifeq ($(strip $(BOARD_USE_USB_AUDIO)),true)
63 include $(CLEAR_VARS)
64
65 LOCAL_MODULE := audio.usb.amlogic
66 ifeq ($(shell test $(PLATFORM_SDK_VERSION) -ge 26 && echo OK),OK)
67 LOCAL_PROPRIETARY_MODULE := true
68 endif
69 LOCAL_MODULE_RELATIVE_PATH := hw
70 LOCAL_SRC_FILES := \
71 usb_audio_hw.c \
72 audio_resampler.c
73 LOCAL_C_INCLUDES += \
74 external/tinyalsa/include \
75 system/media/audio_utils/include
76 LOCAL_SHARED_LIBRARIES := liblog libcutils libtinyalsa libaudioutils libutils
77 LOCAL_MODULE_TAGS := optional
78
79 include $(BUILD_SHARED_LIBRARY)
80 endif # BOARD_USE_USB_AUDIO
81
82#build for hdmi audio HAL
83 ifeq ($(strip $(BOARD_USE_HDMI_HAL)),true)
84 include $(CLEAR_VARS)
85
86 LOCAL_MODULE := audio.hdmi.amlogic
87 ifeq ($(shell test $(PLATFORM_SDK_VERSION) -ge 26 && echo OK),OK)
88 LOCAL_PROPRIETARY_MODULE := true
89 endif
90 LOCAL_MODULE_RELATIVE_PATH := hw
91 LOCAL_SRC_FILES := \
92 hdmi_audio_hw.c
93 LOCAL_C_INCLUDES += \
94 external/tinyalsa/include \
95 system/media/audio_effects/include \
96 system/media/audio_utils/include
97
98 LOCAL_SHARED_LIBRARIES := liblog libcutils libtinyalsa libaudioutils libutils
99#ifdef DOLBY_UDC_PASSTHROUGH_HDMI_PACK
100 LOCAL_SRC_FILES += spdifenc_wrap.cpp
101 LOCAL_C_INCLUDES += \
102 $(call include-path-for, audio-utils)
103 LOCAL_SHARED_LIBRARIES += \
104 libaudiospdif
105#endif # DOLBY_UDC_PASSTHROUGH_HDMI_PACK
106 ifdef DOLBY_EAC3_TO_AC3_CONVERTER
107 LOCAL_SHARED_LIBRARIES += \
108 libdlb_converter
109 endif # DOLBY_EAC3_TO_AC3_CONVERTER
110 LOCAL_SRC_FILES += audio_hw_profile.c
111 LOCAL_SRC_FILES += audio_hw_utils.c
112 LOCAL_SRC_FILES += audio_hwsync.c
113 LOCAL_MODULE_TAGS := optional
114 include $(BUILD_SHARED_LIBRARY)
115 endif # BOARD_USE_HDMI_HAL
116endif # BOARD_ALSA_AUDIO
117
118#########################################################
119# Audio Policy Manager
120ifeq ($(USE_CUSTOM_AUDIO_POLICY),1)
121include $(CLEAR_VARS)
122
123LOCAL_SRC_FILES := \
124 DLGAudioPolicyManager.cpp
125
126LOCAL_SHARED_LIBRARIES := \
127 libcutils \
128 liblog \
129 libutils \
130 libmedia \
131 libbinder \
132 libaudiopolicymanagerdefault \
133 libutils \
134 libaudioclient \
135 libmedia_helper
136
137LOCAL_C_INCLUDES := \
138 external/tinyalsa/include \
139 $(TOPDIR)frameworks/av/services/audiopolicy \
140 $(TOPDIR)frameworks/av/services/audiopolicy/managerdefault \
141 $(TOPDIR)frameworks/av/services/audiopolicy/engine/interface \
142 $(TOPDIR)frameworks/av/services/audiopolicy/common/managerdefinitions/include \
143 $(TOPDIR)frameworks/av/services/audiopolicy/common/include \
144 $(TOPDIR)frameworks/av/media/libaudioclient/include
145
146LOCAL_MODULE := libaudiopolicymanager
147LOCAL_MODULE_TAGS := optional
148ifeq ($(shell test $(PLATFORM_SDK_VERSION) -ge 26 && echo OK),OK)
149 LOCAL_PROPRIETARY_MODULE := true
150endif
151include $(BUILD_SHARED_LIBRARY)
152endif # USE_CUSTOM_AUDIO_POLICY
153
154include $(call all-makefiles-under,$(LOCAL_PATH))
155