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