summaryrefslogtreecommitdiffstats
path: root/alsa-lib/modules
diff options
context:
space:
mode:
authorJeong-Seok Yang <jseok.yang@samsung.com>2010-08-25 18:32:24 -0700
committerEd Heyl <edheyl@google.com>2010-08-25 18:52:19 -0700
commitec456383c58adf2d4c4818438a703e5a2ca949b5 (patch)
tree6d7b1ddc2610c37e911917dad5be7ebdebc6c6ad /alsa-lib/modules
parent1206fad9881e5bca592fcd0fbdafc9d7f195d539 (diff)
downloaddevice_samsung_crespo-ec456383c58adf2d4c4818438a703e5a2ca949b5.tar.gz
device_samsung_crespo-ec456383c58adf2d4c4818438a703e5a2ca949b5.tar.bz2
device_samsung_crespo-ec456383c58adf2d4c4818438a703e5a2ca949b5.zip
S5PC11X: crespo: add alsa-lib, alsa-utils, libaudio, libcamera
Change-Id: I4a6ee248b407c67682eb8884d1176f4807288c7c
Diffstat (limited to 'alsa-lib/modules')
-rw-r--r--alsa-lib/modules/Makefile.am3
-rw-r--r--alsa-lib/modules/Makefile.in572
-rw-r--r--alsa-lib/modules/mixer/Makefile.am1
-rw-r--r--alsa-lib/modules/mixer/Makefile.in572
-rw-r--r--alsa-lib/modules/mixer/simple/Makefile.am35
-rw-r--r--alsa-lib/modules/mixer/simple/Makefile.in610
-rw-r--r--alsa-lib/modules/mixer/simple/ac97.c89
-rw-r--r--alsa-lib/modules/mixer/simple/hda.c90
-rw-r--r--alsa-lib/modules/mixer/simple/python.c1046
-rw-r--r--alsa-lib/modules/mixer/simple/sbase.c587
-rw-r--r--alsa-lib/modules/mixer/simple/sbase.h111
-rw-r--r--alsa-lib/modules/mixer/simple/sbasedl.c106
12 files changed, 3822 insertions, 0 deletions
diff --git a/alsa-lib/modules/Makefile.am b/alsa-lib/modules/Makefile.am
new file mode 100644
index 0000000..bf9543e
--- /dev/null
+++ b/alsa-lib/modules/Makefile.am
@@ -0,0 +1,3 @@
+if BUILD_MIXER
+SUBDIRS=mixer
+endif
diff --git a/alsa-lib/modules/Makefile.in b/alsa-lib/modules/Makefile.in
new file mode 100644
index 0000000..c673602
--- /dev/null
+++ b/alsa-lib/modules/Makefile.in
@@ -0,0 +1,572 @@
+# Makefile.in generated by automake 1.9.6 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+# 2003, 2004, 2005 Free Software Foundation, Inc.
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+@SET_MAKE@
+srcdir = @srcdir@
+top_srcdir = @top_srcdir@
+VPATH = @srcdir@
+pkgdatadir = $(datadir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+top_builddir = ..
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+INSTALL = @INSTALL@
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = $(program_transform_name)
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+build_triplet = @build@
+host_triplet = @host@
+subdir = modules
+DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \
+ $(top_srcdir)/configure.in
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+ $(ACLOCAL_M4)
+mkinstalldirs = $(install_sh) -d
+CONFIG_HEADER = $(top_builddir)/include/config.h
+CONFIG_CLEAN_FILES =
+SOURCES =
+DIST_SOURCES =
+RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \
+ html-recursive info-recursive install-data-recursive \
+ install-exec-recursive install-info-recursive \
+ install-recursive installcheck-recursive installdirs-recursive \
+ pdf-recursive ps-recursive uninstall-info-recursive \
+ uninstall-recursive
+ETAGS = etags
+CTAGS = ctags
+DIST_SUBDIRS = mixer
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+ACLOCAL = @ACLOCAL@
+ALSA_CONFIG_DIR = @ALSA_CONFIG_DIR@
+ALSA_DEPLIBS = @ALSA_DEPLIBS@
+ALSA_HSEARCH_R_FALSE = @ALSA_HSEARCH_R_FALSE@
+ALSA_HSEARCH_R_TRUE = @ALSA_HSEARCH_R_TRUE@
+ALSA_PLUGIN_DIR = @ALSA_PLUGIN_DIR@
+AMDEP_FALSE = @AMDEP_FALSE@
+AMDEP_TRUE = @AMDEP_TRUE@
+AMTAR = @AMTAR@
+AR = @AR@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+BUILD_ALISP_FALSE = @BUILD_ALISP_FALSE@
+BUILD_ALISP_TRUE = @BUILD_ALISP_TRUE@
+BUILD_CTL_PLUGIN_EXT_FALSE = @BUILD_CTL_PLUGIN_EXT_FALSE@
+BUILD_CTL_PLUGIN_EXT_TRUE = @BUILD_CTL_PLUGIN_EXT_TRUE@
+BUILD_CTL_PLUGIN_FALSE = @BUILD_CTL_PLUGIN_FALSE@
+BUILD_CTL_PLUGIN_SHM_FALSE = @BUILD_CTL_PLUGIN_SHM_FALSE@
+BUILD_CTL_PLUGIN_SHM_TRUE = @BUILD_CTL_PLUGIN_SHM_TRUE@
+BUILD_CTL_PLUGIN_TRUE = @BUILD_CTL_PLUGIN_TRUE@
+BUILD_HWDEP_FALSE = @BUILD_HWDEP_FALSE@
+BUILD_HWDEP_TRUE = @BUILD_HWDEP_TRUE@
+BUILD_MIXER_FALSE = @BUILD_MIXER_FALSE@
+BUILD_MIXER_TRUE = @BUILD_MIXER_TRUE@
+BUILD_MODULES_FALSE = @BUILD_MODULES_FALSE@
+BUILD_MODULES_TRUE = @BUILD_MODULES_TRUE@
+BUILD_PCM_FALSE = @BUILD_PCM_FALSE@
+BUILD_PCM_PLUGIN_ADPCM_FALSE = @BUILD_PCM_PLUGIN_ADPCM_FALSE@
+BUILD_PCM_PLUGIN_ADPCM_TRUE = @BUILD_PCM_PLUGIN_ADPCM_TRUE@
+BUILD_PCM_PLUGIN_ALAW_FALSE = @BUILD_PCM_PLUGIN_ALAW_FALSE@
+BUILD_PCM_PLUGIN_ALAW_TRUE = @BUILD_PCM_PLUGIN_ALAW_TRUE@
+BUILD_PCM_PLUGIN_ASYM_FALSE = @BUILD_PCM_PLUGIN_ASYM_FALSE@
+BUILD_PCM_PLUGIN_ASYM_TRUE = @BUILD_PCM_PLUGIN_ASYM_TRUE@
+BUILD_PCM_PLUGIN_COPY_FALSE = @BUILD_PCM_PLUGIN_COPY_FALSE@
+BUILD_PCM_PLUGIN_COPY_TRUE = @BUILD_PCM_PLUGIN_COPY_TRUE@
+BUILD_PCM_PLUGIN_DMIX_FALSE = @BUILD_PCM_PLUGIN_DMIX_FALSE@
+BUILD_PCM_PLUGIN_DMIX_TRUE = @BUILD_PCM_PLUGIN_DMIX_TRUE@
+BUILD_PCM_PLUGIN_DSHARE_FALSE = @BUILD_PCM_PLUGIN_DSHARE_FALSE@
+BUILD_PCM_PLUGIN_DSHARE_TRUE = @BUILD_PCM_PLUGIN_DSHARE_TRUE@
+BUILD_PCM_PLUGIN_DSNOOP_FALSE = @BUILD_PCM_PLUGIN_DSNOOP_FALSE@
+BUILD_PCM_PLUGIN_DSNOOP_TRUE = @BUILD_PCM_PLUGIN_DSNOOP_TRUE@
+BUILD_PCM_PLUGIN_EMPTY_FALSE = @BUILD_PCM_PLUGIN_EMPTY_FALSE@
+BUILD_PCM_PLUGIN_EMPTY_TRUE = @BUILD_PCM_PLUGIN_EMPTY_TRUE@
+BUILD_PCM_PLUGIN_EXTPLUG_FALSE = @BUILD_PCM_PLUGIN_EXTPLUG_FALSE@
+BUILD_PCM_PLUGIN_EXTPLUG_TRUE = @BUILD_PCM_PLUGIN_EXTPLUG_TRUE@
+BUILD_PCM_PLUGIN_FALSE = @BUILD_PCM_PLUGIN_FALSE@
+BUILD_PCM_PLUGIN_FILE_FALSE = @BUILD_PCM_PLUGIN_FILE_FALSE@
+BUILD_PCM_PLUGIN_FILE_TRUE = @BUILD_PCM_PLUGIN_FILE_TRUE@
+BUILD_PCM_PLUGIN_HOOKS_FALSE = @BUILD_PCM_PLUGIN_HOOKS_FALSE@
+BUILD_PCM_PLUGIN_HOOKS_TRUE = @BUILD_PCM_PLUGIN_HOOKS_TRUE@
+BUILD_PCM_PLUGIN_IEC958_FALSE = @BUILD_PCM_PLUGIN_IEC958_FALSE@
+BUILD_PCM_PLUGIN_IEC958_TRUE = @BUILD_PCM_PLUGIN_IEC958_TRUE@
+BUILD_PCM_PLUGIN_IOPLUG_FALSE = @BUILD_PCM_PLUGIN_IOPLUG_FALSE@
+BUILD_PCM_PLUGIN_IOPLUG_TRUE = @BUILD_PCM_PLUGIN_IOPLUG_TRUE@
+BUILD_PCM_PLUGIN_LADSPA_FALSE = @BUILD_PCM_PLUGIN_LADSPA_FALSE@
+BUILD_PCM_PLUGIN_LADSPA_TRUE = @BUILD_PCM_PLUGIN_LADSPA_TRUE@
+BUILD_PCM_PLUGIN_LFLOAT_FALSE = @BUILD_PCM_PLUGIN_LFLOAT_FALSE@
+BUILD_PCM_PLUGIN_LFLOAT_TRUE = @BUILD_PCM_PLUGIN_LFLOAT_TRUE@
+BUILD_PCM_PLUGIN_LINEAR_FALSE = @BUILD_PCM_PLUGIN_LINEAR_FALSE@
+BUILD_PCM_PLUGIN_LINEAR_TRUE = @BUILD_PCM_PLUGIN_LINEAR_TRUE@
+BUILD_PCM_PLUGIN_METER_FALSE = @BUILD_PCM_PLUGIN_METER_FALSE@
+BUILD_PCM_PLUGIN_METER_TRUE = @BUILD_PCM_PLUGIN_METER_TRUE@
+BUILD_PCM_PLUGIN_MMAP_EMUL_FALSE = @BUILD_PCM_PLUGIN_MMAP_EMUL_FALSE@
+BUILD_PCM_PLUGIN_MMAP_EMUL_TRUE = @BUILD_PCM_PLUGIN_MMAP_EMUL_TRUE@
+BUILD_PCM_PLUGIN_MULAW_FALSE = @BUILD_PCM_PLUGIN_MULAW_FALSE@
+BUILD_PCM_PLUGIN_MULAW_TRUE = @BUILD_PCM_PLUGIN_MULAW_TRUE@
+BUILD_PCM_PLUGIN_MULTI_FALSE = @BUILD_PCM_PLUGIN_MULTI_FALSE@
+BUILD_PCM_PLUGIN_MULTI_TRUE = @BUILD_PCM_PLUGIN_MULTI_TRUE@
+BUILD_PCM_PLUGIN_NULL_FALSE = @BUILD_PCM_PLUGIN_NULL_FALSE@
+BUILD_PCM_PLUGIN_NULL_TRUE = @BUILD_PCM_PLUGIN_NULL_TRUE@
+BUILD_PCM_PLUGIN_PLUG_FALSE = @BUILD_PCM_PLUGIN_PLUG_FALSE@
+BUILD_PCM_PLUGIN_PLUG_TRUE = @BUILD_PCM_PLUGIN_PLUG_TRUE@
+BUILD_PCM_PLUGIN_RATE_FALSE = @BUILD_PCM_PLUGIN_RATE_FALSE@
+BUILD_PCM_PLUGIN_RATE_TRUE = @BUILD_PCM_PLUGIN_RATE_TRUE@
+BUILD_PCM_PLUGIN_ROUTE_FALSE = @BUILD_PCM_PLUGIN_ROUTE_FALSE@
+BUILD_PCM_PLUGIN_ROUTE_TRUE = @BUILD_PCM_PLUGIN_ROUTE_TRUE@
+BUILD_PCM_PLUGIN_SHARE_FALSE = @BUILD_PCM_PLUGIN_SHARE_FALSE@
+BUILD_PCM_PLUGIN_SHARE_TRUE = @BUILD_PCM_PLUGIN_SHARE_TRUE@
+BUILD_PCM_PLUGIN_SHM_FALSE = @BUILD_PCM_PLUGIN_SHM_FALSE@
+BUILD_PCM_PLUGIN_SHM_TRUE = @BUILD_PCM_PLUGIN_SHM_TRUE@
+BUILD_PCM_PLUGIN_SOFTVOL_FALSE = @BUILD_PCM_PLUGIN_SOFTVOL_FALSE@
+BUILD_PCM_PLUGIN_SOFTVOL_TRUE = @BUILD_PCM_PLUGIN_SOFTVOL_TRUE@
+BUILD_PCM_PLUGIN_TRUE = @BUILD_PCM_PLUGIN_TRUE@
+BUILD_PCM_TRUE = @BUILD_PCM_TRUE@
+BUILD_PYTHON_FALSE = @BUILD_PYTHON_FALSE@
+BUILD_PYTHON_TRUE = @BUILD_PYTHON_TRUE@
+BUILD_RAWMIDI_FALSE = @BUILD_RAWMIDI_FALSE@
+BUILD_RAWMIDI_TRUE = @BUILD_RAWMIDI_TRUE@
+BUILD_SEQ_FALSE = @BUILD_SEQ_FALSE@
+BUILD_SEQ_TRUE = @BUILD_SEQ_TRUE@
+CC = @CC@
+CCDEPMODE = @CCDEPMODE@
+CFLAGS = @CFLAGS@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CXX = @CXX@
+CXXCPP = @CXXCPP@
+CXXDEPMODE = @CXXDEPMODE@
+CXXFLAGS = @CXXFLAGS@
+CYGPATH_W = @CYGPATH_W@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+ECHO = @ECHO@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EGREP = @EGREP@
+EXEEXT = @EXEEXT@
+F77 = @F77@
+FFLAGS = @FFLAGS@
+GREP = @GREP@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_M4_FALSE = @INSTALL_M4_FALSE@
+INSTALL_M4_TRUE = @INSTALL_M4_TRUE@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+KEEP_OLD_SYMBOLS_FALSE = @KEEP_OLD_SYMBOLS_FALSE@
+KEEP_OLD_SYMBOLS_TRUE = @KEEP_OLD_SYMBOLS_TRUE@
+LDFLAGS = @LDFLAGS@
+LIBOBJS = @LIBOBJS@
+LIBS = @LIBS@
+LIBTOOL = @LIBTOOL@
+LIBTOOL_VERSION_INFO = @LIBTOOL_VERSION_INFO@
+LN_S = @LN_S@
+LTLIBOBJS = @LTLIBOBJS@
+MAKEINFO = @MAKEINFO@
+OBJEXT = @OBJEXT@
+PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+PYTHON_INCLUDES = @PYTHON_INCLUDES@
+PYTHON_LIBS = @PYTHON_LIBS@
+RANLIB = @RANLIB@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+SND_LIB_EXTRAVER = @SND_LIB_EXTRAVER@
+SND_LIB_MAJOR = @SND_LIB_MAJOR@
+SND_LIB_MINOR = @SND_LIB_MINOR@
+SND_LIB_SUBMINOR = @SND_LIB_SUBMINOR@
+SND_LIB_VERSION = @SND_LIB_VERSION@
+STRIP = @STRIP@
+SYMBOLIC_FUNCTIONS_FALSE = @SYMBOLIC_FUNCTIONS_FALSE@
+SYMBOLIC_FUNCTIONS_TRUE = @SYMBOLIC_FUNCTIONS_TRUE@
+SYMBOL_PREFIX = @SYMBOL_PREFIX@
+VERSION = @VERSION@
+VERSIONED_SYMBOLS_FALSE = @VERSIONED_SYMBOLS_FALSE@
+VERSIONED_SYMBOLS_TRUE = @VERSIONED_SYMBOLS_TRUE@
+ac_ct_CC = @ac_ct_CC@
+ac_ct_CXX = @ac_ct_CXX@
+ac_ct_F77 = @ac_ct_F77@
+am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
+am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
+am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@
+am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@
+am__include = @am__include@
+am__leading_dot = @am__leading_dot@
+am__quote = @am__quote@
+am__tar = @am__tar@
+am__untar = @am__untar@
+bindir = @bindir@
+build = @build@
+build_alias = @build_alias@
+build_cpu = @build_cpu@
+build_os = @build_os@
+build_vendor = @build_vendor@
+datadir = @datadir@
+datarootdir = @datarootdir@
+docdir = @docdir@
+dvidir = @dvidir@
+exec_prefix = @exec_prefix@
+host = @host@
+host_alias = @host_alias@
+host_cpu = @host_cpu@
+host_os = @host_os@
+host_vendor = @host_vendor@
+htmldir = @htmldir@
+includedir = @includedir@
+infodir = @infodir@
+install_sh = @install_sh@
+libdir = @libdir@
+libexecdir = @libexecdir@
+localedir = @localedir@
+localstatedir = @localstatedir@
+mandir = @mandir@
+mkdir_p = @mkdir_p@
+oldincludedir = @oldincludedir@
+pdfdir = @pdfdir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+psdir = @psdir@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+sysconfdir = @sysconfdir@
+target_alias = @target_alias@
+@BUILD_MIXER_TRUE@SUBDIRS = mixer
+all: all-recursive
+
+.SUFFIXES:
+$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
+ @for dep in $?; do \
+ case '$(am__configure_deps)' in \
+ *$$dep*) \
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
+ && exit 0; \
+ exit 1;; \
+ esac; \
+ done; \
+ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign modules/Makefile'; \
+ cd $(top_srcdir) && \
+ $(AUTOMAKE) --foreign modules/Makefile
+.PRECIOUS: Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+ @case '$?' in \
+ *config.status*) \
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
+ *) \
+ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
+ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
+ esac;
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+$(top_srcdir)/configure: $(am__configure_deps)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(ACLOCAL_M4): $(am__aclocal_m4_deps)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+mostlyclean-libtool:
+ -rm -f *.lo
+
+clean-libtool:
+ -rm -rf .libs _libs
+
+distclean-libtool:
+ -rm -f libtool
+uninstall-info-am:
+
+# This directory's subdirectories are mostly independent; you can cd
+# into them and run `make' without going through this Makefile.
+# To change the values of `make' variables: instead of editing Makefiles,
+# (1) if the variable is set in `config.status', edit `config.status'
+# (which will cause the Makefiles to be regenerated when you run `make');
+# (2) otherwise, pass the desired values on the `make' command line.
+$(RECURSIVE_TARGETS):
+ @failcom='exit 1'; \
+ for f in x $$MAKEFLAGS; do \
+ case $$f in \
+ *=* | --[!k]*);; \
+ *k*) failcom='fail=yes';; \
+ esac; \
+ done; \
+ dot_seen=no; \
+ target=`echo $@ | sed s/-recursive//`; \
+ list='$(SUBDIRS)'; for subdir in $$list; do \
+ echo "Making $$target in $$subdir"; \
+ if test "$$subdir" = "."; then \
+ dot_seen=yes; \
+ local_target="$$target-am"; \
+ else \
+ local_target="$$target"; \
+ fi; \
+ (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
+ || eval $$failcom; \
+ done; \
+ if test "$$dot_seen" = "no"; then \
+ $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
+ fi; test -z "$$fail"
+
+mostlyclean-recursive clean-recursive distclean-recursive \
+maintainer-clean-recursive:
+ @failcom='exit 1'; \
+ for f in x $$MAKEFLAGS; do \
+ case $$f in \
+ *=* | --[!k]*);; \
+ *k*) failcom='fail=yes';; \
+ esac; \
+ done; \
+ dot_seen=no; \
+ case "$@" in \
+ distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \
+ *) list='$(SUBDIRS)' ;; \
+ esac; \
+ rev=''; for subdir in $$list; do \
+ if test "$$subdir" = "."; then :; else \
+ rev="$$subdir $$rev"; \
+ fi; \
+ done; \
+ rev="$$rev ."; \
+ target=`echo $@ | sed s/-recursive//`; \
+ for subdir in $$rev; do \
+ echo "Making $$target in $$subdir"; \
+ if test "$$subdir" = "."; then \
+ local_target="$$target-am"; \
+ else \
+ local_target="$$target"; \
+ fi; \
+ (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
+ || eval $$failcom; \
+ done && test -z "$$fail"
+tags-recursive:
+ list='$(SUBDIRS)'; for subdir in $$list; do \
+ test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \
+ done
+ctags-recursive:
+ list='$(SUBDIRS)'; for subdir in $$list; do \
+ test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \
+ done
+
+ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
+ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+ unique=`for i in $$list; do \
+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+ done | \
+ $(AWK) ' { files[$$0] = 1; } \
+ END { for (i in files) print i; }'`; \
+ mkid -fID $$unique
+tags: TAGS
+
+TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
+ $(TAGS_FILES) $(LISP)
+ tags=; \
+ here=`pwd`; \
+ if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \
+ include_option=--etags-include; \
+ empty_fix=.; \
+ else \
+ include_option=--include; \
+ empty_fix=; \
+ fi; \
+ list='$(SUBDIRS)'; for subdir in $$list; do \
+ if test "$$subdir" = .; then :; else \
+ test ! -f $$subdir/TAGS || \
+ tags="$$tags $$include_option=$$here/$$subdir/TAGS"; \
+ fi; \
+ done; \
+ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+ unique=`for i in $$list; do \
+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+ done | \
+ $(AWK) ' { files[$$0] = 1; } \
+ END { for (i in files) print i; }'`; \
+ if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \
+ test -n "$$unique" || unique=$$empty_fix; \
+ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+ $$tags $$unique; \
+ fi
+ctags: CTAGS
+CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
+ $(TAGS_FILES) $(LISP)
+ tags=; \
+ here=`pwd`; \
+ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+ unique=`for i in $$list; do \
+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+ done | \
+ $(AWK) ' { files[$$0] = 1; } \
+ END { for (i in files) print i; }'`; \
+ test -z "$(CTAGS_ARGS)$$tags$$unique" \
+ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
+ $$tags $$unique
+
+GTAGS:
+ here=`$(am__cd) $(top_builddir) && pwd` \
+ && cd $(top_srcdir) \
+ && gtags -i $(GTAGS_ARGS) $$here
+
+distclean-tags:
+ -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
+
+distdir: $(DISTFILES)
+ @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
+ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
+ list='$(DISTFILES)'; for file in $$list; do \
+ case $$file in \
+ $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
+ $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
+ esac; \
+ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+ dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
+ if test "$$dir" != "$$file" && test "$$dir" != "."; then \
+ dir="/$$dir"; \
+ $(mkdir_p) "$(distdir)$$dir"; \
+ else \
+ dir=''; \
+ fi; \
+ if test -d $$d/$$file; then \
+ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+ cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
+ fi; \
+ cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
+ else \
+ test -f $(distdir)/$$file \
+ || cp -p $$d/$$file $(distdir)/$$file \
+ || exit 1; \
+ fi; \
+ done
+ list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
+ if test "$$subdir" = .; then :; else \
+ test -d "$(distdir)/$$subdir" \
+ || $(mkdir_p) "$(distdir)/$$subdir" \
+ || exit 1; \
+ distdir=`$(am__cd) $(distdir) && pwd`; \
+ top_distdir=`$(am__cd) $(top_distdir) && pwd`; \
+ (cd $$subdir && \
+ $(MAKE) $(AM_MAKEFLAGS) \
+ top_distdir="$$top_distdir" \
+ distdir="$$distdir/$$subdir" \
+ distdir) \
+ || exit 1; \
+ fi; \
+ done
+check-am: all-am
+check: check-recursive
+all-am: Makefile
+installdirs: installdirs-recursive
+installdirs-am:
+install: install-recursive
+install-exec: install-exec-recursive
+install-data: install-data-recursive
+uninstall: uninstall-recursive
+
+install-am: all-am
+ @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-recursive
+install-strip:
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+ `test -z '$(STRIP)' || \
+ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+mostlyclean-generic:
+
+clean-generic:
+
+distclean-generic:
+ -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+
+maintainer-clean-generic:
+ @echo "This command is intended for maintainers to use"
+ @echo "it deletes files that may require special tools to rebuild."
+clean: clean-recursive
+
+clean-am: clean-generic clean-libtool mostlyclean-am
+
+distclean: distclean-recursive
+ -rm -f Makefile
+distclean-am: clean-am distclean-generic distclean-libtool \
+ distclean-tags
+
+dvi: dvi-recursive
+
+dvi-am:
+
+html: html-recursive
+
+info: info-recursive
+
+info-am:
+
+install-data-am:
+
+install-exec-am:
+
+install-info: install-info-recursive
+
+install-man:
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-recursive
+ -rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-recursive
+
+mostlyclean-am: mostlyclean-generic mostlyclean-libtool
+
+pdf: pdf-recursive
+
+pdf-am:
+
+ps: ps-recursive
+
+ps-am:
+
+uninstall-am: uninstall-info-am
+
+uninstall-info: uninstall-info-recursive
+
+.PHONY: $(RECURSIVE_TARGETS) CTAGS GTAGS all all-am check check-am \
+ clean clean-generic clean-libtool clean-recursive ctags \
+ ctags-recursive distclean distclean-generic distclean-libtool \
+ distclean-recursive distclean-tags distdir dvi dvi-am html \
+ html-am info info-am install install-am install-data \
+ install-data-am install-exec install-exec-am install-info \
+ install-info-am install-man install-strip installcheck \
+ installcheck-am installdirs installdirs-am maintainer-clean \
+ maintainer-clean-generic maintainer-clean-recursive \
+ mostlyclean mostlyclean-generic mostlyclean-libtool \
+ mostlyclean-recursive pdf pdf-am ps ps-am tags tags-recursive \
+ uninstall uninstall-am uninstall-info-am
+
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
diff --git a/alsa-lib/modules/mixer/Makefile.am b/alsa-lib/modules/mixer/Makefile.am
new file mode 100644
index 0000000..9f5917f
--- /dev/null
+++ b/alsa-lib/modules/mixer/Makefile.am
@@ -0,0 +1 @@
+SUBDIRS=simple
diff --git a/alsa-lib/modules/mixer/Makefile.in b/alsa-lib/modules/mixer/Makefile.in
new file mode 100644
index 0000000..96d7fc7
--- /dev/null
+++ b/alsa-lib/modules/mixer/Makefile.in
@@ -0,0 +1,572 @@
+# Makefile.in generated by automake 1.9.6 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+# 2003, 2004, 2005 Free Software Foundation, Inc.
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+@SET_MAKE@
+srcdir = @srcdir@
+top_srcdir = @top_srcdir@
+VPATH = @srcdir@
+pkgdatadir = $(datadir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+top_builddir = ../..
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+INSTALL = @INSTALL@
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = $(program_transform_name)
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+build_triplet = @build@
+host_triplet = @host@
+subdir = modules/mixer
+DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \
+ $(top_srcdir)/configure.in
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+ $(ACLOCAL_M4)
+mkinstalldirs = $(install_sh) -d
+CONFIG_HEADER = $(top_builddir)/include/config.h
+CONFIG_CLEAN_FILES =
+SOURCES =
+DIST_SOURCES =
+RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \
+ html-recursive info-recursive install-data-recursive \
+ install-exec-recursive install-info-recursive \
+ install-recursive installcheck-recursive installdirs-recursive \
+ pdf-recursive ps-recursive uninstall-info-recursive \
+ uninstall-recursive
+ETAGS = etags
+CTAGS = ctags
+DIST_SUBDIRS = $(SUBDIRS)
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+ACLOCAL = @ACLOCAL@
+ALSA_CONFIG_DIR = @ALSA_CONFIG_DIR@
+ALSA_DEPLIBS = @ALSA_DEPLIBS@
+ALSA_HSEARCH_R_FALSE = @ALSA_HSEARCH_R_FALSE@
+ALSA_HSEARCH_R_TRUE = @ALSA_HSEARCH_R_TRUE@
+ALSA_PLUGIN_DIR = @ALSA_PLUGIN_DIR@
+AMDEP_FALSE = @AMDEP_FALSE@
+AMDEP_TRUE = @AMDEP_TRUE@
+AMTAR = @AMTAR@
+AR = @AR@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+BUILD_ALISP_FALSE = @BUILD_ALISP_FALSE@
+BUILD_ALISP_TRUE = @BUILD_ALISP_TRUE@
+BUILD_CTL_PLUGIN_EXT_FALSE = @BUILD_CTL_PLUGIN_EXT_FALSE@
+BUILD_CTL_PLUGIN_EXT_TRUE = @BUILD_CTL_PLUGIN_EXT_TRUE@
+BUILD_CTL_PLUGIN_FALSE = @BUILD_CTL_PLUGIN_FALSE@
+BUILD_CTL_PLUGIN_SHM_FALSE = @BUILD_CTL_PLUGIN_SHM_FALSE@
+BUILD_CTL_PLUGIN_SHM_TRUE = @BUILD_CTL_PLUGIN_SHM_TRUE@
+BUILD_CTL_PLUGIN_TRUE = @BUILD_CTL_PLUGIN_TRUE@
+BUILD_HWDEP_FALSE = @BUILD_HWDEP_FALSE@
+BUILD_HWDEP_TRUE = @BUILD_HWDEP_TRUE@
+BUILD_MIXER_FALSE = @BUILD_MIXER_FALSE@
+BUILD_MIXER_TRUE = @BUILD_MIXER_TRUE@
+BUILD_MODULES_FALSE = @BUILD_MODULES_FALSE@
+BUILD_MODULES_TRUE = @BUILD_MODULES_TRUE@
+BUILD_PCM_FALSE = @BUILD_PCM_FALSE@
+BUILD_PCM_PLUGIN_ADPCM_FALSE = @BUILD_PCM_PLUGIN_ADPCM_FALSE@
+BUILD_PCM_PLUGIN_ADPCM_TRUE = @BUILD_PCM_PLUGIN_ADPCM_TRUE@
+BUILD_PCM_PLUGIN_ALAW_FALSE = @BUILD_PCM_PLUGIN_ALAW_FALSE@
+BUILD_PCM_PLUGIN_ALAW_TRUE = @BUILD_PCM_PLUGIN_ALAW_TRUE@
+BUILD_PCM_PLUGIN_ASYM_FALSE = @BUILD_PCM_PLUGIN_ASYM_FALSE@
+BUILD_PCM_PLUGIN_ASYM_TRUE = @BUILD_PCM_PLUGIN_ASYM_TRUE@
+BUILD_PCM_PLUGIN_COPY_FALSE = @BUILD_PCM_PLUGIN_COPY_FALSE@
+BUILD_PCM_PLUGIN_COPY_TRUE = @BUILD_PCM_PLUGIN_COPY_TRUE@
+BUILD_PCM_PLUGIN_DMIX_FALSE = @BUILD_PCM_PLUGIN_DMIX_FALSE@
+BUILD_PCM_PLUGIN_DMIX_TRUE = @BUILD_PCM_PLUGIN_DMIX_TRUE@
+BUILD_PCM_PLUGIN_DSHARE_FALSE = @BUILD_PCM_PLUGIN_DSHARE_FALSE@
+BUILD_PCM_PLUGIN_DSHARE_TRUE = @BUILD_PCM_PLUGIN_DSHARE_TRUE@
+BUILD_PCM_PLUGIN_DSNOOP_FALSE = @BUILD_PCM_PLUGIN_DSNOOP_FALSE@
+BUILD_PCM_PLUGIN_DSNOOP_TRUE = @BUILD_PCM_PLUGIN_DSNOOP_TRUE@
+BUILD_PCM_PLUGIN_EMPTY_FALSE = @BUILD_PCM_PLUGIN_EMPTY_FALSE@
+BUILD_PCM_PLUGIN_EMPTY_TRUE = @BUILD_PCM_PLUGIN_EMPTY_TRUE@
+BUILD_PCM_PLUGIN_EXTPLUG_FALSE = @BUILD_PCM_PLUGIN_EXTPLUG_FALSE@
+BUILD_PCM_PLUGIN_EXTPLUG_TRUE = @BUILD_PCM_PLUGIN_EXTPLUG_TRUE@
+BUILD_PCM_PLUGIN_FALSE = @BUILD_PCM_PLUGIN_FALSE@
+BUILD_PCM_PLUGIN_FILE_FALSE = @BUILD_PCM_PLUGIN_FILE_FALSE@
+BUILD_PCM_PLUGIN_FILE_TRUE = @BUILD_PCM_PLUGIN_FILE_TRUE@
+BUILD_PCM_PLUGIN_HOOKS_FALSE = @BUILD_PCM_PLUGIN_HOOKS_FALSE@
+BUILD_PCM_PLUGIN_HOOKS_TRUE = @BUILD_PCM_PLUGIN_HOOKS_TRUE@
+BUILD_PCM_PLUGIN_IEC958_FALSE = @BUILD_PCM_PLUGIN_IEC958_FALSE@
+BUILD_PCM_PLUGIN_IEC958_TRUE = @BUILD_PCM_PLUGIN_IEC958_TRUE@
+BUILD_PCM_PLUGIN_IOPLUG_FALSE = @BUILD_PCM_PLUGIN_IOPLUG_FALSE@
+BUILD_PCM_PLUGIN_IOPLUG_TRUE = @BUILD_PCM_PLUGIN_IOPLUG_TRUE@
+BUILD_PCM_PLUGIN_LADSPA_FALSE = @BUILD_PCM_PLUGIN_LADSPA_FALSE@
+BUILD_PCM_PLUGIN_LADSPA_TRUE = @BUILD_PCM_PLUGIN_LADSPA_TRUE@
+BUILD_PCM_PLUGIN_LFLOAT_FALSE = @BUILD_PCM_PLUGIN_LFLOAT_FALSE@
+BUILD_PCM_PLUGIN_LFLOAT_TRUE = @BUILD_PCM_PLUGIN_LFLOAT_TRUE@
+BUILD_PCM_PLUGIN_LINEAR_FALSE = @BUILD_PCM_PLUGIN_LINEAR_FALSE@
+BUILD_PCM_PLUGIN_LINEAR_TRUE = @BUILD_PCM_PLUGIN_LINEAR_TRUE@
+BUILD_PCM_PLUGIN_METER_FALSE = @BUILD_PCM_PLUGIN_METER_FALSE@
+BUILD_PCM_PLUGIN_METER_TRUE = @BUILD_PCM_PLUGIN_METER_TRUE@
+BUILD_PCM_PLUGIN_MMAP_EMUL_FALSE = @BUILD_PCM_PLUGIN_MMAP_EMUL_FALSE@
+BUILD_PCM_PLUGIN_MMAP_EMUL_TRUE = @BUILD_PCM_PLUGIN_MMAP_EMUL_TRUE@
+BUILD_PCM_PLUGIN_MULAW_FALSE = @BUILD_PCM_PLUGIN_MULAW_FALSE@
+BUILD_PCM_PLUGIN_MULAW_TRUE = @BUILD_PCM_PLUGIN_MULAW_TRUE@
+BUILD_PCM_PLUGIN_MULTI_FALSE = @BUILD_PCM_PLUGIN_MULTI_FALSE@
+BUILD_PCM_PLUGIN_MULTI_TRUE = @BUILD_PCM_PLUGIN_MULTI_TRUE@
+BUILD_PCM_PLUGIN_NULL_FALSE = @BUILD_PCM_PLUGIN_NULL_FALSE@
+BUILD_PCM_PLUGIN_NULL_TRUE = @BUILD_PCM_PLUGIN_NULL_TRUE@
+BUILD_PCM_PLUGIN_PLUG_FALSE = @BUILD_PCM_PLUGIN_PLUG_FALSE@
+BUILD_PCM_PLUGIN_PLUG_TRUE = @BUILD_PCM_PLUGIN_PLUG_TRUE@
+BUILD_PCM_PLUGIN_RATE_FALSE = @BUILD_PCM_PLUGIN_RATE_FALSE@
+BUILD_PCM_PLUGIN_RATE_TRUE = @BUILD_PCM_PLUGIN_RATE_TRUE@
+BUILD_PCM_PLUGIN_ROUTE_FALSE = @BUILD_PCM_PLUGIN_ROUTE_FALSE@
+BUILD_PCM_PLUGIN_ROUTE_TRUE = @BUILD_PCM_PLUGIN_ROUTE_TRUE@
+BUILD_PCM_PLUGIN_SHARE_FALSE = @BUILD_PCM_PLUGIN_SHARE_FALSE@
+BUILD_PCM_PLUGIN_SHARE_TRUE = @BUILD_PCM_PLUGIN_SHARE_TRUE@
+BUILD_PCM_PLUGIN_SHM_FALSE = @BUILD_PCM_PLUGIN_SHM_FALSE@
+BUILD_PCM_PLUGIN_SHM_TRUE = @BUILD_PCM_PLUGIN_SHM_TRUE@
+BUILD_PCM_PLUGIN_SOFTVOL_FALSE = @BUILD_PCM_PLUGIN_SOFTVOL_FALSE@
+BUILD_PCM_PLUGIN_SOFTVOL_TRUE = @BUILD_PCM_PLUGIN_SOFTVOL_TRUE@
+BUILD_PCM_PLUGIN_TRUE = @BUILD_PCM_PLUGIN_TRUE@
+BUILD_PCM_TRUE = @BUILD_PCM_TRUE@
+BUILD_PYTHON_FALSE = @BUILD_PYTHON_FALSE@
+BUILD_PYTHON_TRUE = @BUILD_PYTHON_TRUE@
+BUILD_RAWMIDI_FALSE = @BUILD_RAWMIDI_FALSE@
+BUILD_RAWMIDI_TRUE = @BUILD_RAWMIDI_TRUE@
+BUILD_SEQ_FALSE = @BUILD_SEQ_FALSE@
+BUILD_SEQ_TRUE = @BUILD_SEQ_TRUE@
+CC = @CC@
+CCDEPMODE = @CCDEPMODE@
+CFLAGS = @CFLAGS@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CXX = @CXX@
+CXXCPP = @CXXCPP@
+CXXDEPMODE = @CXXDEPMODE@
+CXXFLAGS = @CXXFLAGS@
+CYGPATH_W = @CYGPATH_W@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+ECHO = @ECHO@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EGREP = @EGREP@
+EXEEXT = @EXEEXT@
+F77 = @F77@
+FFLAGS = @FFLAGS@
+GREP = @GREP@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_M4_FALSE = @INSTALL_M4_FALSE@
+INSTALL_M4_TRUE = @INSTALL_M4_TRUE@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+KEEP_OLD_SYMBOLS_FALSE = @KEEP_OLD_SYMBOLS_FALSE@
+KEEP_OLD_SYMBOLS_TRUE = @KEEP_OLD_SYMBOLS_TRUE@
+LDFLAGS = @LDFLAGS@
+LIBOBJS = @LIBOBJS@
+LIBS = @LIBS@
+LIBTOOL = @LIBTOOL@
+LIBTOOL_VERSION_INFO = @LIBTOOL_VERSION_INFO@
+LN_S = @LN_S@
+LTLIBOBJS = @LTLIBOBJS@
+MAKEINFO = @MAKEINFO@
+OBJEXT = @OBJEXT@
+PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+PYTHON_INCLUDES = @PYTHON_INCLUDES@
+PYTHON_LIBS = @PYTHON_LIBS@
+RANLIB = @RANLIB@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+SND_LIB_EXTRAVER = @SND_LIB_EXTRAVER@
+SND_LIB_MAJOR = @SND_LIB_MAJOR@
+SND_LIB_MINOR = @SND_LIB_MINOR@
+SND_LIB_SUBMINOR = @SND_LIB_SUBMINOR@
+SND_LIB_VERSION = @SND_LIB_VERSION@
+STRIP = @STRIP@
+SYMBOLIC_FUNCTIONS_FALSE = @SYMBOLIC_FUNCTIONS_FALSE@
+SYMBOLIC_FUNCTIONS_TRUE = @SYMBOLIC_FUNCTIONS_TRUE@
+SYMBOL_PREFIX = @SYMBOL_PREFIX@
+VERSION = @VERSION@
+VERSIONED_SYMBOLS_FALSE = @VERSIONED_SYMBOLS_FALSE@
+VERSIONED_SYMBOLS_TRUE = @VERSIONED_SYMBOLS_TRUE@
+ac_ct_CC = @ac_ct_CC@
+ac_ct_CXX = @ac_ct_CXX@
+ac_ct_F77 = @ac_ct_F77@
+am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
+am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
+am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@
+am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@
+am__include = @am__include@
+am__leading_dot = @am__leading_dot@
+am__quote = @am__quote@
+am__tar = @am__tar@
+am__untar = @am__untar@
+bindir = @bindir@
+build = @build@
+build_alias = @build_alias@
+build_cpu = @build_cpu@
+build_os = @build_os@
+build_vendor = @build_vendor@
+datadir = @datadir@
+datarootdir = @datarootdir@
+docdir = @docdir@
+dvidir = @dvidir@
+exec_prefix = @exec_prefix@
+host = @host@
+host_alias = @host_alias@
+host_cpu = @host_cpu@
+host_os = @host_os@
+host_vendor = @host_vendor@
+htmldir = @htmldir@
+includedir = @includedir@
+infodir = @infodir@
+install_sh = @install_sh@
+libdir = @libdir@
+libexecdir = @libexecdir@
+localedir = @localedir@
+localstatedir = @localstatedir@
+mandir = @mandir@
+mkdir_p = @mkdir_p@
+oldincludedir = @oldincludedir@
+pdfdir = @pdfdir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+psdir = @psdir@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+sysconfdir = @sysconfdir@
+target_alias = @target_alias@
+SUBDIRS = simple
+all: all-recursive
+
+.SUFFIXES:
+$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
+ @for dep in $?; do \
+ case '$(am__configure_deps)' in \
+ *$$dep*) \
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
+ && exit 0; \
+ exit 1;; \
+ esac; \
+ done; \
+ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign modules/mixer/Makefile'; \
+ cd $(top_srcdir) && \
+ $(AUTOMAKE) --foreign modules/mixer/Makefile
+.PRECIOUS: Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+ @case '$?' in \
+ *config.status*) \
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
+ *) \
+ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
+ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
+ esac;
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+$(top_srcdir)/configure: $(am__configure_deps)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(ACLOCAL_M4): $(am__aclocal_m4_deps)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+mostlyclean-libtool:
+ -rm -f *.lo
+
+clean-libtool:
+ -rm -rf .libs _libs
+
+distclean-libtool:
+ -rm -f libtool
+uninstall-info-am:
+
+# This directory's subdirectories are mostly independent; you can cd
+# into them and run `make' without going through this Makefile.
+# To change the values of `make' variables: instead of editing Makefiles,
+# (1) if the variable is set in `config.status', edit `config.status'
+# (which will cause the Makefiles to be regenerated when you run `make');
+# (2) otherwise, pass the desired values on the `make' command line.
+$(RECURSIVE_TARGETS):
+ @failcom='exit 1'; \
+ for f in x $$MAKEFLAGS; do \
+ case $$f in \
+ *=* | --[!k]*);; \
+ *k*) failcom='fail=yes';; \
+ esac; \
+ done; \
+ dot_seen=no; \
+ target=`echo $@ | sed s/-recursive//`; \
+ list='$(SUBDIRS)'; for subdir in $$list; do \
+ echo "Making $$target in $$subdir"; \
+ if test "$$subdir" = "."; then \
+ dot_seen=yes; \
+ local_target="$$target-am"; \
+ else \
+ local_target="$$target"; \
+ fi; \
+ (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
+ || eval $$failcom; \
+ done; \
+ if test "$$dot_seen" = "no"; then \
+ $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
+ fi; test -z "$$fail"
+
+mostlyclean-recursive clean-recursive distclean-recursive \
+maintainer-clean-recursive:
+ @failcom='exit 1'; \
+ for f in x $$MAKEFLAGS; do \
+ case $$f in \
+ *=* | --[!k]*);; \
+ *k*) failcom='fail=yes';; \
+ esac; \
+ done; \
+ dot_seen=no; \
+ case "$@" in \
+ distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \
+ *) list='$(SUBDIRS)' ;; \
+ esac; \
+ rev=''; for subdir in $$list; do \
+ if test "$$subdir" = "."; then :; else \
+ rev="$$subdir $$rev"; \
+ fi; \
+ done; \
+ rev="$$rev ."; \
+ target=`echo $@ | sed s/-recursive//`; \
+ for subdir in $$rev; do \
+ echo "Making $$target in $$subdir"; \
+ if test "$$subdir" = "."; then \
+ local_target="$$target-am"; \
+ else \
+ local_target="$$target"; \
+ fi; \
+ (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
+ || eval $$failcom; \
+ done && test -z "$$fail"
+tags-recursive:
+ list='$(SUBDIRS)'; for subdir in $$list; do \
+ test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \
+ done
+ctags-recursive:
+ list='$(SUBDIRS)'; for subdir in $$list; do \
+ test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \
+ done
+
+ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
+ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+ unique=`for i in $$list; do \
+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+ done | \
+ $(AWK) ' { files[$$0] = 1; } \
+ END { for (i in files) print i; }'`; \
+ mkid -fID $$unique
+tags: TAGS
+
+TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
+ $(TAGS_FILES) $(LISP)
+ tags=; \
+ here=`pwd`; \
+ if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \
+ include_option=--etags-include; \
+ empty_fix=.; \
+ else \
+ include_option=--include; \
+ empty_fix=; \
+ fi; \
+ list='$(SUBDIRS)'; for subdir in $$list; do \
+ if test "$$subdir" = .; then :; else \
+ test ! -f $$subdir/TAGS || \
+ tags="$$tags $$include_option=$$here/$$subdir/TAGS"; \
+ fi; \
+ done; \
+ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+ unique=`for i in $$list; do \
+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+ done | \
+ $(AWK) ' { files[$$0] = 1; } \
+ END { for (i in files) print i; }'`; \
+ if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \
+ test -n "$$unique" || unique=$$empty_fix; \
+ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+ $$tags $$unique; \
+ fi
+ctags: CTAGS
+CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
+ $(TAGS_FILES) $(LISP)
+ tags=; \
+ here=`pwd`; \
+ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+ unique=`for i in $$list; do \
+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+ done | \
+ $(AWK) ' { files[$$0] = 1; } \
+ END { for (i in files) print i; }'`; \
+ test -z "$(CTAGS_ARGS)$$tags$$unique" \
+ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
+ $$tags $$unique
+
+GTAGS:
+ here=`$(am__cd) $(top_builddir) && pwd` \
+ && cd $(top_srcdir) \
+ && gtags -i $(GTAGS_ARGS) $$here
+
+distclean-tags:
+ -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
+
+distdir: $(DISTFILES)
+ @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
+ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
+ list='$(DISTFILES)'; for file in $$list; do \
+ case $$file in \
+ $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
+ $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
+ esac; \
+ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+ dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
+ if test "$$dir" != "$$file" && test "$$dir" != "."; then \
+ dir="/$$dir"; \
+ $(mkdir_p) "$(distdir)$$dir"; \
+ else \
+ dir=''; \
+ fi; \
+ if test -d $$d/$$file; then \
+ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+ cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
+ fi; \
+ cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
+ else \
+ test -f $(distdir)/$$file \
+ || cp -p $$d/$$file $(distdir)/$$file \
+ || exit 1; \
+ fi; \
+ done
+ list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
+ if test "$$subdir" = .; then :; else \
+ test -d "$(distdir)/$$subdir" \
+ || $(mkdir_p) "$(distdir)/$$subdir" \
+ || exit 1; \
+ distdir=`$(am__cd) $(distdir) && pwd`; \
+ top_distdir=`$(am__cd) $(top_distdir) && pwd`; \
+ (cd $$subdir && \
+ $(MAKE) $(AM_MAKEFLAGS) \
+ top_distdir="$$top_distdir" \
+ distdir="$$distdir/$$subdir" \
+ distdir) \
+ || exit 1; \
+ fi; \
+ done
+check-am: all-am
+check: check-recursive
+all-am: Makefile
+installdirs: installdirs-recursive
+installdirs-am:
+install: install-recursive
+install-exec: install-exec-recursive
+install-data: install-data-recursive
+uninstall: uninstall-recursive
+
+install-am: all-am
+ @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-recursive
+install-strip:
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+ `test -z '$(STRIP)' || \
+ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+mostlyclean-generic:
+
+clean-generic:
+
+distclean-generic:
+ -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+
+maintainer-clean-generic:
+ @echo "This command is intended for maintainers to use"
+ @echo "it deletes files that may require special tools to rebuild."
+clean: clean-recursive
+
+clean-am: clean-generic clean-libtool mostlyclean-am
+
+distclean: distclean-recursive
+ -rm -f Makefile
+distclean-am: clean-am distclean-generic distclean-libtool \
+ distclean-tags
+
+dvi: dvi-recursive
+
+dvi-am:
+
+html: html-recursive
+
+info: info-recursive
+
+info-am:
+
+install-data-am:
+
+install-exec-am:
+
+install-info: install-info-recursive
+
+install-man:
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-recursive
+ -rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-recursive
+
+mostlyclean-am: mostlyclean-generic mostlyclean-libtool
+
+pdf: pdf-recursive
+
+pdf-am:
+
+ps: ps-recursive
+
+ps-am:
+
+uninstall-am: uninstall-info-am
+
+uninstall-info: uninstall-info-recursive
+
+.PHONY: $(RECURSIVE_TARGETS) CTAGS GTAGS all all-am check check-am \
+ clean clean-generic clean-libtool clean-recursive ctags \
+ ctags-recursive distclean distclean-generic distclean-libtool \
+ distclean-recursive distclean-tags distdir dvi dvi-am html \
+ html-am info info-am install install-am install-data \
+ install-data-am install-exec install-exec-am install-info \
+ install-info-am install-man install-strip installcheck \
+ installcheck-am installdirs installdirs-am maintainer-clean \
+ maintainer-clean-generic maintainer-clean-recursive \
+ mostlyclean mostlyclean-generic mostlyclean-libtool \
+ mostlyclean-recursive pdf pdf-am ps ps-am tags tags-recursive \
+ uninstall uninstall-am uninstall-info-am
+
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
diff --git a/alsa-lib/modules/mixer/simple/Makefile.am b/alsa-lib/modules/mixer/simple/Makefile.am
new file mode 100644
index 0000000..f73871f
--- /dev/null
+++ b/alsa-lib/modules/mixer/simple/Makefile.am
@@ -0,0 +1,35 @@
+alsaplugindir = @ALSA_PLUGIN_DIR@
+pkglibdir = $(alsaplugindir)/smixer
+
+AM_CFLAGS = -g -O2 -W -Wall
+
+INCLUDES=-I$(top_srcdir)/include
+
+pkglib_LTLIBRARIES = smixer-sbase.la \
+ smixer-ac97.la \
+ smixer-hda.la
+
+if BUILD_PYTHON
+pkglib_LTLIBRARIES += smixer-python.la
+endif
+
+noinst_HEADERS = sbase.h
+
+smixer_sbase_la_SOURCES = sbase.c
+smixer_sbase_la_LDFLAGS = -module -avoid-version $(LDFLAGS_NOUNDEFINED)
+smixer_sbase_la_LIBADD = ../../../src/libasound.la
+
+smixer_ac97_la_SOURCES = ac97.c sbasedl.c
+smixer_ac97_la_LDFLAGS = -module -avoid-version $(LDFLAGS_NOUNDEFINED)
+smixer_ac97_la_LIBADD = ../../../src/libasound.la
+
+smixer_hda_la_SOURCES = hda.c sbasedl.c
+smixer_hda_la_LDFLAGS = -module -avoid-version $(LDFLAGS_NOUNDEFINED)
+smixer_hda_la_LIBADD = ../../../src/libasound.la
+
+if BUILD_PYTHON
+smixer_python_la_SOURCES = python.c
+smixer_python_la_LDFLAGS = -module -avoid-version $(LDFLAGS_NOUNDEFINED)
+smixer_python_la_CFLAGS = $(PYTHON_INCLUDES)
+smixer_python_la_LIBADD = ../../../src/libasound.la $(PYTHON_LIBS)
+endif
diff --git a/alsa-lib/modules/mixer/simple/Makefile.in b/alsa-lib/modules/mixer/simple/Makefile.in
new file mode 100644
index 0000000..63234cb
--- /dev/null
+++ b/alsa-lib/modules/mixer/simple/Makefile.in
@@ -0,0 +1,610 @@
+# Makefile.in generated by automake 1.9.6 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+# 2003, 2004, 2005 Free Software Foundation, Inc.
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+@SET_MAKE@
+
+
+srcdir = @srcdir@
+top_srcdir = @top_srcdir@
+VPATH = @srcdir@
+pkgdatadir = $(datadir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+top_builddir = ../../..
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+INSTALL = @INSTALL@
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = $(program_transform_name)
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+build_triplet = @build@
+host_triplet = @host@
+@BUILD_PYTHON_TRUE@am__append_1 = smixer-python.la
+subdir = modules/mixer/simple
+DIST_COMMON = $(noinst_HEADERS) $(srcdir)/Makefile.am \
+ $(srcdir)/Makefile.in
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \
+ $(top_srcdir)/configure.in
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+ $(ACLOCAL_M4)
+mkinstalldirs = $(install_sh) -d
+CONFIG_HEADER = $(top_builddir)/include/config.h
+CONFIG_CLEAN_FILES =
+am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
+am__vpath_adj = case $$p in \
+ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
+ *) f=$$p;; \
+ esac;
+am__strip_dir = `echo $$p | sed -e 's|^.*/||'`;
+am__installdirs = "$(DESTDIR)$(pkglibdir)"
+pkglibLTLIBRARIES_INSTALL = $(INSTALL)
+LTLIBRARIES = $(pkglib_LTLIBRARIES)
+smixer_ac97_la_DEPENDENCIES = ../../../src/libasound.la
+am_smixer_ac97_la_OBJECTS = ac97.lo sbasedl.lo
+smixer_ac97_la_OBJECTS = $(am_smixer_ac97_la_OBJECTS)
+smixer_hda_la_DEPENDENCIES = ../../../src/libasound.la
+am_smixer_hda_la_OBJECTS = hda.lo sbasedl.lo
+smixer_hda_la_OBJECTS = $(am_smixer_hda_la_OBJECTS)
+am__DEPENDENCIES_1 =
+@BUILD_PYTHON_TRUE@smixer_python_la_DEPENDENCIES = \
+@BUILD_PYTHON_TRUE@ ../../../src/libasound.la \
+@BUILD_PYTHON_TRUE@ $(am__DEPENDENCIES_1)
+am__smixer_python_la_SOURCES_DIST = python.c
+@BUILD_PYTHON_TRUE@am_smixer_python_la_OBJECTS = \
+@BUILD_PYTHON_TRUE@ smixer_python_la-python.lo
+smixer_python_la_OBJECTS = $(am_smixer_python_la_OBJECTS)
+@BUILD_PYTHON_TRUE@am_smixer_python_la_rpath = -rpath $(pkglibdir)
+smixer_sbase_la_DEPENDENCIES = ../../../src/libasound.la
+am_smixer_sbase_la_OBJECTS = sbase.lo
+smixer_sbase_la_OBJECTS = $(am_smixer_sbase_la_OBJECTS)
+DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir)/include
+depcomp = $(SHELL) $(top_srcdir)/depcomp
+am__depfiles_maybe = depfiles
+COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
+ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
+LTCOMPILE = $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) \
+ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
+ $(AM_CFLAGS) $(CFLAGS)
+CCLD = $(CC)
+LINK = $(LIBTOOL) --tag=CC --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
+ $(AM_LDFLAGS) $(LDFLAGS) -o $@
+SOURCES = $(smixer_ac97_la_SOURCES) $(smixer_hda_la_SOURCES) \
+ $(smixer_python_la_SOURCES) $(smixer_sbase_la_SOURCES)
+DIST_SOURCES = $(smixer_ac97_la_SOURCES) $(smixer_hda_la_SOURCES) \
+ $(am__smixer_python_la_SOURCES_DIST) \
+ $(smixer_sbase_la_SOURCES)
+HEADERS = $(noinst_HEADERS)
+ETAGS = etags
+CTAGS = ctags
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+pkglibdir = $(alsaplugindir)/smixer
+ACLOCAL = @ACLOCAL@
+ALSA_CONFIG_DIR = @ALSA_CONFIG_DIR@
+ALSA_DEPLIBS = @ALSA_DEPLIBS@
+ALSA_HSEARCH_R_FALSE = @ALSA_HSEARCH_R_FALSE@
+ALSA_HSEARCH_R_TRUE = @ALSA_HSEARCH_R_TRUE@
+ALSA_PLUGIN_DIR = @ALSA_PLUGIN_DIR@
+AMDEP_FALSE = @AMDEP_FALSE@
+AMDEP_TRUE = @AMDEP_TRUE@
+AMTAR = @AMTAR@
+AR = @AR@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+BUILD_ALISP_FALSE = @BUILD_ALISP_FALSE@
+BUILD_ALISP_TRUE = @BUILD_ALISP_TRUE@
+BUILD_CTL_PLUGIN_EXT_FALSE = @BUILD_CTL_PLUGIN_EXT_FALSE@
+BUILD_CTL_PLUGIN_EXT_TRUE = @BUILD_CTL_PLUGIN_EXT_TRUE@
+BUILD_CTL_PLUGIN_FALSE = @BUILD_CTL_PLUGIN_FALSE@
+BUILD_CTL_PLUGIN_SHM_FALSE = @BUILD_CTL_PLUGIN_SHM_FALSE@
+BUILD_CTL_PLUGIN_SHM_TRUE = @BUILD_CTL_PLUGIN_SHM_TRUE@
+BUILD_CTL_PLUGIN_TRUE = @BUILD_CTL_PLUGIN_TRUE@
+BUILD_HWDEP_FALSE = @BUILD_HWDEP_FALSE@
+BUILD_HWDEP_TRUE = @BUILD_HWDEP_TRUE@
+BUILD_MIXER_FALSE = @BUILD_MIXER_FALSE@
+BUILD_MIXER_TRUE = @BUILD_MIXER_TRUE@
+BUILD_MODULES_FALSE = @BUILD_MODULES_FALSE@
+BUILD_MODULES_TRUE = @BUILD_MODULES_TRUE@
+BUILD_PCM_FALSE = @BUILD_PCM_FALSE@
+BUILD_PCM_PLUGIN_ADPCM_FALSE = @BUILD_PCM_PLUGIN_ADPCM_FALSE@
+BUILD_PCM_PLUGIN_ADPCM_TRUE = @BUILD_PCM_PLUGIN_ADPCM_TRUE@
+BUILD_PCM_PLUGIN_ALAW_FALSE = @BUILD_PCM_PLUGIN_ALAW_FALSE@
+BUILD_PCM_PLUGIN_ALAW_TRUE = @BUILD_PCM_PLUGIN_ALAW_TRUE@
+BUILD_PCM_PLUGIN_ASYM_FALSE = @BUILD_PCM_PLUGIN_ASYM_FALSE@
+BUILD_PCM_PLUGIN_ASYM_TRUE = @BUILD_PCM_PLUGIN_ASYM_TRUE@
+BUILD_PCM_PLUGIN_COPY_FALSE = @BUILD_PCM_PLUGIN_COPY_FALSE@
+BUILD_PCM_PLUGIN_COPY_TRUE = @BUILD_PCM_PLUGIN_COPY_TRUE@
+BUILD_PCM_PLUGIN_DMIX_FALSE = @BUILD_PCM_PLUGIN_DMIX_FALSE@
+BUILD_PCM_PLUGIN_DMIX_TRUE = @BUILD_PCM_PLUGIN_DMIX_TRUE@
+BUILD_PCM_PLUGIN_DSHARE_FALSE = @BUILD_PCM_PLUGIN_DSHARE_FALSE@
+BUILD_PCM_PLUGIN_DSHARE_TRUE = @BUILD_PCM_PLUGIN_DSHARE_TRUE@
+BUILD_PCM_PLUGIN_DSNOOP_FALSE = @BUILD_PCM_PLUGIN_DSNOOP_FALSE@
+BUILD_PCM_PLUGIN_DSNOOP_TRUE = @BUILD_PCM_PLUGIN_DSNOOP_TRUE@
+BUILD_PCM_PLUGIN_EMPTY_FALSE = @BUILD_PCM_PLUGIN_EMPTY_FALSE@
+BUILD_PCM_PLUGIN_EMPTY_TRUE = @BUILD_PCM_PLUGIN_EMPTY_TRUE@
+BUILD_PCM_PLUGIN_EXTPLUG_FALSE = @BUILD_PCM_PLUGIN_EXTPLUG_FALSE@
+BUILD_PCM_PLUGIN_EXTPLUG_TRUE = @BUILD_PCM_PLUGIN_EXTPLUG_TRUE@
+BUILD_PCM_PLUGIN_FALSE = @BUILD_PCM_PLUGIN_FALSE@
+BUILD_PCM_PLUGIN_FILE_FALSE = @BUILD_PCM_PLUGIN_FILE_FALSE@
+BUILD_PCM_PLUGIN_FILE_TRUE = @BUILD_PCM_PLUGIN_FILE_TRUE@
+BUILD_PCM_PLUGIN_HOOKS_FALSE = @BUILD_PCM_PLUGIN_HOOKS_FALSE@
+BUILD_PCM_PLUGIN_HOOKS_TRUE = @BUILD_PCM_PLUGIN_HOOKS_TRUE@
+BUILD_PCM_PLUGIN_IEC958_FALSE = @BUILD_PCM_PLUGIN_IEC958_FALSE@
+BUILD_PCM_PLUGIN_IEC958_TRUE = @BUILD_PCM_PLUGIN_IEC958_TRUE@
+BUILD_PCM_PLUGIN_IOPLUG_FALSE = @BUILD_PCM_PLUGIN_IOPLUG_FALSE@
+BUILD_PCM_PLUGIN_IOPLUG_TRUE = @BUILD_PCM_PLUGIN_IOPLUG_TRUE@
+BUILD_PCM_PLUGIN_LADSPA_FALSE = @BUILD_PCM_PLUGIN_LADSPA_FALSE@
+BUILD_PCM_PLUGIN_LADSPA_TRUE = @BUILD_PCM_PLUGIN_LADSPA_TRUE@
+BUILD_PCM_PLUGIN_LFLOAT_FALSE = @BUILD_PCM_PLUGIN_LFLOAT_FALSE@
+BUILD_PCM_PLUGIN_LFLOAT_TRUE = @BUILD_PCM_PLUGIN_LFLOAT_TRUE@
+BUILD_PCM_PLUGIN_LINEAR_FALSE = @BUILD_PCM_PLUGIN_LINEAR_FALSE@
+BUILD_PCM_PLUGIN_LINEAR_TRUE = @BUILD_PCM_PLUGIN_LINEAR_TRUE@
+BUILD_PCM_PLUGIN_METER_FALSE = @BUILD_PCM_PLUGIN_METER_FALSE@
+BUILD_PCM_PLUGIN_METER_TRUE = @BUILD_PCM_PLUGIN_METER_TRUE@
+BUILD_PCM_PLUGIN_MMAP_EMUL_FALSE = @BUILD_PCM_PLUGIN_MMAP_EMUL_FALSE@
+BUILD_PCM_PLUGIN_MMAP_EMUL_TRUE = @BUILD_PCM_PLUGIN_MMAP_EMUL_TRUE@
+BUILD_PCM_PLUGIN_MULAW_FALSE = @BUILD_PCM_PLUGIN_MULAW_FALSE@
+BUILD_PCM_PLUGIN_MULAW_TRUE = @BUILD_PCM_PLUGIN_MULAW_TRUE@
+BUILD_PCM_PLUGIN_MULTI_FALSE = @BUILD_PCM_PLUGIN_MULTI_FALSE@
+BUILD_PCM_PLUGIN_MULTI_TRUE = @BUILD_PCM_PLUGIN_MULTI_TRUE@
+BUILD_PCM_PLUGIN_NULL_FALSE = @BUILD_PCM_PLUGIN_NULL_FALSE@
+BUILD_PCM_PLUGIN_NULL_TRUE = @BUILD_PCM_PLUGIN_NULL_TRUE@
+BUILD_PCM_PLUGIN_PLUG_FALSE = @BUILD_PCM_PLUGIN_PLUG_FALSE@
+BUILD_PCM_PLUGIN_PLUG_TRUE = @BUILD_PCM_PLUGIN_PLUG_TRUE@
+BUILD_PCM_PLUGIN_RATE_FALSE = @BUILD_PCM_PLUGIN_RATE_FALSE@
+BUILD_PCM_PLUGIN_RATE_TRUE = @BUILD_PCM_PLUGIN_RATE_TRUE@
+BUILD_PCM_PLUGIN_ROUTE_FALSE = @BUILD_PCM_PLUGIN_ROUTE_FALSE@
+BUILD_PCM_PLUGIN_ROUTE_TRUE = @BUILD_PCM_PLUGIN_ROUTE_TRUE@
+BUILD_PCM_PLUGIN_SHARE_FALSE = @BUILD_PCM_PLUGIN_SHARE_FALSE@
+BUILD_PCM_PLUGIN_SHARE_TRUE = @BUILD_PCM_PLUGIN_SHARE_TRUE@
+BUILD_PCM_PLUGIN_SHM_FALSE = @BUILD_PCM_PLUGIN_SHM_FALSE@
+BUILD_PCM_PLUGIN_SHM_TRUE = @BUILD_PCM_PLUGIN_SHM_TRUE@
+BUILD_PCM_PLUGIN_SOFTVOL_FALSE = @BUILD_PCM_PLUGIN_SOFTVOL_FALSE@
+BUILD_PCM_PLUGIN_SOFTVOL_TRUE = @BUILD_PCM_PLUGIN_SOFTVOL_TRUE@
+BUILD_PCM_PLUGIN_TRUE = @BUILD_PCM_PLUGIN_TRUE@
+BUILD_PCM_TRUE = @BUILD_PCM_TRUE@
+BUILD_PYTHON_FALSE = @BUILD_PYTHON_FALSE@
+BUILD_PYTHON_TRUE = @BUILD_PYTHON_TRUE@
+BUILD_RAWMIDI_FALSE = @BUILD_RAWMIDI_FALSE@
+BUILD_RAWMIDI_TRUE = @BUILD_RAWMIDI_TRUE@
+BUILD_SEQ_FALSE = @BUILD_SEQ_FALSE@
+BUILD_SEQ_TRUE = @BUILD_SEQ_TRUE@
+CC = @CC@
+CCDEPMODE = @CCDEPMODE@
+CFLAGS = @CFLAGS@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CXX = @CXX@
+CXXCPP = @CXXCPP@
+CXXDEPMODE = @CXXDEPMODE@
+CXXFLAGS = @CXXFLAGS@
+CYGPATH_W = @CYGPATH_W@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+ECHO = @ECHO@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EGREP = @EGREP@
+EXEEXT = @EXEEXT@
+F77 = @F77@
+FFLAGS = @FFLAGS@
+GREP = @GREP@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_M4_FALSE = @INSTALL_M4_FALSE@
+INSTALL_M4_TRUE = @INSTALL_M4_TRUE@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+KEEP_OLD_SYMBOLS_FALSE = @KEEP_OLD_SYMBOLS_FALSE@
+KEEP_OLD_SYMBOLS_TRUE = @KEEP_OLD_SYMBOLS_TRUE@
+LDFLAGS = @LDFLAGS@
+LIBOBJS = @LIBOBJS@
+LIBS = @LIBS@
+LIBTOOL = @LIBTOOL@
+LIBTOOL_VERSION_INFO = @LIBTOOL_VERSION_INFO@
+LN_S = @LN_S@
+LTLIBOBJS = @LTLIBOBJS@
+MAKEINFO = @MAKEINFO@
+OBJEXT = @OBJEXT@
+PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+PYTHON_INCLUDES = @PYTHON_INCLUDES@
+PYTHON_LIBS = @PYTHON_LIBS@
+RANLIB = @RANLIB@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+SND_LIB_EXTRAVER = @SND_LIB_EXTRAVER@
+SND_LIB_MAJOR = @SND_LIB_MAJOR@
+SND_LIB_MINOR = @SND_LIB_MINOR@
+SND_LIB_SUBMINOR = @SND_LIB_SUBMINOR@
+SND_LIB_VERSION = @SND_LIB_VERSION@
+STRIP = @STRIP@
+SYMBOLIC_FUNCTIONS_FALSE = @SYMBOLIC_FUNCTIONS_FALSE@
+SYMBOLIC_FUNCTIONS_TRUE = @SYMBOLIC_FUNCTIONS_TRUE@
+SYMBOL_PREFIX = @SYMBOL_PREFIX@
+VERSION = @VERSION@
+VERSIONED_SYMBOLS_FALSE = @VERSIONED_SYMBOLS_FALSE@
+VERSIONED_SYMBOLS_TRUE = @VERSIONED_SYMBOLS_TRUE@
+ac_ct_CC = @ac_ct_CC@
+ac_ct_CXX = @ac_ct_CXX@
+ac_ct_F77 = @ac_ct_F77@
+am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
+am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
+am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@
+am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@
+am__include = @am__include@
+am__leading_dot = @am__leading_dot@
+am__quote = @am__quote@
+am__tar = @am__tar@
+am__untar = @am__untar@
+bindir = @bindir@
+build = @build@
+build_alias = @build_alias@
+build_cpu = @build_cpu@
+build_os = @build_os@
+build_vendor = @build_vendor@
+datadir = @datadir@
+datarootdir = @datarootdir@
+docdir = @docdir@
+dvidir = @dvidir@
+exec_prefix = @exec_prefix@
+host = @host@
+host_alias = @host_alias@
+host_cpu = @host_cpu@
+host_os = @host_os@
+host_vendor = @host_vendor@
+htmldir = @htmldir@
+includedir = @includedir@
+infodir = @infodir@
+install_sh = @install_sh@
+libdir = @libdir@
+libexecdir = @libexecdir@
+localedir = @localedir@
+localstatedir = @localstatedir@
+mandir = @mandir@
+mkdir_p = @mkdir_p@
+oldincludedir = @oldincludedir@
+pdfdir = @pdfdir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+psdir = @psdir@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+sysconfdir = @sysconfdir@
+target_alias = @target_alias@
+alsaplugindir = @ALSA_PLUGIN_DIR@
+AM_CFLAGS = -g -O2 -W -Wall
+INCLUDES = -I$(top_srcdir)/include
+pkglib_LTLIBRARIES = smixer-sbase.la smixer-ac97.la smixer-hda.la \
+ $(am__append_1)
+noinst_HEADERS = sbase.h
+smixer_sbase_la_SOURCES = sbase.c
+smixer_sbase_la_LDFLAGS = -module -avoid-version $(LDFLAGS_NOUNDEFINED)
+smixer_sbase_la_LIBADD = ../../../src/libasound.la
+smixer_ac97_la_SOURCES = ac97.c sbasedl.c
+smixer_ac97_la_LDFLAGS = -module -avoid-version $(LDFLAGS_NOUNDEFINED)
+smixer_ac97_la_LIBADD = ../../../src/libasound.la
+smixer_hda_la_SOURCES = hda.c sbasedl.c
+smixer_hda_la_LDFLAGS = -module -avoid-version $(LDFLAGS_NOUNDEFINED)
+smixer_hda_la_LIBADD = ../../../src/libasound.la
+@BUILD_PYTHON_TRUE@smixer_python_la_SOURCES = python.c
+@BUILD_PYTHON_TRUE@smixer_python_la_LDFLAGS = -module -avoid-version $(LDFLAGS_NOUNDEFINED)
+@BUILD_PYTHON_TRUE@smixer_python_la_CFLAGS = $(PYTHON_INCLUDES)
+@BUILD_PYTHON_TRUE@smixer_python_la_LIBADD = ../../../src/libasound.la $(PYTHON_LIBS)
+all: all-am
+
+.SUFFIXES:
+.SUFFIXES: .c .lo .o .obj
+$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
+ @for dep in $?; do \
+ case '$(am__configure_deps)' in \
+ *$$dep*) \
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
+ && exit 0; \
+ exit 1;; \
+ esac; \
+ done; \
+ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign modules/mixer/simple/Makefile'; \
+ cd $(top_srcdir) && \
+ $(AUTOMAKE) --foreign modules/mixer/simple/Makefile
+.PRECIOUS: Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+ @case '$?' in \
+ *config.status*) \
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
+ *) \
+ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
+ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
+ esac;
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+$(top_srcdir)/configure: $(am__configure_deps)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(ACLOCAL_M4): $(am__aclocal_m4_deps)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+install-pkglibLTLIBRARIES: $(pkglib_LTLIBRARIES)
+ @$(NORMAL_INSTALL)
+ test -z "$(pkglibdir)" || $(mkdir_p) "$(DESTDIR)$(pkglibdir)"
+ @list='$(pkglib_LTLIBRARIES)'; for p in $$list; do \
+ if test -f $$p; then \
+ f=$(am__strip_dir) \
+ echo " $(LIBTOOL) --mode=install $(pkglibLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) '$$p' '$(DESTDIR)$(pkglibdir)/$$f'"; \
+ $(LIBTOOL) --mode=install $(pkglibLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) "$$p" "$(DESTDIR)$(pkglibdir)/$$f"; \
+ else :; fi; \
+ done
+
+uninstall-pkglibLTLIBRARIES:
+ @$(NORMAL_UNINSTALL)
+ @set -x; list='$(pkglib_LTLIBRARIES)'; for p in $$list; do \
+ p=$(am__strip_dir) \
+ echo " $(LIBTOOL) --mode=uninstall rm -f '$(DESTDIR)$(pkglibdir)/$$p'"; \
+ $(LIBTOOL) --mode=uninstall rm -f "$(DESTDIR)$(pkglibdir)/$$p"; \
+ done
+
+clean-pkglibLTLIBRARIES:
+ -test -z "$(pkglib_LTLIBRARIES)" || rm -f $(pkglib_LTLIBRARIES)
+ @list='$(pkglib_LTLIBRARIES)'; for p in $$list; do \
+ dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \
+ test "$$dir" != "$$p" || dir=.; \
+ echo "rm -f \"$${dir}/so_locations\""; \
+ rm -f "$${dir}/so_locations"; \
+ done
+smixer-ac97.la: $(smixer_ac97_la_OBJECTS) $(smixer_ac97_la_DEPENDENCIES)
+ $(LINK) -rpath $(pkglibdir) $(smixer_ac97_la_LDFLAGS) $(smixer_ac97_la_OBJECTS) $(smixer_ac97_la_LIBADD) $(LIBS)
+smixer-hda.la: $(smixer_hda_la_OBJECTS) $(smixer_hda_la_DEPENDENCIES)
+ $(LINK) -rpath $(pkglibdir) $(smixer_hda_la_LDFLAGS) $(smixer_hda_la_OBJECTS) $(smixer_hda_la_LIBADD) $(LIBS)
+smixer-python.la: $(smixer_python_la_OBJECTS) $(smixer_python_la_DEPENDENCIES)
+ $(LINK) $(am_smixer_python_la_rpath) $(smixer_python_la_LDFLAGS) $(smixer_python_la_OBJECTS) $(smixer_python_la_LIBADD) $(LIBS)
+smixer-sbase.la: $(smixer_sbase_la_OBJECTS) $(smixer_sbase_la_DEPENDENCIES)
+ $(LINK) -rpath $(pkglibdir) $(smixer_sbase_la_LDFLAGS) $(smixer_sbase_la_OBJECTS) $(smixer_sbase_la_LIBADD) $(LIBS)
+
+mostlyclean-compile:
+ -rm -f *.$(OBJEXT)
+
+distclean-compile:
+ -rm -f *.tab.c
+
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ac97.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/hda.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sbase.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sbasedl.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/smixer_python_la-python.Plo@am__quote@
+
+.c.o:
+@am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \
+@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(COMPILE) -c $<
+
+.c.obj:
+@am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ `$(CYGPATH_W) '$<'`; \
+@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'`
+
+.c.lo:
+@am__fastdepCC_TRUE@ if $(LTCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \
+@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Plo"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $<
+
+smixer_python_la-python.lo: python.c
+@am__fastdepCC_TRUE@ if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(smixer_python_la_CFLAGS) $(CFLAGS) -MT smixer_python_la-python.lo -MD -MP -MF "$(DEPDIR)/smixer_python_la-python.Tpo" -c -o smixer_python_la-python.lo `test -f 'python.c' || echo '$(srcdir)/'`python.c; \
+@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/smixer_python_la-python.Tpo" "$(DEPDIR)/smixer_python_la-python.Plo"; else rm -f "$(DEPDIR)/smixer_python_la-python.Tpo"; exit 1; fi
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='python.c' object='smixer_python_la-python.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(smixer_python_la_CFLAGS) $(CFLAGS) -c -o smixer_python_la-python.lo `test -f 'python.c' || echo '$(srcdir)/'`python.c
+
+mostlyclean-libtool:
+ -rm -f *.lo
+
+clean-libtool:
+ -rm -rf .libs _libs
+
+distclean-libtool:
+ -rm -f libtool
+uninstall-info-am:
+
+ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
+ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+ unique=`for i in $$list; do \
+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+ done | \
+ $(AWK) ' { files[$$0] = 1; } \
+ END { for (i in files) print i; }'`; \
+ mkid -fID $$unique
+tags: TAGS
+
+TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
+ $(TAGS_FILES) $(LISP)
+ tags=; \
+ here=`pwd`; \
+ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+ unique=`for i in $$list; do \
+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+ done | \
+ $(AWK) ' { files[$$0] = 1; } \
+ END { for (i in files) print i; }'`; \
+ if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \
+ test -n "$$unique" || unique=$$empty_fix; \
+ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+ $$tags $$unique; \
+ fi
+ctags: CTAGS
+CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
+ $(TAGS_FILES) $(LISP)
+ tags=; \
+ here=`pwd`; \
+ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+ unique=`for i in $$list; do \
+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+ done | \
+ $(AWK) ' { files[$$0] = 1; } \
+ END { for (i in files) print i; }'`; \
+ test -z "$(CTAGS_ARGS)$$tags$$unique" \
+ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
+ $$tags $$unique
+
+GTAGS:
+ here=`$(am__cd) $(top_builddir) && pwd` \
+ && cd $(top_srcdir) \
+ && gtags -i $(GTAGS_ARGS) $$here
+
+distclean-tags:
+ -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
+
+distdir: $(DISTFILES)
+ @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
+ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
+ list='$(DISTFILES)'; for file in $$list; do \
+ case $$file in \
+ $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
+ $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
+ esac; \
+ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+ dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
+ if test "$$dir" != "$$file" && test "$$dir" != "."; then \
+ dir="/$$dir"; \
+ $(mkdir_p) "$(distdir)$$dir"; \
+ else \
+ dir=''; \
+ fi; \
+ if test -d $$d/$$file; then \
+ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+ cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
+ fi; \
+ cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
+ else \
+ test -f $(distdir)/$$file \
+ || cp -p $$d/$$file $(distdir)/$$file \
+ || exit 1; \
+ fi; \
+ done
+check-am: all-am
+check: check-am
+all-am: Makefile $(LTLIBRARIES) $(HEADERS)
+installdirs:
+ for dir in "$(DESTDIR)$(pkglibdir)"; do \
+ test -z "$$dir" || $(mkdir_p) "$$dir"; \
+ done
+install: install-am
+install-exec: install-exec-am
+install-data: install-data-am
+uninstall: uninstall-am
+
+install-am: all-am
+ @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-am
+install-strip:
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+ `test -z '$(STRIP)' || \
+ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+mostlyclean-generic:
+
+clean-generic:
+
+distclean-generic:
+ -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+
+maintainer-clean-generic:
+ @echo "This command is intended for maintainers to use"
+ @echo "it deletes files that may require special tools to rebuild."
+clean: clean-am
+
+clean-am: clean-generic clean-libtool clean-pkglibLTLIBRARIES \
+ mostlyclean-am
+
+distclean: distclean-am
+ -rm -rf ./$(DEPDIR)
+ -rm -f Makefile
+distclean-am: clean-am distclean-compile distclean-generic \
+ distclean-libtool distclean-tags
+
+dvi: dvi-am
+
+dvi-am:
+
+html: html-am
+
+info: info-am
+
+info-am:
+
+install-data-am:
+
+install-exec-am: install-pkglibLTLIBRARIES
+
+install-info: install-info-am
+
+install-man:
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-am
+ -rm -rf ./$(DEPDIR)
+ -rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-am
+
+mostlyclean-am: mostlyclean-compile mostlyclean-generic \
+ mostlyclean-libtool
+
+pdf: pdf-am
+
+pdf-am:
+
+ps: ps-am
+
+ps-am:
+
+uninstall-am: uninstall-info-am uninstall-pkglibLTLIBRARIES
+
+.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \
+ clean-libtool clean-pkglibLTLIBRARIES ctags distclean \
+ distclean-compile distclean-generic distclean-libtool \
+ distclean-tags distdir dvi dvi-am html html-am info info-am \
+ install install-am install-data install-data-am install-exec \
+ install-exec-am install-info install-info-am install-man \
+ install-pkglibLTLIBRARIES install-strip installcheck \
+ installcheck-am installdirs maintainer-clean \
+ maintainer-clean-generic mostlyclean mostlyclean-compile \
+ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
+ tags uninstall uninstall-am uninstall-info-am \
+ uninstall-pkglibLTLIBRARIES
+
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
diff --git a/alsa-lib/modules/mixer/simple/ac97.c b/alsa-lib/modules/mixer/simple/ac97.c
new file mode 100644
index 0000000..ddb6143
--- /dev/null
+++ b/alsa-lib/modules/mixer/simple/ac97.c
@@ -0,0 +1,89 @@
+/*
+ * Mixer Interface - AC97 simple abstact module
+ * Copyright (c) 2005 by Jaroslav Kysela <perex@perex.cz>
+ *
+ *
+ * This library is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ *
+ */
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <unistd.h>
+#include <string.h>
+#include <fcntl.h>
+#include <sys/ioctl.h>
+#include <math.h>
+#include "asoundlib.h"
+#include "mixer_abst.h"
+#include "sbase.h"
+
+static struct sm_elem_ops simple_ac97_ops;
+
+struct melem_sids sids[] = {
+ {
+ .sid = SID_MASTER,
+ .sname = "Master",
+ .sindex = 0,
+ .weight = 1,
+ .chanmap = { 3, 0 },
+ .sops = &simple_ac97_ops,
+ }
+};
+
+#define SELECTORS (sizeof(selectors)/sizeof(selectors[0]))
+
+struct helem_selector selectors[] = {
+ {
+ .iface = SND_CTL_ELEM_IFACE_MIXER,
+ .name = "Master Playback Volume",
+ .index = 0,
+ .sid = SID_MASTER,
+ .purpose = PURPOSE_VOLUME,
+ .caps = SM_CAP_PVOLUME,
+ },
+ {
+ .iface = SND_CTL_ELEM_IFACE_MIXER,
+ .name = "Master Playback Switch",
+ .index = 0,
+ .sid = SID_MASTER,
+ .purpose = PURPOSE_SWITCH,
+ .caps = SM_CAP_PSWITCH,
+ }
+};
+
+int alsa_mixer_simple_event(snd_mixer_class_t *class, unsigned int mask,
+ snd_hctl_elem_t *helem, snd_mixer_elem_t *melem)
+{
+ struct bclass_private *priv = snd_mixer_sbasic_get_private(class);
+ return priv->ops.event(class, mask, helem, melem);
+}
+
+int alsa_mixer_simple_init(snd_mixer_class_t *class)
+{
+ struct bclass_base_ops *ops;
+ int err;
+
+ err = mixer_simple_basic_dlopen(class, &ops);
+ if (err < 0)
+ return 0;
+ err = ops->selreg(class, selectors, SELECTORS);
+ if (err < 0)
+ return err;
+ err = ops->sidreg(class, sids, SELECTORS);
+ if (err < 0)
+ return err;
+ return 0;
+}
diff --git a/alsa-lib/modules/mixer/simple/hda.c b/alsa-lib/modules/mixer/simple/hda.c
new file mode 100644
index 0000000..13c931a
--- /dev/null
+++ b/alsa-lib/modules/mixer/simple/hda.c
@@ -0,0 +1,90 @@
+/*
+ * Mixer Interface - HDA simple abstact module
+ * Copyright (c) 2005 by Jaroslav Kysela <perex@perex.cz>
+ *
+ *
+ * This library is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ *
+ */
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <unistd.h>
+#include <string.h>
+#include <fcntl.h>
+#include <sys/ioctl.h>
+#include <math.h>
+#include "asoundlib.h"
+#include "mixer_abst.h"
+#include "sbase.h"
+
+static struct sm_elem_ops simple_hda_ops;
+
+struct melem_sids sids[] = {
+ {
+ .sid = SID_FRONT,
+ .sname = "Front",
+ .sindex = 0,
+ .weight = 1,
+ .chanmap = { 3, 0 },
+ .sops = &simple_hda_ops,
+ }
+};
+
+#define SELECTORS (sizeof(selectors)/sizeof(selectors[0]))
+
+struct helem_selector selectors[] = {
+ {
+ .iface = SND_CTL_ELEM_IFACE_MIXER,
+ .name = "Front Playback Volume",
+ .index = 0,
+ .sid = SID_FRONT,
+ .purpose = PURPOSE_VOLUME,
+ .caps = SM_CAP_PVOLUME,
+ },
+ {
+ .iface = SND_CTL_ELEM_IFACE_MIXER,
+ .name = "Front Playback Switch",
+ .index = 0,
+ .sid = SID_FRONT,
+ .purpose = PURPOSE_SWITCH,
+ .caps = SM_CAP_PSWITCH,
+ }
+};
+
+int alsa_mixer_simple_event(snd_mixer_class_t *class, unsigned int mask,
+ snd_hctl_elem_t *helem, snd_mixer_elem_t *melem)
+{
+ struct bclass_private *priv = snd_mixer_sbasic_get_private(class);
+ return priv->ops.event(class, mask, helem, melem);
+}
+
+int alsa_mixer_simple_init(snd_mixer_class_t *class)
+{
+ struct bclass_base_ops *ops;
+ int err;
+
+ err = mixer_simple_basic_dlopen(class, &ops);
+ if (err < 0)
+ return 0;
+ err = ops->selreg(class, selectors, SELECTORS);
+ if (err < 0)
+ return err;
+ err = ops->sidreg(class, sids, SELECTORS);
+ if (err < 0)
+ return err;
+ return 0;
+}
diff --git a/alsa-lib/modules/mixer/simple/python.c b/alsa-lib/modules/mixer/simple/python.c
new file mode 100644
index 0000000..c822c52
--- /dev/null
+++ b/alsa-lib/modules/mixer/simple/python.c
@@ -0,0 +1,1046 @@
+/*
+ * Mixer Interface - python binding simple abstact module
+ * Copyright (c) 2007 by Jaroslav Kysela <perex@perex.cz>
+ *
+ *
+ * This library is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ *
+ */
+
+#include "Python.h"
+#include <stddef.h>
+#include "config.h"
+#include "asoundlib.h"
+#include "mixer_abst.h"
+
+struct python_priv {
+ int py_initialized;
+ PyObject *py_event_func;
+ PyObject *py_mdict;
+ PyObject *py_mixer;
+};
+
+#define SCRIPT ALSA_PLUGIN_DIR "/smixer/python/main.py"
+
+struct pymelem {
+ PyObject_HEAD
+ sm_selem_t selem;
+ PyObject *py_mixer;
+ snd_mixer_elem_t *melem;
+};
+
+struct pymixer {
+ PyObject_HEAD
+ snd_mixer_class_t *class;
+ snd_mixer_t *mixer;
+ PyObject *mdict;
+ int hctl_count;
+ void **hctl;
+ int helem_count;
+ void **helem;
+ int melem_count;
+ void **melem;
+};
+
+static PyInterpreterState *main_interpreter;
+
+static void *get_C_ptr(PyObject *obj, const char *attr)
+{
+ PyObject *o;
+
+ o = PyObject_GetAttr(obj, PyString_InternFromString(attr));
+ if (!o) {
+ PyErr_Format(PyExc_TypeError, "missing '%s' attribute", attr);
+ return NULL;
+ }
+ if (!PyInt_Check(o)) {
+ PyErr_Format(PyExc_TypeError, "'%s' attribute is not integer", attr);
+ return NULL;
+ }
+ return (void *)PyInt_AsLong(o);
+}
+
+static struct pymelem *melem_to_pymelem(snd_mixer_elem_t *elem)
+{
+ return (struct pymelem *)((char *)snd_mixer_elem_get_private(elem) - offsetof(struct pymelem, selem));
+}
+
+static int pcall(struct pymelem *pymelem, const char *attr, PyObject *args, PyObject **_res)
+{
+ PyObject *obj = (PyObject *)pymelem, *res;
+ int xres = 0;
+
+ if (_res)
+ *_res = NULL;
+ obj = PyObject_GetAttr(obj, PyString_InternFromString(attr));
+ if (!obj) {
+ PyErr_Format(PyExc_TypeError, "missing '%s' attribute", attr);
+ PyErr_Print();
+ PyErr_Clear();
+ Py_DECREF(args);
+ return -EIO;
+ }
+ res = PyObject_CallObject(obj, args);
+ Py_XDECREF(args);
+ if (res == NULL) {
+ PyErr_Print();
+ PyErr_Clear();
+ return -EIO;
+ }
+ if (_res && PyTuple_Check(res)) {
+ *_res = res;
+ res = PyTuple_GetItem(res, 0);
+ }
+ if (PyInt_Check(res)) {
+ xres = PyInt_AsLong(res);
+ } else if (res == Py_None) {
+ xres = 0;
+ } else if (PyBool_Check(res)) {
+ xres = res == Py_True;
+ } else {
+ PyErr_Format(PyExc_TypeError, "wrong result from '%s'!", attr);
+ PyErr_Print();
+ PyErr_Clear();
+ Py_DECREF(res);
+ if (_res)
+ *_res = NULL;
+ return -EIO;
+ }
+ if (_res && *_res)
+ return xres;
+ Py_DECREF(res);
+ return xres;
+}
+
+static int is_ops(snd_mixer_elem_t *elem, int dir, int cmd, int val)
+{
+ PyObject *obj1;
+ struct pymelem *pymelem = melem_to_pymelem(elem);
+ char *s, fcn[32] = "opsIs";
+ int res, xdir = 1, xval = 0;
+
+ switch (cmd) {
+ case SM_OPS_IS_ACTIVE: s = "Active"; xdir = 0; break;
+ case SM_OPS_IS_MONO: s = "Mono"; break;
+ case SM_OPS_IS_CHANNEL: s = "Channel"; xval = 1; break;
+ case SM_OPS_IS_ENUMERATED: s = "Enumerated"; xdir = val == 1; break;
+ case SM_OPS_IS_ENUMCNT: s = "EnumCnt"; break;
+ default:
+ return 1;
+ }
+ strcat(fcn, s);
+
+ obj1 = PyTuple_New(xdir + xval);
+ if (xdir) {
+ PyTuple_SET_ITEM(obj1, 0, PyInt_FromLong(dir));
+ if (xval)
+ PyTuple_SET_ITEM(obj1, 1, PyInt_FromLong(val));
+ }
+ res = pcall(pymelem, fcn, obj1, NULL);
+ return res < 0 ? 0 : res;
+}
+
+static int get_x_range_ops(snd_mixer_elem_t *elem, int dir,
+ long *min, long *max, const char *attr)
+{
+ PyObject *obj1, *res;
+ struct pymelem *pymelem = melem_to_pymelem(elem);
+ int err;
+
+ obj1 = PyTuple_New(1);
+ PyTuple_SET_ITEM(obj1, 0, PyInt_FromLong(dir));
+ err = pcall(pymelem, attr, obj1, &res);
+ if (err >= 0) {
+ err = !PyInt_Check(PyTuple_GetItem(res, 1)) || !PyInt_Check(PyTuple_GetItem(res, 2));
+ if (err) {
+ err = !PyLong_Check(PyTuple_GetItem(res, 1)) || !PyLong_Check(PyTuple_GetItem(res, 2));
+ if (err) {
+ PyErr_Format(PyExc_TypeError, "wrong result (invalid tuple)");
+ PyErr_Print();
+ PyErr_Clear();
+ err = -EIO;
+ } else {
+ *min = PyLong_AsLong(PyTuple_GetItem(res, 1));
+ *max = PyLong_AsLong(PyTuple_GetItem(res, 2));
+ }
+ } else {
+ *min = PyInt_AsLong(PyTuple_GetItem(res, 1));
+ *max = PyInt_AsLong(PyTuple_GetItem(res, 2));
+ }
+ }
+ Py_XDECREF(res);
+ return err;
+}
+
+static int get_range_ops(snd_mixer_elem_t *elem, int dir,
+ long *min, long *max)
+{
+ return get_x_range_ops(elem, dir, min, max, "opsGetRange");
+}
+
+static int set_range_ops(snd_mixer_elem_t *elem, int dir,
+ long min, long max)
+{
+ PyObject *obj1;
+ struct pymelem *pymelem = melem_to_pymelem(elem);
+
+ obj1 = PyTuple_New(3);
+ PyTuple_SET_ITEM(obj1, 0, PyInt_FromLong(dir));
+ PyTuple_SET_ITEM(obj1, 1, PyInt_FromLong(min));
+ PyTuple_SET_ITEM(obj1, 2, PyInt_FromLong(max));
+ return pcall(pymelem, "opsGetRange", obj1, NULL);
+}
+
+static int get_x_ops(snd_mixer_elem_t *elem, int dir,
+ long channel, long *value,
+ const char *attr)
+{
+ PyObject *obj1, *res;
+ struct pymelem *pymelem = melem_to_pymelem(elem);
+ int err;
+
+ obj1 = PyTuple_New(2);
+ PyTuple_SET_ITEM(obj1, 0, PyInt_FromLong(dir));
+ PyTuple_SET_ITEM(obj1, 1, PyInt_FromLong(channel));
+ err = pcall(pymelem, attr, obj1, &res);
+ if (err >= 0) {
+ err = !PyInt_Check(PyTuple_GetItem(res, 1));
+ if (err) {
+ err = !PyLong_Check(PyTuple_GetItem(res, 1));
+ if (err) {
+ PyErr_Format(PyExc_TypeError, "wrong result (invalid tuple)");
+ PyErr_Print();
+ PyErr_Clear();
+ err = -EIO;
+ } else {
+ *value = PyLong_AsLong(PyTuple_GetItem(res, 1));
+ }
+ } else {
+ *value = PyInt_AsLong(PyTuple_GetItem(res, 1));
+ }
+ }
+ Py_XDECREF(res);
+ return err;
+}
+
+static int get_volume_ops(snd_mixer_elem_t *elem, int dir,
+ snd_mixer_selem_channel_id_t channel, long *value)
+{
+ return get_x_ops(elem, dir, channel, value, "opsGetVolume");
+}
+
+static int get_switch_ops(snd_mixer_elem_t *elem, int dir,
+ snd_mixer_selem_channel_id_t channel, int *value)
+{
+ long value1;
+ int res;
+ res = get_x_ops(elem, dir, channel, &value1, "opsGetSwitch");
+ *value = value1;
+ return res;
+}
+
+static int ask_vol_dB_ops(snd_mixer_elem_t *elem,
+ int dir,
+ long value,
+ long *dbValue)
+{
+ return get_x_ops(elem, dir, value, dbValue, "opsGetVolDB");
+}
+
+static int ask_dB_vol_ops(snd_mixer_elem_t *elem,
+ int dir,
+ long value,
+ long *dbValue,
+ int xdir)
+{
+ PyObject *obj1, *res;
+ struct pymelem *pymelem = melem_to_pymelem(elem);
+ int err;
+
+ obj1 = PyTuple_New(3);
+ PyTuple_SET_ITEM(obj1, 0, PyInt_FromLong(dir));
+ PyTuple_SET_ITEM(obj1, 1, PyInt_FromLong(value));
+ PyTuple_SET_ITEM(obj1, 2, PyInt_FromLong(xdir));
+ err = pcall(pymelem, "opsGetDBVol", obj1, &res);
+ if (err >= 0) {
+ err = !PyInt_Check(PyTuple_GetItem(res, 1));
+ if (err) {
+ err = !PyLong_Check(PyTuple_GetItem(res, 1));
+ if (err) {
+ PyErr_Format(PyExc_TypeError, "wrong result (invalid tuple)");
+ PyErr_Print();
+ PyErr_Clear();
+ err = -EIO;
+ } else {
+ *dbValue = PyLong_AsLong(PyTuple_GetItem(res, 1));
+ }
+ } else {
+ *dbValue = PyInt_AsLong(PyTuple_GetItem(res, 1));
+ }
+ }
+ Py_XDECREF(res);
+ return err;
+}
+
+static int get_dB_ops(snd_mixer_elem_t *elem,
+ int dir,
+ snd_mixer_selem_channel_id_t channel,
+ long *value)
+{
+ return get_x_ops(elem, dir, channel, value, "opsGetDB");
+}
+
+static int get_dB_range_ops(snd_mixer_elem_t *elem, int dir,
+ long *min, long *max)
+{
+ return get_x_range_ops(elem, dir, min, max, "opsGetDBRange");
+}
+
+static int set_volume_ops(snd_mixer_elem_t *elem, int dir,
+ snd_mixer_selem_channel_id_t channel, long value)
+{
+ PyObject *obj1;
+ struct pymelem *pymelem = melem_to_pymelem(elem);
+
+ obj1 = PyTuple_New(3);
+ PyTuple_SET_ITEM(obj1, 0, PyInt_FromLong(dir));
+ PyTuple_SET_ITEM(obj1, 1, PyInt_FromLong(channel));
+ PyTuple_SET_ITEM(obj1, 2, PyInt_FromLong(value));
+ return pcall(pymelem, "opsSetVolume", obj1, NULL);
+}
+
+static int set_switch_ops(snd_mixer_elem_t *elem, int dir,
+ snd_mixer_selem_channel_id_t channel, int value)
+{
+ PyObject *obj1;
+ struct pymelem *pymelem = melem_to_pymelem(elem);
+
+ obj1 = PyTuple_New(3);
+ PyTuple_SET_ITEM(obj1, 0, PyInt_FromLong(dir));
+ PyTuple_SET_ITEM(obj1, 1, PyInt_FromLong(channel));
+ PyTuple_SET_ITEM(obj1, 2, PyInt_FromLong(value));
+ return pcall(pymelem, "opsSetSwitch", obj1, NULL);
+}
+
+static int set_dB_ops(snd_mixer_elem_t *elem, int dir,
+ snd_mixer_selem_channel_id_t channel,
+ long db_gain, int xdir)
+{
+ PyObject *obj1;
+ struct pymelem *pymelem = melem_to_pymelem(elem);
+
+ obj1 = PyTuple_New(4);
+ PyTuple_SET_ITEM(obj1, 0, PyInt_FromLong(dir));
+ PyTuple_SET_ITEM(obj1, 1, PyInt_FromLong(channel));
+ PyTuple_SET_ITEM(obj1, 2, PyInt_FromLong(db_gain));
+ PyTuple_SET_ITEM(obj1, 3, PyInt_FromLong(xdir));
+ return pcall(pymelem, "opsSetDB", obj1, NULL);
+}
+
+static int enum_item_name_ops(snd_mixer_elem_t *elem,
+ unsigned int item,
+ size_t maxlen, char *buf)
+{
+ PyObject *obj1, *res;
+ struct pymelem *pymelem = melem_to_pymelem(elem);
+ int err;
+ unsigned int len;
+ char *s;
+
+ obj1 = PyTuple_New(1);
+ PyTuple_SET_ITEM(obj1, 0, PyInt_FromLong(item));
+ err = pcall(pymelem, "opsGetEnumItemName", obj1, &res);
+ if (err >= 0) {
+ err = !PyString_Check(PyTuple_GetItem(res, 1));
+ if (err) {
+ PyErr_Format(PyExc_TypeError, "wrong result (invalid tuple)");
+ PyErr_Print();
+ PyErr_Clear();
+ err = -EIO;
+ } else {
+ s = PyString_AsString(PyTuple_GetItem(res, 1));
+ len = strlen(s);
+ if (maxlen - 1 > len)
+ len = maxlen - 1;
+ memcpy(buf, s, len);
+ buf[len] = '\0';
+ }
+ }
+ Py_XDECREF(res);
+ return err;
+}
+
+static int get_enum_item_ops(snd_mixer_elem_t *elem,
+ snd_mixer_selem_channel_id_t channel,
+ unsigned int *itemp)
+{
+ PyObject *obj1, *res;
+ struct pymelem *pymelem = melem_to_pymelem(elem);
+ int err;
+
+ obj1 = PyTuple_New(1);
+ PyTuple_SET_ITEM(obj1, 0, PyInt_FromLong(channel));
+ err = pcall(pymelem, "opsGetEnumItem", obj1, &res);
+ if (err >= 0) {
+ err = !PyInt_Check(PyTuple_GetItem(res, 1));
+ if (err) {
+ PyErr_Format(PyExc_TypeError, "wrong result (invalid tuple)");
+ PyErr_Print();
+ PyErr_Clear();
+ err = -EIO;
+ } else {
+ *itemp = PyInt_AsLong(PyTuple_GetItem(res, 1));
+ }
+ }
+ Py_XDECREF(res);
+ return err;
+}
+
+static int set_enum_item_ops(snd_mixer_elem_t *elem,
+ snd_mixer_selem_channel_id_t channel,
+ unsigned int item)
+{
+ PyObject *obj1;
+ struct pymelem *pymelem = melem_to_pymelem(elem);
+
+ obj1 = PyTuple_New(2);
+ PyTuple_SET_ITEM(obj1, 0, PyInt_FromLong(channel));
+ PyTuple_SET_ITEM(obj1, 1, PyInt_FromLong(item));
+ return pcall(pymelem, "opsSetEnumItem", obj1, NULL);
+}
+
+static struct sm_elem_ops simple_python_ops = {
+ .is = is_ops,
+ .get_range = get_range_ops,
+ .get_dB_range = get_dB_range_ops,
+ .set_range = set_range_ops,
+ .ask_vol_dB = ask_vol_dB_ops,
+ .ask_dB_vol = ask_dB_vol_ops,
+ .get_volume = get_volume_ops,
+ .get_dB = get_dB_ops,
+ .set_volume = set_volume_ops,
+ .set_dB = set_dB_ops,
+ .get_switch = get_switch_ops,
+ .set_switch = set_switch_ops,
+ .enum_item_name = enum_item_name_ops,
+ .get_enum_item = get_enum_item_ops,
+ .set_enum_item = set_enum_item_ops
+};
+
+static void selem_free(snd_mixer_elem_t *elem)
+{
+ sm_selem_t *simple = snd_mixer_elem_get_private(elem);
+
+ if (simple->id) {
+ snd_mixer_selem_id_free(simple->id);
+ simple->id = NULL;
+ }
+}
+
+static PyObject *
+pymelem_cap(struct pymelem *pymelem ATTRIBUTE_UNUSED, void *priv)
+{
+ return PyInt_FromLong((long)priv);
+}
+
+static PyObject *
+pymelem_get_caps(struct pymelem *pymelem, void *priv ATTRIBUTE_UNUSED)
+{
+ return PyInt_FromLong(pymelem->selem.caps);
+}
+
+static PyObject *
+pymelem_get_name(struct pymelem *pymelem, void *priv ATTRIBUTE_UNUSED)
+{
+ return PyString_FromString(snd_mixer_selem_id_get_name(pymelem->selem.id));
+}
+
+static PyObject *
+pymelem_get_index(struct pymelem *pymelem, void *priv ATTRIBUTE_UNUSED)
+{
+ return PyInt_FromLong(snd_mixer_selem_id_get_index(pymelem->selem.id));
+}
+
+static int
+pymelem_set_caps(struct pymelem *pymelem, PyObject *val, void *priv ATTRIBUTE_UNUSED)
+{
+ if (!PyInt_Check(val)) {
+ PyErr_SetString(PyExc_TypeError, "The last attribute value must be an integer");
+ return -1;
+ }
+ pymelem->selem.caps = PyInt_AsLong(val);
+ return 0;
+}
+
+static PyObject *
+pymelem_ignore(struct pymelem *pymelem ATTRIBUTE_UNUSED, PyObject *args ATTRIBUTE_UNUSED)
+{
+ Py_RETURN_NONE;
+}
+
+static PyObject *
+pymelem_ignore1(struct pymelem *pymelem ATTRIBUTE_UNUSED, PyObject *args ATTRIBUTE_UNUSED)
+{
+ Py_RETURN_TRUE;
+}
+
+static PyObject *
+pymelem_error(struct pymelem *pymelem ATTRIBUTE_UNUSED, PyObject *args ATTRIBUTE_UNUSED)
+{
+ return PyInt_FromLong(-EIO);
+}
+
+static PyObject *
+pymelem_attach(struct pymelem *pymelem, PyObject *args)
+{
+ PyObject *obj;
+ snd_hctl_elem_t *helem;
+ int err;
+
+ if (!PyArg_ParseTuple(args, "O", &obj))
+ return NULL;
+ helem = (snd_hctl_elem_t *)get_C_ptr(obj, "get_C_helem");
+ if (helem == NULL)
+ return NULL;
+ err = snd_mixer_elem_attach(pymelem->melem, helem);
+ if (err < 0) {
+ PyErr_Format(PyExc_RuntimeError, "Cannot attach hcontrol element to mixer element: %s", snd_strerror(err));
+ return NULL;
+ }
+ Py_RETURN_NONE;
+}
+
+static PyObject *
+pymelem_detach(struct pymelem *pymelem, PyObject *args)
+{
+ PyObject *obj;
+ snd_hctl_elem_t *helem;
+ int err;
+
+ if (!PyArg_ParseTuple(args, "O", &obj))
+ return NULL;
+ helem = (snd_hctl_elem_t *)get_C_ptr(obj, "get_C_helem");
+ if (helem == NULL)
+ return NULL;
+ err = snd_mixer_elem_detach(pymelem->melem, helem);
+ if (err < 0) {
+ PyErr_Format(PyExc_RuntimeError, "Cannot detach hcontrol element to mixer element: %s", snd_strerror(err));
+ return NULL;
+ }
+ Py_RETURN_NONE;
+}
+
+static PyObject *
+pymelem_event_info(struct pymelem *pymelem, PyObject *args)
+{
+ if (!PyArg_ParseTuple(args, ""))
+ return NULL;
+ return PyInt_FromLong(snd_mixer_elem_info(pymelem->melem));
+}
+
+static PyObject *
+pymelem_event_value(struct pymelem *pymelem, PyObject *args)
+{
+ if (!PyArg_ParseTuple(args, ""))
+ return NULL;
+ return PyInt_FromLong(snd_mixer_elem_value(pymelem->melem));
+}
+
+static int
+pymelem_init(struct pymelem *pymelem, PyObject *args, PyObject *kwds ATTRIBUTE_UNUSED)
+{
+ char *name;
+ long index, weight;
+ snd_mixer_selem_id_t *id;
+ int err;
+
+ if (!PyArg_ParseTuple(args, "Osii", &pymelem->py_mixer, &name, &index, &weight))
+ return -1;
+ memset(&pymelem->selem, 0, sizeof(pymelem->selem));
+ if (snd_mixer_selem_id_malloc(&id))
+ return -1;
+ snd_mixer_selem_id_set_name(id, name);
+ snd_mixer_selem_id_set_index(id, index);
+ pymelem->selem.id = id;
+ pymelem->selem.ops = &simple_python_ops;
+ err = snd_mixer_elem_new(&pymelem->melem, SND_MIXER_ELEM_SIMPLE,
+ weight, &pymelem->selem, selem_free);
+ if (err < 0) {
+ snd_mixer_selem_id_free(id);
+ return -1;
+ }
+ return 0;
+}
+
+static void
+pymelem_dealloc(struct pymelem *self)
+{
+ selem_free(self->melem);
+ self->ob_type->tp_free(self);
+}
+
+static PyGetSetDef pymelem_getseters[] = {
+ {"CAP_GVOLUME", (getter)pymelem_cap, NULL, NULL, (void *)SM_CAP_GVOLUME},
+ {"CAP_GSWITCH", (getter)pymelem_cap, NULL, NULL, (void *)SM_CAP_GSWITCH},
+ {"CAP_PVOLUME", (getter)pymelem_cap, NULL, NULL, (void *)SM_CAP_PVOLUME},
+ {"CAP_PVOLUME_JOIN", (getter)pymelem_cap, NULL, NULL, (void *)SM_CAP_PVOLUME_JOIN},
+ {"CAP_PSWITCH", (getter)pymelem_cap, NULL, NULL, (void *)SM_CAP_PSWITCH},
+ {"CAP_PSWITCH_JOIN", (getter)pymelem_cap, NULL, NULL, (void *)SM_CAP_PSWITCH_JOIN},
+ {"CAP_CVOLUME", (getter)pymelem_cap, NULL, NULL, (void *)SM_CAP_CVOLUME},
+ {"CAP_CVOLUME_JOIN", (getter)pymelem_cap, NULL, NULL, (void *)SM_CAP_CVOLUME_JOIN},
+ {"CAP_CSWITCH", (getter)pymelem_cap, NULL, NULL, (void *)SM_CAP_CSWITCH},
+ {"CAP_CSWITCH_JOIN", (getter)pymelem_cap, NULL, NULL, (void *)SM_CAP_CSWITCH_JOIN},
+ {"CAP_CSWITCH_EXCL", (getter)pymelem_cap, NULL, NULL, (void *)SM_CAP_CSWITCH_EXCL},
+ {"CAP_PENUM", (getter)pymelem_cap, NULL, NULL, (void *)SM_CAP_PENUM},
+ {"CAP_CENUM", (getter)pymelem_cap, NULL, NULL, (void *)SM_CAP_CENUM},
+
+ {"caps", (getter)pymelem_get_caps, (setter)pymelem_set_caps, NULL, NULL},
+
+ {"name", (getter)pymelem_get_name, NULL, NULL, NULL},
+ {"index", (getter)pymelem_get_index, NULL, NULL, NULL},
+
+ {NULL,NULL,NULL,NULL,NULL}
+};
+
+static PyMethodDef pymelem_methods[] = {
+ {"attach", (PyCFunction)pymelem_attach, METH_VARARGS, NULL},
+ {"detach", (PyCFunction)pymelem_detach, METH_VARARGS, NULL},
+
+ /* "default" functions - no functionality */
+ {"opsIsActive", (PyCFunction)pymelem_ignore1, METH_VARARGS, NULL},
+ {"opsIsMono", (PyCFunction)pymelem_ignore, METH_VARARGS, NULL},
+ {"opsIsChannel", (PyCFunction)pymelem_ignore, METH_VARARGS, NULL},
+ {"opsIsEnumerated", (PyCFunction)pymelem_ignore, METH_VARARGS, NULL},
+ {"opsIsEnumCnt", (PyCFunction)pymelem_ignore, METH_VARARGS, NULL},
+
+ {"opsGetDB", (PyCFunction)pymelem_error, METH_VARARGS, NULL},
+
+ {"eventInfo", (PyCFunction)pymelem_event_info, METH_VARARGS, NULL},
+ {"eventValue", (PyCFunction)pymelem_event_value, METH_VARARGS, NULL},
+
+ {NULL,NULL,0,NULL}
+};
+
+static PyTypeObject pymelem_type = {
+ PyObject_HEAD_INIT(0)
+ tp_name: "smixer_python.InternalMElement",
+ tp_basicsize: sizeof(struct pymelem),
+ tp_dealloc: (destructor)pymelem_dealloc,
+ tp_flags: Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
+ tp_doc: NULL /* mixerinit__doc__ */,
+ tp_getset: pymelem_getseters,
+ tp_init: (initproc)pymelem_init,
+ tp_alloc: PyType_GenericAlloc,
+ tp_new: PyType_GenericNew,
+ tp_free: PyObject_Del,
+ tp_methods: pymelem_methods,
+};
+
+static PyObject *
+pymixer_attach_hctl(struct pymixer *pymixer, PyObject *args)
+{
+ PyObject *obj;
+ snd_hctl_t *hctl;
+ void **hctls;
+ int err;
+
+ if (!PyArg_ParseTuple(args, "O", &obj))
+ return NULL;
+ hctl = (snd_hctl_t *)get_C_ptr(obj, "get_C_hctl");
+ if (hctl == NULL)
+ return NULL;
+ err = snd_mixer_attach_hctl(pymixer->mixer, hctl);
+ if (err < 0) {
+ PyErr_Format(PyExc_RuntimeError, "Cannot attach hctl: %s", snd_strerror(err));
+ return NULL;
+ }
+ hctls = realloc(pymixer->hctl, sizeof(void *) * (pymixer->hctl_count+1) * 2);
+ if (hctls == NULL) {
+ PyErr_SetString(PyExc_RuntimeError, "No enough memory");
+ return NULL;
+ }
+ pymixer->hctl = hctls;
+ pymixer->hctl[pymixer->hctl_count*2] = (void *)hctl;
+ pymixer->hctl[pymixer->hctl_count*2+1] = (void *)obj;
+ pymixer->hctl_count++;
+ Py_INCREF(obj);
+ Py_RETURN_NONE;
+}
+
+static PyObject *
+pymixer_register(struct pymixer *pymixer, PyObject *args)
+{
+ int err;
+
+ if (!PyArg_ParseTuple(args, ""))
+ return NULL;
+ err = snd_mixer_class_register(pymixer->class, pymixer->mixer);
+ if (err < 0) {
+ PyErr_Format(PyExc_RuntimeError, "Cannot register mixer: %s", snd_strerror(err));
+ return NULL;
+ }
+ Py_RETURN_NONE;
+}
+
+static PyObject *
+pymixer_melement_new(struct pymixer *pymixer, PyObject *args)
+{
+ PyObject *obj, *obj1, *obj2;
+ char *class, *name;
+ long index, weight;
+
+ if (!PyArg_ParseTuple(args, "ssii", &class, &name, &index, &weight))
+ return NULL;
+ obj = PyDict_GetItemString(pymixer->mdict, class);
+ if (obj) {
+ obj1 = PyTuple_New(4);
+ if (PyTuple_SET_ITEM(obj1, 0, (PyObject *)pymixer))
+ Py_INCREF((PyObject *)pymixer);
+ PyTuple_SET_ITEM(obj1, 1, PyString_FromString(name));
+ PyTuple_SET_ITEM(obj1, 2, PyInt_FromLong(index));
+ PyTuple_SET_ITEM(obj1, 3, PyInt_FromLong(weight));
+ obj2 = PyObject_CallObject(obj, obj1);
+ Py_XDECREF(obj1);
+ if (obj2) {
+ struct pymelem *pymelem = (struct pymelem *)obj2;
+ void **melems = realloc(pymixer->melem, sizeof(void *) * (pymixer->melem_count + 1) * 2);
+ if (melems == NULL) {
+ Py_DECREF(obj2);
+ return NULL;
+ }
+ melems[pymixer->melem_count*2] = pymelem->melem;
+ melems[pymixer->melem_count*2+1] = obj2;
+ Py_INCREF(obj2);
+ pymixer->melem = melems;
+ pymixer->melem_count++;
+ }
+ } else {
+ PyErr_Format(PyExc_RuntimeError, "Cannot find class '%s'", class);
+ return NULL;
+ }
+ return obj2;
+}
+
+static PyObject *
+pymixer_melement_add(struct pymixer *pymixer, PyObject *args)
+{
+ PyObject *obj;
+ struct pymelem *pymelem;
+ int err;
+
+ if (!PyArg_ParseTuple(args, "O", &obj))
+ return NULL;
+ pymelem = (struct pymelem *)obj;
+ err = snd_mixer_elem_add(pymelem->melem, pymixer->class);
+ if (err < 0) {
+ PyErr_Format(PyExc_RuntimeError, "Cannot add mixer element: %s", snd_strerror(err));
+ return NULL;
+ }
+ Py_RETURN_NONE;
+}
+
+static int
+pymixer_init(struct pymixer *pymixer, PyObject *args, PyObject *kwds ATTRIBUTE_UNUSED)
+{
+ long class, mixer;
+
+ if (!PyArg_ParseTuple(args, "iiO", &class, &mixer, &pymixer->mdict))
+ return -1;
+ pymixer->class = (snd_mixer_class_t *)class;
+ pymixer->mixer = (snd_mixer_t *)mixer;
+ pymixer->hctl_count = 0;
+ pymixer->hctl = NULL;
+ pymixer->helem_count = 0;
+ pymixer->helem = NULL;
+ pymixer->melem_count = 0;
+ pymixer->melem = NULL;
+ return 0;
+}
+
+static void
+pymixer_free(struct pymixer *self)
+{
+ int idx;
+
+ for (idx = 0; idx < self->hctl_count; idx++) {
+ snd_mixer_detach_hctl(self->mixer, self->hctl[idx*2]);
+ Py_DECREF((PyObject *)self->hctl[idx*2+1]);
+ }
+ if (self->hctl)
+ free(self->hctl);
+ self->hctl_count = 0;
+ self->hctl = NULL;
+ for (idx = 0; idx < self->helem_count; idx++)
+ Py_DECREF((PyObject *)self->helem[idx*2+1]);
+ if (self->helem)
+ free(self->helem);
+ self->helem_count = 0;
+ self->helem = NULL;
+ for (idx = 0; idx < self->melem_count; idx++)
+ Py_DECREF((PyObject *)self->melem[idx*2+1]);
+ if (self->melem)
+ free(self->melem);
+ self->melem_count = 0;
+ self->melem = NULL;
+}
+
+static void
+pymixer_dealloc(struct pymixer *self)
+{
+ pymixer_free(self);
+ self->ob_type->tp_free(self);
+}
+
+static PyGetSetDef pymixer_getseters[] = {
+ {NULL,NULL,NULL,NULL,NULL}
+};
+
+static PyMethodDef pymixer_methods[] = {
+ {"attachHCtl", (PyCFunction)pymixer_attach_hctl, METH_VARARGS, NULL},
+ {"register", (PyCFunction)pymixer_register, METH_VARARGS, NULL},
+ {"newMElement", (PyCFunction)pymixer_melement_new, METH_VARARGS, NULL},
+ {"addMElement", (PyCFunction)pymixer_melement_add, METH_VARARGS, NULL},
+ {NULL,NULL,0,NULL}
+};
+
+static PyTypeObject pymixer_type = {
+ PyObject_HEAD_INIT(0)
+ tp_name: "smixer_python.InternalMixer",
+ tp_basicsize: sizeof(struct pymixer),
+ tp_dealloc: (destructor)pymixer_dealloc,
+ tp_flags: Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
+ tp_doc: NULL /* mixerinit__doc__ */,
+ tp_getset: pymixer_getseters,
+ tp_init: (initproc)pymixer_init,
+ tp_alloc: PyType_GenericAlloc,
+ tp_new: PyType_GenericNew,
+ tp_free: PyObject_Del,
+ tp_methods: pymixer_methods,
+};
+
+static PyMethodDef python_methods[] = {
+ {NULL, NULL, 0, NULL}
+};
+
+static PyObject *new_helem(struct python_priv *priv, snd_hctl_elem_t *helem)
+{
+ PyObject *obj, *py_hctl = NULL, *obj1, *obj2;
+ snd_hctl_t *hctl = snd_hctl_elem_get_hctl(helem);
+ struct pymixer *pymixer = (struct pymixer *)priv->py_mixer;
+ int idx;
+
+ for (idx = 0; idx < pymixer->hctl_count; idx++) {
+ if (pymixer->hctl[idx] == hctl) {
+ py_hctl = pymixer->hctl[idx*2+1];
+ break;
+ }
+ }
+ if (py_hctl == NULL)
+ return NULL;
+ obj = PyDict_GetItemString(priv->py_mdict, "HElement");
+ if (obj) {
+ obj1 = PyTuple_New(3);
+ if (PyTuple_SET_ITEM(obj1, 0, py_hctl))
+ Py_INCREF(py_hctl);
+ PyTuple_SET_ITEM(obj1, 1, PyFloat_FromDouble(1));
+ PyTuple_SET_ITEM(obj1, 2, PyInt_FromLong((long)helem));
+ obj2 = PyObject_CallObject(obj, obj1);
+ if (obj2 == NULL) {
+ PyErr_Print();
+ PyErr_Clear();
+ }
+ Py_XDECREF(obj1);
+ } else {
+ SNDERR("Unable to create InternalMixer object");
+ return NULL;
+ }
+ if (obj2) {
+ struct pymixer *pymixer = (struct pymixer *)priv->py_mixer;
+ void **helems = realloc(pymixer->helem, sizeof(void *) * (pymixer->helem_count + 1) * 2);
+ if (helems == NULL) {
+ Py_DECREF(obj2);
+ return NULL;
+ }
+ helems[pymixer->helem_count*2] = helem;
+ helems[pymixer->helem_count*2+1] = obj2;
+ Py_INCREF(obj2);
+ pymixer->helem = helems;
+ pymixer->helem_count++;
+ }
+ return obj2;
+}
+
+static PyObject *find_helem(struct python_priv *priv, snd_hctl_elem_t *helem)
+{
+ struct pymixer *pymixer = (struct pymixer *)priv->py_mixer;
+ int idx;
+
+ for (idx = 0; idx < pymixer->helem_count; idx++) {
+ if (pymixer->helem[idx*2] == helem)
+ return (PyObject *)pymixer->helem[idx*2+1];
+ }
+ return NULL;
+}
+
+static PyObject *find_melem(struct python_priv *priv, snd_mixer_elem_t *melem)
+{
+ struct pymixer *pymixer = (struct pymixer *)priv->py_mixer;
+ int idx;
+
+ for (idx = 0; idx < pymixer->melem_count; idx++) {
+ if (pymixer->melem[idx*2] == melem)
+ return (PyObject *)pymixer->melem[idx*2+1];
+ }
+ return NULL;
+}
+
+int alsa_mixer_simple_event(snd_mixer_class_t *class, unsigned int mask,
+ snd_hctl_elem_t *helem, snd_mixer_elem_t *melem)
+{
+ struct python_priv *priv = snd_mixer_sbasic_get_private(class);
+ PyThreadState *tstate, *origstate;
+ PyObject *t, *o, *r;
+ int res = -ENOMEM;
+
+ tstate = PyThreadState_New(main_interpreter);
+ origstate = PyThreadState_Swap(tstate);
+
+ t = PyTuple_New(3);
+ if (t) {
+ PyTuple_SET_ITEM(t, 0, (PyObject *)PyInt_FromLong(mask));
+ o = find_helem(priv, helem);
+ if (mask & SND_CTL_EVENT_MASK_ADD) {
+ if (o == NULL)
+ o = new_helem(priv, helem);
+ }
+ if (o == NULL)
+ return 0;
+ if (PyTuple_SET_ITEM(t, 1, o))
+ Py_INCREF(o);
+ o = melem ? find_melem(priv, melem) : Py_None;
+ if (PyTuple_SET_ITEM(t, 2, o))
+ Py_INCREF(o);
+ r = PyObject_CallObject(priv->py_event_func, t);
+ Py_DECREF(t);
+ if (r) {
+ if (PyInt_Check(r)) {
+ res = PyInt_AsLong(r);
+ } else if (r == Py_None) {
+ res = 0;
+ }
+ Py_DECREF(r);
+ } else {
+ PyErr_Print();
+ PyErr_Clear();
+ res = -EIO;
+ }
+ }
+
+ return res;
+}
+
+static void alsa_mixer_simple_free(snd_mixer_class_t *class)
+{
+ struct python_priv *priv = snd_mixer_sbasic_get_private(class);
+
+ if (priv->py_mixer) {
+ pymixer_free((struct pymixer *)priv->py_mixer);
+ Py_DECREF(priv->py_mixer);
+ }
+ if (priv->py_initialized) {
+ Py_XDECREF(priv->py_event_func);
+ Py_Finalize();
+ }
+ free(priv);
+}
+
+int alsa_mixer_simple_finit(snd_mixer_class_t *class,
+ snd_mixer_t *mixer,
+ const char *device)
+{
+ struct python_priv *priv;
+ FILE *fp;
+ const char *file;
+ PyObject *obj, *obj1, *obj2, *py_mod, *mdict;
+
+ priv = calloc(1, sizeof(*priv));
+ if (priv == NULL)
+ return -ENOMEM;
+
+ snd_mixer_sbasic_set_private(class, priv);
+ snd_mixer_sbasic_set_private_free(class, alsa_mixer_simple_free);
+
+ file = getenv("ALSA_MIXER_SIMPLE_MPYTHON");
+ if (file == NULL)
+ file = SCRIPT;
+
+ fp = fopen(file, "r");
+ if (fp == NULL) {
+ SNDERR("Unable to find python module '%s'", file);
+ return -ENODEV;
+ }
+
+ Py_Initialize();
+ if (PyType_Ready(&pymelem_type) < 0)
+ return -EIO;
+ if (PyType_Ready(&pymixer_type) < 0)
+ return -EIO;
+ Py_InitModule("smixer_python", python_methods);
+ priv->py_initialized = 1;
+ main_interpreter = PyThreadState_Get()->interp;
+ obj = PyImport_GetModuleDict();
+ py_mod = PyDict_GetItemString(obj, "__main__");
+ if (py_mod) {
+ mdict = priv->py_mdict = PyModule_GetDict(py_mod);
+ obj = PyString_FromString(file);
+ if (obj)
+ PyDict_SetItemString(mdict, "__file__", obj);
+ Py_XDECREF(obj);
+ obj = PyString_FromString(device);
+ if (obj)
+ PyDict_SetItemString(mdict, "device", obj);
+ Py_XDECREF(obj);
+ Py_INCREF(&pymixer_type);
+ PyModule_AddObject(py_mod, "InternalMElement", (PyObject *)&pymelem_type);
+ PyModule_AddObject(py_mod, "InternalMixer", (PyObject *)&pymixer_type);
+ obj = PyDict_GetItemString(mdict, "InternalMixer");
+ if (obj) {
+ obj1 = PyTuple_New(3);
+ PyTuple_SET_ITEM(obj1, 0, PyInt_FromLong((long)class));
+ PyTuple_SET_ITEM(obj1, 1, PyInt_FromLong((long)mixer));
+ if (PyTuple_SET_ITEM(obj1, 2, mdict))
+ Py_INCREF(mdict);
+ obj2 = PyObject_CallObject(obj, obj1);
+ Py_XDECREF(obj1);
+ PyDict_SetItemString(mdict, "mixer", obj2);
+ priv->py_mixer = obj2;
+ } else {
+ SNDERR("Unable to create InternalMixer object");
+ return -EIO;
+ }
+
+
+ obj = PyRun_FileEx(fp, file, Py_file_input, mdict, mdict, 1);
+ if (obj == NULL)
+ PyErr_Print();
+ Py_XDECREF(obj);
+ priv->py_event_func = PyDict_GetItemString(mdict, "event");
+ if (priv->py_event_func == NULL) {
+ SNDERR("Unable to find python function 'event'");
+ return -EIO;
+ }
+ }
+ return 0;
+}
diff --git a/alsa-lib/modules/mixer/simple/sbase.c b/alsa-lib/modules/mixer/simple/sbase.c
new file mode 100644
index 0000000..97feee8
--- /dev/null
+++ b/alsa-lib/modules/mixer/simple/sbase.c
@@ -0,0 +1,587 @@
+/*
+ * Mixer Interface - simple abstact module - base library
+ * Copyright (c) 2005 by Jaroslav Kysela <perex@perex.cz>
+ *
+ *
+ * This library is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ *
+ */
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <unistd.h>
+#include <string.h>
+#include <fcntl.h>
+#include <sys/ioctl.h>
+#include <math.h>
+#include "asoundlib.h"
+#include "mixer_abst.h"
+#include "sbase.h"
+
+/*
+ * Prototypes
+ */
+
+static int selem_read(snd_mixer_elem_t *elem);
+
+/*
+ * Helpers
+ */
+
+static unsigned int chanmap_to_channels(unsigned int chanmap)
+{
+ unsigned int i, res;
+
+ for (i = 0, res = 0; i < MAX_CHANNEL; i++)
+ if (chanmap & (1 << i))
+ res++;
+ return res;
+}
+
+#if 0
+static long to_user(struct selem_base *s, int dir, struct helem_base *c, long value)
+{
+ int64_t n;
+ if (c->max == c->min)
+ return s->dir[dir].min;
+ n = (int64_t) (value - c->min) * (s->dir[dir].max - s->dir[dir].min);
+ return s->dir[dir].min + (n + (c->max - c->min) / 2) / (c->max - c->min);
+}
+
+static long from_user(struct selem_base *s, int dir, struct helem_base *c, long value)
+{
+ int64_t n;
+ if (s->dir[dir].max == s->dir[dir].min)
+ return c->min;
+ n = (int64_t) (value - s->dir[dir].min) * (c->max - c->min);
+ return c->min + (n + (s->dir[dir].max - s->dir[dir].min) / 2) / (s->dir[dir].max - s->dir[dir].min);
+}
+#endif
+
+static void update_ranges(struct selem_base *s)
+{
+ static unsigned int mask[2] = { SM_CAP_PVOLUME, SM_CAP_CVOLUME };
+ static unsigned int gmask[2] = { SM_CAP_GVOLUME, SM_CAP_GVOLUME };
+ unsigned int dir, ok_flag;
+ struct list_head *pos;
+ struct helem_base *helem;
+
+ for (dir = 0; dir < 2; dir++) {
+ s->dir[dir].min = 0;
+ s->dir[dir].max = 0;
+ ok_flag = 0;
+ list_for_each(pos, &s->helems) {
+ helem = list_entry(pos, struct helem_base, list);
+ printf("min = %li, max = %li\n", helem->min, helem->max);
+ if (helem->caps & mask[dir]) {
+ s->dir[dir].min = helem->min;
+ s->dir[dir].max = helem->max;
+ ok_flag = 1;
+ break;
+ }
+ }
+ if (ok_flag)
+ continue;
+ list_for_each(pos, &s->helems) {
+ helem = list_entry(pos, struct helem_base, list);
+ if (helem->caps & gmask[dir]) {
+ s->dir[dir].min = helem->min;
+ s->dir[dir].max = helem->max;
+ break;
+ }
+ }
+ }
+}
+
+/*
+ * Simple Mixer Operations
+ */
+
+static int is_ops(snd_mixer_elem_t *elem, int dir, int cmd, int val)
+{
+ struct selem_base *s = snd_mixer_elem_get_private(elem);
+
+ switch (cmd) {
+
+ case SM_OPS_IS_ACTIVE: {
+ struct list_head *pos;
+ struct helem_base *helem;
+ list_for_each(pos, &s->helems) {
+ helem = list_entry(pos, struct helem_base, list);
+ if (helem->inactive)
+ return 0;
+ }
+ return 1;
+ }
+
+ case SM_OPS_IS_MONO:
+ return chanmap_to_channels(s->dir[dir].chanmap) == 1;
+
+ case SM_OPS_IS_CHANNEL:
+ if (val > MAX_CHANNEL)
+ return 0;
+ return !!((1 << val) & s->dir[dir].chanmap);
+
+ case SM_OPS_IS_ENUMERATED: {
+ struct helem_base *helem;
+ helem = list_entry(s->helems.next, struct helem_base, list);
+ return !!(helem->purpose == PURPOSE_ENUMLIST);
+ }
+
+ case SM_OPS_IS_ENUMCNT: {
+ struct helem_base *helem;
+ helem = list_entry(s->helems.next, struct helem_base, list);
+ return helem->max;
+ }
+
+ }
+
+ return 1;
+}
+
+static int get_range_ops(snd_mixer_elem_t *elem, int dir,
+ long *min, long *max)
+{
+ struct selem_base *s = snd_mixer_elem_get_private(elem);
+
+ *min = s->dir[dir].min;
+ *max = s->dir[dir].max;
+
+ return 0;
+}
+
+static int get_dB_range_ops(snd_mixer_elem_t *elem ATTRIBUTE_UNUSED,
+ int dir ATTRIBUTE_UNUSED,
+ long *min ATTRIBUTE_UNUSED,
+ long *max ATTRIBUTE_UNUSED)
+{
+ return -ENXIO;
+}
+
+static int set_range_ops(snd_mixer_elem_t *elem, int dir,
+ long min, long max)
+{
+ struct selem_base *s = snd_mixer_elem_get_private(elem);
+ int err;
+
+ s->dir[dir].forced_range = 1;
+ s->dir[dir].min = min;
+ s->dir[dir].max = max;
+
+ if ((err = selem_read(elem)) < 0)
+ return err;
+ return 0;
+}
+
+static int get_volume_ops(snd_mixer_elem_t *elem, int dir,
+ snd_mixer_selem_channel_id_t channel, long *value)
+{
+ struct selem_base *s = snd_mixer_elem_get_private(elem);
+
+ *value = s->dir[dir].vol[channel];
+ return 0;
+}
+
+static int get_dB_ops(snd_mixer_elem_t *elem ATTRIBUTE_UNUSED,
+ int dir ATTRIBUTE_UNUSED,
+ snd_mixer_selem_channel_id_t channel ATTRIBUTE_UNUSED,
+ long *value ATTRIBUTE_UNUSED)
+{
+ return -ENXIO;
+}
+
+static int get_switch_ops(snd_mixer_elem_t *elem ATTRIBUTE_UNUSED,
+ int dir ATTRIBUTE_UNUSED,
+ snd_mixer_selem_channel_id_t channel ATTRIBUTE_UNUSED,
+ int *value)
+{
+ /* struct selem_base *s = snd_mixer_elem_get_private(elem); */
+ *value = 0;
+ return 0;
+}
+
+static int set_volume_ops(snd_mixer_elem_t *elem ATTRIBUTE_UNUSED,
+ int dir ATTRIBUTE_UNUSED,
+ snd_mixer_selem_channel_id_t channel ATTRIBUTE_UNUSED,
+ long value ATTRIBUTE_UNUSED)
+{
+ /* struct selem_base *s = snd_mixer_elem_get_private(elem); */
+ return 0;
+}
+
+static int set_dB_ops(snd_mixer_elem_t *elem ATTRIBUTE_UNUSED,
+ int dir ATTRIBUTE_UNUSED,
+ snd_mixer_selem_channel_id_t channel ATTRIBUTE_UNUSED,
+ long value ATTRIBUTE_UNUSED,
+ int xdir ATTRIBUTE_UNUSED)
+{
+ return -ENXIO;
+}
+
+static int set_switch_ops(snd_mixer_elem_t *elem ATTRIBUTE_UNUSED,
+ int dir ATTRIBUTE_UNUSED,
+ snd_mixer_selem_channel_id_t channel ATTRIBUTE_UNUSED,
+ int value ATTRIBUTE_UNUSED)
+{
+ /* struct selem_base *s = snd_mixer_elem_get_private(elem); */
+ /* int changed; */
+ return 0;
+}
+
+static int enum_item_name_ops(snd_mixer_elem_t *elem ATTRIBUTE_UNUSED,
+ unsigned int item ATTRIBUTE_UNUSED,
+ size_t maxlen ATTRIBUTE_UNUSED,
+ char *buf ATTRIBUTE_UNUSED)
+{
+ /* struct selem_base *s = snd_mixer_elem_get_private(elem);*/
+ return 0;
+}
+
+static int get_enum_item_ops(snd_mixer_elem_t *elem ATTRIBUTE_UNUSED,
+ snd_mixer_selem_channel_id_t channel ATTRIBUTE_UNUSED,
+ unsigned int *itemp ATTRIBUTE_UNUSED)
+{
+ /* struct selem_base *s = snd_mixer_elem_get_private(elem); */
+ return 0;
+}
+
+static int set_enum_item_ops(snd_mixer_elem_t *elem ATTRIBUTE_UNUSED,
+ snd_mixer_selem_channel_id_t channel ATTRIBUTE_UNUSED,
+ unsigned int item ATTRIBUTE_UNUSED)
+{
+ /* struct selem_base *s = snd_mixer_elem_get_private(elem); */
+ return 0;
+}
+
+static struct sm_elem_ops simple_ac97_ops = {
+ .is = is_ops,
+ .get_range = get_range_ops,
+ .get_dB_range = get_dB_range_ops,
+ .set_range = set_range_ops,
+ .get_volume = get_volume_ops,
+ .get_dB = get_dB_ops,
+ .set_volume = set_volume_ops,
+ .set_dB = set_dB_ops,
+ .get_switch = get_switch_ops,
+ .set_switch = set_switch_ops,
+ .enum_item_name = enum_item_name_ops,
+ .get_enum_item = get_enum_item_ops,
+ .set_enum_item = set_enum_item_ops
+};
+
+/*
+ * event handling
+ */
+
+static int selem_read(snd_mixer_elem_t *elem)
+{
+ printf("elem read: %p\n", elem);
+ return 0;
+}
+
+static int simple_event_remove(snd_hctl_elem_t *helem,
+ snd_mixer_elem_t *melem ATTRIBUTE_UNUSED)
+{
+ printf("event remove: %p\n", helem);
+ return 0;
+}
+
+static void selem_free(snd_mixer_elem_t *elem)
+{
+ struct selem_base *simple = snd_mixer_elem_get_private(elem);
+ struct helem_base *hsimple;
+ struct list_head *pos, *npos;
+
+ if (simple->selem.id)
+ snd_mixer_selem_id_free(simple->selem.id);
+ list_for_each_safe(pos, npos, &simple->helems) {
+ hsimple = list_entry(pos, struct helem_base, list);
+ free(hsimple);
+ }
+ free(simple);
+}
+
+static int simple_event_add1(snd_mixer_class_t *class,
+ snd_hctl_elem_t *helem,
+ struct helem_selector *sel)
+{
+ struct bclass_private *priv = snd_mixer_sbasic_get_private(class);
+ snd_mixer_elem_t *melem;
+ snd_mixer_selem_id_t *id;
+ snd_ctl_elem_info_t *info;
+ struct selem_base *simple;
+ struct helem_base *hsimple;
+ snd_ctl_elem_type_t ctype;
+ unsigned long values;
+ long min, max;
+ int err, new = 0;
+ struct list_head *pos;
+ struct bclass_sid *bsid;
+ struct melem_sids *sid;
+ unsigned int ui;
+
+ list_for_each(pos, &priv->sids) {
+ bsid = list_entry(pos, struct bclass_sid, list);
+ for (ui = 0; ui < bsid->count; ui++) {
+ if (bsid->sids[ui].sid == sel->sid) {
+ sid = &bsid->sids[ui];
+ goto __sid_ok;
+ }
+ }
+ }
+ return 0;
+
+ __sid_ok:
+ snd_ctl_elem_info_alloca(&info);
+ err = snd_hctl_elem_info(helem, info);
+ if (err < 0)
+ return err;
+ ctype = snd_ctl_elem_info_get_type(info);
+ values = snd_ctl_elem_info_get_count(info);
+ switch (ctype) {
+ case SND_CTL_ELEM_TYPE_ENUMERATED:
+ min = 0;
+ max = snd_ctl_elem_info_get_items(info);
+ break;
+ case SND_CTL_ELEM_TYPE_INTEGER:
+ min = snd_ctl_elem_info_get_min(info);
+ max = snd_ctl_elem_info_get_max(info);
+ break;
+ default:
+ min = max = 0;
+ break;
+ }
+
+ printf("event add: %p, %p (%s)\n", helem, sel, snd_hctl_elem_get_name(helem));
+ if (snd_mixer_selem_id_malloc(&id))
+ return -ENOMEM;
+ hsimple = calloc(1, sizeof(*hsimple));
+ if (hsimple == NULL) {
+ snd_mixer_selem_id_free(id);
+ return -ENOMEM;
+ }
+ switch (sel->purpose) {
+ case PURPOSE_SWITCH:
+ if (ctype != SND_CTL_ELEM_TYPE_BOOLEAN) {
+ __invalid_type:
+ snd_mixer_selem_id_free(id);
+ return -EINVAL;
+ }
+ break;
+ case PURPOSE_VOLUME:
+ if (ctype != SND_CTL_ELEM_TYPE_INTEGER)
+ goto __invalid_type;
+ break;
+ }
+ hsimple->purpose = sel->purpose;
+ hsimple->caps = sel->caps;
+ hsimple->min = min;
+ hsimple->max = max;
+ snd_mixer_selem_id_set_name(id, sid->sname);
+ snd_mixer_selem_id_set_index(id, sid->sindex);
+ melem = snd_mixer_find_selem(snd_mixer_class_get_mixer(class), id);
+ if (!melem) {
+ simple = calloc(1, sizeof(*simple));
+ if (!simple) {
+ snd_mixer_selem_id_free(id);
+ free(hsimple);
+ return -ENOMEM;
+ }
+ simple->selem.id = id;
+ simple->selem.ops = &simple_ac97_ops;
+ INIT_LIST_HEAD(&simple->helems);
+ simple->sid = sel->sid;
+ err = snd_mixer_elem_new(&melem, SND_MIXER_ELEM_SIMPLE,
+ sid->weight,
+ simple, selem_free);
+ if (err < 0) {
+ snd_mixer_selem_id_free(id);
+ free(hsimple);
+ free(simple);
+ return err;
+ }
+ new = 1;
+ } else {
+ simple = snd_mixer_elem_get_private(melem);
+ snd_mixer_selem_id_free(id);
+ }
+ list_add_tail(&hsimple->list, &simple->helems);
+ hsimple->inactive = snd_ctl_elem_info_is_inactive(info);
+ err = snd_mixer_elem_attach(melem, helem);
+ if (err < 0)
+ goto __error;
+ simple->dir[0].chanmap |= sid->chanmap[0];
+ simple->dir[1].chanmap |= sid->chanmap[1];
+ simple->selem.caps |= hsimple->caps;
+ update_ranges(simple);
+#if 0
+ err = simple_update(melem);
+ if (err < 0) {
+ if (new)
+ goto __error;
+ return err;
+ }
+#endif
+ if (new)
+ err = snd_mixer_elem_add(melem, class);
+ else
+ err = snd_mixer_elem_info(melem);
+ if (err < 0)
+ return err;
+ err = selem_read(melem);
+ if (err < 0)
+ return err;
+ if (err)
+ err = snd_mixer_elem_value(melem);
+ return err;
+ __error:
+ if (new)
+ snd_mixer_elem_free(melem);
+ return -EINVAL;
+}
+
+static int simple_event_add(snd_mixer_class_t *class, snd_hctl_elem_t *helem)
+{
+ struct bclass_private *priv = snd_mixer_sbasic_get_private(class);
+ struct bclass_selector *sel;
+ struct helem_selector *hsel;
+ struct list_head *pos;
+ snd_ctl_elem_iface_t iface = snd_hctl_elem_get_interface(helem);
+ const char *name = snd_hctl_elem_get_name(helem);
+ unsigned int index = snd_hctl_elem_get_index(helem);
+ unsigned int ui;
+ int err;
+
+ list_for_each(pos, &priv->selectors) {
+ sel = list_entry(pos, struct bclass_selector, list);
+ for (ui = 0; ui < sel->count; ui++) {
+ hsel = &sel->selectors[ui];
+ if (hsel->iface == iface && !strcmp(hsel->name, name) && hsel->index == index) {
+ err = simple_event_add1(class, helem, hsel);
+ if (err < 0)
+ return err; /* early exit? */
+ }
+ }
+ }
+ return 0;
+}
+
+int alsa_mixer_sbasic_event(snd_mixer_class_t *class, unsigned int mask,
+ snd_hctl_elem_t *helem, snd_mixer_elem_t *melem)
+{
+ int err;
+ if (mask == SND_CTL_EVENT_MASK_REMOVE)
+ return simple_event_remove(helem, melem);
+ if (mask & SND_CTL_EVENT_MASK_ADD) {
+ err = simple_event_add(class, helem);
+ if (err < 0)
+ return err;
+ }
+ if (mask & SND_CTL_EVENT_MASK_INFO) {
+ err = simple_event_remove(helem, melem);
+ if (err < 0)
+ return err;
+ err = simple_event_add(class, helem);
+ if (err < 0)
+ return err;
+ return 0;
+ }
+ if (mask & SND_CTL_EVENT_MASK_VALUE) {
+ err = selem_read(melem);
+ if (err < 0)
+ return err;
+ if (err) {
+ err = snd_mixer_elem_value(melem);
+ if (err < 0)
+ return err;
+ }
+ }
+ return 0;
+}
+
+static void sbasic_cpriv_free(snd_mixer_class_t *class)
+{
+ struct bclass_private *priv = snd_mixer_sbasic_get_private(class);
+ struct bclass_selector *sel;
+ struct bclass_sid *sid;
+ struct list_head *pos, *pos1;
+
+ list_for_each_safe(pos, pos1, &priv->selectors) {
+ sel = list_entry(pos, struct bclass_selector, list);
+ free(sel);
+ }
+ list_for_each_safe(pos, pos1, &priv->sids) {
+ sid = list_entry(pos, struct bclass_sid, list);
+ free(sid);
+ }
+ free(priv);
+}
+
+void alsa_mixer_sbasic_initpriv(snd_mixer_class_t *class,
+ struct bclass_private *priv)
+{
+ INIT_LIST_HEAD(&priv->selectors);
+ INIT_LIST_HEAD(&priv->sids);
+ snd_mixer_sbasic_set_private(class, priv);
+ snd_mixer_sbasic_set_private_free(class, sbasic_cpriv_free);
+}
+
+int alsa_mixer_sbasic_selreg(snd_mixer_class_t *class,
+ struct helem_selector *selectors,
+ unsigned int count)
+{
+ struct bclass_private *priv = snd_mixer_sbasic_get_private(class);
+ struct bclass_selector *sel = calloc(1, sizeof(*sel));
+
+ if (sel == NULL)
+ return -ENOMEM;
+ if (priv == NULL) {
+ priv = calloc(1, sizeof(*priv));
+ if (priv == NULL) {
+ free(sel);
+ return -ENOMEM;
+ }
+ }
+ sel->selectors = selectors;
+ sel->count = count;
+ list_add_tail(&sel->list, &priv->selectors);
+ return 0;
+}
+
+int alsa_mixer_sbasic_sidreg(snd_mixer_class_t *class,
+ struct melem_sids *sids,
+ unsigned int count)
+{
+ struct bclass_private *priv = snd_mixer_sbasic_get_private(class);
+ struct bclass_sid *sid = calloc(1, sizeof(*sid));
+
+ if (sid == NULL)
+ return -ENOMEM;
+ if (priv == NULL) {
+ priv = calloc(1, sizeof(*priv));
+ if (priv == NULL) {
+ free(sid);
+ return -ENOMEM;
+ }
+ INIT_LIST_HEAD(&priv->selectors);
+ INIT_LIST_HEAD(&priv->sids);
+ snd_mixer_sbasic_set_private(class, priv);
+ snd_mixer_sbasic_set_private_free(class, sbasic_cpriv_free);
+ }
+ sid->sids = sids;
+ sid->count = count;
+ list_add(&sid->list, &priv->sids);
+ return 0;
+}
diff --git a/alsa-lib/modules/mixer/simple/sbase.h b/alsa-lib/modules/mixer/simple/sbase.h
new file mode 100644
index 0000000..ee5fe03
--- /dev/null
+++ b/alsa-lib/modules/mixer/simple/sbase.h
@@ -0,0 +1,111 @@
+/*
+ * Mixer Interface - simple abstact module - base library
+ * Copyright (c) 2005 by Jaroslav Kysela <perex@perex.cz>
+ *
+ *
+ * This library is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ *
+ */
+
+#ifndef __SMIXER_BASE_H
+
+#include "list.h"
+
+#define MAX_CHANNEL 6
+
+#define SID_MASTER 0
+#define SID_HEADPHONE 1
+#define SID_FRONT 2
+#define SID_PCM 3
+#define SID_CD 4
+
+struct melem_sids {
+ unsigned short sid;
+ const char *sname;
+ unsigned short sindex;
+ unsigned short weight;
+ unsigned int chanmap[2];
+ struct sm_elem_ops *sops;
+};
+
+#define PURPOSE_VOLUME 0
+#define PURPOSE_SWITCH 1
+#define PURPOSE_ENUMLIST 2
+
+struct helem_selector {
+ snd_ctl_elem_iface_t iface;
+ const char *name;
+ unsigned short index;
+ unsigned short sid;
+ unsigned short purpose;
+ unsigned short caps;
+};
+
+struct helem_base {
+ struct list_head list;
+ snd_hctl_elem_t *helem;
+ unsigned short purpose;
+ unsigned int caps;
+ unsigned int inactive: 1;
+ long min, max;
+ unsigned int count;
+};
+
+struct selem_base {
+ sm_selem_t selem;
+ struct list_head helems;
+ unsigned short sid;
+ struct {
+ unsigned int chanmap;
+ unsigned int forced_range: 1;
+ long min, max;
+ long vol[MAX_CHANNEL];
+ } dir[2];
+};
+
+struct bclass_selector {
+ struct list_head list;
+ struct helem_selector *selectors;
+ unsigned int count;
+};
+
+struct bclass_sid {
+ struct list_head list;
+ struct melem_sids *sids;
+ unsigned int count;
+};
+
+typedef struct bclass_base_ops {
+ int (*event)(snd_mixer_class_t *class, unsigned int mask,
+ snd_hctl_elem_t *helem, snd_mixer_elem_t *melem);
+ int (*selreg)(snd_mixer_class_t *class,
+ struct helem_selector *selectors,
+ unsigned int count);
+ int (*sidreg)(snd_mixer_class_t *class,
+ struct melem_sids *sids,
+ unsigned int count);
+} bclass_base_ops_t;
+
+struct bclass_private {
+ struct list_head selectors;
+ struct list_head sids;
+ void *dl_sbase;
+ bclass_base_ops_t ops;
+};
+
+int mixer_simple_basic_dlopen(snd_mixer_class_t *class,
+ bclass_base_ops_t **ops);
+
+#endif /* __SMIXER_BASE_H */
diff --git a/alsa-lib/modules/mixer/simple/sbasedl.c b/alsa-lib/modules/mixer/simple/sbasedl.c
new file mode 100644
index 0000000..0137586
--- /dev/null
+++ b/alsa-lib/modules/mixer/simple/sbasedl.c
@@ -0,0 +1,106 @@
+/*
+ * Mixer Interface - simple abstact module - base library (dlopen function)
+ * Copyright (c) 2005 by Jaroslav Kysela <perex@perex.cz>
+ *
+ *
+ * This library is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ *
+ */
+
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <unistd.h>
+#include <string.h>
+#include <fcntl.h>
+#include <sys/ioctl.h>
+#include <math.h>
+#include <dlfcn.h>
+#include "config.h"
+#include "asoundlib.h"
+#include "mixer_abst.h"
+#include "sbase.h"
+
+#define SO_PATH ALSA_PLUGIN_DIR "/smixer"
+
+int mixer_simple_basic_dlopen(snd_mixer_class_t *class,
+ bclass_base_ops_t **ops)
+{
+ struct bclass_private *priv = snd_mixer_sbasic_get_private(class);
+ const char *lib = "smixer-sbase.so";
+ void (*initpriv)(snd_mixer_class_t *class, struct bclass_private *priv);
+ char *xlib, *path;
+ void *h;
+ int initflag = 0;
+
+ if (priv == NULL) {
+ priv = calloc(1, sizeof(*priv));
+ if (priv == NULL)
+ return -ENOMEM;
+ initflag = 1;
+ }
+ path = getenv("ALSA_MIXER_SIMPLE_MODULES");
+ if (!path)
+ path = SO_PATH;
+ xlib = malloc(strlen(lib) + strlen(path) + 1 + 1);
+ if (xlib == NULL) {
+ if (initflag)
+ free(priv);
+ return -ENOMEM;
+ }
+ strcpy(xlib, path);
+ strcat(xlib, "/");
+ strcat(xlib, lib);
+ h = snd_dlopen(xlib, RTLD_NOW);
+ if (h == NULL) {
+ SNDERR("Unable to open library '%s'", xlib);
+ goto __error;
+ }
+ initpriv = dlsym(h, "alsa_mixer_sbasic_initpriv");
+ if (initpriv == NULL) {
+ SNDERR("Symbol 'alsa_mixer_sbasic_initpriv' was not found in '%s'", xlib);
+ goto __error;
+ }
+ priv->ops.event = dlsym(h, "alsa_mixer_sbasic_event");
+ if (priv->ops.event == NULL) {
+ SNDERR("Symbol 'alsa_mixer_sbasic_event' was not found in '%s'", xlib);
+ goto __error;
+ }
+ priv->ops.selreg = dlsym(h, "alsa_mixer_sbasic_selreg");
+ if (priv->ops.selreg == NULL) {
+ SNDERR("Symbol 'alsa_mixer_sbasic_selreg' was not found in '%s'", xlib);
+ goto __error;
+ }
+ priv->ops.sidreg = dlsym(h, "alsa_mixer_sbasic_sidreg");
+ if (priv->ops.sidreg == NULL) {
+ SNDERR("Symbol 'alsa_mixer_sbasic_sidreg' was not found in '%s'", xlib);
+ goto __error;
+ }
+ free(xlib);
+ if (initflag)
+ initpriv(class, priv);
+ priv->dl_sbase = h;
+ if (ops)
+ *ops = &priv->ops;
+ return 1;
+
+ __error:
+ if (initflag)
+ free(priv);
+ if (h == NULL)
+ snd_dlclose(h);
+ free(xlib);
+ return -ENXIO;
+}