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