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