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