1 # hardware/libaudio-alsa/Android.mk 2 # 3 # Copyright 2008 Wind River Systems 4 # 5 6 ifeq ($(strip $(BOARD_USES_ALSA_AUDIO)),true) 7 8 LOCAL_PATH := $(call my-dir) 9 10 include $(CLEAR_VARS) 11 12 LOCAL_ARM_MODE := arm 13 LOCAL_CFLAGS := -D_POSIX_SOURCE 14 LOCAL_CFLAGS += -DQCOM_CSDCLIENT_ENABLED 15 LOCAL_CFLAGS += -DQCOM_ACDB_ENABLED 16 17 ifeq ($(strip $(BOARD_USES_FLUENCE_INCALL)),true) 18 LOCAL_CFLAGS += -DUSES_FLUENCE_INCALL 19 endif 20 21 ifeq ($(strip $(BOARD_USES_SEPERATED_AUDIO_INPUT)),true) 22 LOCAL_CFLAGS += -DSEPERATED_AUDIO_INPUT 23 endif 24 25 LOCAL_SRC_FILES := \ 26 AudioHardwareALSA.cpp \ 27 AudioStreamOutALSA.cpp \ 28 AudioStreamInALSA.cpp \ 29 ALSAStreamOps.cpp \ 30 audio_hw_hal.cpp \ 31 AudioUsbALSA.cpp \ 32 AudioUtil.cpp 33 34 LOCAL_STATIC_LIBRARIES := \ 35 libmedia_helper \ 36 libaudiohw_legacy \ 37 libaudiopolicy_legacy \ 38 39 LOCAL_SHARED_LIBRARIES := \ 40 libcutils \ 41 libutils \ 42 libmedia \ 43 libhardware \ 44 libc \ 45 libpower \ 46 libalsa-intf 47 48 ifeq ($(TARGET_SIMULATOR),true) 49 LOCAL_LDLIBS += -ldl 50 else 51 LOCAL_SHARED_LIBRARIES += libdl 52 endif 53 54 LOCAL_C_INCLUDES += $(TARGET_OUT_HEADERS)/mm-audio/audio-alsa 55 LOCAL_C_INCLUDES += $(TARGET_OUT_HEADERS)/mm-audio/libalsa-intf 56 LOCAL_C_INCLUDES += $(TARGET_OUT_HEADERS)/mm-audio/surround_sound/ 57 LOCAL_C_INCLUDES += hardware/libhardware/include 58 LOCAL_C_INCLUDES += hardware/libhardware_legacy/include 59 LOCAL_C_INCLUDES += frameworks/base/include 60 LOCAL_C_INCLUDES += system/core/include 61 62 63 LOCAL_MODULE := audio.primary.msm8960 64 LOCAL_MODULE_PATH := $(TARGET_OUT_SHARED_LIBRARIES)/hw 65 LOCAL_MODULE_TAGS := optional 66 67 include $(BUILD_SHARED_LIBRARY) 68 69 # This is the ALSA audio policy manager 70 71 include $(CLEAR_VARS) 72 73 LOCAL_CFLAGS := -D_POSIX_SOURCE 74 LOCAL_CFLAGS += -DQCOM_ACDB_ENABLED 75 76 LOCAL_SRC_FILES := \ 77 audio_policy_hal.cpp \ 78 AudioPolicyManagerALSA.cpp 79 80 LOCAL_MODULE := audio_policy.msm8960 81 LOCAL_MODULE_PATH := $(TARGET_OUT_SHARED_LIBRARIES)/hw 82 LOCAL_MODULE_TAGS := optional 83 84 LOCAL_STATIC_LIBRARIES := \ 85 libmedia_helper \ 86 libaudiopolicy_legacy 87 88 LOCAL_SHARED_LIBRARIES := \ 89 libcutils \ 90 libutils 91 92 LOCAL_C_INCLUDES += hardware/libhardware_legacy/audio 93 94 include $(BUILD_SHARED_LIBRARY) 95 96 # This is the ALSA module which behaves closely like the original 97 98 include $(CLEAR_VARS) 99 100 LOCAL_PRELINK_MODULE := false 101 102 LOCAL_MODULE_PATH := $(TARGET_OUT_SHARED_LIBRARIES)/hw 103 104 LOCAL_CFLAGS := -D_POSIX_SOURCE -Wno-multichar 105 LOCAL_CFLAGS += -DQCOM_ACDB_ENABLED 106 107 ifeq ($(strip $(BOARD_USES_FLUENCE_INCALL)),true) 108 LOCAL_CFLAGS += -DUSES_FLUENCE_INCALL 109 endif 110 111 ifeq ($(strip $(BOARD_USES_SEPERATED_AUDIO_INPUT)),true) 112 LOCAL_CFLAGS += -DSEPERATED_AUDIO_INPUT 113 endif 114 115 ifneq ($(ALSA_DEFAULT_SAMPLE_RATE),) 116 LOCAL_CFLAGS += -DALSA_DEFAULT_SAMPLE_RATE=$(ALSA_DEFAULT_SAMPLE_RATE) 117 endif 118 119 LOCAL_C_INCLUDES += $(TARGET_OUT_HEADERS)/mm-audio/libalsa-intf 120 121 LOCAL_SRC_FILES:= \ 122 alsa_default.cpp \ 123 ALSAControl.cpp \ 124 AudioUtil.cpp 125 126 LOCAL_SHARED_LIBRARIES := \ 127 libcutils \ 128 liblog \ 129 libalsa-intf 130 131 ifeq ($(TARGET_SIMULATOR),true) 132 LOCAL_LDLIBS += -ldl 133 else 134 LOCAL_SHARED_LIBRARIES += libdl 135 endif 136 137 LOCAL_MODULE:= alsa.msm8960 138 LOCAL_MODULE_TAGS := optional 139 140 include $(BUILD_SHARED_LIBRARY) 141 endif 142