summaryrefslogtreecommitdiffstats
path: root/libaudio/Android.mk
blob: 790f63c4641fe19d26f1739dcaaf62a0e8fc7ba9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
# hardware/libaudio-alsa/Android.mk
#
# Copyright 2008 Wind River Systems
#

ifeq ($(TARGET_DEVICE),crespo)
ifeq ($(filter-out s5pc110 s5pc100 s5p6440,$(TARGET_BOARD_PLATFORM)),)
ifeq ($(BOARD_USES_GENERIC_AUDIO),false)

  LOCAL_PATH := $(call my-dir)

  include $(CLEAR_VARS)

  LOCAL_ARM_MODE := arm
  LOCAL_CFLAGS := -D_POSIX_SOURCE
  LOCAL_WHOLE_STATIC_LIBRARIES := libasound

  ifneq ($(ALSA_DEFAULT_SAMPLE_RATE),)
    LOCAL_CFLAGS += -DALSA_DEFAULT_SAMPLE_RATE=$(ALSA_DEFAULT_SAMPLE_RATE)
  endif

# Samsung Feature
ifeq ($(TARGET_BOARD_PLATFORM),s5pc110)
  LOCAL_CFLAGS += -DSLSI_S5PC110

# Samsung Driver Feature
#   LOCAL_CFLAGS += -DSEC_SWP_SOUND -DSEC_IPC -DPOWER_GATING -DSYNCHRONIZE_CP -DBT_NR_EC_ONOFF
   LOCAL_CFLAGS += -DSEC_SWP_SOUND -DSEC_IPC 
   LOCAL_CFLAGS += -DTURN_ON_DEVICE_ONLY_USE  
endif

ifeq ($(TARGET_BOARD_PLATFORM),s5pc100)
  LOCAL_CFLAGS += -DSLSI_S5PC100
endif

  LOCAL_C_INCLUDES += device/samsung/crespo/alsa-lib/include
  LOCAL_SRC_FILES := AudioHardwareALSA.cpp

  LOCAL_MODULE := libaudio

  LOCAL_STATIC_LIBRARIES += libaudiointerface

  LOCAL_SHARED_LIBRARIES := \
    libcutils \
    libutils \
    libmedia \
    libhardware_legacy \
    libdl \
    libc

ifeq ($(BOARD_HAVE_BLUETOOTH),true)
  LOCAL_SHARED_LIBRARIES += liba2dp
endif

ifneq ($(NO_IPC_ALSA_RILD),true)
  LOCAL_SHARED_LIBRARIES += libsecril-client
  LOCAL_CFLAGS  +=  -DIPC_ALSA_RILD
endif
  include $(BUILD_SHARED_LIBRARY)

# To build audiopolicy library 
include $(CLEAR_VARS)

LOCAL_SRC_FILES:=               \
    AudioPolicyManager.cpp	\
    AudioPolicyManagerBase.cpp

LOCAL_SHARED_LIBRARIES := \
    libcutils \
    libutils \
    libmedia

LOCAL_MODULE:= libaudiopolicy

ifeq ($(BOARD_HAVE_BLUETOOTH),true)
  LOCAL_CFLAGS += -DWITH_A2DP
endif

include $(BUILD_SHARED_LIBRARY)

endif
endif
endif