2013-01-18 00:50:22 +00:00
|
|
|
ifeq ($(strip $(BOARD_USES_ALSA_AUDIO)),true)
|
|
|
|
|
|
|
|
LOCAL_PATH := $(call my-dir)
|
|
|
|
|
|
|
|
include $(CLEAR_VARS)
|
|
|
|
|
|
|
|
LOCAL_ARM_MODE := arm
|
|
|
|
|
2013-08-20 01:47:21 +00:00
|
|
|
AUDIO_PLATFORM := $(TARGET_BOARD_PLATFORM)
|
2013-10-29 13:07:44 +00:00
|
|
|
|
2013-10-11 03:36:49 +00:00
|
|
|
ifneq ($(filter msm8974 msm8226 msm8610 apq8084,$(TARGET_BOARD_PLATFORM)),)
|
2013-08-20 01:47:21 +00:00
|
|
|
# B-family platform uses msm8974 code base
|
|
|
|
AUDIO_PLATFORM = msm8974
|
2013-10-29 13:07:44 +00:00
|
|
|
MULTIPLE_HW_VARIANTS_ENABLED := true
|
2013-10-07 22:23:41 +00:00
|
|
|
ifneq ($(filter msm8610,$(TARGET_BOARD_PLATFORM)),)
|
|
|
|
LOCAL_CFLAGS := -DPLATFORM_MSM8610
|
|
|
|
endif
|
2013-10-01 22:49:05 +00:00
|
|
|
ifneq ($(filter msm8226,$(TARGET_BOARD_PLATFORM)),)
|
|
|
|
LOCAL_CFLAGS := -DPLATFORM_MSM8x26
|
|
|
|
endif
|
2013-11-13 19:46:52 +00:00
|
|
|
ifneq ($(filter apq8084,$(TARGET_BOARD_PLATFORM)),)
|
|
|
|
LOCAL_CFLAGS := -DPLATFORM_APQ8084
|
|
|
|
endif
|
2013-08-20 01:47:21 +00:00
|
|
|
endif
|
|
|
|
|
2013-01-18 00:50:22 +00:00
|
|
|
LOCAL_SRC_FILES := \
|
|
|
|
audio_hw.c \
|
2013-10-01 22:49:05 +00:00
|
|
|
voice.c \
|
2013-08-20 01:47:21 +00:00
|
|
|
$(AUDIO_PLATFORM)/platform.c
|
2013-01-18 00:50:22 +00:00
|
|
|
|
2013-10-04 23:13:44 +00:00
|
|
|
LOCAL_SRC_FILES += audio_extn/audio_extn.c
|
|
|
|
|
|
|
|
ifneq ($(strip $(AUDIO_FEATURE_DISABLED_ANC_HEADSET)),true)
|
|
|
|
LOCAL_CFLAGS += -DANC_HEADSET_ENABLED
|
|
|
|
endif
|
|
|
|
|
|
|
|
ifneq ($(strip $(AUDIO_FEATURE_DISABLED_PROXY_DEVICE)),true)
|
|
|
|
LOCAL_CFLAGS += -DAFE_PROXY_ENABLED
|
|
|
|
endif
|
|
|
|
|
2013-10-06 21:39:35 +00:00
|
|
|
ifneq ($(strip $(AUDIO_FEATURE_DISABLED_FM)),true)
|
|
|
|
LOCAL_CFLAGS += -DFM_ENABLED
|
|
|
|
LOCAL_SRC_FILES += audio_extn/fm.c
|
|
|
|
endif
|
|
|
|
|
2013-10-08 01:40:05 +00:00
|
|
|
ifneq ($(strip $(AUDIO_FEATURE_DISABLED_USBAUDIO)),true)
|
|
|
|
LOCAL_CFLAGS += -DUSB_HEADSET_ENABLED
|
|
|
|
LOCAL_SRC_FILES += audio_extn/usb.c
|
|
|
|
endif
|
|
|
|
|
2013-10-19 19:38:54 +00:00
|
|
|
ifneq ($(strip $(AUDIO_FEATURE_DISABLED_SSR)),true)
|
|
|
|
LOCAL_CFLAGS += -DSSR_ENABLED
|
|
|
|
LOCAL_SRC_FILES += audio_extn/ssr.c
|
|
|
|
LOCAL_C_INCLUDES += $(TARGET_OUT_HEADERS)/mm-audio/surround_sound/
|
|
|
|
endif
|
|
|
|
|
2013-10-25 23:24:27 +00:00
|
|
|
ifneq ($(strip $(AUDIO_FEATURE_DISABLED_MULTI_VOICE_SESSIONS)),true)
|
|
|
|
LOCAL_CFLAGS += -DMULTI_VOICE_SESSION_ENABLED
|
|
|
|
LOCAL_SRC_FILES += voice_extn/voice_extn.c
|
|
|
|
LOCAL_C_INCLUDES += $(TARGET_OUT_INTERMEDIATES)/KERNEL_OBJ/usr/include
|
|
|
|
|
|
|
|
ifneq ($(strip $(AUDIO_FEATURE_DISABLED_INCALL_MUSIC)),true)
|
|
|
|
LOCAL_CFLAGS += -DINCALL_MUSIC_ENABLED
|
|
|
|
endif
|
2013-11-15 23:21:40 +00:00
|
|
|
|
|
|
|
ifneq ($(strip $(AUDIO_FEATURE_DISABLED_COMPRESS_VOIP)),true)
|
|
|
|
LOCAL_CFLAGS += -DCOMPRESS_VOIP_ENABLED
|
|
|
|
LOCAL_SRC_FILES += voice_extn/compress_voip.c
|
|
|
|
endif
|
2013-10-28 21:06:03 +00:00
|
|
|
endif
|
2013-10-25 23:24:27 +00:00
|
|
|
|
2013-10-28 21:06:03 +00:00
|
|
|
ifneq ($(strip, $(AUDIO_FEATURE_DISABLED_SPKR_PROTECTION)),true)
|
|
|
|
ifneq ($(filter msm8974,$(TARGET_BOARD_PLATFORM)),)
|
|
|
|
LOCAL_CFLAGS += -DSPKR_PROT_ENABLED
|
|
|
|
LOCAL_SRC_FILES += audio_extn/spkr_protection.c
|
|
|
|
LOCAL_C_INCLUDES += $(TARGET_OUT_INTERMEDIATES)/KERNEL_OBJ/usr/include
|
|
|
|
endif
|
2013-10-25 23:24:27 +00:00
|
|
|
endif
|
|
|
|
|
2013-10-29 13:07:44 +00:00
|
|
|
ifdef MULTIPLE_HW_VARIANTS_ENABLED
|
|
|
|
LOCAL_CFLAGS += -DHW_VARIANTS_ENABLED
|
|
|
|
LOCAL_SRC_FILES += $(AUDIO_PLATFORM)/hw_info.c
|
|
|
|
endif
|
|
|
|
|
2013-10-25 23:26:03 +00:00
|
|
|
ifneq ($(strip $(AUDIO_FEATURE_DISABLED_COMPRESS_CAPTURE)),true)
|
|
|
|
LOCAL_CFLAGS += -DCOMPRESS_CAPTURE_ENABLED
|
|
|
|
LOCAL_SRC_FILES += audio_extn/compress_capture.c
|
|
|
|
endif
|
|
|
|
|
2013-01-18 00:50:22 +00:00
|
|
|
LOCAL_SHARED_LIBRARIES := \
|
|
|
|
liblog \
|
|
|
|
libcutils \
|
|
|
|
libtinyalsa \
|
2013-07-17 22:22:04 +00:00
|
|
|
libtinycompress \
|
2013-01-18 00:50:22 +00:00
|
|
|
libaudioroute \
|
|
|
|
libdl
|
|
|
|
|
|
|
|
LOCAL_C_INCLUDES += \
|
|
|
|
external/tinyalsa/include \
|
2013-07-17 22:22:04 +00:00
|
|
|
external/tinycompress/include \
|
2013-04-16 22:55:53 +00:00
|
|
|
$(call include-path-for, audio-route) \
|
2013-05-14 22:27:20 +00:00
|
|
|
$(call include-path-for, audio-effects) \
|
2013-10-04 23:13:44 +00:00
|
|
|
$(LOCAL_PATH)/$(AUDIO_PLATFORM) \
|
2013-11-15 23:21:40 +00:00
|
|
|
$(LOCAL_PATH)/audio_extn \
|
|
|
|
$(LOCAL_PATH)/voice_extn
|
2013-01-18 00:50:22 +00:00
|
|
|
|
2013-10-29 20:29:42 +00:00
|
|
|
ifeq ($(strip $(AUDIO_FEATURE_ENABLED_LISTEN)),true)
|
|
|
|
LOCAL_CFLAGS += -DAUDIO_LISTEN_ENABLED
|
|
|
|
LOCAL_C_INCLUDES += $(TARGET_OUT_HEADERS)/mm-audio/audio-listen
|
|
|
|
LOCAL_SRC_FILES += audio_extn/listen.c
|
|
|
|
endif
|
|
|
|
|
2013-11-07 01:59:04 +00:00
|
|
|
ifeq ($(strip $(AUDIO_FEATURE_ENABLED_AUXPCM_BT)),true)
|
|
|
|
LOCAL_CFLAGS += -DAUXPCM_BT_ENABLED
|
|
|
|
endif
|
|
|
|
|
2013-10-07 22:23:41 +00:00
|
|
|
LOCAL_MODULE := audio.primary.$(TARGET_BOARD_PLATFORM)
|
2013-01-18 00:50:22 +00:00
|
|
|
|
|
|
|
LOCAL_MODULE_PATH := $(TARGET_OUT_SHARED_LIBRARIES)/hw
|
|
|
|
|
|
|
|
LOCAL_MODULE_TAGS := optional
|
|
|
|
|
|
|
|
include $(BUILD_SHARED_LIBRARY)
|
|
|
|
|
|
|
|
endif
|