Android-x86
Fork
Donation

  • R/O
  • HTTP
  • SSH
  • HTTPS

external-alsa-utils: Commit

external/alsa-utils


Commit MetaInfo

Revisión2e0c01ee6018d8246857ab93a5bc8b056ffe815e (tree)
Tiempo2019-11-25 18:11:58
AutorChih-Wei Huang <cwhuang@linu...>
CommiterChih-Wei Huang

Log Message

Android: add makefile and config.h

This is the initial porting of alsa-utils 1.2.1 to Android.
Four tools are built: alsa_amixer, alsa_aplay, alsa_ctl, alsa_ucm.

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

Cambiar Resumen

Diferencia

--- /dev/null
+++ b/android/Android.mk
@@ -0,0 +1,105 @@
1+#
2+# Copyright (C) 2019 The Android-x86 Open Source Project
3+#
4+# Licensed under the GNU General Public License Version 2 or later.
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/gpl.html
9+#
10+
11+LOCAL_PATH := $(dir $(call my-dir))
12+
13+# Build version.h
14+include $(CLEAR_VARS)
15+
16+LOCAL_MODULE := alsa_utils_headers
17+LOCAL_MODULE_CLASS := HEADER_LIBRARIES
18+
19+intermediates := $(call local-generated-sources-dir)
20+
21+GEN := $(intermediates)/version.h
22+$(GEN): $(LOCAL_PATH)configure.ac
23+ @mkdir -p $(@D); \
24+ sed -n "/^AC_INIT.* \([0-9.]*\))/s//\#define SND_UTIL_VERSION_STR \"\1\"/p" $< > $@
25+
26+# Common flags
27+ALSA_UTILS_CFLAGS := \
28+ -Wno-absolute-value -Wno-enum-conversion \
29+ -Wno-parentheses -Wno-pointer-arith -Wno-sign-compare \
30+ -Wno-unused-parameter -Wno-unused-variable
31+
32+ALSA_UTILS_C_INCLUDES := \
33+ $(dir $(GEN)) \
34+ $(LOCAL_PATH)include \
35+ $(LOCAL_PATH)android
36+
37+# Build amixer command
38+include $(CLEAR_VARS)
39+
40+LOCAL_CFLAGS := $(ALSA_UTILS_CFLAGS) -D_GNU_SOURCE
41+LOCAL_C_INCLUDES:= $(ALSA_UTILS_C_INCLUDES)
42+
43+LOCAL_SRC_FILES := \
44+ amixer/amixer.c \
45+ alsamixer/volume_mapping.c
46+
47+LOCAL_MODULE := alsa_amixer
48+LOCAL_SHARED_LIBRARIES := libasound
49+LOCAL_ADDITIONAL_DEPENDENCIES := $(GEN)
50+
51+include $(BUILD_EXECUTABLE)
52+
53+# Build aplay command
54+include $(CLEAR_VARS)
55+
56+LOCAL_CFLAGS := $(ALSA_UTILS_CFLAGS)
57+LOCAL_C_INCLUDES:= $(ALSA_UTILS_C_INCLUDES)
58+
59+LOCAL_SRC_FILES := \
60+ aplay/aplay.c
61+
62+LOCAL_MODULE := alsa_aplay
63+LOCAL_SHARED_LIBRARIES := libasound
64+LOCAL_ADDITIONAL_DEPENDENCIES := $(GEN)
65+
66+include $(BUILD_EXECUTABLE)
67+
68+# Build alsactl command
69+include $(CLEAR_VARS)
70+
71+LOCAL_CFLAGS := $(ALSA_UTILS_CFLAGS) \
72+ -DSYS_ASOUNDRC=\"/data/local/tmp/asound.state\" \
73+ -DSYS_LOCKFILE=\"/data/local/tmp/asound.state.lock\" \
74+ -DSYS_PIDFILE=\"/data/local/tmp/alsactl.pid\"
75+LOCAL_C_INCLUDES:= $(ALSA_UTILS_C_INCLUDES)
76+
77+LOCAL_SRC_FILES := $(addprefix alsactl/,\
78+ alsactl.c \
79+ daemon.c \
80+ init_parse.c \
81+ lock.c \
82+ monitor.c \
83+ state.c \
84+ utils.c)
85+
86+LOCAL_MODULE := alsa_ctl
87+LOCAL_SHARED_LIBRARIES := libasound
88+LOCAL_ADDITIONAL_DEPENDENCIES := $(GEN)
89+
90+include $(BUILD_EXECUTABLE)
91+
92+# Build alsaucm command
93+include $(CLEAR_VARS)
94+
95+LOCAL_CFLAGS := $(ALSA_UTILS_CFLAGS)
96+LOCAL_C_INCLUDES:= $(ALSA_UTILS_C_INCLUDES)
97+
98+LOCAL_SRC_FILES := \
99+ alsaucm/usecase.c \
100+
101+LOCAL_MODULE := alsa_ucm
102+LOCAL_SHARED_LIBRARIES := libasound
103+LOCAL_ADDITIONAL_DEPENDENCIES := $(GEN)
104+
105+include $(BUILD_EXECUTABLE)
--- /dev/null
+++ b/android/aconfig.h
@@ -0,0 +1,161 @@
1+/* include/aconfig.h. Generated from aconfig.h.in by configure. */
2+/* include/aconfig.h.in. Generated from configure.ac by autoheader. */
3+
4+/* directory containing alsa configuration */
5+#define DATADIR "/system/usr/share/alsa"
6+
7+/* Define to 1 if translation of program messages to the user's native
8+ language is requested. */
9+/* #undef ENABLE_NLS */
10+
11+/* Define if curses-based programs can show translated messages. */
12+/* #undef ENABLE_NLS_IN_CURSES */
13+
14+/* Define to 1 if you have the <alsa/mixer.h> header file. */
15+#define HAVE_ALSA_MIXER_H 1
16+
17+/* Define to 1 if you have the <alsa/pcm.h> header file. */
18+#define HAVE_ALSA_PCM_H 1
19+
20+/* Define to 1 if you have the <alsa/rawmidi.h> header file. */
21+#define HAVE_ALSA_RAWMIDI_H 1
22+
23+/* Define to 1 if you have the <alsa/seq.h> header file. */
24+#define HAVE_ALSA_SEQ_H 1
25+
26+/* Define to 1 if you have the <alsa/topology.h> header file. */
27+#define HAVE_ALSA_TOPOLOGY_H 1
28+
29+/* Define to 1 if you have the <alsa/use-case.h> header file. */
30+#define HAVE_ALSA_USE_CASE_H 1
31+
32+/* Define to 1 if you have the Mac OS X function CFLocaleCopyCurrent in the
33+ CoreFoundation framework. */
34+/* #undef HAVE_CFLOCALECOPYCURRENT */
35+
36+/* Define to 1 if you have the Mac OS X function CFPreferencesCopyAppValue in
37+ the CoreFoundation framework. */
38+/* #undef HAVE_CFPREFERENCESCOPYAPPVALUE */
39+
40+/* Have clock gettime */
41+#define HAVE_CLOCK_GETTIME 1
42+
43+/* Have curses set_escdelay */
44+/* #undef HAVE_CURSES_ESCDELAY */
45+
46+/* Define if the GNU dcgettext() function is already present or preinstalled.
47+ */
48+/* #undef HAVE_DCGETTEXT */
49+
50+/* Define to 1 if you have the <form.h> header file. */
51+/* #undef HAVE_FORM_H */
52+
53+/* Define if the GNU gettext() function is already present or preinstalled. */
54+/* #undef HAVE_GETTEXT */
55+
56+/* Define if you have the iconv() function and it works. */
57+/* #undef HAVE_ICONV */
58+
59+/* Define to 1 if you have the <inttypes.h> header file. */
60+#define HAVE_INTTYPES_H 1
61+
62+/* Define to 1 if you have the `asound' library (-lasound). */
63+#define HAVE_LIBASOUND 1
64+
65+/* Define to 1 if you have the `fftw3f' library (-lfftw3f). */
66+/* #undef HAVE_LIBFFTW3F */
67+
68+/* Define to 1 if you have the `m' library (-lm). */
69+#define HAVE_LIBM 1
70+
71+/* Define to 1 if you have the `pthread' library (-lpthread). */
72+#define HAVE_LIBPTHREAD 1
73+
74+/* Have librt */
75+/* #undef HAVE_LIBRT */
76+
77+/* Define to 1 if you have the `tinyalsa' library (-ltinyalsa). */
78+/* #undef HAVE_LIBTINYALSA */
79+
80+/* Define to 1 if you have the <memory.h> header file. */
81+#define HAVE_MEMORY_H 1
82+
83+/* Define to 1 if you have the <menu.h> header file. */
84+/* #undef HAVE_MENU_H */
85+
86+/* Define to 1 if you have the <panel.h> header file. */
87+/* #undef HAVE_PANEL_H */
88+
89+/* Define to 1 if you have the <samplerate.h> header file. */
90+/* #undef HAVE_SAMPLERATE_H */
91+
92+/* alsa-lib supports snd_seq_client_info_get_card */
93+#define HAVE_SEQ_CLIENT_INFO_GET_CARD 1
94+
95+/* alsa-lib supports snd_seq_client_info_get_pid */
96+#define HAVE_SEQ_CLIENT_INFO_GET_PID 1
97+
98+/* Define to 1 if you have the <stdint.h> header file. */
99+#define HAVE_STDINT_H 1
100+
101+/* Define to 1 if you have the <stdlib.h> header file. */
102+#define HAVE_STDLIB_H 1
103+
104+/* Define to 1 if you have the <strings.h> header file. */
105+#define HAVE_STRINGS_H 1
106+
107+/* Define to 1 if you have the <string.h> header file. */
108+#define HAVE_STRING_H 1
109+
110+/* Define to 1 if you have the <sys/stat.h> header file. */
111+#define HAVE_SYS_STAT_H 1
112+
113+/* Define to 1 if you have the <sys/types.h> header file. */
114+#define HAVE_SYS_TYPES_H 1
115+
116+/* Define to 1 if you have the <unistd.h> header file. */
117+#define HAVE_UNISTD_H 1
118+
119+/* Name of package */
120+#define PACKAGE "alsa-utils"
121+
122+/* Define to the address where bug reports for this package should be sent. */
123+#define PACKAGE_BUGREPORT ""
124+
125+/* Define to the full name of this package. */
126+#define PACKAGE_NAME "alsa-utils"
127+
128+/* Define to the one symbol short name of this package. */
129+#define PACKAGE_TARNAME "alsa-utils"
130+
131+/* Define to the home page for this package. */
132+#define PACKAGE_URL ""
133+
134+/* Define to 1 if you have the ANSI C header files. */
135+#define STDC_HEADERS 1
136+
137+/* Define to 1 if you can safely include both <sys/time.h> and <time.h>. */
138+#define TIME_WITH_SYS_TIME 1
139+
140+/* Define if FFADO library is available */
141+/* #undef WITH_FFADO */
142+
143+/* Enable large inode numbers on Mac OS X 10.5. */
144+#ifndef _DARWIN_USE_64_BIT_INODE
145+# define _DARWIN_USE_64_BIT_INODE 1
146+#endif
147+
148+/* Number of bits in a file offset, on hosts where this is settable. */
149+#define _FILE_OFFSET_BITS 64
150+
151+/* Define for large files, on AIX-style hosts. */
152+/* #undef _LARGE_FILES */
153+
154+/* Define to empty if `const' does not conform to ANSI C. */
155+/* #undef const */
156+
157+/* Define to `__inline__' or `__inline' if that's what the C compiler
158+ calls it, or to nothing if 'inline' is not supported under any name. */
159+#ifndef __cplusplus
160+/* #undef inline */
161+#endif
Show on old repository browser