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