Iliyan Malchev | 4765c43 | 2012-06-11 14:36:16 -0700 | [diff] [blame] | 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 |
Ajay Dudani | 9291943 | 2012-06-28 14:23:11 -0700 | [diff] [blame] | 14 | LOCAL_CFLAGS += -DQCOM_CSDCLIENT_ENABLED |
ehgrace.kim | db7a5cc | 2012-08-06 18:56:00 -0700 | [diff] [blame] | 15 | LOCAL_CFLAGS += -DQCOM_ACDB_ENABLED |
Iliyan Malchev | 4765c43 | 2012-06-11 14:36:16 -0700 | [diff] [blame] | 16 | |
ty.lee | 924f798 | 2012-08-01 23:15:30 +0900 | [diff] [blame] | 17 | ifeq ($(strip $(BOARD_USES_FLUENCE_INCALL)),true) |
| 18 | LOCAL_CFLAGS += -DUSES_FLUENCE_INCALL |
| 19 | endif |
| 20 | |
ty.lee | 74060de | 2012-08-02 00:47:00 +0900 | [diff] [blame] | 21 | ifeq ($(strip $(BOARD_USES_SEPERATED_AUDIO_INPUT)),true) |
| 22 | LOCAL_CFLAGS += -DSEPERATED_AUDIO_INPUT |
| 23 | endif |
| 24 | |
Iliyan Malchev | 4765c43 | 2012-06-11 14:36:16 -0700 | [diff] [blame] | 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 | |
| 33 | LOCAL_STATIC_LIBRARIES := \ |
| 34 | libmedia_helper \ |
| 35 | libaudiohw_legacy \ |
Iliyan Malchev | 4113f34 | 2012-06-11 14:39:47 -0700 | [diff] [blame] | 36 | libaudiopolicy_legacy \ |
Iliyan Malchev | 4765c43 | 2012-06-11 14:36:16 -0700 | [diff] [blame] | 37 | |
| 38 | LOCAL_SHARED_LIBRARIES := \ |
| 39 | libcutils \ |
| 40 | libutils \ |
| 41 | libmedia \ |
| 42 | libhardware \ |
| 43 | libc \ |
| 44 | libpower \ |
SathishKumar Mani | 5ff7a02 | 2012-09-14 11:36:35 -0700 | [diff] [blame^] | 45 | libalsa-intf |
| 46 | |
| 47 | ifeq ($(TARGET_SIMULATOR),true) |
| 48 | LOCAL_LDLIBS += -ldl |
| 49 | else |
| 50 | LOCAL_SHARED_LIBRARIES += libdl |
| 51 | endif |
Iliyan Malchev | 4765c43 | 2012-06-11 14:36:16 -0700 | [diff] [blame] | 52 | |
| 53 | LOCAL_C_INCLUDES += $(TARGET_OUT_HEADERS)/mm-audio/audio-alsa |
| 54 | LOCAL_C_INCLUDES += $(TARGET_OUT_HEADERS)/mm-audio/audcal |
| 55 | LOCAL_C_INCLUDES += $(TARGET_OUT_HEADERS)/mm-audio/audio-acdb-util |
| 56 | LOCAL_C_INCLUDES += $(TARGET_OUT_HEADERS)/mm-audio/libalsa-intf |
Ajay Dudani | 9291943 | 2012-06-28 14:23:11 -0700 | [diff] [blame] | 57 | LOCAL_C_INCLUDES += $(TARGET_OUT_HEADERS)/mm-audio/audio-qmi/csd-client |
Iliyan Malchev | 4765c43 | 2012-06-11 14:36:16 -0700 | [diff] [blame] | 58 | LOCAL_C_INCLUDES += $(TARGET_OUT_HEADERS)/mm-audio/surround_sound/ |
| 59 | LOCAL_C_INCLUDES += hardware/libhardware/include |
| 60 | LOCAL_C_INCLUDES += hardware/libhardware_legacy/include |
| 61 | LOCAL_C_INCLUDES += frameworks/base/include |
| 62 | LOCAL_C_INCLUDES += system/core/include |
| 63 | |
Iliyan Malchev | 4765c43 | 2012-06-11 14:36:16 -0700 | [diff] [blame] | 64 | |
| 65 | LOCAL_MODULE := audio.primary.msm8960 |
| 66 | LOCAL_MODULE_PATH := $(TARGET_OUT_SHARED_LIBRARIES)/hw |
| 67 | LOCAL_MODULE_TAGS := optional |
| 68 | |
| 69 | include $(BUILD_SHARED_LIBRARY) |
| 70 | |
Ajay Dudani | 9746c47 | 2012-06-18 16:01:16 -0700 | [diff] [blame] | 71 | ifeq (1,0) # use default audio policy manager |
Iliyan Malchev | 4765c43 | 2012-06-11 14:36:16 -0700 | [diff] [blame] | 72 | # This is the ALSA audio policy manager |
| 73 | |
| 74 | include $(CLEAR_VARS) |
| 75 | |
| 76 | LOCAL_CFLAGS := -D_POSIX_SOURCE |
ehgrace.kim | db7a5cc | 2012-08-06 18:56:00 -0700 | [diff] [blame] | 77 | LOCAL_CFLAGS += -DQCOM_ACDB_ENABLED |
Iliyan Malchev | 4765c43 | 2012-06-11 14:36:16 -0700 | [diff] [blame] | 78 | |
| 79 | ifeq ($(BOARD_HAVE_BLUETOOTH),true) |
| 80 | LOCAL_CFLAGS += -DWITH_A2DP |
| 81 | endif |
| 82 | |
| 83 | LOCAL_SRC_FILES := \ |
Iliyan Malchev | 4113f34 | 2012-06-11 14:39:47 -0700 | [diff] [blame] | 84 | audio_policy_hal.cpp \ |
| 85 | AudioPolicyManagerALSA.cpp |
Iliyan Malchev | 4765c43 | 2012-06-11 14:36:16 -0700 | [diff] [blame] | 86 | |
| 87 | LOCAL_MODULE := audio_policy.msm8960 |
| 88 | LOCAL_MODULE_PATH := $(TARGET_OUT_SHARED_LIBRARIES)/hw |
| 89 | LOCAL_MODULE_TAGS := optional |
| 90 | |
| 91 | LOCAL_STATIC_LIBRARIES := \ |
| 92 | libmedia_helper \ |
Iliyan Malchev | 4113f34 | 2012-06-11 14:39:47 -0700 | [diff] [blame] | 93 | libaudiohw_legacy \ |
Iliyan Malchev | 4765c43 | 2012-06-11 14:36:16 -0700 | [diff] [blame] | 94 | libaudiopolicy_legacy |
| 95 | |
| 96 | LOCAL_SHARED_LIBRARIES := \ |
| 97 | libcutils \ |
| 98 | libutils \ |
| 99 | libmedia |
| 100 | |
| 101 | LOCAL_C_INCLUDES += hardware/libhardware_legacy/audio |
| 102 | |
| 103 | include $(BUILD_SHARED_LIBRARY) |
Iliyan Malchev | 4113f34 | 2012-06-11 14:39:47 -0700 | [diff] [blame] | 104 | endif |
Iliyan Malchev | 4765c43 | 2012-06-11 14:36:16 -0700 | [diff] [blame] | 105 | |
Ajay Dudani | 9746c47 | 2012-06-18 16:01:16 -0700 | [diff] [blame] | 106 | # Load audio_policy.conf to system/etc/ |
| 107 | include $(CLEAR_VARS) |
| 108 | LOCAL_MODULE := audio_policy.conf |
| 109 | LOCAL_MODULE_TAGS := optional |
| 110 | LOCAL_MODULE_CLASS := ETC |
| 111 | LOCAL_MODULE_PATH := $(TARGET_OUT_ETC)/ |
| 112 | LOCAL_SRC_FILES := audio_policy.conf |
| 113 | include $(BUILD_PREBUILT) |
| 114 | |
Iliyan Malchev | 4765c43 | 2012-06-11 14:36:16 -0700 | [diff] [blame] | 115 | # This is the ALSA module which behaves closely like the original |
| 116 | |
| 117 | include $(CLEAR_VARS) |
| 118 | |
| 119 | LOCAL_PRELINK_MODULE := false |
| 120 | |
| 121 | LOCAL_MODULE_PATH := $(TARGET_OUT_SHARED_LIBRARIES)/hw |
| 122 | |
| 123 | LOCAL_CFLAGS := -D_POSIX_SOURCE -Wno-multichar |
ehgrace.kim | db7a5cc | 2012-08-06 18:56:00 -0700 | [diff] [blame] | 124 | LOCAL_CFLAGS += -DQCOM_ACDB_ENABLED |
Iliyan Malchev | 4765c43 | 2012-06-11 14:36:16 -0700 | [diff] [blame] | 125 | |
ty.lee | 924f798 | 2012-08-01 23:15:30 +0900 | [diff] [blame] | 126 | ifeq ($(strip $(BOARD_USES_FLUENCE_INCALL)),true) |
| 127 | LOCAL_CFLAGS += -DUSES_FLUENCE_INCALL |
| 128 | endif |
| 129 | |
ty.lee | 74060de | 2012-08-02 00:47:00 +0900 | [diff] [blame] | 130 | ifeq ($(strip $(BOARD_USES_SEPERATED_AUDIO_INPUT)),true) |
| 131 | LOCAL_CFLAGS += -DSEPERATED_AUDIO_INPUT |
| 132 | endif |
| 133 | |
Iliyan Malchev | 4765c43 | 2012-06-11 14:36:16 -0700 | [diff] [blame] | 134 | ifneq ($(ALSA_DEFAULT_SAMPLE_RATE),) |
| 135 | LOCAL_CFLAGS += -DALSA_DEFAULT_SAMPLE_RATE=$(ALSA_DEFAULT_SAMPLE_RATE) |
| 136 | endif |
| 137 | |
Iliyan Malchev | 4765c43 | 2012-06-11 14:36:16 -0700 | [diff] [blame] | 138 | LOCAL_C_INCLUDES += $(TARGET_OUT_HEADERS)/mm-audio/libalsa-intf |
Ajay Dudani | 9291943 | 2012-06-28 14:23:11 -0700 | [diff] [blame] | 139 | LOCAL_C_INCLUDES += $(TARGET_OUT_HEADERS)/mm-audio/audio-qmi/csd-client |
ehgrace.kim | db7a5cc | 2012-08-06 18:56:00 -0700 | [diff] [blame] | 140 | LOCAL_C_INCLUDES += $(TARGET_OUT_HEADERS)/mm-audio/audio-acdb-util |
Iliyan Malchev | 4765c43 | 2012-06-11 14:36:16 -0700 | [diff] [blame] | 141 | |
| 142 | LOCAL_SRC_FILES:= \ |
| 143 | alsa_default.cpp \ |
| 144 | ALSAControl.cpp |
| 145 | |
| 146 | LOCAL_SHARED_LIBRARIES := \ |
| 147 | libcutils \ |
| 148 | liblog \ |
SathishKumar Mani | 5ff7a02 | 2012-09-14 11:36:35 -0700 | [diff] [blame^] | 149 | libalsa-intf |
| 150 | |
| 151 | ifeq ($(TARGET_SIMULATOR),true) |
| 152 | LOCAL_LDLIBS += -ldl |
| 153 | else |
| 154 | LOCAL_SHARED_LIBRARIES += libdl |
| 155 | endif |
Iliyan Malchev | 4765c43 | 2012-06-11 14:36:16 -0700 | [diff] [blame] | 156 | |
| 157 | LOCAL_MODULE:= alsa.msm8960 |
| 158 | LOCAL_MODULE_TAGS := optional |
| 159 | |
| 160 | include $(BUILD_SHARED_LIBRARY) |
Iliyan Malchev | 4765c43 | 2012-06-11 14:36:16 -0700 | [diff] [blame] | 161 | endif |