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