diff options
Diffstat (limited to '')
3 files changed, 1059 insertions, 0 deletions
diff --git a/libraries/edje/src/modules/alsa_snd_player/Makefile.am b/libraries/edje/src/modules/alsa_snd_player/Makefile.am new file mode 100644 index 0000000..de015f8 --- /dev/null +++ b/libraries/edje/src/modules/alsa_snd_player/Makefile.am | |||
@@ -0,0 +1,20 @@ | |||
1 | ## Process this file with automake to produce Makefile.in | ||
2 | |||
3 | MAINTAINERCLEANFILES = Makefile.in | ||
4 | |||
5 | pkglibdir = $(REMIX_PLUGIN_DIR) | ||
6 | |||
7 | AM_CPPFLAGS = \ | ||
8 | -I. \ | ||
9 | -DPACKAGE_LIB_DIR=\"$(libdir)/remix\" \ | ||
10 | -DPACKAGE_DATA_DIR=\"$(datadir)/remix\" \ | ||
11 | @EDJE_CFLAGS@ \ | ||
12 | @REMIX_CFLAGS@ \ | ||
13 | @ALSA_CFLAGS@ | ||
14 | |||
15 | pkgdir = $(REMIX_PLUGIN_DIR) | ||
16 | pkg_LTLIBRARIES = libalsa_snd_player.la | ||
17 | |||
18 | libalsa_snd_player_la_SOURCES = alsa_snd_player.c | ||
19 | libalsa_snd_player_la_LDFLAGS = -no-undefined @lt_enable_auto_import@ -module -avoid-version @EDJE_LIBS@ @REMIX_LIBS@ @ALSA_LIBS@ | ||
20 | libalsa_snd_player_la_LIBTOOLFLAGS = --tag=disable-static | ||
diff --git a/libraries/edje/src/modules/alsa_snd_player/Makefile.in b/libraries/edje/src/modules/alsa_snd_player/Makefile.in new file mode 100644 index 0000000..ce68f41 --- /dev/null +++ b/libraries/edje/src/modules/alsa_snd_player/Makefile.in | |||
@@ -0,0 +1,634 @@ | |||
1 | # Makefile.in generated by automake 1.11.1 from Makefile.am. | ||
2 | # @configure_input@ | ||
3 | |||
4 | # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, | ||
5 | # 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, | ||
6 | # Inc. | ||
7 | # This Makefile.in is free software; the Free Software Foundation | ||
8 | # gives unlimited permission to copy and/or distribute it, | ||
9 | # with or without modifications, as long as this notice is preserved. | ||
10 | |||
11 | # This program is distributed in the hope that it will be useful, | ||
12 | # but WITHOUT ANY WARRANTY, to the extent permitted by law; without | ||
13 | # even the implied warranty of MERCHANTABILITY or FITNESS FOR A | ||
14 | # PARTICULAR PURPOSE. | ||
15 | |||
16 | @SET_MAKE@ | ||
17 | |||
18 | VPATH = @srcdir@ | ||
19 | pkgdatadir = $(datadir)/@PACKAGE@ | ||
20 | pkgincludedir = $(includedir)/@PACKAGE@ | ||
21 | pkglibexecdir = $(libexecdir)/@PACKAGE@ | ||
22 | am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd | ||
23 | install_sh_DATA = $(install_sh) -c -m 644 | ||
24 | install_sh_PROGRAM = $(install_sh) -c | ||
25 | install_sh_SCRIPT = $(install_sh) -c | ||
26 | INSTALL_HEADER = $(INSTALL_DATA) | ||
27 | transform = $(program_transform_name) | ||
28 | NORMAL_INSTALL = : | ||
29 | PRE_INSTALL = : | ||
30 | POST_INSTALL = : | ||
31 | NORMAL_UNINSTALL = : | ||
32 | PRE_UNINSTALL = : | ||
33 | POST_UNINSTALL = : | ||
34 | build_triplet = @build@ | ||
35 | host_triplet = @host@ | ||
36 | subdir = src/modules/alsa_snd_player | ||
37 | DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in | ||
38 | ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 | ||
39 | am__aclocal_m4_deps = $(top_srcdir)/m4/ac_attribute.m4 \ | ||
40 | $(top_srcdir)/m4/efl_binary.m4 \ | ||
41 | $(top_srcdir)/m4/efl_coverage.m4 \ | ||
42 | $(top_srcdir)/m4/efl_doxygen.m4 \ | ||
43 | $(top_srcdir)/m4/efl_path_max.m4 $(top_srcdir)/m4/efl_tests.m4 \ | ||
44 | $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ | ||
45 | $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ | ||
46 | $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/configure.ac | ||
47 | am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ | ||
48 | $(ACLOCAL_M4) | ||
49 | mkinstalldirs = $(install_sh) -d | ||
50 | CONFIG_HEADER = $(top_builddir)/config.h | ||
51 | CONFIG_CLEAN_FILES = | ||
52 | CONFIG_CLEAN_VPATH_FILES = | ||
53 | am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; | ||
54 | am__vpath_adj = case $$p in \ | ||
55 | $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ | ||
56 | *) f=$$p;; \ | ||
57 | esac; | ||
58 | am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; | ||
59 | am__install_max = 40 | ||
60 | am__nobase_strip_setup = \ | ||
61 | srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` | ||
62 | am__nobase_strip = \ | ||
63 | for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" | ||
64 | am__nobase_list = $(am__nobase_strip_setup); \ | ||
65 | for p in $$list; do echo "$$p $$p"; done | \ | ||
66 | sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ | ||
67 | $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ | ||
68 | if (++n[$$2] == $(am__install_max)) \ | ||
69 | { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ | ||
70 | END { for (dir in files) print dir, files[dir] }' | ||
71 | am__base_list = \ | ||
72 | sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ | ||
73 | sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | ||
74 | am__installdirs = "$(DESTDIR)$(pkgdir)" | ||
75 | LTLIBRARIES = $(pkg_LTLIBRARIES) | ||
76 | libalsa_snd_player_la_LIBADD = | ||
77 | am_libalsa_snd_player_la_OBJECTS = \ | ||
78 | libalsa_snd_player_la-alsa_snd_player.lo | ||
79 | libalsa_snd_player_la_OBJECTS = $(am_libalsa_snd_player_la_OBJECTS) | ||
80 | AM_V_lt = $(am__v_lt_$(V)) | ||
81 | am__v_lt_ = $(am__v_lt_$(AM_DEFAULT_VERBOSITY)) | ||
82 | am__v_lt_0 = --silent | ||
83 | libalsa_snd_player_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \ | ||
84 | $(libalsa_snd_player_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ | ||
85 | --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ | ||
86 | $(libalsa_snd_player_la_LDFLAGS) $(LDFLAGS) -o $@ | ||
87 | DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) | ||
88 | depcomp = $(SHELL) $(top_srcdir)/depcomp | ||
89 | am__depfiles_maybe = depfiles | ||
90 | am__mv = mv -f | ||
91 | COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ | ||
92 | $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) | ||
93 | LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ | ||
94 | $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ | ||
95 | $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ | ||
96 | $(AM_CFLAGS) $(CFLAGS) | ||
97 | AM_V_CC = $(am__v_CC_$(V)) | ||
98 | am__v_CC_ = $(am__v_CC_$(AM_DEFAULT_VERBOSITY)) | ||
99 | am__v_CC_0 = @echo " CC " $@; | ||
100 | AM_V_at = $(am__v_at_$(V)) | ||
101 | am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY)) | ||
102 | am__v_at_0 = @ | ||
103 | CCLD = $(CC) | ||
104 | LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ | ||
105 | $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ | ||
106 | $(AM_LDFLAGS) $(LDFLAGS) -o $@ | ||
107 | AM_V_CCLD = $(am__v_CCLD_$(V)) | ||
108 | am__v_CCLD_ = $(am__v_CCLD_$(AM_DEFAULT_VERBOSITY)) | ||
109 | am__v_CCLD_0 = @echo " CCLD " $@; | ||
110 | AM_V_GEN = $(am__v_GEN_$(V)) | ||
111 | am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY)) | ||
112 | am__v_GEN_0 = @echo " GEN " $@; | ||
113 | SOURCES = $(libalsa_snd_player_la_SOURCES) | ||
114 | DIST_SOURCES = $(libalsa_snd_player_la_SOURCES) | ||
115 | ETAGS = etags | ||
116 | CTAGS = ctags | ||
117 | DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) | ||
118 | pkglibdir = $(REMIX_PLUGIN_DIR) | ||
119 | ACLOCAL = @ACLOCAL@ | ||
120 | ALLOCA = @ALLOCA@ | ||
121 | ALSA_CFLAGS = @ALSA_CFLAGS@ | ||
122 | ALSA_LIBS = @ALSA_LIBS@ | ||
123 | AMTAR = @AMTAR@ | ||
124 | AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ | ||
125 | AR = @AR@ | ||
126 | AS = @AS@ | ||
127 | AUTOCONF = @AUTOCONF@ | ||
128 | AUTOHEADER = @AUTOHEADER@ | ||
129 | AUTOMAKE = @AUTOMAKE@ | ||
130 | AWK = @AWK@ | ||
131 | CC = @CC@ | ||
132 | CCDEPMODE = @CCDEPMODE@ | ||
133 | CFLAGS = @CFLAGS@ | ||
134 | CHECK_CFLAGS = @CHECK_CFLAGS@ | ||
135 | CHECK_LIBS = @CHECK_LIBS@ | ||
136 | CPP = @CPP@ | ||
137 | CPPFLAGS = @CPPFLAGS@ | ||
138 | CYGPATH_W = @CYGPATH_W@ | ||
139 | DEFS = @DEFS@ | ||
140 | DEPDIR = @DEPDIR@ | ||
141 | DLLTOOL = @DLLTOOL@ | ||
142 | DSYMUTIL = @DSYMUTIL@ | ||
143 | DUMPBIN = @DUMPBIN@ | ||
144 | ECHO_C = @ECHO_C@ | ||
145 | ECHO_N = @ECHO_N@ | ||
146 | ECHO_T = @ECHO_T@ | ||
147 | ECORE_IMF_CFLAGS = @ECORE_IMF_CFLAGS@ | ||
148 | ECORE_IMF_LIBS = @ECORE_IMF_LIBS@ | ||
149 | EDJE_CC_CFLAGS = @EDJE_CC_CFLAGS@ | ||
150 | EDJE_CC_LIBS = @EDJE_CC_LIBS@ | ||
151 | EDJE_CC_PRG = @EDJE_CC_PRG@ | ||
152 | EDJE_CFLAGS = @EDJE_CFLAGS@ | ||
153 | EDJE_DECC_CFLAGS = @EDJE_DECC_CFLAGS@ | ||
154 | EDJE_DECC_LIBS = @EDJE_DECC_LIBS@ | ||
155 | EDJE_DECC_PRG = @EDJE_DECC_PRG@ | ||
156 | EDJE_EXTERNAL_INSPECTOR_CFLAGS = @EDJE_EXTERNAL_INSPECTOR_CFLAGS@ | ||
157 | EDJE_EXTERNAL_INSPECTOR_LIBS = @EDJE_EXTERNAL_INSPECTOR_LIBS@ | ||
158 | EDJE_EXTERNAL_INSPECTOR_PRG = @EDJE_EXTERNAL_INSPECTOR_PRG@ | ||
159 | EDJE_INSPECTOR_CFLAGS = @EDJE_INSPECTOR_CFLAGS@ | ||
160 | EDJE_INSPECTOR_LIBS = @EDJE_INSPECTOR_LIBS@ | ||
161 | EDJE_INSPECTOR_PRG = @EDJE_INSPECTOR_PRG@ | ||
162 | EDJE_LIBS = @EDJE_LIBS@ | ||
163 | EDJE_PLAYER_CFLAGS = @EDJE_PLAYER_CFLAGS@ | ||
164 | EDJE_PLAYER_LIBS = @EDJE_PLAYER_LIBS@ | ||
165 | EDJE_PLAYER_PRG = @EDJE_PLAYER_PRG@ | ||
166 | EDJE_RECC_PRG = @EDJE_RECC_PRG@ | ||
167 | EFL_COVERAGE_CFLAGS = @EFL_COVERAGE_CFLAGS@ | ||
168 | EFL_COVERAGE_LIBS = @EFL_COVERAGE_LIBS@ | ||
169 | EFL_EDJE_BUILD = @EFL_EDJE_BUILD@ | ||
170 | EGREP = @EGREP@ | ||
171 | EVIL_CFLAGS = @EVIL_CFLAGS@ | ||
172 | EVIL_LIBS = @EVIL_LIBS@ | ||
173 | EXEEXT = @EXEEXT@ | ||
174 | FGREP = @FGREP@ | ||
175 | FLAC_CFLAGS = @FLAC_CFLAGS@ | ||
176 | FLAC_LIBS = @FLAC_LIBS@ | ||
177 | GREP = @GREP@ | ||
178 | INSTALL = @INSTALL@ | ||
179 | INSTALL_DATA = @INSTALL_DATA@ | ||
180 | INSTALL_PROGRAM = @INSTALL_PROGRAM@ | ||
181 | INSTALL_SCRIPT = @INSTALL_SCRIPT@ | ||
182 | INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ | ||
183 | LD = @LD@ | ||
184 | LDFLAGS = @LDFLAGS@ | ||
185 | LIBOBJS = @LIBOBJS@ | ||
186 | LIBS = @LIBS@ | ||
187 | LIBTOOL = @LIBTOOL@ | ||
188 | LIPO = @LIPO@ | ||
189 | LN_S = @LN_S@ | ||
190 | LTLIBOBJS = @LTLIBOBJS@ | ||
191 | LUA_CFLAGS = @LUA_CFLAGS@ | ||
192 | LUA_LIBS = @LUA_LIBS@ | ||
193 | MAKEINFO = @MAKEINFO@ | ||
194 | MINIMAL_CFLAGS = @MINIMAL_CFLAGS@ | ||
195 | MINIMAL_LIBS = @MINIMAL_LIBS@ | ||
196 | MKDIR_P = @MKDIR_P@ | ||
197 | MODULE_ARCH = @MODULE_ARCH@ | ||
198 | NM = @NM@ | ||
199 | NMEDIT = @NMEDIT@ | ||
200 | OBJDUMP = @OBJDUMP@ | ||
201 | OBJEXT = @OBJEXT@ | ||
202 | OTOOL = @OTOOL@ | ||
203 | OTOOL64 = @OTOOL64@ | ||
204 | PACKAGE = @PACKAGE@ | ||
205 | PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ | ||
206 | PACKAGE_NAME = @PACKAGE_NAME@ | ||
207 | PACKAGE_STRING = @PACKAGE_STRING@ | ||
208 | PACKAGE_TARNAME = @PACKAGE_TARNAME@ | ||
209 | PACKAGE_URL = @PACKAGE_URL@ | ||
210 | PACKAGE_VERSION = @PACKAGE_VERSION@ | ||
211 | PATH_SEPARATOR = @PATH_SEPARATOR@ | ||
212 | PKG_CONFIG = @PKG_CONFIG@ | ||
213 | PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ | ||
214 | PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ | ||
215 | PYTHON = @PYTHON@ | ||
216 | PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@ | ||
217 | PYTHON_PLATFORM = @PYTHON_PLATFORM@ | ||
218 | PYTHON_PREFIX = @PYTHON_PREFIX@ | ||
219 | PYTHON_VERSION = @PYTHON_VERSION@ | ||
220 | RANLIB = @RANLIB@ | ||
221 | REMIX_CFLAGS = @REMIX_CFLAGS@ | ||
222 | REMIX_LIBS = @REMIX_LIBS@ | ||
223 | REMIX_PLUGIN_DIR = @REMIX_PLUGIN_DIR@ | ||
224 | SED = @SED@ | ||
225 | SET_MAKE = @SET_MAKE@ | ||
226 | SHELL = @SHELL@ | ||
227 | SNDFILE_CFLAGS = @SNDFILE_CFLAGS@ | ||
228 | SNDFILE_LIBS = @SNDFILE_LIBS@ | ||
229 | STRIP = @STRIP@ | ||
230 | VERSION = @VERSION@ | ||
231 | VMAJ = @VMAJ@ | ||
232 | VORBISENC_CFLAGS = @VORBISENC_CFLAGS@ | ||
233 | VORBISENC_LIBS = @VORBISENC_LIBS@ | ||
234 | abs_builddir = @abs_builddir@ | ||
235 | abs_srcdir = @abs_srcdir@ | ||
236 | abs_top_builddir = @abs_top_builddir@ | ||
237 | abs_top_srcdir = @abs_top_srcdir@ | ||
238 | ac_ct_CC = @ac_ct_CC@ | ||
239 | ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ | ||
240 | am__include = @am__include@ | ||
241 | am__leading_dot = @am__leading_dot@ | ||
242 | am__quote = @am__quote@ | ||
243 | am__tar = @am__tar@ | ||
244 | am__untar = @am__untar@ | ||
245 | bindir = @bindir@ | ||
246 | build = @build@ | ||
247 | build_alias = @build_alias@ | ||
248 | build_cpu = @build_cpu@ | ||
249 | build_os = @build_os@ | ||
250 | build_vendor = @build_vendor@ | ||
251 | builddir = @builddir@ | ||
252 | datadir = @datadir@ | ||
253 | datarootdir = @datarootdir@ | ||
254 | docdir = @docdir@ | ||
255 | dvidir = @dvidir@ | ||
256 | edje_cc = @edje_cc@ | ||
257 | efl_doxygen = @efl_doxygen@ | ||
258 | efl_have_doxygen = @efl_have_doxygen@ | ||
259 | exec_prefix = @exec_prefix@ | ||
260 | have_lcov = @have_lcov@ | ||
261 | host = @host@ | ||
262 | host_alias = @host_alias@ | ||
263 | host_cpu = @host_cpu@ | ||
264 | host_os = @host_os@ | ||
265 | host_vendor = @host_vendor@ | ||
266 | htmldir = @htmldir@ | ||
267 | includedir = @includedir@ | ||
268 | infodir = @infodir@ | ||
269 | install_sh = @install_sh@ | ||
270 | libdir = @libdir@ | ||
271 | libexecdir = @libexecdir@ | ||
272 | localedir = @localedir@ | ||
273 | localstatedir = @localstatedir@ | ||
274 | lt_ECHO = @lt_ECHO@ | ||
275 | lt_enable_auto_import = @lt_enable_auto_import@ | ||
276 | lua_libs = @lua_libs@ | ||
277 | mandir = @mandir@ | ||
278 | mkdir_p = @mkdir_p@ | ||
279 | oldincludedir = @oldincludedir@ | ||
280 | pdfdir = @pdfdir@ | ||
281 | pkgconfig_requires_private = @pkgconfig_requires_private@ | ||
282 | pkgpyexecdir = @pkgpyexecdir@ | ||
283 | pkgpythondir = @pkgpythondir@ | ||
284 | prefix = @prefix@ | ||
285 | program_transform_name = @program_transform_name@ | ||
286 | psdir = @psdir@ | ||
287 | pyexecdir = @pyexecdir@ | ||
288 | pythondir = @pythondir@ | ||
289 | release_info = @release_info@ | ||
290 | requirement_edje = @requirement_edje@ | ||
291 | sbindir = @sbindir@ | ||
292 | sharedstatedir = @sharedstatedir@ | ||
293 | srcdir = @srcdir@ | ||
294 | sysconfdir = @sysconfdir@ | ||
295 | target_alias = @target_alias@ | ||
296 | top_build_prefix = @top_build_prefix@ | ||
297 | top_builddir = @top_builddir@ | ||
298 | top_srcdir = @top_srcdir@ | ||
299 | version_info = @version_info@ | ||
300 | vimdir = @vimdir@ | ||
301 | MAINTAINERCLEANFILES = Makefile.in | ||
302 | AM_CPPFLAGS = \ | ||
303 | -I. \ | ||
304 | -DPACKAGE_LIB_DIR=\"$(libdir)/remix\" \ | ||
305 | -DPACKAGE_DATA_DIR=\"$(datadir)/remix\" \ | ||
306 | @EDJE_CFLAGS@ \ | ||
307 | @REMIX_CFLAGS@ \ | ||
308 | @ALSA_CFLAGS@ | ||
309 | |||
310 | pkgdir = $(REMIX_PLUGIN_DIR) | ||
311 | pkg_LTLIBRARIES = libalsa_snd_player.la | ||
312 | libalsa_snd_player_la_SOURCES = alsa_snd_player.c | ||
313 | libalsa_snd_player_la_LDFLAGS = -no-undefined @lt_enable_auto_import@ -module -avoid-version @EDJE_LIBS@ @REMIX_LIBS@ @ALSA_LIBS@ | ||
314 | libalsa_snd_player_la_LIBTOOLFLAGS = --tag=disable-static | ||
315 | all: all-am | ||
316 | |||
317 | .SUFFIXES: | ||
318 | .SUFFIXES: .c .lo .o .obj | ||
319 | $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) | ||
320 | @for dep in $?; do \ | ||
321 | case '$(am__configure_deps)' in \ | ||
322 | *$$dep*) \ | ||
323 | ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ | ||
324 | && { if test -f $@; then exit 0; else break; fi; }; \ | ||
325 | exit 1;; \ | ||
326 | esac; \ | ||
327 | done; \ | ||
328 | echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/modules/alsa_snd_player/Makefile'; \ | ||
329 | $(am__cd) $(top_srcdir) && \ | ||
330 | $(AUTOMAKE) --gnu src/modules/alsa_snd_player/Makefile | ||
331 | .PRECIOUS: Makefile | ||
332 | Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status | ||
333 | @case '$?' in \ | ||
334 | *config.status*) \ | ||
335 | cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ | ||
336 | *) \ | ||
337 | echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ | ||
338 | cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ | ||
339 | esac; | ||
340 | |||
341 | $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) | ||
342 | cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh | ||
343 | |||
344 | $(top_srcdir)/configure: $(am__configure_deps) | ||
345 | cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh | ||
346 | $(ACLOCAL_M4): $(am__aclocal_m4_deps) | ||
347 | cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh | ||
348 | $(am__aclocal_m4_deps): | ||
349 | install-pkgLTLIBRARIES: $(pkg_LTLIBRARIES) | ||
350 | @$(NORMAL_INSTALL) | ||
351 | test -z "$(pkgdir)" || $(MKDIR_P) "$(DESTDIR)$(pkgdir)" | ||
352 | @list='$(pkg_LTLIBRARIES)'; test -n "$(pkgdir)" || list=; \ | ||
353 | list2=; for p in $$list; do \ | ||
354 | if test -f $$p; then \ | ||
355 | list2="$$list2 $$p"; \ | ||
356 | else :; fi; \ | ||
357 | done; \ | ||
358 | test -z "$$list2" || { \ | ||
359 | echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(pkgdir)'"; \ | ||
360 | $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(pkgdir)"; \ | ||
361 | } | ||
362 | |||
363 | uninstall-pkgLTLIBRARIES: | ||
364 | @$(NORMAL_UNINSTALL) | ||
365 | @list='$(pkg_LTLIBRARIES)'; test -n "$(pkgdir)" || list=; \ | ||
366 | for p in $$list; do \ | ||
367 | $(am__strip_dir) \ | ||
368 | echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(pkgdir)/$$f'"; \ | ||
369 | $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(pkgdir)/$$f"; \ | ||
370 | done | ||
371 | |||
372 | clean-pkgLTLIBRARIES: | ||
373 | -test -z "$(pkg_LTLIBRARIES)" || rm -f $(pkg_LTLIBRARIES) | ||
374 | @list='$(pkg_LTLIBRARIES)'; for p in $$list; do \ | ||
375 | dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ | ||
376 | test "$$dir" != "$$p" || dir=.; \ | ||
377 | echo "rm -f \"$${dir}/so_locations\""; \ | ||
378 | rm -f "$${dir}/so_locations"; \ | ||
379 | done | ||
380 | libalsa_snd_player.la: $(libalsa_snd_player_la_OBJECTS) $(libalsa_snd_player_la_DEPENDENCIES) | ||
381 | $(AM_V_CCLD)$(libalsa_snd_player_la_LINK) -rpath $(pkgdir) $(libalsa_snd_player_la_OBJECTS) $(libalsa_snd_player_la_LIBADD) $(LIBS) | ||
382 | |||
383 | mostlyclean-compile: | ||
384 | -rm -f *.$(OBJEXT) | ||
385 | |||
386 | distclean-compile: | ||
387 | -rm -f *.tab.c | ||
388 | |||
389 | @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libalsa_snd_player_la-alsa_snd_player.Plo@am__quote@ | ||
390 | |||
391 | .c.o: | ||
392 | @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< | ||
393 | @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po | ||
394 | @am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ | ||
395 | @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ | ||
396 | @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ | ||
397 | @am__fastdepCC_FALSE@ $(COMPILE) -c $< | ||
398 | |||
399 | .c.obj: | ||
400 | @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` | ||
401 | @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po | ||
402 | @am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ | ||
403 | @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ | ||
404 | @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ | ||
405 | @am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` | ||
406 | |||
407 | .c.lo: | ||
408 | @am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< | ||
409 | @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo | ||
410 | @am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ | ||
411 | @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ | ||
412 | @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ | ||
413 | @am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< | ||
414 | |||
415 | libalsa_snd_player_la-alsa_snd_player.lo: alsa_snd_player.c | ||
416 | @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(libalsa_snd_player_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libalsa_snd_player_la-alsa_snd_player.lo -MD -MP -MF $(DEPDIR)/libalsa_snd_player_la-alsa_snd_player.Tpo -c -o libalsa_snd_player_la-alsa_snd_player.lo `test -f 'alsa_snd_player.c' || echo '$(srcdir)/'`alsa_snd_player.c | ||
417 | @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libalsa_snd_player_la-alsa_snd_player.Tpo $(DEPDIR)/libalsa_snd_player_la-alsa_snd_player.Plo | ||
418 | @am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ | ||
419 | @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='alsa_snd_player.c' object='libalsa_snd_player_la-alsa_snd_player.lo' libtool=yes @AMDEPBACKSLASH@ | ||
420 | @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ | ||
421 | @am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(libalsa_snd_player_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libalsa_snd_player_la-alsa_snd_player.lo `test -f 'alsa_snd_player.c' || echo '$(srcdir)/'`alsa_snd_player.c | ||
422 | |||
423 | mostlyclean-libtool: | ||
424 | -rm -f *.lo | ||
425 | |||
426 | clean-libtool: | ||
427 | -rm -rf .libs _libs | ||
428 | |||
429 | ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) | ||
430 | list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ | ||
431 | unique=`for i in $$list; do \ | ||
432 | if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ | ||
433 | done | \ | ||
434 | $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ | ||
435 | END { if (nonempty) { for (i in files) print i; }; }'`; \ | ||
436 | mkid -fID $$unique | ||
437 | tags: TAGS | ||
438 | |||
439 | TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ | ||
440 | $(TAGS_FILES) $(LISP) | ||
441 | set x; \ | ||
442 | here=`pwd`; \ | ||
443 | list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ | ||
444 | unique=`for i in $$list; do \ | ||
445 | if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ | ||
446 | done | \ | ||
447 | $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ | ||
448 | END { if (nonempty) { for (i in files) print i; }; }'`; \ | ||
449 | shift; \ | ||
450 | if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ | ||
451 | test -n "$$unique" || unique=$$empty_fix; \ | ||
452 | if test $$# -gt 0; then \ | ||
453 | $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ | ||
454 | "$$@" $$unique; \ | ||
455 | else \ | ||
456 | $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ | ||
457 | $$unique; \ | ||
458 | fi; \ | ||
459 | fi | ||
460 | ctags: CTAGS | ||
461 | CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ | ||
462 | $(TAGS_FILES) $(LISP) | ||
463 | list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ | ||
464 | unique=`for i in $$list; do \ | ||
465 | if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ | ||
466 | done | \ | ||
467 | $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ | ||
468 | END { if (nonempty) { for (i in files) print i; }; }'`; \ | ||
469 | test -z "$(CTAGS_ARGS)$$unique" \ | ||
470 | || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ | ||
471 | $$unique | ||
472 | |||
473 | GTAGS: | ||
474 | here=`$(am__cd) $(top_builddir) && pwd` \ | ||
475 | && $(am__cd) $(top_srcdir) \ | ||
476 | && gtags -i $(GTAGS_ARGS) "$$here" | ||
477 | |||
478 | distclean-tags: | ||
479 | -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags | ||
480 | |||
481 | distdir: $(DISTFILES) | ||
482 | @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ | ||
483 | topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ | ||
484 | list='$(DISTFILES)'; \ | ||
485 | dist_files=`for file in $$list; do echo $$file; done | \ | ||
486 | sed -e "s|^$$srcdirstrip/||;t" \ | ||
487 | -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ | ||
488 | case $$dist_files in \ | ||
489 | */*) $(MKDIR_P) `echo "$$dist_files" | \ | ||
490 | sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ | ||
491 | sort -u` ;; \ | ||
492 | esac; \ | ||
493 | for file in $$dist_files; do \ | ||
494 | if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ | ||
495 | if test -d $$d/$$file; then \ | ||
496 | dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ | ||
497 | if test -d "$(distdir)/$$file"; then \ | ||
498 | find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ | ||
499 | fi; \ | ||
500 | if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ | ||
501 | cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ | ||
502 | find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ | ||
503 | fi; \ | ||
504 | cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ | ||
505 | else \ | ||
506 | test -f "$(distdir)/$$file" \ | ||
507 | || cp -p $$d/$$file "$(distdir)/$$file" \ | ||
508 | || exit 1; \ | ||
509 | fi; \ | ||
510 | done | ||
511 | check-am: all-am | ||
512 | check: check-am | ||
513 | all-am: Makefile $(LTLIBRARIES) | ||
514 | installdirs: | ||
515 | for dir in "$(DESTDIR)$(pkgdir)"; do \ | ||
516 | test -z "$$dir" || $(MKDIR_P) "$$dir"; \ | ||
517 | done | ||
518 | install: install-am | ||
519 | install-exec: install-exec-am | ||
520 | install-data: install-data-am | ||
521 | uninstall: uninstall-am | ||
522 | |||
523 | install-am: all-am | ||
524 | @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am | ||
525 | |||
526 | installcheck: installcheck-am | ||
527 | install-strip: | ||
528 | $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ | ||
529 | install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ | ||
530 | `test -z '$(STRIP)' || \ | ||
531 | echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install | ||
532 | mostlyclean-generic: | ||
533 | |||
534 | clean-generic: | ||
535 | |||
536 | distclean-generic: | ||
537 | -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) | ||
538 | -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) | ||
539 | |||
540 | maintainer-clean-generic: | ||
541 | @echo "This command is intended for maintainers to use" | ||
542 | @echo "it deletes files that may require special tools to rebuild." | ||
543 | -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) | ||
544 | clean: clean-am | ||
545 | |||
546 | clean-am: clean-generic clean-libtool clean-pkgLTLIBRARIES \ | ||
547 | mostlyclean-am | ||
548 | |||
549 | distclean: distclean-am | ||
550 | -rm -rf ./$(DEPDIR) | ||
551 | -rm -f Makefile | ||
552 | distclean-am: clean-am distclean-compile distclean-generic \ | ||
553 | distclean-tags | ||
554 | |||
555 | dvi: dvi-am | ||
556 | |||
557 | dvi-am: | ||
558 | |||
559 | html: html-am | ||
560 | |||
561 | html-am: | ||
562 | |||
563 | info: info-am | ||
564 | |||
565 | info-am: | ||
566 | |||
567 | install-data-am: install-pkgLTLIBRARIES | ||
568 | |||
569 | install-dvi: install-dvi-am | ||
570 | |||
571 | install-dvi-am: | ||
572 | |||
573 | install-exec-am: | ||
574 | |||
575 | install-html: install-html-am | ||
576 | |||
577 | install-html-am: | ||
578 | |||
579 | install-info: install-info-am | ||
580 | |||
581 | install-info-am: | ||
582 | |||
583 | install-man: | ||
584 | |||
585 | install-pdf: install-pdf-am | ||
586 | |||
587 | install-pdf-am: | ||
588 | |||
589 | install-ps: install-ps-am | ||
590 | |||
591 | install-ps-am: | ||
592 | |||
593 | installcheck-am: | ||
594 | |||
595 | maintainer-clean: maintainer-clean-am | ||
596 | -rm -rf ./$(DEPDIR) | ||
597 | -rm -f Makefile | ||
598 | maintainer-clean-am: distclean-am maintainer-clean-generic | ||
599 | |||
600 | mostlyclean: mostlyclean-am | ||
601 | |||
602 | mostlyclean-am: mostlyclean-compile mostlyclean-generic \ | ||
603 | mostlyclean-libtool | ||
604 | |||
605 | pdf: pdf-am | ||
606 | |||
607 | pdf-am: | ||
608 | |||
609 | ps: ps-am | ||
610 | |||
611 | ps-am: | ||
612 | |||
613 | uninstall-am: uninstall-pkgLTLIBRARIES | ||
614 | |||
615 | .MAKE: install-am install-strip | ||
616 | |||
617 | .PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ | ||
618 | clean-libtool clean-pkgLTLIBRARIES ctags distclean \ | ||
619 | distclean-compile distclean-generic distclean-libtool \ | ||
620 | distclean-tags distdir dvi dvi-am html html-am info info-am \ | ||
621 | install install-am install-data install-data-am install-dvi \ | ||
622 | install-dvi-am install-exec install-exec-am install-html \ | ||
623 | install-html-am install-info install-info-am install-man \ | ||
624 | install-pdf install-pdf-am install-pkgLTLIBRARIES install-ps \ | ||
625 | install-ps-am install-strip installcheck installcheck-am \ | ||
626 | installdirs maintainer-clean maintainer-clean-generic \ | ||
627 | mostlyclean mostlyclean-compile mostlyclean-generic \ | ||
628 | mostlyclean-libtool pdf pdf-am ps ps-am tags uninstall \ | ||
629 | uninstall-am uninstall-pkgLTLIBRARIES | ||
630 | |||
631 | |||
632 | # Tell versions [3.59,3.63) of GNU make to not export all variables. | ||
633 | # Otherwise a system limit (for SysV at least) may be exceeded. | ||
634 | .NOEXPORT: | ||
diff --git a/libraries/edje/src/modules/alsa_snd_player/alsa_snd_player.c b/libraries/edje/src/modules/alsa_snd_player/alsa_snd_player.c new file mode 100644 index 0000000..f397255 --- /dev/null +++ b/libraries/edje/src/modules/alsa_snd_player/alsa_snd_player.c | |||
@@ -0,0 +1,405 @@ | |||
1 | /* | ||
2 | * Remix ALSA Player: ALSA audio output | ||
3 | * | ||
4 | * Govindaraju SM <govi.sm@samsung.com>, October 2011 | ||
5 | * Prince Kumar Dubey <prince.dubey@samsung.com>, October 2011 | ||
6 | */ | ||
7 | |||
8 | #include "config.h" | ||
9 | #include <stdio.h> | ||
10 | #include <remix/remix.h> | ||
11 | #include <alsa/asoundlib.h> | ||
12 | #include <Eina.h> | ||
13 | #ifdef HAVE_LIBSNDFILE | ||
14 | #include <sndfile.h> | ||
15 | #endif | ||
16 | |||
17 | #define ALSA_PLAYER_BUFFERLEN 2048 | ||
18 | |||
19 | typedef struct _Alsa_Player_Data Alsa_Player_Data; | ||
20 | typedef short PLAYER_PCM; | ||
21 | |||
22 | struct _Alsa_Player_Data | ||
23 | { | ||
24 | RemixPCM databuffer[ALSA_PLAYER_BUFFERLEN]; | ||
25 | snd_pcm_t *alsa_dev; | ||
26 | unsigned int stereo; | ||
27 | unsigned channels; | ||
28 | unsigned int frequency; | ||
29 | }; | ||
30 | |||
31 | static int _log_dom = -1; | ||
32 | static int init_count = 0; | ||
33 | |||
34 | #ifdef WRN | ||
35 | # undef WRN | ||
36 | #endif | ||
37 | #define WRN(...) EINA_LOG_DOM_WARN(_log_dom, __VA_ARGS__) | ||
38 | |||
39 | //#define MIXDBG 1 | ||
40 | |||
41 | /* Optimisation dependencies: none */ | ||
42 | static RemixBase *alsa_player_optimise(RemixEnv *env, RemixBase *base); | ||
43 | |||
44 | static snd_pcm_t * | ||
45 | alsa_open(int channels, unsigned int samplerate, unsigned int *real_samplerate) | ||
46 | { | ||
47 | const char *device = "default"; | ||
48 | snd_pcm_t *alsa_dev = NULL; | ||
49 | snd_pcm_hw_params_t *hw_params; | ||
50 | snd_pcm_uframes_t alsa_buffer_frames; | ||
51 | snd_pcm_uframes_t alsa_period_size; | ||
52 | unsigned int samplerate_ret = 0; | ||
53 | int err; | ||
54 | |||
55 | alsa_buffer_frames = ALSA_PLAYER_BUFFERLEN; | ||
56 | alsa_period_size = ALSA_PLAYER_BUFFERLEN / 4; | ||
57 | |||
58 | if ((err = snd_pcm_open(&alsa_dev, device, SND_PCM_STREAM_PLAYBACK, 0)) < 0) | ||
59 | { | ||
60 | WRN("cannot open alsa playback stream (%s)", snd_strerror(err)); | ||
61 | goto catch_error; | ||
62 | } | ||
63 | snd_pcm_hw_params_alloca(&hw_params); | ||
64 | if ((err = snd_pcm_hw_params_any(alsa_dev, hw_params)) < 0) | ||
65 | { | ||
66 | WRN("cannot initialize snd hw params (%s)", snd_strerror(err)); | ||
67 | goto catch_error; | ||
68 | } | ||
69 | if ((err = snd_pcm_hw_params_set_access(alsa_dev, hw_params, | ||
70 | SND_PCM_ACCESS_RW_INTERLEAVED)) < 0) | ||
71 | { | ||
72 | WRN("cannot set interleaved access (%s)", snd_strerror(err)); | ||
73 | goto catch_error; | ||
74 | } | ||
75 | if ((err = snd_pcm_hw_params_set_format(alsa_dev, hw_params, | ||
76 | SND_PCM_FORMAT_FLOAT)) < 0) | ||
77 | { | ||
78 | WRN("cannot set float sample format (%s)", snd_strerror(err)); | ||
79 | goto catch_error; | ||
80 | } | ||
81 | #ifdef MIXDBG // testing/debugging by making output samplerate be 48khz | ||
82 | samplerate_ret = 48000; | ||
83 | if ((err = snd_pcm_hw_params_set_rate_near(alsa_dev, hw_params, | ||
84 | &samplerate_ret, 0)) < 0) | ||
85 | { | ||
86 | WRN("cannot set sample rate (%s)", snd_strerror(err)); | ||
87 | goto catch_error; | ||
88 | } | ||
89 | #else | ||
90 | if ((err = snd_pcm_hw_params_set_rate_near(alsa_dev, hw_params, | ||
91 | &samplerate, 0)) < 0) | ||
92 | { | ||
93 | WRN("cannot set sample rate (%s)", snd_strerror(err)); | ||
94 | goto catch_error; | ||
95 | } | ||
96 | #endif | ||
97 | if ((err = snd_pcm_hw_params_set_channels(alsa_dev, hw_params, channels)) < 0) | ||
98 | { | ||
99 | WRN("cannot set channel count (%s)", snd_strerror(err)); | ||
100 | goto catch_error; | ||
101 | } | ||
102 | if ((err = snd_pcm_hw_params_set_buffer_size_near(alsa_dev, hw_params, | ||
103 | &alsa_buffer_frames)) < 0) | ||
104 | { | ||
105 | WRN("cannot set buffer size (%s)", snd_strerror(err)); | ||
106 | goto catch_error; | ||
107 | } | ||
108 | if ((err = snd_pcm_hw_params_set_period_size_near(alsa_dev, hw_params, | ||
109 | &alsa_period_size, 0)) < 0) | ||
110 | { | ||
111 | WRN("cannot set period size (%s)", snd_strerror(err)); | ||
112 | goto catch_error; | ||
113 | } | ||
114 | if ((err = snd_pcm_hw_params(alsa_dev, hw_params)) < 0) | ||
115 | { | ||
116 | WRN("cannot set parameters (%s)", snd_strerror(err)); | ||
117 | goto catch_error; | ||
118 | } | ||
119 | if ((err = snd_pcm_hw_params_get_rate(hw_params, &samplerate_ret, 0)) < 0) | ||
120 | { | ||
121 | WRN("cannot get samplerate (%s)", snd_strerror(err)); | ||
122 | goto catch_error; | ||
123 | } | ||
124 | if ((err = snd_pcm_prepare(alsa_dev)) < 0) | ||
125 | { | ||
126 | WRN("cannot prepare audio for use (%s)", snd_strerror(err)); | ||
127 | goto catch_error; | ||
128 | } | ||
129 | if (real_samplerate) *real_samplerate = samplerate_ret; | ||
130 | |||
131 | catch_error: | ||
132 | if ((err < 0) && (alsa_dev != NULL)) | ||
133 | { | ||
134 | snd_pcm_close(alsa_dev); | ||
135 | return NULL; | ||
136 | } | ||
137 | return alsa_dev; | ||
138 | } | ||
139 | |||
140 | static RemixBase * | ||
141 | alsa_player_reset_device(RemixEnv *env, RemixBase *base) | ||
142 | { | ||
143 | Alsa_Player_Data *player_data = remix_base_get_instance_data(env, base); | ||
144 | unsigned int real_samplerate = 0; | ||
145 | |||
146 | if (player_data->alsa_dev) | ||
147 | { | ||
148 | snd_pcm_drain(player_data->alsa_dev); | ||
149 | snd_pcm_close(player_data->alsa_dev); | ||
150 | } | ||
151 | player_data->alsa_dev = alsa_open(player_data->channels, | ||
152 | player_data->frequency, | ||
153 | &real_samplerate); | ||
154 | if (!player_data->alsa_dev) | ||
155 | { | ||
156 | remix_set_error(env, REMIX_ERROR_SYSTEM); | ||
157 | return RemixNone; | ||
158 | } | ||
159 | // printf("%i != %i\n", real_samplerate, player_data->frequency); | ||
160 | if (real_samplerate != player_data->frequency) | ||
161 | { | ||
162 | player_data->frequency = real_samplerate; | ||
163 | remix_set_samplerate(env, player_data->frequency); | ||
164 | } | ||
165 | return base; | ||
166 | } | ||
167 | |||
168 | static RemixBase * | ||
169 | alsa_player_init(RemixEnv *env, RemixBase *base, CDSet *parameters __UNUSED__) | ||
170 | { | ||
171 | CDSet *channels; | ||
172 | Alsa_Player_Data *player_data = calloc(1, sizeof(Alsa_Player_Data)); | ||
173 | |||
174 | if (!player_data) | ||
175 | { | ||
176 | remix_set_error(env, REMIX_ERROR_SYSTEM); | ||
177 | return RemixNone; | ||
178 | } | ||
179 | |||
180 | init_count++; | ||
181 | if (init_count == 1) | ||
182 | { | ||
183 | eina_init(); | ||
184 | _log_dom = eina_log_domain_register("remix-alsa", EINA_COLOR_CYAN); | ||
185 | } | ||
186 | |||
187 | remix_base_set_instance_data(env, base, player_data); | ||
188 | channels = remix_get_channels(env); | ||
189 | |||
190 | player_data->channels = cd_set_size(env, channels); | ||
191 | if (player_data->channels == 1) player_data->stereo = 0; | ||
192 | else if (player_data->channels == 2) player_data->stereo = 1; | ||
193 | |||
194 | player_data->frequency = remix_get_samplerate(env); | ||
195 | alsa_player_reset_device(env, base); | ||
196 | base = alsa_player_optimise(env, base); | ||
197 | return base; | ||
198 | } | ||
199 | |||
200 | static RemixBase * | ||
201 | alsa_player_clone(RemixEnv *env, RemixBase *base __UNUSED__) | ||
202 | { | ||
203 | RemixBase *new_player = remix_base_new(env); | ||
204 | alsa_player_init(env, new_player, NULL); | ||
205 | return new_player; | ||
206 | } | ||
207 | |||
208 | static int | ||
209 | alsa_player_destroy(RemixEnv *env, RemixBase *base) | ||
210 | { | ||
211 | Alsa_Player_Data *player_data = remix_base_get_instance_data(env, base); | ||
212 | |||
213 | if (player_data->alsa_dev) | ||
214 | { | ||
215 | snd_pcm_drain(player_data->alsa_dev); | ||
216 | snd_pcm_close(player_data->alsa_dev); | ||
217 | } | ||
218 | free(player_data); | ||
219 | init_count--; | ||
220 | if (init_count == 0) | ||
221 | { | ||
222 | eina_log_domain_unregister(_log_dom); | ||
223 | _log_dom = -1; | ||
224 | eina_shutdown(); | ||
225 | } | ||
226 | return 0; | ||
227 | } | ||
228 | |||
229 | static int | ||
230 | alsa_player_ready(RemixEnv *env, RemixBase *base) | ||
231 | { | ||
232 | Alsa_Player_Data *player_data = remix_base_get_instance_data(env, base); | ||
233 | RemixCount nr_channels; | ||
234 | CDSet *channels; | ||
235 | int samplerate; | ||
236 | |||
237 | channels = remix_get_channels(env); | ||
238 | samplerate = (int)remix_get_samplerate(env); | ||
239 | nr_channels = cd_set_size(env, channels); | ||
240 | return ((samplerate == (int)player_data->frequency) && | ||
241 | (((nr_channels == 1) && (player_data->stereo == 0)) || | ||
242 | ((nr_channels > 1) && (player_data->stereo == 1)))); | ||
243 | } | ||
244 | |||
245 | static RemixBase * | ||
246 | alsa_player_prepare(RemixEnv *env, RemixBase *base) | ||
247 | { | ||
248 | alsa_player_reset_device(env, base); | ||
249 | return base; | ||
250 | } | ||
251 | |||
252 | static RemixCount | ||
253 | alsa_player_playbuffer(RemixEnv *env __UNUSED__, Alsa_Player_Data *player, RemixPCM *data, RemixCount count) | ||
254 | { | ||
255 | #ifdef MIXDBG | ||
256 | { | ||
257 | static int total = 0; | ||
258 | static SNDFILE *sfile = NULL; | ||
259 | static SF_INFO sfinfo; | ||
260 | |||
261 | if (total == 0) | ||
262 | { | ||
263 | sfinfo.frames = 0; | ||
264 | sfinfo.samplerate = player->frequency; | ||
265 | sfinfo.channels = 2; | ||
266 | sfinfo.format = SF_FORMAT_WAV | SF_FORMAT_PCM_16 | SF_ENDIAN_LITTLE; | ||
267 | sfinfo.sections = 0; | ||
268 | sfinfo.seekable = 0; | ||
269 | sfile = sf_open("out.wav", SFM_WRITE, &sfinfo); | ||
270 | } | ||
271 | |||
272 | if (sfile) | ||
273 | { | ||
274 | sf_writef_float(sfile, data, count); | ||
275 | total += count; | ||
276 | } | ||
277 | } | ||
278 | #endif | ||
279 | return snd_pcm_writei(player->alsa_dev, data, count); | ||
280 | } | ||
281 | |||
282 | static RemixCount | ||
283 | alsa_player_chunk(RemixEnv *env, RemixChunk *chunk, RemixCount offset, RemixCount count, int channelname __UNUSED__, void *data) | ||
284 | { | ||
285 | Alsa_Player_Data *player = data; | ||
286 | RemixCount remaining = count, written = 0, n, playcount; | ||
287 | RemixPCM *d; | ||
288 | |||
289 | while (remaining > 0) | ||
290 | { | ||
291 | playcount = MIN(remaining, ALSA_PLAYER_BUFFERLEN); | ||
292 | |||
293 | d = &chunk->data[offset]; | ||
294 | n = alsa_player_playbuffer(env, player, d, playcount); | ||
295 | |||
296 | if (n == -1) return -1; | ||
297 | else n /= sizeof(PLAYER_PCM); | ||
298 | |||
299 | offset += n; | ||
300 | written += n; | ||
301 | remaining -= n; | ||
302 | } | ||
303 | return written; | ||
304 | } | ||
305 | |||
306 | static RemixCount | ||
307 | alsa_player_process(RemixEnv *env, RemixBase *base, RemixCount count, RemixStream *input, RemixStream *output __UNUSED__) | ||
308 | { | ||
309 | Alsa_Player_Data *player_data = remix_base_get_instance_data(env, base); | ||
310 | RemixCount nr_channels = remix_stream_nr_channels(env, input); | ||
311 | RemixCount remaining = count, processed = 0, n, nn; | ||
312 | |||
313 | if ((nr_channels == 1) && (player_data->stereo == 0)) | ||
314 | { /*MONO*/ | ||
315 | return remix_stream_chunkfuncify(env, input, count, | ||
316 | alsa_player_chunk, player_data); | ||
317 | } | ||
318 | else if ((nr_channels == 2) && (player_data->stereo == 1)) | ||
319 | { /*STEREO*/ | ||
320 | while (remaining > 0) | ||
321 | { | ||
322 | n = MIN(remaining, ALSA_PLAYER_BUFFERLEN / 2); | ||
323 | n = remix_stream_interleave_2(env, input, | ||
324 | REMIX_CHANNEL_LEFT, | ||
325 | REMIX_CHANNEL_RIGHT, | ||
326 | player_data->databuffer, n); | ||
327 | nn = alsa_player_playbuffer(env, player_data, | ||
328 | player_data->databuffer, n); | ||
329 | processed += n; | ||
330 | remaining -= n; | ||
331 | } | ||
332 | return processed; | ||
333 | } | ||
334 | WRN("[alsa_player_process] unsupported stream/output channel " | ||
335 | "combination %ld / %d", nr_channels, player_data->stereo ? 2 : 1); | ||
336 | return -1; | ||
337 | } | ||
338 | |||
339 | static RemixCount | ||
340 | alsa_player_length(RemixEnv *env __UNUSED__, RemixBase *base __UNUSED__) | ||
341 | { | ||
342 | return REMIX_COUNT_INFINITE; | ||
343 | } | ||
344 | |||
345 | static RemixCount | ||
346 | alsa_player_seek(RemixEnv *env __UNUSED__, RemixBase *base __UNUSED__, RemixCount count __UNUSED__) | ||
347 | { | ||
348 | return count; | ||
349 | } | ||
350 | |||
351 | static int | ||
352 | alsa_player_flush(RemixEnv *env, RemixBase *base) | ||
353 | { | ||
354 | alsa_player_reset_device(env, base); | ||
355 | return 0; | ||
356 | } | ||
357 | |||
358 | static struct _RemixMethods _alsa_player_methods = | ||
359 | { | ||
360 | alsa_player_clone, | ||
361 | alsa_player_destroy, | ||
362 | alsa_player_ready, | ||
363 | alsa_player_prepare, | ||
364 | alsa_player_process, | ||
365 | alsa_player_length, | ||
366 | alsa_player_seek, | ||
367 | alsa_player_flush, | ||
368 | }; | ||
369 | |||
370 | static RemixBase * | ||
371 | alsa_player_optimise(RemixEnv *env, RemixBase *base) | ||
372 | { | ||
373 | remix_base_set_methods(env, base, &_alsa_player_methods); | ||
374 | return base; | ||
375 | } | ||
376 | |||
377 | static struct _RemixMetaText alsa_player_metatext = | ||
378 | { | ||
379 | "alsa_snd_player", | ||
380 | "ALSA sound player for Remix", | ||
381 | "Output the audio stream into ALSA Driver", | ||
382 | "Copyright (C) 2011, Samsung Electronics Co., Ltd.", | ||
383 | "http://www.samsung.com", | ||
384 | REMIX_ONE_AUTHOR("Govindaraju SM", "prince.dubey@samsung.com"), | ||
385 | }; | ||
386 | |||
387 | static struct _RemixPlugin alsa_player_plugin = | ||
388 | { | ||
389 | &alsa_player_metatext, | ||
390 | REMIX_FLAGS_NONE, | ||
391 | CD_EMPTY_SET, /* init scheme */ | ||
392 | alsa_player_init, | ||
393 | CD_EMPTY_SET, /* process scheme */ | ||
394 | NULL, /* suggests */ | ||
395 | NULL, /* plugin data */ | ||
396 | NULL /* destroy */ | ||
397 | }; | ||
398 | |||
399 | EAPI CDList * | ||
400 | remix_load(RemixEnv *env) | ||
401 | { | ||
402 | CDList *plugins = cd_list_new(env); | ||
403 | plugins = cd_list_prepend(env, plugins, CD_POINTER(&alsa_player_plugin)); | ||
404 | return plugins; | ||
405 | } | ||