Android-x86
Fork
Donation

  • R/O
  • HTTP
  • SSH
  • HTTPS

external-alsa-lib: Commit

external/alsa-lib


Commit MetaInfo

Revisionb92c3b6282ef3e6fd51824ae371022c6a30c8441 (tree)
Time2019-03-16 01:23:22
AuthorChih-Wei Huang <cwhuang@linu...>
CommiterChih-Wei Huang

Log Message

Android: add makefile and config.h

This is the initial porting of alsa-lib 1.1.8 to Android.

Signed-off-by: Chih-Wei Huang <cwhuang@linux.org.tw>

Change Summary

Incremental Difference

--- /dev/null
+++ b/android/Android.mk
@@ -0,0 +1,55 @@
1+#
2+# Copyright (C) 2019 The Android-x86 Open Source Project
3+#
4+# Licensed under the GNU Lesser General Public License Version 2.1.
5+# You may not use this file except in compliance with the License.
6+# You may obtain a copy of the License at
7+#
8+# http://www.gnu.org/licenses/lgpl.html
9+#
10+
11+LOCAL_PATH := $(dir $(call my-dir))
12+include $(CLEAR_VARS)
13+
14+LOCAL_MODULE := libasound
15+LOCAL_MODULE_TAGS := optional
16+LOCAL_MODULE_CLASS := SHARED_LIBRARIES
17+
18+intermediates := $(call local-generated-sources-dir)
19+
20+LOCAL_C_INCLUDES := $(LOCAL_PATH)include $(LOCAL_PATH)android
21+LOCAL_EXPORT_C_INCLUDE_DIRS := $(intermediates)
22+
23+LOCAL_CFLAGS := -DPIC \
24+ -Wno-absolute-value -Wno-address-of-packed-member -Wno-missing-braces \
25+ -Wno-pointer-arith -Wno-sign-compare -Wno-unused-function \
26+ -Wno-unused-const-variable -Wno-unused-parameter -Wno-unused-variable \
27+ -finline-limit=300 -finline-functions -fno-inline-functions-called-once
28+
29+# list of files to be excluded
30+EXCLUDE_SRC_FILES := \
31+ src/alisp/alisp_snd.c \
32+ src/compat/hsearch_r.c \
33+ src/control/control_shm.c \
34+ src/pcm/pcm_d%.c \
35+ src/pcm/pcm_ladspa.c \
36+ src/pcm/pcm_shm.c \
37+ src/pcm/scopes/level.c \
38+
39+LOCAL_SRC_FILES := $(filter-out $(EXCLUDE_SRC_FILES),$(call all-c-files-under,src))
40+
41+GEN := $(intermediates)/alsa/asoundlib.h
42+$(GEN): $(LOCAL_PATH)configure.ac $(wildcard $(LOCAL_PATH)include/*.h)
43+ rm -rf $(@D); mkdir -p $(@D); cd $(@D); \
44+ ln -s ../../../../../../../../$(<D)/include/*.h .
45+ cat $(@D)/asoundlib-head.h > $@; \
46+ sed -n "/.*\(#include <[ae].*.h>\).*/s//\1/p" $< >> $@; \
47+ cat $(@D)/asoundlib-tail.h >> $@
48+ sed -n "/^AC_INIT.* \([0-9.]*\))/s//\#define SND_LIB_VERSION_STR \"\1\"/p" $< > $(@D)/version.h; \
49+ ln -sf alsa/version.h $(@D)/..
50+
51+LOCAL_GENERATED_SOURCES := $(GEN)
52+
53+LOCAL_SHARED_LIBRARIES := libdl
54+
55+include $(BUILD_SHARED_LIBRARY)
--- /dev/null
+++ b/android/config.h
@@ -0,0 +1,217 @@
1+/* include/config.h. Generated from config.h.in by configure. */
2+/* include/config.h.in. Generated from configure.ac by autoheader. */
3+
4+/* Directory with aload* device files */
5+#define ALOAD_DEVICE_DIRECTORY "/dev/"
6+
7+/* directory containing ALSA configuration database */
8+#define ALSA_CONFIG_DIR "/system/usr/share/alsa"
9+
10+/* Enable assert at error message handler */
11+/* #undef ALSA_DEBUG_ASSERT */
12+
13+/* Directory with ALSA device files */
14+#define ALSA_DEVICE_DIRECTORY "/dev/snd/"
15+
16+/* directory containing ALSA add-on modules */
17+#define ALSA_PLUGIN_DIR "/system/usr/lib/alsa-lib"
18+
19+/* Build hwdep component */
20+#define BUILD_HWDEP "1"
21+
22+/* Build mixer component */
23+#define BUILD_MIXER "1"
24+
25+/* Build PCM component */
26+#define BUILD_PCM "1"
27+
28+/* Build PCM adpcm plugin */
29+#define BUILD_PCM_PLUGIN_ADPCM "1"
30+
31+/* Build PCM alaw plugin */
32+#define BUILD_PCM_PLUGIN_ALAW "1"
33+
34+/* Build PCM lfloat plugin */
35+#define BUILD_PCM_PLUGIN_LFLOAT "1"
36+
37+/* Build PCM mmap-emul plugin */
38+#define BUILD_PCM_PLUGIN_MMAP_EMUL "1"
39+
40+/* Build PCM mulaw plugin */
41+#define BUILD_PCM_PLUGIN_MULAW "1"
42+
43+/* Build PCM rate plugin */
44+#define BUILD_PCM_PLUGIN_RATE "1"
45+
46+/* Build PCM route plugin */
47+#define BUILD_PCM_PLUGIN_ROUTE "1"
48+
49+/* Build raw MIDI component */
50+/* #undef BUILD_RAWMIDI */
51+
52+/* Build sequencer component */
53+/* #undef BUILD_SEQ */
54+
55+/* Build DSP Topology component */
56+#define BUILD_TOPOLOGY "1"
57+
58+/* Build UCM component */
59+#define BUILD_UCM "1"
60+
61+/* Have clock gettime */
62+#define HAVE_CLOCK_GETTIME 1
63+
64+/* Define to 1 if you have the <dlfcn.h> header file. */
65+#define HAVE_DLFCN_H 1
66+
67+/* Define to 1 if you have the <endian.h> header file. */
68+#define HAVE_ENDIAN_H 1
69+
70+/* Define to 1 if you have the <inttypes.h> header file. */
71+#define HAVE_INTTYPES_H 1
72+
73+/* Have libdl */
74+#define HAVE_LIBDL 1
75+
76+/* Have libpthread */
77+#define HAVE_LIBPTHREAD 1
78+
79+/* Define to 1 if you have the `resmgr' library (-lresmgr). */
80+/* #undef HAVE_LIBRESMGR */
81+
82+/* Have librt */
83+/* #undef HAVE_LIBRT */
84+
85+/* Define to 1 if you have the <memory.h> header file. */
86+#define HAVE_MEMORY_H 1
87+
88+/* Define if your pthreads implementation have PTHREAD_MUTEX_RECURSIVE */
89+#define HAVE_PTHREAD_MUTEX_RECURSIVE /**/
90+
91+/* Avoid calculation in float */
92+/* #undef HAVE_SOFT_FLOAT */
93+
94+/* Define to 1 if you have the <stdint.h> header file. */
95+#define HAVE_STDINT_H 1
96+
97+/* Define to 1 if you have the <stdlib.h> header file. */
98+#define HAVE_STDLIB_H 1
99+
100+/* Define to 1 if you have the <strings.h> header file. */
101+#define HAVE_STRINGS_H 1
102+
103+/* Define to 1 if you have the <string.h> header file. */
104+#define HAVE_STRING_H 1
105+
106+/* Define to 1 if you have the <sys/endian.h> header file. */
107+/* #undef HAVE_SYS_ENDIAN_H */
108+
109+/* Define to 1 if you have the <sys/shm.h> header file. */
110+#define HAVE_SYS_SHM_H 1
111+
112+/* Define to 1 if you have the <sys/stat.h> header file. */
113+#define HAVE_SYS_STAT_H 1
114+
115+/* Define to 1 if you have the <sys/types.h> header file. */
116+#define HAVE_SYS_TYPES_H 1
117+
118+/* Define to 1 if you have the <unistd.h> header file. */
119+#define HAVE_UNISTD_H 1
120+
121+/* Define to 1 if you have the `uselocale' function. */
122+#define HAVE_USELOCALE 1
123+
124+/* Enable use of wordexp */
125+/* #undef HAVE_WORDEXP */
126+
127+/* Define to 1 if compiler supports __thread */
128+#define HAVE___THREAD 1
129+
130+/* Define to the sub-directory where libtool stores uninstalled libraries. */
131+#define LT_OBJDIR ".libs/"
132+
133+/* No assert debug */
134+/* #undef NDEBUG */
135+
136+/* Name of package */
137+#define PACKAGE "alsa-lib"
138+
139+/* Define to the address where bug reports for this package should be sent. */
140+#define PACKAGE_BUGREPORT ""
141+
142+/* Define to the full name of this package. */
143+#define PACKAGE_NAME "alsa-lib"
144+
145+/* Define to the one symbol short name of this package. */
146+#define PACKAGE_TARNAME "alsa-lib"
147+
148+/* Define to the home page for this package. */
149+#define PACKAGE_URL ""
150+
151+/* Max number of cards */
152+#define SND_MAX_CARDS 32
153+
154+/* Define to 1 if you have the ANSI C header files. */
155+#define STDC_HEADERS 1
156+
157+/* Support /dev/aload* access for auto-loading */
158+/* #undef SUPPORT_ALOAD */
159+
160+/* Support resmgr with alsa-lib */
161+/* #undef SUPPORT_RESMGR */
162+
163+/* Disable thread-safe API functions */
164+#define THREAD_SAFE_API "1"
165+
166+/* Define to 1 if you can safely include both <sys/time.h> and <time.h>. */
167+#define TIME_WITH_SYS_TIME 1
168+
169+/* directory to put tmp socket files */
170+#define TMPDIR "/tmp"
171+
172+/* Enable extensions on AIX 3, Interix. */
173+#ifndef _ALL_SOURCE
174+# define _ALL_SOURCE 1
175+#endif
176+/* Enable GNU extensions on systems that have them. */
177+#ifndef _GNU_SOURCE
178+# define _GNU_SOURCE 1
179+#endif
180+/* Enable threading extensions on Solaris. */
181+#ifndef _POSIX_PTHREAD_SEMANTICS
182+# define _POSIX_PTHREAD_SEMANTICS 1
183+#endif
184+/* Enable extensions on HP NonStop. */
185+#ifndef _TANDEM_SOURCE
186+# define _TANDEM_SOURCE 1
187+#endif
188+/* Enable general extensions on Solaris. */
189+#ifndef __EXTENSIONS__
190+# define __EXTENSIONS__ 1
191+#endif
192+
193+
194+/* compiled with versioned symbols */
195+/* #undef VERSIONED_SYMBOLS */
196+
197+/* Define to 1 if on MINIX. */
198+/* #undef _MINIX */
199+
200+/* Define to 2 if the system does not provide POSIX.1 features except with
201+ this defined. */
202+/* #undef _POSIX_1_SOURCE */
203+
204+/* Define to 1 if you need to in order for `stat' and other things to work. */
205+/* #undef _POSIX_SOURCE */
206+
207+/* Toolchain Symbol Prefix */
208+#define __SYMBOL_PREFIX ""
209+
210+/* Define to empty if `const' does not conform to ANSI C. */
211+/* #undef const */
212+
213+/* Define to `__inline__' or `__inline' if that's what the C compiler
214+ calls it, or to nothing if 'inline' is not supported under any name. */
215+#ifndef __cplusplus
216+/* #undef inline */
217+#endif
Show on old repository browser