summaryrefslogtreecommitdiff
path: root/Android.mk (plain)
blob: 64ab04d7156a61f2768e1b12db5d688677767c43
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 LOCAL_MODULE_RELATIVE_PATH := hw
29 LOCAL_SRC_FILES := \
30 audio_hw.c \
31 audio_virtual_effect.c \
32 libTVaudio/audio/audio_effect_control.c \
33 audio_hw_utils.c \
34 audio_hwsync.c \
35 spdifenc_wrap.cpp \
36 audio_hw_profile.c
37 LOCAL_C_INCLUDES += \
38 external/tinyalsa/include \
39 system/media/audio_utils/include \
40 system/media/audio_effects/include \
41 system/media/audio_route/include \
42 frameworks/av/media/libeffects/lvm/lib/StereoWidening/lib \
43 frameworks/av/media/libeffects/lvm/lib/StereoWidening/src \
44 frameworks/av/media/libeffects/lvm/lib/Common/lib \
45 frameworks/av/media/libeffects/lvm/lib/Common/src \
46 libTVaudio/audio
47
48 LOCAL_STATIC_LIBRARIES += libmusicbundle
49
50 LOCAL_SHARED_LIBRARIES := \
51 liblog libcutils libtinyalsa \
52 libaudioutils libdl libaudioroute libutils \
53 libaudiospdif
54 LOCAL_MODULE_TAGS := optional
55
56 include $(BUILD_SHARED_LIBRARY)
57
58#build for USB audio
59 ifeq ($(strip $(BOARD_USE_USB_AUDIO)),true)
60 include $(CLEAR_VARS)
61
62 LOCAL_MODULE := audio.usb.amlogic
63 LOCAL_MODULE_RELATIVE_PATH := hw
64 LOCAL_SRC_FILES := \
65 usb_audio_hw.c \
66 audio_resampler.c
67 LOCAL_C_INCLUDES += \
68 external/tinyalsa/include \
69 system/media/audio_utils/include
70 LOCAL_SHARED_LIBRARIES := liblog libcutils libtinyalsa libaudioutils libutils
71 LOCAL_MODULE_TAGS := optional
72
73 include $(BUILD_SHARED_LIBRARY)
74 endif # BOARD_USE_USB_AUDIO
75
76#build for hdmi audio HAL
77 ifeq ($(strip $(BOARD_USE_HDMI_HAL)),true)
78 include $(CLEAR_VARS)
79
80 LOCAL_MODULE := audio.hdmi.amlogic
81 LOCAL_MODULE_RELATIVE_PATH := hw
82 LOCAL_SRC_FILES := \
83 hdmi_audio_hw.c
84 LOCAL_C_INCLUDES += \
85 external/tinyalsa/include \
86 system/media/audio_effects/include \
87 system/media/audio_utils/include
88
89 LOCAL_SHARED_LIBRARIES := liblog libcutils libtinyalsa libaudioutils libutils
90#ifdef DOLBY_UDC_PASSTHROUGH_HDMI_PACK
91 LOCAL_SRC_FILES += spdifenc_wrap.cpp
92 LOCAL_C_INCLUDES += \
93 $(call include-path-for, audio-utils)
94 LOCAL_SHARED_LIBRARIES += \
95 libaudiospdif
96#endif # DOLBY_UDC_PASSTHROUGH_HDMI_PACK
97 ifdef DOLBY_EAC3_TO_AC3_CONVERTER
98 LOCAL_SHARED_LIBRARIES += \
99 libdlb_converter
100 endif # DOLBY_EAC3_TO_AC3_CONVERTER
101 LOCAL_SRC_FILES += audio_hw_profile.c
102 LOCAL_SRC_FILES += audio_hw_utils.c
103 LOCAL_SRC_FILES += audio_hwsync.c
104 LOCAL_MODULE_TAGS := optional
105 include $(BUILD_SHARED_LIBRARY)
106 endif # BOARD_USE_HDMI_HAL
107endif # BOARD_ALSA_AUDIO
108
109#########################################################
110# Audio Policy Manager
111ifeq ($(USE_CUSTOM_AUDIO_POLICY),1)
112include $(CLEAR_VARS)
113
114LOCAL_SRC_FILES := \
115 DLGAudioPolicyManager.cpp
116
117LOCAL_SHARED_LIBRARIES := \
118 libcutils \
119 liblog \
120 libutils \
121 libmedia \
122 libbinder \
123 libaudiopolicymanagerdefault \
124 libutils
125
126LOCAL_C_INCLUDES := \
127 external/tinyalsa/include \
128 $(TOPDIR)frameworks/av/services/audiopolicy \
129 $(TOPDIR)frameworks/av/services/audiopolicy/managerdefault \
130 $(TOPDIR)frameworks/av/services/audiopolicy/engine/interface \
131 $(TOPDIR)frameworks/av/services/audiopolicy/common/managerdefinitions/include \
132 $(TOPDIR)frameworks/av/services/audiopolicy/common/include
133
134
135LOCAL_MODULE := libaudiopolicymanager
136LOCAL_MODULE_TAGS := optional
137
138include $(BUILD_SHARED_LIBRARY)
139endif # USE_CUSTOM_AUDIO_POLICY
140
141include $(call all-makefiles-under,$(LOCAL_PATH))
142