blob: cb01e798d35ab6203292372e7c684869e1584c2f [file] [log] [blame]
Yamit Mehtaa0d653a2016-11-25 20:33:25 +05301AM_CFLAGS = -I ${WORKSPACE}/external/tinyalsa/include \
2 -I ${WORKSPACE}/system/media/audio_effects/include \
3 -I ${WORKSPACE}/system/media/audio_utils/include \
4 -I $(top_srcdir)/hal \
5 -I $(top_srcdir)/hal/audio_extn \
6 -I $(top_srcdir)/hal/voice_extn \
Sachin Mohan Gadag3d3e78f2016-11-30 10:30:36 +05307 -I $(top_srcdir)/hal/${TARGET_PLATFORM}
Yamit Mehtaa0d653a2016-11-25 20:33:25 +05308
9c_sources = audio_hw.c \
10 voice.c \
11 platform_info.c \
Sachin Mohan Gadag3d3e78f2016-11-30 10:30:36 +053012 ${TARGET_PLATFORM}/platform.c \
Yamit Mehtaa0d653a2016-11-25 20:33:25 +053013 audio_extn/audio_extn.c \
Vignesh Kulothungan55396882017-04-20 14:37:02 -070014 audio_extn/utils.c \
15 acdb.c
Yamit Mehtaa0d653a2016-11-25 20:33:25 +053016
17if HDMI_EDID
18AM_CFLAGS += -DHDMI_EDID
19c_sources += edid.c
20endif
21
22if FM_POWER_OPT
23AM_CFLAGS += -DFM_POWER_OPT
24c_sources += audio_extn/fm.c
25endif
26
27if USBAUDIO
28AM_CFLAGS += -DUSB_HEADSET_ENABLED
29c_sources += audio_extn/usb.c
30endif
31
32if HFP
33AM_CFLAGS += -DHFP_ENABLED
34c_sources += audio_extn/hfp.c
35endif
36
37if SSR
38AM_CFLAGS += -DSSR_ENABLED
39c_sources += audio_extn/ssr.c
40AM_CFLAGS += -I ${WORKSPACE}/audio/mm-audio-noship/surround_sound_3mic/libsurround_3mic_proc/surround_rec_interface/inc/
41endif
42
43if MULTI_VOICE_SESSIONS
44AM_CFLAGS += -DMULTI_VOICE_SESSION_ENABLED
45c_sources += voice_extn/voice_extn.c
46endif
47
48if COMPRESS_VOIP
49AM_CFLAGS += -DCOMPRESS_VOIP_ENABLED
50c_sources += voice_extn/compress_voip.c
51endif
52
53if SPKR_PROTECTION
54AM_CFLAGS += -DSPKR_PROT_ENABLED
55c_sources += audio_extn/spkr_protection.c
56endif
57
58if HW_VARIANTS
59AM_CFLAGS += -DHW_VARIANTS_ENABLED
Sachin Mohan Gadag3d3e78f2016-11-30 10:30:36 +053060c_sources += ${TARGET_PLATFORM}/hw_info.c
Yamit Mehtaa0d653a2016-11-25 20:33:25 +053061endif
62
63if COMPRESS_CAPTURE
64AM_CFLAGS += -DCOMPRESS_CAPTURE_ENABLED
65c_sources += audio_extn/compress_capture.c
66endif
67
68if DTS_EAGLE
69AM_CFLAGS += -DDTS_EAGLE
70c_sources += audio_extn/dts_eagle.c
71endif
72
73if DOLBY_DDP
74AM_CFLAGS += -DDS1_DOLBY_DDP_ENABLED
75c_sources += audio_extn/dolby.c
76endif
77
78if DS1_DOLBY_DAP
79AM_CFLAGS += -DDS1_DOLBY_DAP_ENABLED
80if DOLBY_DDP
81c_sources += audio_extn/dolby.c
82endif
83endif
84
85if DEV_ARBI
86AM_CFLAGS += -DDEV_ARBI_ENABLED
87c_sources += audio_extn/dev_arbi.c
88endif
89
90if SOURCE_TRACKING
91AM_CFLAGS += -DSOURCE_TRACKING_ENABLED
92c_sources += audio_extn/source_track.c
93endif
94
95if LISTEN
96AM_CFLAGS += -DAUDIO_LISTEN_ENABLED
97AM_CFLAGS += -I ${WORKSPACE}/audio/mm-audio-noship/audio-listen
98c_sources += audio_extn/listen.c
99endif
100
101if SOUND_TRIGGER
102AM_CFLAGS += -DSOUND_TRIGGER_ENABLED
103AM_CFLAGS += -I ${WORKSPACE}/audio/mm-audio/sound_trigger/
104c_sources += audio_extn/soundtrigger.c
105endif
106
Yamit Mehta0d37ca02016-11-24 09:12:40 +0530107if FLAC_SUPPORT
108AM_CFLAGS += -DFLAC_OFFLOAD_ENABLED
109AM_CFLAGS += -DCOMPRESS_METADATA_NEEDED
110endif
111
112if ALAC_SUPPORT
113AM_CFLAGS += -DALAC_OFFLOAD_ENABLED
114AM_CFLAGS += -DCOMPRESS_METADATA_NEEDED
115endif
116
117if VORBIS_SUPPORT
118AM_CFLAGS += -DVORBIS_OFFLOAD_ENABLED
119AM_CFLAGS += -DCOMPRESS_METADATA_NEEDED
120endif
121
122if WMA_SUPPORT
123AM_CFLAGS += -DWMA_OFFLOAD_ENABLED
124AM_CFLAGS += -DCOMPRESS_METADATA_NEEDED
125endif
126
Dhananjay Kumaree4d2002016-10-25 18:02:58 +0530127if COMPRESS_INPUT
128AM_CFLAGS += -DCOMPRESS_INPUT_ENABLED
129c_sources += audio_extn/compress_in.c
130endif
131
Satish Babu Patakokila915ecba2017-01-10 17:43:56 +0530132if COMPRESS_PASSTHROUGH
133AM_CFLAGS += -DHDMI_PASSTHROUGH_ENABLED
134c_sources += audio_extn/passthru.c
135endif
136
137if KEEP_ALIVE
138AM_CFLAGS += -DKEEP_ALIVE_ENABLED
139c_sources += audio_extn/keep_alive.c
140endif
141
Dhananjay Kumaree4d2002016-10-25 18:02:58 +0530142if AUDIO_HW_EXTN_API
143AM_CFLAGS += -DAUDIO_HW_EXTN_API_ENABLED
144c_sources += audio_hw_extn_api.c
145endif
146
Weiyin Jiang82e40942017-01-10 16:07:34 +0800147if GEF
148AM_CFLAGS += -DAUDIO_GENERIC_EFFECT_FRAMEWORK_ENABLED
149c_sources += audio_extn/gef.c
Dhanalakshmi Siddaniedaa1822016-12-08 17:37:29 +0530150endif
151
Dhanalakshmi Siddani18737932016-11-29 17:33:17 +0530152if APTX_DECODER
153AM_CFLAGS += -DAPTX_DECODER_ENABLED
154endif
155
Dhanalakshmi Siddani0bbcb9e2017-02-03 19:14:42 +0530156if AFE_PROXY
157AM_CFLAGS += -DAFE_PROXY_ENABLED
158endif
159
Ben Rombergerd771a7c2017-02-22 18:05:17 -0800160if ADSP_HDLR
161AM_CFLAGS += -DAUDIO_EXTN_ADSP_HDLR_ENABLED
162c_sources += audio_extn/adsp_hdlr.c
163endif
164
Naresh Tannirub1834322017-04-13 18:27:03 +0530165if SPLIT_A2DP
166AM_CFLAGS += -DSPLIT_A2DP_ENABLED
167c_sources += audio_extn/a2dp.c
168endif
169
Naresh Tannirue7156032017-04-18 17:43:05 -0700170if AUDIO_IP_HDLR
171AM_CFLAGS += -DAUDIO_EXTN_IP_HDLR_ENABLED
172c_sources += audio_extn/ip_hdlr_intf.c
173endif
174
Yamit Mehtaa0d653a2016-11-25 20:33:25 +0530175h_sources = audio_extn/audio_defs.h \
176 audio_extn/audio_extn.h \
177 audio_hw.h \
178 voice.h
179
180library_include_HEADERS = $(h_sources)
181library_includedir = $(includedir)
182
183lib_LTLIBRARIES = audio_primary_default.la
184audio_primary_default_la_SOURCES = $(c_sources)
185audio_primary_default_la_LIBADD = $(GLIB_LIBS) -llog -lcutils -ltinyalsa
186audio_primary_default_la_LIBADD += -ltinycompress -laudioroute -ldl -lexpat -laudioutils
187audio_primary_default_la_CFLAGS = $(AM_CFLAGS) $(GLIB_CFLAGS)
188audio_primary_default_la_CFLAGS += -Dstrlcat=g_strlcat
189audio_primary_default_la_CFLAGS += -DINT_MAX=0x7fffffff
190audio_primary_default_la_CFLAGS += -D__unused=__attribute__\(\(__unused__\)\)
Sachin Mohan Gadag1ec7fab2016-12-12 17:41:26 +0530191audio_primary_default_la_CFLAGS += -DLINUX_ENABLED $(TARGET_CFLAGS) -DAUDIO_EXTN_FORMATS_ENABLED
Yamit Mehtaa0d653a2016-11-25 20:33:25 +0530192audio_primary_default_la_LDFLAGS = -module -shared -avoid-version