mirror of
https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
synced 2025-10-29 05:40:23 -04:00
merged
This commit is contained in:
parent
3a09a88fd1
commit
18e975fc5e
324 changed files with 78026 additions and 14523 deletions
3
.gitignore
vendored
3
.gitignore
vendored
|
|
@ -1,5 +1,4 @@
|
|||
shave
|
||||
shave-libtool
|
||||
.version
|
||||
.*.swp
|
||||
ABOUT-NLS
|
||||
intltool-extract.in
|
||||
|
|
|
|||
16
Makefile.am
16
Makefile.am
|
|
@ -17,7 +17,7 @@
|
|||
|
||||
ACLOCAL_AMFLAGS = -I m4
|
||||
|
||||
EXTRA_DIST = bootstrap.sh LICENSE GPL LGPL doxygen/Makefile.am doxygen/Makefile.in doxygen/doxygen.conf.in README todo
|
||||
EXTRA_DIST = bootstrap.sh git-version-gen LICENSE GPL LGPL doxygen/Makefile.am doxygen/Makefile.in doxygen/doxygen.conf.in README todo
|
||||
SUBDIRS = src doxygen man po
|
||||
|
||||
MAINTAINERCLEANFILES =
|
||||
|
|
@ -52,7 +52,7 @@ untabify:
|
|||
find \( -name '*.c' -o -name '*.h' \) -exec perl -i -pe 's/\t/ /g;' \{\} \;
|
||||
|
||||
fedora-snapshot: dist
|
||||
cp $(distdir).tar.gz $$HOME/cvs.fedora/pulseaudio/devel/$(distdir).git`date +%Y%m%d`.tar.gz
|
||||
cp $(distdir).tar.gz $$HOME/cvs.fedora/pulseaudio/devel/$(distdir).tar.gz
|
||||
|
||||
dist-hook:
|
||||
if test -d .git ; then \
|
||||
|
|
@ -60,14 +60,14 @@ dist-hook:
|
|||
chmod u+w ${distdir}/ChangeLog || true ; \
|
||||
( git-changelog.perl || echo "git-changelog.perl failed." ) > ${distdir}/ChangeLog 2>&1 ; \
|
||||
fi
|
||||
|
||||
update-shave:
|
||||
for i in shave.in shave.m4 shave-libtool.in; do \
|
||||
wget -O $$i http://git.lespiau.name/cgit/shave/blob/\?path=shave/$$i ; \
|
||||
done
|
||||
mv shave.m4 m4/
|
||||
echo $(VERSION) > $(distdir)/.tarball-version
|
||||
|
||||
.PHONY: homepage distcleancheck doxygen
|
||||
|
||||
# see git-version-gen
|
||||
BUILT_SOURCES = $(top_srcdir)/.version
|
||||
$(top_srcdir)/.version:
|
||||
echo $(VERSION) > $@-t && mv $@-t $@
|
||||
|
||||
DISTCLEANFILES = \
|
||||
po/.intltool-merge-cache
|
||||
|
|
|
|||
20
PROTOCOL
20
PROTOCOL
|
|
@ -168,3 +168,23 @@ PA_COMMAND_GET_MODULE_INFO_LIST
|
|||
|
||||
remove bool auto_unload
|
||||
add proplist at the end
|
||||
|
||||
new messages:
|
||||
|
||||
PA_COMMAND_GET_CARD_INFO
|
||||
PA_COMMAND_GET_CARD_INFO_LIST
|
||||
PA_COMMAND_SET_CARD_PROFILE
|
||||
|
||||
PA_COMMAND_CLIENT_EVENT
|
||||
PA_COMMAND_PLAYBACK_STREAM_EVENT
|
||||
PA_COMMAND_RECORD_STREAM_EVENT
|
||||
|
||||
PA_COMMAND_PLAYBACK_BUFFER_ATTR_CHANGED
|
||||
PA_COMMAND_RECORD_BUFFER_ATTR_CHANGED
|
||||
|
||||
### v16, implemented by >= 0.9.15
|
||||
|
||||
new messages:
|
||||
|
||||
PA_COMMAND_SET_SINK_PORT
|
||||
PA_COMMAND_SET_SOURCE_PORT
|
||||
|
|
|
|||
15
bootstrap.sh
15
bootstrap.sh
|
|
@ -16,7 +16,7 @@
|
|||
# along with PulseAudio; if not, write to the Free Software Foundation,
|
||||
# Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
|
||||
|
||||
VERSION=1.10
|
||||
VERSION=1.11
|
||||
|
||||
run_versioned() {
|
||||
local P
|
||||
|
|
@ -40,6 +40,17 @@ run_versioned() {
|
|||
|
||||
set -ex
|
||||
|
||||
if [ -f .git/hooks/pre-commit.sample -a ! -f .git/hooks/pre-commit ] ; then
|
||||
echo "Activating pre-commit hook."
|
||||
cp -av .git/hooks/pre-commit.sample .git/hooks/pre-commit
|
||||
chmod -c +x .git/hooks/pre-commit
|
||||
fi
|
||||
|
||||
if [ -f .tarball-version ]; then
|
||||
echo "Marking tarball version as modified."
|
||||
echo -n `cat .tarball-version | sed 's/-rebootstrapped$//'`-rebootstrapped >.tarball-version
|
||||
fi
|
||||
|
||||
# We check for this here, because if pkg-config is not found in the
|
||||
# system, it's likely that the pkg.m4 macro file is also not present,
|
||||
# which will make PKG_PROG_PKG_CONFIG be undefined and the generated
|
||||
|
|
@ -77,7 +88,7 @@ else
|
|||
run_versioned automake "$VERSION" --copy --foreign --add-missing
|
||||
|
||||
if test "x$NOCONFIGURE" = "x"; then
|
||||
CFLAGS="-g -O0" ./configure --sysconfdir=/etc --localstatedir=/var --enable-force-preopen --enable-shave "$@"
|
||||
CFLAGS="-g -O0" ./configure --sysconfdir=/etc --localstatedir=/var --enable-force-preopen "$@"
|
||||
make clean
|
||||
fi
|
||||
fi
|
||||
|
|
|
|||
204
configure.ac
204
configure.ac
|
|
@ -22,15 +22,16 @@
|
|||
|
||||
AC_PREREQ(2.63)
|
||||
|
||||
m4_define(pa_major, [0])
|
||||
m4_define(pa_minor, [9])
|
||||
m4_define(pa_micro, [15])
|
||||
|
||||
AC_INIT([pulseaudio],[pa_major.pa_minor.pa_micro-test5],[mzchyfrnhqvb (at) 0pointer (dot) net])
|
||||
AC_INIT([pulseaudio], m4_esyscmd([./git-version-gen .tarball-version]),
|
||||
[mzchyfrnhqvb (at) 0pointer (dot) net])
|
||||
AC_CONFIG_SRCDIR([src/daemon/main.c])
|
||||
AC_CONFIG_MACRO_DIR([m4])
|
||||
AC_CONFIG_HEADERS([config.h])
|
||||
AM_INIT_AUTOMAKE([foreign 1.10 -Wall -Wno-portability])
|
||||
AM_INIT_AUTOMAKE([foreign 1.11 -Wall -Wno-portability silent-rules tar-pax])
|
||||
|
||||
m4_define(pa_major, `echo $VERSION | cut -d. -f1 | cut -d- -f1`)
|
||||
m4_define(pa_minor, `echo $VERSION | cut -d. -f2 | cut -d- -f1`)
|
||||
m4_define(pa_micro, `echo $VERSION | cut -d. -f3 | cut -d- -f1`)
|
||||
|
||||
AC_SUBST(PA_MAJOR, pa_major)
|
||||
AC_SUBST(PA_MINOR, pa_minor)
|
||||
|
|
@ -40,7 +41,7 @@ AC_SUBST(PA_MAJORMINORMICRO, pa_major.pa_minor.pa_micro)
|
|||
AC_SUBST(PACKAGE_URL, [http://pulseaudio.org/])
|
||||
|
||||
AC_SUBST(PA_API_VERSION, 12)
|
||||
AC_SUBST(PA_PROTOCOL_VERSION, 15)
|
||||
AC_SUBST(PA_PROTOCOL_VERSION, 16)
|
||||
|
||||
# The stable ABI for client applications, for the version info x:y:z
|
||||
# always will hold y=z
|
||||
|
|
@ -75,6 +76,8 @@ case $host in
|
|||
;;
|
||||
esac
|
||||
|
||||
AM_SILENT_RULES([yes])
|
||||
|
||||
#### Checks for programs. ####
|
||||
|
||||
# mkdir -p
|
||||
|
|
@ -97,11 +100,7 @@ if test "x$M4" = xno ; then
|
|||
fi
|
||||
|
||||
dnl Compiler flags
|
||||
DESIRED_FLAGS="-Wall -W -Wextra -pipe -Wno-long-long -Winline -Wvla -Wno-overlength-strings -Wunsafe-loop-optimizations -Wundef -Wformat=2 -Wlogical-op -Wsign-compare -Wformat-security -Wmissing-include-dirs -Wformat-nonliteral -Wold-style-definition -Wpointer-arith -Winit-self -Wdeclaration-after-statement -Wfloat-equal -Wmissing-prototypes -Wstrict-prototypes -Wredundant-decls -Wmissing-declarations -Wmissing-noreturn -Wshadow -Wendif-labels -Wcast-align -Wstrict-aliasing=2 -Wwrite-strings -Wno-unused-parameter -ffast-math -Wp,-D_FORTIFY_SOURCE=2 -fno-common -fdiagnostics-show-option"
|
||||
|
||||
for flag in $DESIRED_FLAGS ; do
|
||||
CC_CHECK_CFLAGS([$flag], [CFLAGS="$CFLAGS $flag"])
|
||||
done
|
||||
CC_CHECK_CFLAGS_APPEND([-Wall -W -Wextra -pipe -Wno-long-long -Winline -Wvla -Wno-overlength-strings -Wunsafe-loop-optimizations -Wundef -Wformat=2 -Wlogical-op -Wsign-compare -Wformat-security -Wmissing-include-dirs -Wformat-nonliteral -Wold-style-definition -Wpointer-arith -Winit-self -Wdeclaration-after-statement -Wfloat-equal -Wmissing-prototypes -Wstrict-prototypes -Wredundant-decls -Wmissing-declarations -Wmissing-noreturn -Wshadow -Wendif-labels -Wcast-align -Wstrict-aliasing=2 -Wwrite-strings -Wno-unused-parameter -ffast-math -Wp,-D_FORTIFY_SOURCE=2 -fno-common -fdiagnostics-show-option])
|
||||
|
||||
dnl Linker flags.
|
||||
dnl Check whether the linker supports the -version-script option.
|
||||
|
|
@ -114,6 +113,11 @@ CC_CHECK_LDFLAGS([${tmp_ldflag}],
|
|||
[VERSIONING_LDFLAGS='-Wl,-version-script=$(srcdir)/map-file'])
|
||||
AC_SUBST([VERSIONING_LDFLAGS])
|
||||
|
||||
dnl Check for the proper way to build libraries that have no undefined
|
||||
dnl symbols; on some hosts this needs to be avoided but the macro
|
||||
dnl takes care of it.
|
||||
CC_NOUNDEFINED
|
||||
|
||||
dnl Check whether to build tests by default (as compile-test) or not
|
||||
AC_ARG_ENABLE([default-build-tests],
|
||||
AS_HELP_STRING([--disable-default-build-tests], [Build test programs only during make check]))
|
||||
|
|
@ -274,7 +278,7 @@ AC_CHECK_HEADER([ltdl.h],
|
|||
[LIBLTDL=])
|
||||
|
||||
AS_IF([test "x$LIBLTDL" = "x"],
|
||||
[AC_MSG_ERROR([Unable to find libltdl.])])
|
||||
[AC_MSG_ERROR([Unable to find libltdl version 2. Makes sure you have libtool 2.2 or later installed.])])
|
||||
AC_SUBST([LIBLTDL])
|
||||
|
||||
#### Determine build environment ####
|
||||
|
|
@ -300,7 +304,7 @@ AM_CONDITIONAL(OS_IS_WIN32, test "x$os_is_win32" = "x1")
|
|||
AC_HEADER_STDC
|
||||
|
||||
# POSIX
|
||||
AC_CHECK_HEADERS([arpa/inet.h glob.h grp.h netdb.h netinet/in.h \
|
||||
AC_CHECK_HEADERS_ONCE([arpa/inet.h glob.h grp.h netdb.h netinet/in.h \
|
||||
netinet/in_systm.h netinet/tcp.h poll.h pwd.h sched.h \
|
||||
sys/mman.h sys/resource.h sys/select.h sys/socket.h sys/wait.h \
|
||||
sys/uio.h syslog.h sys/dl.h dlfcn.h linux/sockios.h])
|
||||
|
|
@ -324,23 +328,23 @@ AC_CHECK_HEADERS([linux/input.h], [HAVE_EVDEV=1], [HAVE_EVDEV=0])
|
|||
|
||||
AM_CONDITIONAL([HAVE_EVDEV], [test "x$HAVE_EVDEV" = "x1"])
|
||||
|
||||
AC_CHECK_HEADERS([sys/prctl.h])
|
||||
AC_CHECK_HEADERS_ONCE([sys/prctl.h])
|
||||
|
||||
# Solaris
|
||||
AC_CHECK_HEADERS([sys/filio.h])
|
||||
AC_CHECK_HEADERS_ONCE([sys/filio.h])
|
||||
|
||||
# Windows
|
||||
AC_CHECK_HEADERS([windows.h winsock2.h ws2tcpip.h])
|
||||
AC_CHECK_HEADERS_ONCE([windows.h winsock2.h ws2tcpip.h])
|
||||
|
||||
# NetBSD
|
||||
AC_CHECK_HEADERS([sys/atomic.h])
|
||||
AC_CHECK_HEADERS_ONCE([sys/atomic.h])
|
||||
|
||||
# Other
|
||||
AC_CHECK_HEADERS([sys/ioctl.h])
|
||||
AC_CHECK_HEADERS([byteswap.h])
|
||||
AC_CHECK_HEADERS([sys/syscall.h])
|
||||
AC_CHECK_HEADERS([sys/eventfd.h])
|
||||
AC_CHECK_HEADERS([execinfo.h])
|
||||
AC_CHECK_HEADERS_ONCE([sys/ioctl.h])
|
||||
AC_CHECK_HEADERS_ONCE([byteswap.h])
|
||||
AC_CHECK_HEADERS_ONCE([sys/syscall.h])
|
||||
AC_CHECK_HEADERS_ONCE([sys/eventfd.h])
|
||||
AC_CHECK_HEADERS_ONCE([execinfo.h])
|
||||
|
||||
#### Typdefs, structures, etc. ####
|
||||
|
||||
|
|
@ -391,19 +395,16 @@ AC_SEARCH_LIBS([connect], [socket])
|
|||
# build, disabling its ability to make dlls.
|
||||
AC_CHECK_FUNCS([getopt_long], [], [AC_CHECK_LIB([iberty], [getopt_long])])
|
||||
|
||||
AC_CHECK_LIB(gdbm, gdbm_open)
|
||||
AC_CHECK_HEADERS(gdbm.h, [], [AC_MSG_ERROR([gdbm.h not found])])
|
||||
|
||||
#### Check for functions ####
|
||||
|
||||
# ISO
|
||||
AC_CHECK_FUNCS([lrintf strtof])
|
||||
AC_CHECK_FUNCS_ONCE([lrintf strtof])
|
||||
|
||||
# POSIX
|
||||
AC_FUNC_FORK
|
||||
AC_FUNC_GETGROUPS
|
||||
AC_FUNC_SELECT_ARGTYPES
|
||||
AC_CHECK_FUNCS([chmod chown clock_gettime getaddrinfo getgrgid_r getgrnam_r \
|
||||
AC_CHECK_FUNCS_ONCE([chmod chown clock_gettime getaddrinfo getgrgid_r getgrnam_r \
|
||||
getpwnam_r getpwuid_r gettimeofday getuid inet_ntop inet_pton mlock nanosleep \
|
||||
pipe posix_fadvise posix_madvise posix_memalign setpgid setsid shm_open \
|
||||
sigaction sleep sysconf pthread_setaffinity_np])
|
||||
|
|
@ -412,20 +413,20 @@ AC_CHECK_FUNCS([mkfifo], [HAVE_MKFIFO=1], [HAVE_MKFIFO=0])
|
|||
AM_CONDITIONAL(HAVE_MKFIFO, test "x$HAVE_MKFIFO" = "x1")
|
||||
|
||||
# X/OPEN
|
||||
AC_CHECK_FUNCS([readlink])
|
||||
AC_CHECK_FUNCS_ONCE([readlink])
|
||||
|
||||
# SUSv2
|
||||
AC_CHECK_FUNCS([ctime_r usleep])
|
||||
AC_CHECK_FUNCS_ONCE([ctime_r usleep])
|
||||
|
||||
# SUSv3
|
||||
AC_CHECK_FUNCS([strerror_r])
|
||||
AC_CHECK_FUNCS_ONCE([strerror_r])
|
||||
|
||||
# BSD
|
||||
AC_CHECK_FUNCS([lstat])
|
||||
AC_CHECK_FUNCS_ONCE([lstat])
|
||||
|
||||
# Non-standard
|
||||
|
||||
AC_CHECK_FUNCS([setresuid setresgid setreuid setregid seteuid setegid ppoll strsignal sig2str strtof_l])
|
||||
AC_CHECK_FUNCS_ONCE([setresuid setresgid setreuid setregid seteuid setegid ppoll strsignal sig2str strtof_l])
|
||||
|
||||
AC_FUNC_ALLOCA
|
||||
|
||||
|
|
@ -458,7 +459,7 @@ AC_DEFINE_UNQUOTED(PA_CFLAGS,"$CFLAGS", [The CFLAGS used during compilation])
|
|||
AC_SYS_LARGEFILE
|
||||
|
||||
# Check for open64 to know if the current system does have open64() and similar functions
|
||||
AC_CHECK_FUNCS([open64])
|
||||
AC_CHECK_FUNCS_ONCE([open64])
|
||||
|
||||
#### [lib]iconv ####
|
||||
|
||||
|
|
@ -537,11 +538,11 @@ fi
|
|||
|
||||
#### Valgrind (optional) ####
|
||||
|
||||
AC_CHECK_HEADERS([valgrind/memcheck.h])
|
||||
AC_CHECK_HEADERS_ONCE([valgrind/memcheck.h])
|
||||
|
||||
#### Sound file ####
|
||||
|
||||
PKG_CHECK_MODULES(LIBSNDFILE, [ sndfile >= 1.0.10 ])
|
||||
PKG_CHECK_MODULES(LIBSNDFILE, [ sndfile >= 1.0.20 ])
|
||||
AC_SUBST(LIBSNDFILE_CFLAGS)
|
||||
AC_SUBST(LIBSNDFILE_LIBS)
|
||||
|
||||
|
|
@ -601,6 +602,65 @@ AC_SUBST(LIBSAMPLERATE_LIBS)
|
|||
AC_SUBST(HAVE_LIBSAMPLERATE)
|
||||
AM_CONDITIONAL([HAVE_LIBSAMPLERATE], [test "x$HAVE_LIBSAMPLERATE" = x1])
|
||||
|
||||
#### Database support ####
|
||||
|
||||
HAVE_TDB=0
|
||||
HAVE_GDBM=0
|
||||
|
||||
AC_ARG_WITH(
|
||||
[database],
|
||||
AS_HELP_STRING([--with-database=auto|tdb|gdbm],[Choose database backend.]),[],[with_database=auto])
|
||||
|
||||
if test "x${with_database}" = "xauto" -o "x${with_database}" = "xtdb" ; then
|
||||
PKG_CHECK_MODULES(TDB, [ tdb ],
|
||||
[
|
||||
HAVE_TDB=1
|
||||
with_database=tdb
|
||||
], [
|
||||
if test "x${with_database}" = "xtdb" ; then
|
||||
AC_MSG_ERROR([*** tdb not found])
|
||||
fi
|
||||
])
|
||||
fi
|
||||
|
||||
if test "x${with_database}" = "xauto" -o "x${with_database}" = "xgdbm" ; then
|
||||
have_gdbm=yes
|
||||
|
||||
AC_CHECK_LIB(gdbm, gdbm_open, [], [have_gdbm=no])
|
||||
AC_CHECK_HEADERS(gdbm.h, [], [have_gdbm=no])
|
||||
|
||||
if test "x${have_gdbm}" = "xyes" ; then
|
||||
HAVE_GDBM=1
|
||||
GDBM_CFLAGS=
|
||||
GDBM_LIBS=-lgdbm
|
||||
with_database=gdbm
|
||||
elif test "x${with_database}" = "xgdbm"; then
|
||||
AC_MSG_ERROR([*** gdbm not found])
|
||||
fi
|
||||
fi
|
||||
|
||||
if test "x${HAVE_TDB}" != x1 -a "x${HAVE_GDBM}" != x1; then
|
||||
AC_MSG_ERROR([*** missing database backend])
|
||||
fi
|
||||
|
||||
if test "x${HAVE_TDB}" = x1 ; then
|
||||
AC_DEFINE([HAVE_TDB], 1, [Have tdb?])
|
||||
fi
|
||||
|
||||
if test "x${HAVE_GDBM}" = x1 ; then
|
||||
AC_DEFINE([HAVE_GDBM], 1, [Have gdbm?])
|
||||
fi
|
||||
|
||||
AC_SUBST(TDB_CFLAGS)
|
||||
AC_SUBST(TDB_LIBS)
|
||||
AC_SUBST(HAVE_TDB)
|
||||
AM_CONDITIONAL([HAVE_TDB], [test "x$HAVE_TDB" = x1])
|
||||
|
||||
AC_SUBST(GDBM_CFLAGS)
|
||||
AC_SUBST(GDBM_LIBS)
|
||||
AC_SUBST(HAVE_GDBM)
|
||||
AM_CONDITIONAL([HAVE_GDBM], [test "x$HAVE_GDBM" = x1])
|
||||
|
||||
#### OSS support (optional) ####
|
||||
|
||||
AC_ARG_ENABLE([oss],
|
||||
|
|
@ -1000,7 +1060,7 @@ AC_ARG_ENABLE([udev],
|
|||
],
|
||||
[udev=auto])
|
||||
if test "x${udev}" != xno -a \( "x$HAVE_OSS" = "x1" -o "x$HAVE_ALSA" = "x1" \) ; then
|
||||
PKG_CHECK_MODULES(UDEV, [ libudev >= 137 ],
|
||||
PKG_CHECK_MODULES(UDEV, [ libudev >= 143 ],
|
||||
[
|
||||
HAVE_UDEV=1
|
||||
AC_DEFINE([HAVE_UDEV], 1, [Have UDEV.])
|
||||
|
|
@ -1095,44 +1155,6 @@ AC_SUBST(DBUS_LIBS)
|
|||
AC_SUBST(HAVE_DBUS)
|
||||
AM_CONDITIONAL([HAVE_DBUS], [test "x$HAVE_DBUS" = x1])
|
||||
|
||||
#### PolicyKit support (optional) ####
|
||||
|
||||
AC_ARG_ENABLE([polkit],
|
||||
AS_HELP_STRING([--disable-polkit],[Disable optional PolicyKit support]),
|
||||
[
|
||||
case "${enableval}" in
|
||||
yes) polkit=yes ;;
|
||||
no) polkit=no ;;
|
||||
*) AC_MSG_ERROR(bad value ${enableval} for --disable-polkit) ;;
|
||||
esac
|
||||
],
|
||||
[polkit=auto])
|
||||
|
||||
if test "x${polkit}" != xno ; then
|
||||
|
||||
PKG_CHECK_MODULES(POLKIT, [ polkit-dbus >= 0.7 ],
|
||||
[
|
||||
HAVE_POLKIT=1
|
||||
AC_DEFINE([HAVE_POLKIT], 1, [Have PolicyKit])
|
||||
policydir=`pkg-config polkit-dbus --variable prefix`/share/PolicyKit/policy/
|
||||
AC_SUBST(policydir)
|
||||
],
|
||||
[
|
||||
HAVE_POLKIT=0
|
||||
if test "x$polkit" = xyes ; then
|
||||
AC_MSG_ERROR([*** PolicyKit support not found])
|
||||
fi
|
||||
])
|
||||
else
|
||||
HAVE_POLKIT=0
|
||||
fi
|
||||
|
||||
AC_SUBST(POLKIT_CFLAGS)
|
||||
AC_SUBST(POLKIT_LIBS)
|
||||
AC_SUBST(HAVE_POLKIT)
|
||||
AM_CONDITIONAL([HAVE_POLKIT], [test "x$HAVE_POLKIT" = x1])
|
||||
|
||||
|
||||
### IPv6 connection support (optional) ###
|
||||
|
||||
AC_ARG_ENABLE([ipv6],
|
||||
|
|
@ -1219,15 +1241,6 @@ fi
|
|||
AC_SUBST(PA_SYSTEM_GROUP)
|
||||
AC_DEFINE_UNQUOTED(PA_SYSTEM_GROUP,"$PA_SYSTEM_GROUP", [Group for the PulseAudio system daemon])
|
||||
|
||||
AC_ARG_WITH(realtime_group,AS_HELP_STRING([--with-realtime-group=<group>],[Group for users that are allowed to start the PulseAudio daemon with realtime scheduling (realtime)]))
|
||||
if test -z "$with_realtime_group" ; then
|
||||
PA_REALTIME_GROUP=pulse-rt
|
||||
else
|
||||
PA_REALTIME_GROUP=$with_realtime_group
|
||||
fi
|
||||
AC_SUBST(PA_REALTIME_GROUP)
|
||||
AC_DEFINE_UNQUOTED(PA_REALTIME_GROUP,"$PA_REALTIME_GROUP", [Realtime group])
|
||||
|
||||
AC_ARG_WITH(access_group,AS_HELP_STRING([--with-access-group=<group>],[Group which is allowed access to a system-wide PulseAudio daemon (pulse-access)]))
|
||||
if test -z "$with_access_group" ; then
|
||||
PA_ACCESS_GROUP=pulse-access
|
||||
|
|
@ -1293,8 +1306,8 @@ fi
|
|||
|
||||
AC_ARG_WITH(
|
||||
[module-dir],
|
||||
AS_HELP_STRING([--with-module-dir],[Directory where to install the modules to (defaults to ${libdir}/pulse-${PA_MAJORMINORMICRO}/modules/]),
|
||||
[modlibexecdir=$withval], [modlibexecdir="${libdir}/pulse-${PA_MAJORMINORMICRO}/modules/"])
|
||||
AS_HELP_STRING([--with-module-dir],[Directory where to install the modules to (defaults to ${libdir}/pulse-${PA_MAJORMINORMICRO}/modules]),
|
||||
[modlibexecdir=$withval], [modlibexecdir="${libdir}/pulse-${PA_MAJORMINORMICRO}/modules"])
|
||||
|
||||
AC_SUBST(modlibexecdir)
|
||||
|
||||
|
|
@ -1306,8 +1319,6 @@ AM_CONDITIONAL([FORCE_PREOPEN], [test "x$FORCE_PREOPEN" = "xyes"])
|
|||
|
||||
AC_CONFIG_FILES([
|
||||
Makefile
|
||||
shave
|
||||
shave-libtool
|
||||
src/Makefile
|
||||
man/Makefile
|
||||
libpulse.pc
|
||||
|
|
@ -1320,9 +1331,7 @@ src/pulse/version.h
|
|||
po/Makefile.in
|
||||
])
|
||||
|
||||
SHAVE_INIT
|
||||
AC_OUTPUT
|
||||
SHAVE_OUTPUT
|
||||
|
||||
# ==========================================================================
|
||||
ENABLE_X11=no
|
||||
|
|
@ -1405,9 +1414,14 @@ if test "x${HAVE_BLUEZ}" = "x1" ; then
|
|||
ENABLE_BLUEZ=yes
|
||||
fi
|
||||
|
||||
ENABLE_POLKIT=no
|
||||
if test "x${HAVE_POLKIT}" = "x1" ; then
|
||||
ENABLE_POLKIT=yes
|
||||
ENABLE_GDBM=no
|
||||
if test "x${HAVE_GDBM}" = "x1" ; then
|
||||
ENABLE_GDBM=yes
|
||||
fi
|
||||
|
||||
ENABLE_TDB=no
|
||||
if test "x${HAVE_TDB}" = "x1" ; then
|
||||
ENABLE_TDB=yes
|
||||
fi
|
||||
|
||||
ENABLE_OPENSSL=no
|
||||
|
|
@ -1453,13 +1467,13 @@ echo "
|
|||
Enable BlueZ: ${ENABLE_BLUEZ}
|
||||
Enable TCP Wrappers: ${ENABLE_TCPWRAP}
|
||||
Enable libsamplerate: ${ENABLE_LIBSAMPLERATE}
|
||||
Enable PolicyKit: ${ENABLE_POLKIT}
|
||||
Enable IPv6: ${ENABLE_IPV6}
|
||||
Enable OpenSSL (for Airtunes): ${ENABLE_OPENSSL}
|
||||
Enable tdb: ${ENABLE_TDB}
|
||||
Enable gdbm: ${ENABLE_GDBM}
|
||||
|
||||
System User: ${PA_SYSTEM_USER}
|
||||
System Group: ${PA_SYSTEM_GROUP}
|
||||
Realtime Group: ${PA_REALTIME_GROUP}
|
||||
Access Group: ${PA_ACCESS_GROUP}
|
||||
Enable per-user EsounD socket: ${ENABLE_PER_USER_ESOUND_SOCKET}
|
||||
Force preopen: ${FORCE_PREOPEN}
|
||||
|
|
|
|||
153
git-version-gen
Executable file
153
git-version-gen
Executable file
|
|
@ -0,0 +1,153 @@
|
|||
#!/bin/sh
|
||||
# Print a version string.
|
||||
scriptversion=2008-04-08.07
|
||||
|
||||
# Copyright (C) 2007-2008 Free Software Foundation
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation; either version 3, 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 General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
# 02110-1301, USA.
|
||||
|
||||
# This script is derived from GIT-VERSION-GEN from GIT: http://git.or.cz/.
|
||||
# It may be run two ways:
|
||||
# - from a git repository in which the "git describe" command below
|
||||
# produces useful output (thus requiring at least one signed tag)
|
||||
# - from a non-git-repo directory containing a .tarball-version file, which
|
||||
# presumes this script is invoked like "./git-version-gen .tarball-version".
|
||||
|
||||
# In order to use intra-version strings in your project, you will need two
|
||||
# separate generated version string files:
|
||||
#
|
||||
# .tarball-version - present only in a distribution tarball, and not in
|
||||
# a checked-out repository. Created with contents that were learned at
|
||||
# the last time autoconf was run, and used by git-version-gen. Must not
|
||||
# be present in either $(srcdir) or $(builddir) for git-version-gen to
|
||||
# give accurate answers during normal development with a checked out tree,
|
||||
# but must be present in a tarball when there is no version control system.
|
||||
# Therefore, it cannot be used in any dependencies. GNUmakefile has
|
||||
# hooks to force a reconfigure at distribution time to get the value
|
||||
# correct, without penalizing normal development with extra reconfigures.
|
||||
#
|
||||
# .version - present in a checked-out repository and in a distribution
|
||||
# tarball. Usable in dependencies, particularly for files that don't
|
||||
# want to depend on config.h but do want to track version changes.
|
||||
# Delete this file prior to any autoconf run where you want to rebuild
|
||||
# files to pick up a version string change; and leave it stale to
|
||||
# minimize rebuild time after unrelated changes to configure sources.
|
||||
#
|
||||
# It is probably wise to add these two files to .gitignore, so that you
|
||||
# don't accidentally commit either generated file.
|
||||
#
|
||||
# Use the following line in your configure.ac, so that $(VERSION) will
|
||||
# automatically be up-to-date each time configure is run (and note that
|
||||
# since configure.ac no longer includes a version string, Makefile rules
|
||||
# should not depend on configure.ac for version updates).
|
||||
#
|
||||
# AC_INIT([GNU project],
|
||||
# m4_esyscmd([build-aux/git-version-gen .tarball-version]),
|
||||
# [bug-project@example])
|
||||
#
|
||||
# Then use the following lines in your Makefile.am, so that .version
|
||||
# will be present for dependencies, and so that .tarball-version will
|
||||
# exist in distribution tarballs.
|
||||
#
|
||||
# BUILT_SOURCES = $(top_srcdir)/.version
|
||||
# $(top_srcdir)/.version:
|
||||
# echo $(VERSION) > $@-t && mv $@-t $@
|
||||
# dist-hook:
|
||||
# echo $(VERSION) > $(distdir)/.tarball-version
|
||||
|
||||
case $# in
|
||||
1) ;;
|
||||
*) echo 1>&2 "Usage: $0 \$srcdir/.tarball-version"; exit 1;;
|
||||
esac
|
||||
|
||||
tarball_version_file=$1
|
||||
nl='
|
||||
'
|
||||
|
||||
# First see if there is a tarball-only version file.
|
||||
# then try "git describe", then default.
|
||||
if test -f $tarball_version_file
|
||||
then
|
||||
v=`cat $tarball_version_file` || exit 1
|
||||
case $v in
|
||||
*$nl*) v= ;; # reject multi-line output
|
||||
[0-9]*) ;;
|
||||
*) v= ;;
|
||||
esac
|
||||
test -z "$v" \
|
||||
&& echo "$0: WARNING: $tarball_version_file seems to be damaged" 1>&2
|
||||
fi
|
||||
|
||||
if test -n "$v"
|
||||
then
|
||||
: # use $v
|
||||
elif test -d .git \
|
||||
&& v=`git describe --abbrev=4 --match='v*' HEAD 2>/dev/null \
|
||||
|| git describe --abbrev=4 HEAD 2>/dev/null` \
|
||||
&& case $v in
|
||||
v[0-9]*) ;;
|
||||
*) (exit 1) ;;
|
||||
esac
|
||||
then
|
||||
# Is this a new git that lists number of commits since the last
|
||||
# tag or the previous older version that did not?
|
||||
# Newer: v6.10-77-g0f8faeb
|
||||
# Older: v6.10-g0f8faeb
|
||||
# case $v in
|
||||
# *-*-*) : git describe is okay three part flavor ;;
|
||||
# *-*)
|
||||
# : git describe is older two part flavor
|
||||
# # Recreate the number of commits and rewrite such that the
|
||||
# # result is the same as if we were using the newer version
|
||||
# # of git describe.
|
||||
# vtag=`echo "$v" | sed 's/-.*//'`
|
||||
# numcommits=`git rev-list "$vtag"..HEAD | wc -l`
|
||||
# v=`echo "$v" | sed "s/\(.*\)-\(.*\)/\1-$numcommits-\2/"`;
|
||||
# ;;
|
||||
# esac
|
||||
|
||||
# Change the first '-' to a '.', so version-comparing tools work properly.
|
||||
# Remove the "g" in git describe's output string, to save a byte.
|
||||
# v=`echo "$v" | sed 's/-/./;s/\(.*\)-g/\1-/'`;
|
||||
:
|
||||
else
|
||||
v=UNKNOWN
|
||||
fi
|
||||
|
||||
v=`echo "$v" |sed 's/^v//'`
|
||||
|
||||
# Don't declare a version "dirty" merely because a time stamp has changed.
|
||||
git status > /dev/null 2>&1
|
||||
|
||||
dirty=`sh -c 'git diff-index --name-only HEAD' 2>/dev/null` || dirty=
|
||||
case "$dirty" in
|
||||
'') ;;
|
||||
*) # Append the suffix only if there isn't one already.
|
||||
case $v in
|
||||
*-dirty) ;;
|
||||
*) v="$v-dirty" ;;
|
||||
esac ;;
|
||||
esac
|
||||
|
||||
# Omit the trailing newline, so that m4_esyscmd can use the result directly.
|
||||
echo "$v" | tr -d '\012'
|
||||
|
||||
# Local variables:
|
||||
# eval: (add-hook 'write-file-hooks 'time-stamp)
|
||||
# time-stamp-start: "scriptversion="
|
||||
# time-stamp-format: "%:y-%02m-%02d.%02H"
|
||||
# time-stamp-end: "$"
|
||||
# End:
|
||||
|
|
@ -1,6 +1,6 @@
|
|||
dnl Macros to check the presence of generic (non-typed) symbols.
|
||||
dnl Copyright (c) 2006-2007 Diego Pettenò <flameeyes@gmail.com>
|
||||
dnl Copyright (c) 2006-2007 xine project
|
||||
dnl Copyright (c) 2006-2008 Diego Pettenò <flameeyes@gmail.com>
|
||||
dnl Copyright (c) 2006-2008 xine project
|
||||
dnl
|
||||
dnl This program is free software; you can redistribute it and/or modify
|
||||
dnl it under the terms of the GNU General Public License as published by
|
||||
|
|
@ -32,6 +32,9 @@ dnl distribute a modified version of the Autoconf Macro, you may extend
|
|||
dnl this special exception to the GPL to apply to your modified version as
|
||||
dnl well.
|
||||
|
||||
dnl Check if the flag is supported by compiler
|
||||
dnl CC_CHECK_CFLAGS_SILENT([FLAG], [ACTION-IF-FOUND],[ACTION-IF-NOT-FOUND])
|
||||
|
||||
AC_DEFUN([CC_CHECK_CFLAGS_SILENT], [
|
||||
AC_CACHE_VAL(AS_TR_SH([cc_cv_cflags_$1]),
|
||||
[ac_save_CFLAGS="$CFLAGS"
|
||||
|
|
@ -46,6 +49,9 @@ AC_DEFUN([CC_CHECK_CFLAGS_SILENT], [
|
|||
[$2], [$3])
|
||||
])
|
||||
|
||||
dnl Check if the flag is supported by compiler (cacheable)
|
||||
dnl CC_CHECK_CFLAGS([FLAG], [ACTION-IF-FOUND],[ACTION-IF-NOT-FOUND])
|
||||
|
||||
AC_DEFUN([CC_CHECK_CFLAGS], [
|
||||
AC_CACHE_CHECK([if $CC supports $1 flag],
|
||||
AS_TR_SH([cc_cv_cflags_$1]),
|
||||
|
|
@ -56,6 +62,28 @@ AC_DEFUN([CC_CHECK_CFLAGS], [
|
|||
[$2], [$3])
|
||||
])
|
||||
|
||||
dnl CC_CHECK_CFLAG_APPEND(FLAG, [action-if-found], [action-if-not-found])
|
||||
dnl Check for CFLAG and appends them to CFLAGS if supported
|
||||
AC_DEFUN([CC_CHECK_CFLAG_APPEND], [
|
||||
AC_CACHE_CHECK([if $CC supports $1 flag],
|
||||
AS_TR_SH([cc_cv_cflags_$1]),
|
||||
CC_CHECK_CFLAGS_SILENT([$1]) dnl Don't execute actions here!
|
||||
)
|
||||
|
||||
AS_IF([eval test x$]AS_TR_SH([cc_cv_cflags_$1])[ = xyes],
|
||||
[CFLAGS="$CFLAGS $1"; DEBUG_CFLAGS="$DEBUG_CFLAGS $1"; $2], [$3])
|
||||
])
|
||||
|
||||
dnl CC_CHECK_CFLAGS_APPEND([FLAG1 FLAG2], [action-if-found], [action-if-not])
|
||||
AC_DEFUN([CC_CHECK_CFLAGS_APPEND], [
|
||||
for flag in $1; do
|
||||
CC_CHECK_CFLAG_APPEND($flag, [$2], [$3])
|
||||
done
|
||||
])
|
||||
|
||||
dnl Check if the flag is supported by linker (cacheable)
|
||||
dnl CC_CHECK_LDFLAGS([FLAG], [ACTION-IF-FOUND],[ACTION-IF-NOT-FOUND])
|
||||
|
||||
AC_DEFUN([CC_CHECK_LDFLAGS], [
|
||||
AC_CACHE_CHECK([if $CC supports $1 flag],
|
||||
AS_TR_SH([cc_cv_ldflags_$1]),
|
||||
|
|
@ -63,7 +91,7 @@ AC_DEFUN([CC_CHECK_LDFLAGS], [
|
|||
LDFLAGS="$LDFLAGS $1"
|
||||
AC_LINK_IFELSE([int main() { return 1; }],
|
||||
[eval "AS_TR_SH([cc_cv_ldflags_$1])='yes'"],
|
||||
[eval "AS_TR_SH([cc_cv_ldflags_$1])='no'"])
|
||||
[eval "AS_TR_SH([cc_cv_ldflags_$1])="])
|
||||
LDFLAGS="$ac_save_LDFLAGS"
|
||||
])
|
||||
|
||||
|
|
@ -71,6 +99,31 @@ AC_DEFUN([CC_CHECK_LDFLAGS], [
|
|||
[$2], [$3])
|
||||
])
|
||||
|
||||
dnl define the LDFLAGS_NOUNDEFINED variable with the correct value for
|
||||
dnl the current linker to avoid undefined references in a shared object.
|
||||
AC_DEFUN([CC_NOUNDEFINED], [
|
||||
dnl We check $host for which systems to enable this for.
|
||||
AC_REQUIRE([AC_CANONICAL_HOST])
|
||||
|
||||
case $host in
|
||||
dnl FreeBSD (et al.) does not complete linking for shared objects when pthreads
|
||||
dnl are requested, as different implementations are present; to avoid problems
|
||||
dnl use -Wl,-z,defs only for those platform not behaving this way.
|
||||
*-freebsd* | *-openbsd*) ;;
|
||||
*)
|
||||
dnl First of all check for the --no-undefined variant of GNU ld. This allows
|
||||
dnl for a much more readable commandline, so that people can understand what
|
||||
dnl it does without going to look for what the heck -z defs does.
|
||||
for possible_flags in "-Wl,--no-undefined" "-Wl,-z,defs"; do
|
||||
CC_CHECK_LDFLAGS([$possible_flags], [LDFLAGS_NOUNDEFINED="$possible_flags"])
|
||||
break
|
||||
done
|
||||
;;
|
||||
esac
|
||||
|
||||
AC_SUBST([LDFLAGS_NOUNDEFINED])
|
||||
])
|
||||
|
||||
dnl Check for a -Werror flag or equivalent. -Werror is the GCC
|
||||
dnl and ICC flag that tells the compiler to treat all the warnings
|
||||
dnl as fatal. We usually need this option to make sure that some
|
||||
|
|
|
|||
|
|
@ -163,6 +163,14 @@ USA.
|
|||
memory overcommit.</p>
|
||||
</option>
|
||||
|
||||
<option>
|
||||
<p><opt>lock-memory=</opt> Locks the entire PulseAudio process
|
||||
into memory. While this might increase drop-out safety when used
|
||||
in conjunction with real-time scheduling this takes away a lot
|
||||
of memory from other processes and might hence considerably slow
|
||||
down your system. Defaults to <opt>no</opt>.</p>
|
||||
</option>
|
||||
|
||||
<option>
|
||||
<p><opt>flat-volumes=</opt> Enable 'flat' volumes, i.e. where
|
||||
possible let the sink volume equal the maximum of the volumes of
|
||||
|
|
@ -227,13 +235,6 @@ USA.
|
|||
precedence.</p>
|
||||
</option>
|
||||
|
||||
<option>
|
||||
<p><opt>module-idle-time=</opt> Unload autoloaded modules after
|
||||
being idle for this time in seconds. Defaults to 20. The
|
||||
<opt>--module-idle-time</opt> command line option takes
|
||||
precedence.</p>
|
||||
</option>
|
||||
|
||||
<option>
|
||||
<p><opt>scache-idle-time=</opt> Unload autoloaded sample cache
|
||||
entries after being idle for this time in seconds. Defaults to
|
||||
|
|
@ -267,9 +268,9 @@ USA.
|
|||
</option>
|
||||
|
||||
<option>
|
||||
<p><opt>default-script-file=</opt> Load the default
|
||||
<p><opt>load-default-script-file=</opt> Load the default
|
||||
configuration script file as specified
|
||||
in <opt>default-script-file=</opt>. Defaults to "yes".</p>
|
||||
in <opt>default-script-file=</opt>. Defaults to <opt>yes</opt>.</p>
|
||||
</option>
|
||||
|
||||
</section>
|
||||
|
|
@ -296,6 +297,23 @@ USA.
|
|||
might alter this setting.</p>
|
||||
</option>
|
||||
|
||||
<option>
|
||||
<p><opt>log-meta=</opt> With each logged message log the code
|
||||
location the message was generated from. Defaults to
|
||||
<opt>no</opt>.</p>
|
||||
</option>
|
||||
|
||||
<option>
|
||||
<p><opt>log-time=</opt> With each logged messages log the
|
||||
relative time since startup. Defaults to <opt>no</opt>.</p>
|
||||
</option>
|
||||
|
||||
<option>
|
||||
<p><opt>log-backtrace=</opt> When greater than 0, with each
|
||||
logged message log a code stack trace up the the specified
|
||||
number of stack frames. Defaults to <opt>0</opt>.</p>
|
||||
</option>
|
||||
|
||||
</section>
|
||||
|
||||
<section name="Resource Limits">
|
||||
|
|
@ -371,11 +389,13 @@ USA.
|
|||
<option>
|
||||
<p><opt>default-sample-format=</opt> The default sampling
|
||||
format. Specify one of <opt>u8</opt>, <opt>s16le</opt>,
|
||||
<opt>s16be</opt>, <opt>s32le</opt>,
|
||||
<opt>s32be</opt>, <opt>float32le</opt>, <opt>float32be</opt>,
|
||||
<opt>s16be</opt>, <opt>s24le</opt>, <opt>s24be</opt>,
|
||||
<opt>s24-32le</opt>, <opt>s24-32be</opt>, <opt>s32le</opt>,
|
||||
<opt>s32be</opt> <opt>float32le</opt>, <opt>float32be</opt>,
|
||||
<opt>ulaw</opt>, <opt>alaw</opt>. Depending on the endianess of
|
||||
the CPU the
|
||||
formats <opt>s16ne</opt>, <opt>s16re</opt>, <opt>s32ne</opt>, <opt>s32re</opt>,
|
||||
the CPU the formats <opt>s16ne</opt>, <opt>s16re</opt>,
|
||||
<opt>s24ne</opt>, <opt>s24re</opt>, <opt>s24-32ne</opt>,
|
||||
<opt>s24-32re</opt>, <opt>s32ne</opt>, <opt>s32re</opt>,
|
||||
<opt>float32ne</opt>, <opt>float32re</opt> (for native,
|
||||
resp. reverse endian) are available as aliases.</p>
|
||||
</option>
|
||||
|
|
@ -401,7 +421,8 @@ USA.
|
|||
these buffer metrics for machines with high scheduling
|
||||
latencies. Not all possible values that may be configured here are
|
||||
available in all hardware. The driver will to find the nearest
|
||||
setting supported.</p>
|
||||
setting supported. Modern drivers that support timer-based
|
||||
scheduling ignore these options.</p>
|
||||
|
||||
<option>
|
||||
<p><opt>default-fragments=</opt> The default number of
|
||||
|
|
|
|||
15
po/LINGUAS
15
po/LINGUAS
|
|
@ -1,13 +1,28 @@
|
|||
as
|
||||
bn_IN
|
||||
ca
|
||||
cs
|
||||
de_CH
|
||||
de
|
||||
el
|
||||
es
|
||||
fi
|
||||
fr
|
||||
gu
|
||||
hi
|
||||
it
|
||||
kn
|
||||
mr
|
||||
nl
|
||||
or
|
||||
pa
|
||||
pl
|
||||
pt_BR
|
||||
pt
|
||||
sr@latin
|
||||
sr
|
||||
sv
|
||||
ta
|
||||
te
|
||||
uk
|
||||
zh_CN
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@ src/modules/module-zeroconf-discover.c
|
|||
src/modules/alsa/module-alsa-source.c
|
||||
src/modules/module-device-restore.c
|
||||
src/modules/module-match.c
|
||||
src/modules/dbus-util.c
|
||||
src/pulsecore/dbus-util.c
|
||||
src/modules/module-console-kit.c
|
||||
src/modules/oss/module-oss.c
|
||||
src/modules/oss/oss-util.c
|
||||
|
|
@ -15,7 +15,7 @@ src/modules/alsa/alsa-util.c
|
|||
src/modules/module-pipe-source.c
|
||||
src/modules/module-solaris.c
|
||||
src/modules/module-default-device-restore.c
|
||||
src/modules/module-x11-xsmp.c
|
||||
src/modules/x11/module-x11-xsmp.c
|
||||
src/modules/module-remap-sink.c
|
||||
src/modules/bluetooth/module-bluetooth-proximity.c
|
||||
src/modules/module-detect.c
|
||||
|
|
@ -24,23 +24,23 @@ src/modules/module-lirc.c
|
|||
src/modules/module-hal-detect.c
|
||||
src/modules/module-sine.c
|
||||
src/modules/module-zeroconf-publish.c
|
||||
src/modules/module-jack-source.c
|
||||
src/modules/jack/module-jack-source.c
|
||||
src/modules/module-cli.c
|
||||
src/modules/gconf/module-gconf.c
|
||||
src/modules/gconf/gconf-helper.c
|
||||
src/modules/module-esound-sink.c
|
||||
src/modules/alsa/module-alsa-sink.c
|
||||
src/modules/module-volume-restore.c
|
||||
src/modules/module-x11-bell.c
|
||||
src/modules/x11/module-x11-bell.c
|
||||
src/modules/module-protocol-stub.c
|
||||
src/modules/module-stream-restore.c
|
||||
src/modules/module-jack-sink.c
|
||||
src/modules/jack/module-jack-sink.c
|
||||
src/modules/module-esound-compat-spawnfd.c
|
||||
src/modules/module-esound-compat-spawnpid.c
|
||||
#src/modules/module-waveout.c
|
||||
src/modules/module-combine.c
|
||||
src/modules/bluetooth/proximity-helper.c
|
||||
src/modules/module-x11-publish.c
|
||||
src/modules/x11/module-x11-publish.c
|
||||
src/modules/rtp/module-rtp-recv.c
|
||||
src/modules/rtp/sdp.c
|
||||
src/modules/rtp/rtp.c
|
||||
|
|
@ -190,5 +190,9 @@ src/utils/pactl.c
|
|||
src/utils/padsp.c
|
||||
src/utils/pax11publish.c
|
||||
src/utils/pacmd.c
|
||||
src/utils/paplay.c
|
||||
src/pulsecore/lock-autospawn.c
|
||||
src/modules/alsa/alsa-sink.c
|
||||
src/modules/alsa/alsa-source.c
|
||||
src/modules/alsa/module-alsa-card.c
|
||||
src/modules/bluetooth/module-bluetooth-device.c
|
||||
src/modules/reserve-wrap.c
|
||||
|
|
|
|||
2513
po/bn_IN.po
Normal file
2513
po/bn_IN.po
Normal file
File diff suppressed because it is too large
Load diff
2556
po/de_CH.po
Normal file
2556
po/de_CH.po
Normal file
File diff suppressed because it is too large
Load diff
1174
po/pt_BR.po
1174
po/pt_BR.po
File diff suppressed because it is too large
Load diff
2527
po/sr@latin.po
Normal file
2527
po/sr@latin.po
Normal file
File diff suppressed because it is too large
Load diff
1596
po/zh_CN.po
1596
po/zh_CN.po
File diff suppressed because it is too large
Load diff
79
shave
Normal file
79
shave
Normal file
|
|
@ -0,0 +1,79 @@
|
|||
#!/bin/sh
|
||||
|
||||
# we need sed
|
||||
SED=/bin/sed
|
||||
if test -z "$SED" ; then
|
||||
SED=sed
|
||||
fi
|
||||
|
||||
lt_unmangle ()
|
||||
{
|
||||
last_result=`echo $1 | $SED -e 's#.libs/##' -e 's#[0-9a-zA-Z_\-\.]*_la-##'`
|
||||
}
|
||||
|
||||
# the tool to wrap (cc, cxx, ar, ranlib, ..)
|
||||
tool="$1"
|
||||
shift
|
||||
|
||||
# the reel tool (to call)
|
||||
REEL_TOOL="$1"
|
||||
shift
|
||||
|
||||
pass_through=0
|
||||
preserved_args=
|
||||
while test "$#" -gt 0; do
|
||||
opt="$1"
|
||||
shift
|
||||
|
||||
case $opt in
|
||||
--shave-mode=*)
|
||||
mode=`echo $opt | $SED -e 's/[-_a-zA-Z0-9]*=//'`
|
||||
;;
|
||||
-o)
|
||||
lt_output="$1"
|
||||
preserved_args="$preserved_args $opt"
|
||||
;;
|
||||
*)
|
||||
preserved_args="$preserved_args $opt"
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
||||
# mode=link is handled in the libtool wrapper
|
||||
case "$mode,$tool" in
|
||||
link,*)
|
||||
pass_through=1
|
||||
;;
|
||||
*,cxx)
|
||||
Q=" CXX "
|
||||
;;
|
||||
*,cc)
|
||||
Q=" CC "
|
||||
;;
|
||||
*,fc)
|
||||
Q=" FC "
|
||||
;;
|
||||
*,f77)
|
||||
Q=" F77 "
|
||||
;;
|
||||
*,objc)
|
||||
Q=" OBJC "
|
||||
;;
|
||||
*,*)
|
||||
# should not happen
|
||||
Q=" CC "
|
||||
;;
|
||||
esac
|
||||
|
||||
lt_unmangle "$lt_output"
|
||||
output=$last_result
|
||||
|
||||
if test -z $V; then
|
||||
if test $pass_through -eq 0; then
|
||||
echo "$Q$output"
|
||||
fi
|
||||
$REEL_TOOL $preserved_args
|
||||
else
|
||||
echo $REEL_TOOL $preserved_args
|
||||
$REEL_TOOL $preserved_args
|
||||
fi
|
||||
69
shave-libtool
Normal file
69
shave-libtool
Normal file
|
|
@ -0,0 +1,69 @@
|
|||
#!/bin/sh
|
||||
|
||||
# we need sed
|
||||
SED=/bin/sed
|
||||
if test -z "$SED" ; then
|
||||
SED=sed
|
||||
fi
|
||||
|
||||
lt_unmangle ()
|
||||
{
|
||||
last_result=`echo $1 | $SED -e 's#.libs/##' -e 's#[0-9a-zA-Z_\-\.]*_la-##'`
|
||||
}
|
||||
|
||||
# the real libtool to use
|
||||
LIBTOOL="$1"
|
||||
shift
|
||||
|
||||
# if 1, don't print anything, the underlaying wrapper will do it
|
||||
pass_though=0
|
||||
|
||||
# scan the arguments, keep the right ones for libtool, and discover the mode
|
||||
preserved_args=
|
||||
while test "$#" -gt 0; do
|
||||
opt="$1"
|
||||
shift
|
||||
|
||||
case $opt in
|
||||
--mode=*)
|
||||
mode=`echo $opt | $SED -e 's/[-_a-zA-Z0-9]*=//'`
|
||||
preserved_args="$preserved_args $opt"
|
||||
;;
|
||||
-o)
|
||||
lt_output="$1"
|
||||
preserved_args="$preserved_args $opt"
|
||||
;;
|
||||
*)
|
||||
preserved_args="$preserved_args $opt"
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
||||
case "$mode" in
|
||||
compile)
|
||||
# shave will be called and print the actual CC/CXX/LINK line
|
||||
preserved_args="$preserved_args --shave-mode=$mode"
|
||||
pass_though=1
|
||||
;;
|
||||
link)
|
||||
preserved_args="$preserved_args --shave-mode=$mode"
|
||||
Q=" LINK "
|
||||
;;
|
||||
*)
|
||||
# let's u
|
||||
# echo "*** libtool: Unimplemented mode: $mode, fill a bug report"
|
||||
;;
|
||||
esac
|
||||
|
||||
lt_unmangle "$lt_output"
|
||||
output=$last_result
|
||||
|
||||
if test -z $V; then
|
||||
if test $pass_though -eq 0; then
|
||||
echo "$Q$output"
|
||||
fi
|
||||
$LIBTOOL --silent $preserved_args
|
||||
else
|
||||
echo $LIBTOOL $preserved_args
|
||||
$LIBTOOL $preserved_args
|
||||
fi
|
||||
1
src/.gitignore
vendored
1
src/.gitignore
vendored
|
|
@ -1,3 +1,4 @@
|
|||
sigbus-test
|
||||
TAGS
|
||||
alsa-time-test
|
||||
gtk-test
|
||||
|
|
|
|||
266
src/Makefile.am
266
src/Makefile.am
|
|
@ -29,6 +29,9 @@ pulsecoreincludedir=$(includedir)/pulsecore
|
|||
pulseconfdir=$(sysconfdir)/pulse
|
||||
pulselibexecdir=$(libexecdir)/pulse
|
||||
xdgautostartdir=$(sysconfdir)/xdg/autostart
|
||||
alsaprofilesetsdir=$(datadir)/pulseaudio/alsa-mixer/profile-sets
|
||||
alsapathsdir=$(datadir)/pulseaudio/alsa-mixer/paths
|
||||
udevrulesdir=/lib/udev/rules.d
|
||||
|
||||
###################################
|
||||
# Defines #
|
||||
|
|
@ -56,9 +59,16 @@ AM_CFLAGS = \
|
|||
-I$(top_builddir)/src/modules/gconf \
|
||||
-I$(top_srcdir)/src/modules/bluetooth \
|
||||
-I$(top_builddir)/src/modules/bluetooth \
|
||||
-I$(top_srcdir)/src/modules/oss \
|
||||
-I$(top_builddir)/src/modules/oss \
|
||||
-I$(top_srcdir)/src/modules/alsa \
|
||||
-I$(top_builddir)/src/modules/alsa \
|
||||
-I$(top_srcdir)/src/modules/raop \
|
||||
-I$(top_builddir)/src/modules/raop \
|
||||
-I$(top_srcdir)/src/modules/x11 \
|
||||
-I$(top_builddir)/src/modules/x11 \
|
||||
-I$(top_srcdir)/src/modules/jack \
|
||||
-I$(top_builddir)/src/modules/jack \
|
||||
$(PTHREAD_CFLAGS) -D_POSIX_PTHREAD_SEMANTICS \
|
||||
$(LIBSAMPLERATE_CFLAGS) \
|
||||
$(LIBSNDFILE_CFLAGS) \
|
||||
|
|
@ -71,7 +81,9 @@ AM_CFLAGS = \
|
|||
-DPA_SYSTEM_STATE_PATH=\"$(PA_SYSTEM_STATE_PATH)\" \
|
||||
-DAO_REQUIRE_CAS \
|
||||
-DPULSE_LOCALEDIR=\"$(pulselocaledir)\" \
|
||||
-DPA_MACHINE_ID=\"$(localstatedir)/lib/dbus/machine-id\"
|
||||
-DPA_MACHINE_ID=\"$(localstatedir)/lib/dbus/machine-id\" \
|
||||
-DPA_ALSA_PATHS_DIR=\"$(alsapathsdir)\" \
|
||||
-DPA_ALSA_PROFILE_SETS_DIR=\"$(alsaprofilesetsdir)\"
|
||||
|
||||
AM_LIBADD = $(PTHREAD_LIBS) $(INTLLIBS)
|
||||
AM_LDADD = $(PTHREAD_LIBS) $(INTLLIBS)
|
||||
|
|
@ -87,7 +99,7 @@ WINSOCK_LIBS=-lwsock32 -lws2_32 -lwininet
|
|||
endif
|
||||
|
||||
FOREIGN_CFLAGS = -w
|
||||
MODULE_LDFLAGS = -module -disable-static -avoid-version
|
||||
MODULE_LDFLAGS = -module -disable-static -avoid-version $(LDFLAGS_NOUNDEFINED)
|
||||
|
||||
###################################
|
||||
# Extra files #
|
||||
|
|
@ -107,7 +119,25 @@ EXTRA_DIST = \
|
|||
modules/module-defs.h.m4 \
|
||||
daemon/pulseaudio.desktop.in \
|
||||
map-file \
|
||||
daemon/org.pulseaudio.policy.in
|
||||
modules/alsa/mixer/profile-sets/default.conf \
|
||||
modules/alsa/mixer/profile-sets/native-instruments-audio4dj.conf \
|
||||
modules/alsa/mixer/profile-sets/native-instruments-audio8dj.conf \
|
||||
modules/alsa/mixer/profile-sets/90-pulseaudio.rules \
|
||||
modules/alsa/mixer/paths/analog-input-aux.conf \
|
||||
modules/alsa/mixer/paths/analog-input.conf \
|
||||
modules/alsa/mixer/paths/analog-input.conf.common \
|
||||
modules/alsa/mixer/paths/analog-input-fm.conf \
|
||||
modules/alsa/mixer/paths/analog-input-linein.conf \
|
||||
modules/alsa/mixer/paths/analog-input-mic.conf \
|
||||
modules/alsa/mixer/paths/analog-input-mic.conf.common \
|
||||
modules/alsa/mixer/paths/analog-input-mic-line.conf \
|
||||
modules/alsa/mixer/paths/analog-input-tvtuner.conf \
|
||||
modules/alsa/mixer/paths/analog-input-video.conf \
|
||||
modules/alsa/mixer/paths/analog-output.conf \
|
||||
modules/alsa/mixer/paths/analog-output.conf.common \
|
||||
modules/alsa/mixer/paths/analog-output-headphones.conf \
|
||||
modules/alsa/mixer/paths/analog-output-lfe-on-mono.conf \
|
||||
modules/alsa/mixer/paths/analog-output-mono.conf
|
||||
|
||||
pulseconf_DATA = \
|
||||
default.pa \
|
||||
|
|
@ -158,16 +188,6 @@ else
|
|||
pulseaudio_LDFLAGS = $(AM_LDFLAGS) $(BINLDFLAGS) -dlopen force $(foreach f,$(PREOPEN_LIBS),-dlopen $(f))
|
||||
endif
|
||||
|
||||
if HAVE_POLKIT
|
||||
policy_in_files = daemon/org.pulseaudio.policy.in
|
||||
policy_DATA = $(policy_in_files:.policy.in=.policy)
|
||||
@INTLTOOL_POLICY_RULE@
|
||||
|
||||
pulseaudio_SOURCES += daemon/polkit.c daemon/polkit.h
|
||||
pulseaudio_CFLAGS += $(POLKIT_CFLAGS)
|
||||
pulseaudio_LDADD += $(POLKIT_LIBS)
|
||||
endif
|
||||
|
||||
###################################
|
||||
# Utility programs #
|
||||
###################################
|
||||
|
|
@ -175,7 +195,6 @@ endif
|
|||
bin_PROGRAMS += \
|
||||
pacat \
|
||||
pactl \
|
||||
paplay \
|
||||
pasuspender
|
||||
|
||||
if HAVE_AF_UNIX
|
||||
|
|
@ -193,23 +212,18 @@ endif
|
|||
bin_SCRIPTS = esdcompat start-pulseaudio-x11
|
||||
|
||||
pacat_SOURCES = utils/pacat.c
|
||||
pacat_LDADD = $(AM_LDADD) libpulse.la
|
||||
pacat_CFLAGS = $(AM_CFLAGS)
|
||||
pacat_LDADD = $(AM_LDADD) libpulse.la libpulsecommon-@PA_MAJORMINORMICRO@.la $(LIBSNDFILE_LIBS)
|
||||
pacat_CFLAGS = $(AM_CFLAGS) $(LIBSNDFILE_CFLAGS)
|
||||
pacat_LDFLAGS = $(AM_LDFLAGS) $(BINLDFLAGS)
|
||||
|
||||
paplay_SOURCES = utils/paplay.c
|
||||
paplay_LDADD = $(AM_LDADD) libpulse.la $(LIBSNDFILE_LIBS)
|
||||
paplay_CFLAGS = $(AM_CFLAGS) $(LIBSNDFILE_CFLAGS)
|
||||
paplay_LDFLAGS = $(AM_LDFLAGS) $(BINLDFLAGS)
|
||||
|
||||
pactl_SOURCES = utils/pactl.c
|
||||
pactl_LDADD = $(AM_LDADD) libpulse.la libpulsecommon-@PA_MAJORMINORMICRO@.la $(LIBSNDFILE_LIBS)
|
||||
pactl_CFLAGS = $(AM_CFLAGS) $(LIBSNDFILE_CFLAGS)
|
||||
pactl_LDFLAGS = $(AM_LDFLAGS) $(BINLDFLAGS)
|
||||
|
||||
pasuspender_SOURCES = utils/pasuspender.c
|
||||
pasuspender_LDADD = $(AM_LDADD) libpulse.la libpulsecommon-@PA_MAJORMINORMICRO@.la $(LIBSNDFILE_LIBS)
|
||||
pasuspender_CFLAGS = $(AM_CFLAGS) $(LIBSNDFILE_CFLAGS)
|
||||
pasuspender_LDADD = $(AM_LDADD) libpulse.la libpulsecommon-@PA_MAJORMINORMICRO@.la
|
||||
pasuspender_CFLAGS = $(AM_CFLAGS)
|
||||
pasuspender_LDFLAGS = $(AM_LDFLAGS) $(BINLDFLAGS)
|
||||
|
||||
pacmd_SOURCES = utils/pacmd.c
|
||||
|
|
@ -223,7 +237,7 @@ pax11publish_LDADD = $(AM_LDADD) libpulse.la libpulsecommon-@PA_MAJORMINORMICRO@
|
|||
pax11publish_LDFLAGS = $(AM_LDFLAGS) $(BINLDFLAGS)
|
||||
|
||||
pabrowse_SOURCES = utils/pabrowse.c
|
||||
pabrowse_LDADD = $(AM_LDADD) libpulse.la libpulse-browse.la
|
||||
pabrowse_LDADD = $(AM_LDADD) libpulse.la libpulse-browse.la libpulsecommon-@PA_MAJORMINORMICRO@.la
|
||||
pabrowse_CFLAGS = $(AM_CFLAGS)
|
||||
pabrowse_LDFLAGS = $(AM_LDFLAGS) $(BINLDFLAGS)
|
||||
|
||||
|
|
@ -259,7 +273,8 @@ TESTS = \
|
|||
envelope-test \
|
||||
proplist-test \
|
||||
lock-autospawn-test \
|
||||
prioq-test
|
||||
prioq-test \
|
||||
sigbus-test
|
||||
|
||||
TESTS_BINARIES = \
|
||||
mainloop-test \
|
||||
|
|
@ -296,7 +311,8 @@ TESTS_BINARIES = \
|
|||
rtstutter \
|
||||
stripnul \
|
||||
lock-autospawn-test \
|
||||
prioq-test
|
||||
prioq-test \
|
||||
sigbus-test
|
||||
|
||||
if HAVE_SIGXCPU
|
||||
#TESTS += \
|
||||
|
|
@ -520,6 +536,11 @@ prioq_test_LDADD = $(AM_LDADD) libpulsecore-@PA_MAJORMINORMICRO@.la libpulsecomm
|
|||
prioq_test_CFLAGS = $(AM_CFLAGS) $(LIBOIL_CFLAGS)
|
||||
prioq_test_LDFLAGS = $(AM_LDFLAGS) $(BINLDFLAGS) $(LIBOIL_LIBS)
|
||||
|
||||
sigbus_test_SOURCES = tests/sigbus-test.c
|
||||
sigbus_test_LDADD = $(AM_LDADD) libpulsecore-@PA_MAJORMINORMICRO@.la libpulsecommon-@PA_MAJORMINORMICRO@.la
|
||||
sigbus_test_CFLAGS = $(AM_CFLAGS) $(LIBOIL_CFLAGS)
|
||||
sigbus_test_LDFLAGS = $(AM_LDFLAGS) $(BINLDFLAGS) $(LIBOIL_LIBS)
|
||||
|
||||
gtk_test_SOURCES = tests/gtk-test.c
|
||||
gtk_test_LDADD = $(AM_LDADD) libpulse.la libpulse-mainloop-glib.la
|
||||
gtk_test_CFLAGS = $(AM_CFLAGS) $(GTK20_CFLAGS)
|
||||
|
|
@ -545,6 +566,7 @@ libpulsecommon_@PA_MAJORMINORMICRO@_la_SOURCES = \
|
|||
pulsecore/authkey.c pulsecore/authkey.h \
|
||||
pulsecore/conf-parser.c pulsecore/conf-parser.h \
|
||||
pulsecore/core-error.c pulsecore/core-error.h \
|
||||
pulsecore/core-rtclock.c pulsecore/core-rtclock.h \
|
||||
pulsecore/core-util.c pulsecore/core-util.h \
|
||||
pulsecore/creds.h \
|
||||
pulsecore/dynarray.c pulsecore/dynarray.h \
|
||||
|
|
@ -575,13 +597,14 @@ libpulsecommon_@PA_MAJORMINORMICRO@_la_SOURCES = \
|
|||
pulsecore/pipe.c pulsecore/pipe.h \
|
||||
pulsecore/poll.c pulsecore/poll.h \
|
||||
pulsecore/prioq.c pulsecore/prioq.h \
|
||||
pulsecore/memtrap.c pulsecore/memtrap.h \
|
||||
pulsecore/aupdate.c pulsecore/aupdate.h \
|
||||
pulsecore/proplist-util.c pulsecore/proplist-util.h \
|
||||
pulsecore/pstream-util.c pulsecore/pstream-util.h \
|
||||
pulsecore/pstream.c pulsecore/pstream.h \
|
||||
pulsecore/queue.c pulsecore/queue.h \
|
||||
pulsecore/random.c pulsecore/random.h \
|
||||
pulsecore/refcnt.h \
|
||||
pulsecore/rtclock.c pulsecore/rtclock.h \
|
||||
pulsecore/shm.c pulsecore/shm.h \
|
||||
pulsecore/bitset.c pulsecore/bitset.h \
|
||||
pulsecore/socket-client.c pulsecore/socket-client.h \
|
||||
|
|
@ -592,11 +615,12 @@ libpulsecommon_@PA_MAJORMINORMICRO@_la_SOURCES = \
|
|||
pulsecore/tagstruct.c pulsecore/tagstruct.h \
|
||||
pulsecore/time-smoother.c pulsecore/time-smoother.h \
|
||||
pulsecore/tokenizer.c pulsecore/tokenizer.h \
|
||||
pulsecore/sndfile-util.c pulsecore/sndfile-util.h \
|
||||
pulsecore/winsock.h
|
||||
|
||||
libpulsecommon_@PA_MAJORMINORMICRO@_la_CFLAGS = $(AM_CFLAGS)
|
||||
libpulsecommon_@PA_MAJORMINORMICRO@_la_LDFLAGS = $(AM_LDFLAGS) -avoid-version
|
||||
libpulsecommon_@PA_MAJORMINORMICRO@_la_LIBADD = $(AM_LIBADD) $(LIBWRAP_LIBS) $(WINSOCK_LIBS) $(LTLIBICONV)
|
||||
libpulsecommon_@PA_MAJORMINORMICRO@_la_LIBADD = $(AM_LIBADD) $(LIBWRAP_LIBS) $(WINSOCK_LIBS) $(LTLIBICONV) $(LIBSNDFILE_LIBS)
|
||||
|
||||
# proplist-util.h uses these header files, but not the library itself!
|
||||
libpulsecommon_@PA_MAJORMINORMICRO@_la_CFLAGS += $(GLIB20_CFLAGS) $(GTK20_CFLAGS)
|
||||
|
|
@ -633,6 +657,14 @@ if OS_IS_WIN32
|
|||
libpulsecommon_@PA_MAJORMINORMICRO@_la_SOURCES += pulsecore/dllmain.c
|
||||
endif
|
||||
|
||||
if HAVE_DBUS
|
||||
libpulsecommon_@PA_MAJORMINORMICRO@_la_SOURCES += \
|
||||
pulsecore/dbus-util.c pulsecore/dbus-util.h \
|
||||
pulsecore/rtkit.c pulsecore/rtkit.h
|
||||
libpulsecommon_@PA_MAJORMINORMICRO@_la_CFLAGS += $(DBUS_CFLAGS)
|
||||
libpulsecommon_@PA_MAJORMINORMICRO@_la_LIBADD += $(DBUS_LIBS)
|
||||
endif
|
||||
|
||||
###################################
|
||||
# Client library #
|
||||
###################################
|
||||
|
|
@ -652,6 +684,7 @@ pulseinclude_HEADERS = \
|
|||
pulse/operation.h \
|
||||
pulse/proplist.h \
|
||||
pulse/pulseaudio.h \
|
||||
pulse/rtclock.h \
|
||||
pulse/sample.h \
|
||||
pulse/scache.h \
|
||||
pulse/simple.h \
|
||||
|
|
@ -702,6 +735,7 @@ libpulse_la_SOURCES = \
|
|||
pulse/operation.c pulse/operation.h \
|
||||
pulse/proplist.c pulse/proplist.h \
|
||||
pulse/pulseaudio.h \
|
||||
pulse/rtclock.c pulse/rtclock.h \
|
||||
pulse/sample.c pulse/sample.h \
|
||||
pulse/scache.c pulse/scache.h \
|
||||
pulse/stream.c pulse/stream.h \
|
||||
|
|
@ -713,7 +747,7 @@ libpulse_la_SOURCES = \
|
|||
pulse/volume.c pulse/volume.h \
|
||||
pulse/xmalloc.c pulse/xmalloc.h
|
||||
|
||||
libpulse_la_CFLAGS = $(AM_CFLAGS)
|
||||
libpulse_la_CFLAGS = $(AM_CFLAGS) $(DBUS_CFLAGS)
|
||||
libpulse_la_LIBADD = $(AM_LIBADD) $(WINSOCK_LIBS) $(LTLIBICONV) libpulsecommon-@PA_MAJORMINORMICRO@.la
|
||||
libpulse_la_LDFLAGS = $(AM_LDFLAGS) $(VERSIONING_LDFLAGS) -version-info $(LIBPULSE_VERSION_INFO)
|
||||
|
||||
|
|
@ -785,7 +819,6 @@ libpulsecore_@PA_MAJORMINORMICRO@_la_SOURCES = \
|
|||
pulsecore/play-memchunk.c pulsecore/play-memchunk.h \
|
||||
pulsecore/resampler.c pulsecore/resampler.h \
|
||||
pulsecore/rtpoll.c pulsecore/rtpoll.h \
|
||||
pulsecore/rtsig.c pulsecore/rtsig.h \
|
||||
pulsecore/sample-util.c pulsecore/sample-util.h \
|
||||
pulsecore/sconv-s16be.c pulsecore/sconv-s16be.h \
|
||||
pulsecore/sconv-s16le.c pulsecore/sconv-s16le.h \
|
||||
|
|
@ -801,11 +834,12 @@ libpulsecore_@PA_MAJORMINORMICRO@_la_SOURCES = \
|
|||
pulsecore/source.c pulsecore/source.h \
|
||||
pulsecore/start-child.c pulsecore/start-child.h \
|
||||
pulsecore/thread-mq.c pulsecore/thread-mq.h \
|
||||
pulsecore/time-smoother.c pulsecore/time-smoother.h
|
||||
pulsecore/time-smoother.c pulsecore/time-smoother.h \
|
||||
pulsecore/database.h
|
||||
|
||||
libpulsecore_@PA_MAJORMINORMICRO@_la_CFLAGS = $(AM_CFLAGS) $(LIBOIL_CFLAGS)
|
||||
libpulsecore_@PA_MAJORMINORMICRO@_la_CFLAGS = $(AM_CFLAGS) $(LIBSAMPLERATE_CFLAGS) $(LIBSPEEX_CFLAGS) $(WINSOCK_CFLAGS) $(LIBOIL_CFLAGS)
|
||||
libpulsecore_@PA_MAJORMINORMICRO@_la_LDFLAGS = -avoid-version
|
||||
libpulsecore_@PA_MAJORMINORMICRO@_la_LIBADD = $(AM_LIBADD) $(LIBLTDL) $(LIBSAMPLERATE_LIBS) $(LIBSNDFILE_LIBS) $(LIBSPEEX_LIBS) $(WINSOCK_LIBS) $(LIBOIL_LIBS) $(LTLIBICONV) libpulsecommon-@PA_MAJORMINORMICRO@.la libpulse.la libpulsecore-foreign.la
|
||||
libpulsecore_@PA_MAJORMINORMICRO@_la_LIBADD = $(AM_LIBADD) $(LIBLTDL) $(LIBSAMPLERATE_LIBS) $(LIBSPEEX_LIBS) $(WINSOCK_LIBS) $(LIBOIL_LIBS) $(LTLIBICONV) libpulsecommon-@PA_MAJORMINORMICRO@.la libpulse.la libpulsecore-foreign.la
|
||||
|
||||
if HAVE_X11
|
||||
libpulsecore_@PA_MAJORMINORMICRO@_la_SOURCES += pulsecore/x11wrap.c pulsecore/x11wrap.h
|
||||
|
|
@ -813,6 +847,25 @@ libpulsecore_@PA_MAJORMINORMICRO@_la_CFLAGS += $(X11_CFLAGS)
|
|||
libpulsecore_@PA_MAJORMINORMICRO@_la_LDFLAGS += $(X11_LIBS)
|
||||
endif
|
||||
|
||||
if HAVE_DBUS
|
||||
libpulsecore_@PA_MAJORMINORMICRO@_la_SOURCES += pulsecore/dbus-shared.c pulsecore/dbus-shared.h
|
||||
libpulsecore_@PA_MAJORMINORMICRO@_la_CFLAGS += $(DBUS_CFLAGS)
|
||||
libpulsecore_@PA_MAJORMINORMICRO@_la_LIBADD += $(DBUS_LIBS)
|
||||
endif
|
||||
|
||||
if HAVE_GDBM
|
||||
libpulsecore_@PA_MAJORMINORMICRO@_la_SOURCES += pulsecore/database-gdbm.c
|
||||
libpulsecore_@PA_MAJORMINORMICRO@_la_CFLAGS += $(GDBM_CFLAGS)
|
||||
libpulsecore_@PA_MAJORMINORMICRO@_la_LIBADD += $(GDBM_LIBS)
|
||||
endif
|
||||
|
||||
if HAVE_TDB
|
||||
libpulsecore_@PA_MAJORMINORMICRO@_la_SOURCES += pulsecore/database-tdb.c
|
||||
libpulsecore_@PA_MAJORMINORMICRO@_la_CFLAGS += $(TDB_CFLAGS)
|
||||
libpulsecore_@PA_MAJORMINORMICRO@_la_LIBADD += $(TDB_LIBS)
|
||||
endif
|
||||
|
||||
|
||||
# We split the foreign code off to not be annoyed by warnings we don't care about
|
||||
noinst_LTLIBRARIES = libpulsecore-foreign.la
|
||||
|
||||
|
|
@ -861,7 +914,7 @@ libprotocol_cli_la_SOURCES = pulsecore/protocol-cli.c pulsecore/protocol-cli.h
|
|||
libprotocol_cli_la_LDFLAGS = -avoid-version
|
||||
libprotocol_cli_la_LIBADD = $(AM_LIBADD) libpulsecore-@PA_MAJORMINORMICRO@.la libpulsecommon-@PA_MAJORMINORMICRO@.la libpulse.la libcli.la
|
||||
|
||||
libprotocol_http_la_SOURCES = pulsecore/protocol-http.c pulsecore/protocol-http.h
|
||||
libprotocol_http_la_SOURCES = pulsecore/protocol-http.c pulsecore/protocol-http.h pulsecore/mime-type.c pulsecore/mime-type.h
|
||||
libprotocol_http_la_LDFLAGS = -avoid-version
|
||||
libprotocol_http_la_LIBADD = $(AM_LIBADD) libpulsecore-@PA_MAJORMINORMICRO@.la libpulsecommon-@PA_MAJORMINORMICRO@.la libpulse.la
|
||||
|
||||
|
|
@ -902,7 +955,6 @@ libavahi_wrap_la_LIBADD = $(AM_LIBADD) $(AVAHI_CFLAGS) libpulsecore-@PA_MAJORMIN
|
|||
if HAVE_DBUS
|
||||
# Serveral module (e.g. libalsa-util.la)
|
||||
modlibexec_LTLIBRARIES += \
|
||||
libdbus-util.la \
|
||||
module-console-kit.la
|
||||
endif
|
||||
|
||||
|
|
@ -920,6 +972,7 @@ modlibexec_LTLIBRARIES += \
|
|||
module-default-device-restore.la \
|
||||
module-always-sink.la \
|
||||
module-rescue-streams.la \
|
||||
module-intended-roles.la \
|
||||
module-suspend-on-idle.la \
|
||||
module-http-protocol-tcp.la \
|
||||
module-sine.la \
|
||||
|
|
@ -992,6 +1045,34 @@ modlibexec_LTLIBRARIES += \
|
|||
module-alsa-sink.la \
|
||||
module-alsa-source.la \
|
||||
module-alsa-card.la
|
||||
|
||||
alsaprofilesets_DATA = \
|
||||
modules/alsa/mixer/profile-sets/default.conf \
|
||||
modules/alsa/mixer/profile-sets/native-instruments-audio4dj.conf \
|
||||
modules/alsa/mixer/profile-sets/native-instruments-audio8dj.conf
|
||||
|
||||
if HAVE_UDEV
|
||||
udevrules_DATA = \
|
||||
modules/alsa/mixer/profile-sets/90-pulseaudio.rules
|
||||
endif
|
||||
|
||||
alsapaths_DATA = \
|
||||
modules/alsa/mixer/paths/analog-input-aux.conf \
|
||||
modules/alsa/mixer/paths/analog-input.conf \
|
||||
modules/alsa/mixer/paths/analog-input.conf.common \
|
||||
modules/alsa/mixer/paths/analog-input-fm.conf \
|
||||
modules/alsa/mixer/paths/analog-input-linein.conf \
|
||||
modules/alsa/mixer/paths/analog-input-mic.conf \
|
||||
modules/alsa/mixer/paths/analog-input-mic.conf.common \
|
||||
modules/alsa/mixer/paths/analog-input-mic-line.conf \
|
||||
modules/alsa/mixer/paths/analog-input-tvtuner.conf \
|
||||
modules/alsa/mixer/paths/analog-input-video.conf \
|
||||
modules/alsa/mixer/paths/analog-output.conf \
|
||||
modules/alsa/mixer/paths/analog-output.conf.common \
|
||||
modules/alsa/mixer/paths/analog-output-headphones.conf \
|
||||
modules/alsa/mixer/paths/analog-output-lfe-on-mono.conf \
|
||||
modules/alsa/mixer/paths/analog-output-mono.conf
|
||||
|
||||
endif
|
||||
|
||||
if HAVE_SOLARIS
|
||||
|
|
@ -1039,6 +1120,16 @@ modlibexec_LTLIBRARIES += \
|
|||
module-hal-detect.la
|
||||
endif
|
||||
|
||||
if HAVE_UDEV
|
||||
modlibexec_LTLIBRARIES += \
|
||||
module-udev-detect.la
|
||||
endif
|
||||
|
||||
if HAVE_DBUS
|
||||
modlibexec_LTLIBRARIES += \
|
||||
module-rygel-media-server.la
|
||||
endif
|
||||
|
||||
if HAVE_BLUEZ
|
||||
modlibexec_LTLIBRARIES += \
|
||||
libbluetooth-util.la \
|
||||
|
|
@ -1094,10 +1185,11 @@ SYMDEF_FILES = \
|
|||
modules/module-mmkbd-evdev-symdef.h \
|
||||
modules/module-http-protocol-tcp-symdef.h \
|
||||
modules/module-http-protocol-unix-symdef.h \
|
||||
modules/module-x11-bell-symdef.h \
|
||||
modules/module-x11-publish-symdef.h \
|
||||
modules/module-x11-xsmp-symdef.h \
|
||||
modules/module-x11-cork-request-symdef.h \
|
||||
modules/module-rygel-media-server-symdef.h \
|
||||
modules/x11/module-x11-bell-symdef.h \
|
||||
modules/x11/module-x11-publish-symdef.h \
|
||||
modules/x11/module-x11-xsmp-symdef.h \
|
||||
modules/x11/module-x11-cork-request-symdef.h \
|
||||
modules/oss/module-oss-symdef.h \
|
||||
modules/alsa/module-alsa-sink-symdef.h \
|
||||
modules/alsa/module-alsa-source-symdef.h \
|
||||
|
|
@ -1107,8 +1199,8 @@ SYMDEF_FILES = \
|
|||
modules/module-detect-symdef.h \
|
||||
modules/rtp/module-rtp-send-symdef.h \
|
||||
modules/rtp/module-rtp-recv-symdef.h \
|
||||
modules/module-jack-sink-symdef.h \
|
||||
modules/module-jack-source-symdef.h \
|
||||
modules/jack/module-jack-sink-symdef.h \
|
||||
modules/jack/module-jack-source-symdef.h \
|
||||
modules/module-volume-restore-symdef.h \
|
||||
modules/module-device-restore-symdef.h \
|
||||
modules/module-stream-restore-symdef.h \
|
||||
|
|
@ -1116,13 +1208,15 @@ SYMDEF_FILES = \
|
|||
modules/module-default-device-restore-symdef.h \
|
||||
modules/module-always-sink-symdef.h \
|
||||
modules/module-rescue-streams-symdef.h \
|
||||
modules/module-intended-roles-symdef.h \
|
||||
modules/module-suspend-on-idle-symdef.h \
|
||||
modules/module-hal-detect-symdef.h \
|
||||
modules/module-udev-detect-symdef.h \
|
||||
modules/bluetooth/module-bluetooth-proximity-symdef.h \
|
||||
modules/bluetooth/module-bluetooth-discover-symdef.h \
|
||||
modules/bluetooth/module-bluetooth-device-symdef.h \
|
||||
modules/module-raop-sink-symdef.h \
|
||||
modules/module-raop-discover-symdef.h \
|
||||
modules/raop/module-raop-sink-symdef.h \
|
||||
modules/raop/module-raop-discover-symdef.h \
|
||||
modules/gconf/module-gconf-symdef.h \
|
||||
modules/module-position-event-sounds-symdef.h \
|
||||
modules/module-augment-properties-symdef.h \
|
||||
|
|
@ -1152,7 +1246,7 @@ module_simple_protocol_unix_la_LIBADD = $(AM_LIBADD) libpulsecore-@PA_MAJORMINOR
|
|||
|
||||
module_cli_la_SOURCES = modules/module-cli.c
|
||||
module_cli_la_LDFLAGS = $(MODULE_LDFLAGS)
|
||||
module_cli_la_LIBADD = $(AM_LIBADD) libpulsecore-@PA_MAJORMINORMICRO@.la libcli.la
|
||||
module_cli_la_LIBADD = $(AM_LIBADD) libpulsecore-@PA_MAJORMINORMICRO@.la libcli.la libpulsecommon-@PA_MAJORMINORMICRO@.la libpulse.la
|
||||
|
||||
module_cli_protocol_tcp_la_SOURCES = modules/module-protocol-stub.c
|
||||
module_cli_protocol_tcp_la_CFLAGS = -DUSE_TCP_SOCKETS -DUSE_PROTOCOL_CLI $(AM_CFLAGS)
|
||||
|
|
@ -1271,22 +1365,22 @@ module_tunnel_source_la_LIBADD = $(AM_LIBADD) libpulsecore-@PA_MAJORMINORMICRO@.
|
|||
|
||||
# X11
|
||||
|
||||
module_x11_bell_la_SOURCES = modules/module-x11-bell.c
|
||||
module_x11_bell_la_SOURCES = modules/x11/module-x11-bell.c
|
||||
module_x11_bell_la_CFLAGS = $(AM_CFLAGS) $(X11_CFLAGS)
|
||||
module_x11_bell_la_LDFLAGS = $(MODULE_LDFLAGS)
|
||||
module_x11_bell_la_LIBADD = $(AM_LIBADD) $(X11_LIBS) libpulsecore-@PA_MAJORMINORMICRO@.la libpulsecommon-@PA_MAJORMINORMICRO@.la libpulse.la
|
||||
|
||||
module_x11_publish_la_SOURCES = modules/module-x11-publish.c
|
||||
module_x11_publish_la_SOURCES = modules/x11/module-x11-publish.c
|
||||
module_x11_publish_la_CFLAGS = $(AM_CFLAGS) $(X11_CFLAGS)
|
||||
module_x11_publish_la_LDFLAGS = $(MODULE_LDFLAGS)
|
||||
module_x11_publish_la_LIBADD = $(AM_LIBADD) $(X11_LIBS) libprotocol-native.la libpulsecore-@PA_MAJORMINORMICRO@.la libpulsecommon-@PA_MAJORMINORMICRO@.la libpulse.la
|
||||
|
||||
module_x11_xsmp_la_SOURCES = modules/module-x11-xsmp.c
|
||||
module_x11_xsmp_la_SOURCES = modules/x11/module-x11-xsmp.c
|
||||
module_x11_xsmp_la_CFLAGS = $(AM_CFLAGS) $(X11_CFLAGS)
|
||||
module_x11_xsmp_la_LDFLAGS = $(MODULE_LDFLAGS)
|
||||
module_x11_xsmp_la_LIBADD = $(AM_LIBADD) $(X11_LIBS) libpulsecore-@PA_MAJORMINORMICRO@.la libpulsecommon-@PA_MAJORMINORMICRO@.la libpulse.la
|
||||
|
||||
module_x11_cork_request_la_SOURCES = modules/module-x11-cork-request.c
|
||||
module_x11_cork_request_la_SOURCES = modules/x11/module-x11-cork-request.c
|
||||
module_x11_cork_request_la_CFLAGS = $(AM_CFLAGS) $(X11_CFLAGS)
|
||||
module_x11_cork_request_la_LDFLAGS = $(MODULE_LDFLAGS)
|
||||
module_x11_cork_request_la_LIBADD = $(AM_LIBADD) $(X11_LIBS) libpulsecore-@PA_MAJORMINORMICRO@.la libpulsecommon-@PA_MAJORMINORMICRO@.la libpulse.la
|
||||
|
|
@ -1303,7 +1397,7 @@ module_oss_la_LIBADD = $(AM_LIBADD) liboss-util.la libpulsecore-@PA_MAJORMINORMI
|
|||
|
||||
# ALSA
|
||||
|
||||
libalsa_util_la_SOURCES = modules/alsa/alsa-util.c modules/alsa/alsa-util.h modules/alsa/alsa-sink.c modules/alsa/alsa-sink.h modules/alsa/alsa-source.c modules/alsa/alsa-source.h
|
||||
libalsa_util_la_SOURCES = modules/alsa/alsa-util.c modules/alsa/alsa-util.h modules/alsa/alsa-mixer.c modules/alsa/alsa-mixer.h modules/alsa/alsa-sink.c modules/alsa/alsa-sink.h modules/alsa/alsa-source.c modules/alsa/alsa-source.h modules/reserve-wrap.c modules/reserve-wrap.h
|
||||
libalsa_util_la_LDFLAGS = -avoid-version
|
||||
libalsa_util_la_LIBADD = $(AM_LIBADD) $(ASOUNDLIB_LIBS) libpulsecore-@PA_MAJORMINORMICRO@.la libpulsecommon-@PA_MAJORMINORMICRO@.la libpulse.la
|
||||
libalsa_util_la_CFLAGS = $(AM_CFLAGS) $(ASOUNDLIB_CFLAGS)
|
||||
|
|
@ -1321,8 +1415,8 @@ libalsa_util_la_CFLAGS += $(UDEV_CFLAGS)
|
|||
endif
|
||||
|
||||
if HAVE_DBUS
|
||||
libalsa_util_la_SOURCES += modules/reserve.h modules/reserve.c modules/reserve-wrap.c modules/reserve-wrap.h
|
||||
libalsa_util_la_LIBADD += $(DBUS_LIBS) libdbus-util.la
|
||||
libalsa_util_la_SOURCES += modules/reserve.h modules/reserve.c modules/reserve-monitor.h modules/reserve-monitor.c
|
||||
libalsa_util_la_LIBADD += $(DBUS_LIBS)
|
||||
libalsa_util_la_CFLAGS += $(DBUS_CFLAGS)
|
||||
endif
|
||||
|
||||
|
|
@ -1351,7 +1445,7 @@ module_solaris_la_LIBADD = $(AM_LIBADD) libpulsecore-@PA_MAJORMINORMICRO@.la lib
|
|||
|
||||
module_zeroconf_publish_la_SOURCES = modules/module-zeroconf-publish.c
|
||||
module_zeroconf_publish_la_LDFLAGS = $(MODULE_LDFLAGS)
|
||||
module_zeroconf_publish_la_LIBADD = $(AM_LIBADD) $(AVAHI_LIBS) libavahi-wrap.la libpulsecore-@PA_MAJORMINORMICRO@.la libpulsecommon-@PA_MAJORMINORMICRO@.la libpulse.la
|
||||
module_zeroconf_publish_la_LIBADD = $(AM_LIBADD) $(AVAHI_LIBS) libavahi-wrap.la libprotocol-native.la libpulsecore-@PA_MAJORMINORMICRO@.la libpulsecommon-@PA_MAJORMINORMICRO@.la libpulse.la
|
||||
module_zeroconf_publish_la_CFLAGS = $(AM_CFLAGS) $(AVAHI_CFLAGS)
|
||||
|
||||
module_zeroconf_discover_la_SOURCES = modules/module-zeroconf-discover.c
|
||||
|
|
@ -1414,19 +1508,19 @@ module_cork_music_on_phone_la_CFLAGS = $(AM_CFLAGS)
|
|||
# Device volume/muted restore module
|
||||
module_device_restore_la_SOURCES = modules/module-device-restore.c
|
||||
module_device_restore_la_LDFLAGS = $(MODULE_LDFLAGS)
|
||||
module_device_restore_la_LIBADD = $(AM_LIBADD) libpulsecore-@PA_MAJORMINORMICRO@.la -lgdbm libpulsecommon-@PA_MAJORMINORMICRO@.la libpulse.la
|
||||
module_device_restore_la_LIBADD = $(AM_LIBADD) libpulsecore-@PA_MAJORMINORMICRO@.la libpulsecommon-@PA_MAJORMINORMICRO@.la libpulse.la
|
||||
module_device_restore_la_CFLAGS = $(AM_CFLAGS)
|
||||
|
||||
# Stream volume/muted/device restore module
|
||||
module_stream_restore_la_SOURCES = modules/module-stream-restore.c
|
||||
module_stream_restore_la_LDFLAGS = $(MODULE_LDFLAGS)
|
||||
module_stream_restore_la_LIBADD = $(AM_LIBADD) libprotocol-native.la libpulsecore-@PA_MAJORMINORMICRO@.la -lgdbm libpulsecommon-@PA_MAJORMINORMICRO@.la libpulse.la
|
||||
module_stream_restore_la_LIBADD = $(AM_LIBADD) libprotocol-native.la libpulsecore-@PA_MAJORMINORMICRO@.la libpulsecommon-@PA_MAJORMINORMICRO@.la libpulse.la
|
||||
module_stream_restore_la_CFLAGS = $(AM_CFLAGS)
|
||||
|
||||
# Card profile restore module
|
||||
module_card_restore_la_SOURCES = modules/module-card-restore.c
|
||||
module_card_restore_la_LDFLAGS = $(MODULE_LDFLAGS)
|
||||
module_card_restore_la_LIBADD = $(AM_LIBADD) libpulsecore-@PA_MAJORMINORMICRO@.la -lgdbm libpulsecommon-@PA_MAJORMINORMICRO@.la libpulse.la
|
||||
module_card_restore_la_LIBADD = $(AM_LIBADD) libpulsecore-@PA_MAJORMINORMICRO@.la libpulsecommon-@PA_MAJORMINORMICRO@.la libpulse.la
|
||||
module_card_restore_la_CFLAGS = $(AM_CFLAGS)
|
||||
|
||||
# Default sink/source restore module
|
||||
|
|
@ -1447,6 +1541,12 @@ module_rescue_streams_la_LDFLAGS = $(MODULE_LDFLAGS)
|
|||
module_rescue_streams_la_LIBADD = $(AM_LIBADD) libpulsecore-@PA_MAJORMINORMICRO@.la libpulsecommon-@PA_MAJORMINORMICRO@.la libpulse.la
|
||||
module_rescue_streams_la_CFLAGS = $(AM_CFLAGS)
|
||||
|
||||
# Automatically move streams to devices that are intended for their roles
|
||||
module_intended_roles_la_SOURCES = modules/module-intended-roles.c
|
||||
module_intended_roles_la_LDFLAGS = $(MODULE_LDFLAGS)
|
||||
module_intended_roles_la_LIBADD = $(AM_LIBADD) libpulsecore-@PA_MAJORMINORMICRO@.la libpulsecommon-@PA_MAJORMINORMICRO@.la libpulse.la
|
||||
module_intended_roles_la_CFLAGS = $(AM_CFLAGS)
|
||||
|
||||
# Suspend-on-idle module
|
||||
module_suspend_on_idle_la_SOURCES = modules/module-suspend-on-idle.c
|
||||
module_suspend_on_idle_la_LDFLAGS = $(MODULE_LDFLAGS)
|
||||
|
|
@ -1466,30 +1566,29 @@ module_rtp_recv_la_CFLAGS = $(AM_CFLAGS)
|
|||
|
||||
# JACK
|
||||
|
||||
module_jack_sink_la_SOURCES = modules/module-jack-sink.c
|
||||
module_jack_sink_la_SOURCES = modules/jack/module-jack-sink.c
|
||||
module_jack_sink_la_LDFLAGS = $(MODULE_LDFLAGS)
|
||||
module_jack_sink_la_LIBADD = $(AM_LIBADD) libpulsecore-@PA_MAJORMINORMICRO@.la $(JACK_LIBS) libpulsecommon-@PA_MAJORMINORMICRO@.la libpulse.la
|
||||
module_jack_sink_la_CFLAGS = $(AM_CFLAGS) $(JACK_CFLAGS)
|
||||
|
||||
module_jack_source_la_SOURCES = modules/module-jack-source.c
|
||||
module_jack_source_la_SOURCES = modules/jack/module-jack-source.c
|
||||
module_jack_source_la_LDFLAGS = $(MODULE_LDFLAGS)
|
||||
module_jack_source_la_LIBADD = $(AM_LIBADD) libpulsecore-@PA_MAJORMINORMICRO@.la $(JACK_LIBS) libpulsecommon-@PA_MAJORMINORMICRO@.la libpulse.la
|
||||
module_jack_source_la_CFLAGS = $(AM_CFLAGS) $(JACK_CFLAGS)
|
||||
|
||||
# HAL/D-Bus
|
||||
libdbus_util_la_SOURCES = modules/dbus-util.c modules/dbus-util.h
|
||||
libdbus_util_la_LDFLAGS = -avoid-version
|
||||
libdbus_util_la_LIBADD = $(AM_LIBADD) $(DBUS_LIBS) libpulsecore-@PA_MAJORMINORMICRO@.la libpulsecommon-@PA_MAJORMINORMICRO@.la libpulse.la
|
||||
libdbus_util_la_CFLAGS = $(AM_CFLAGS) $(DBUS_CFLAGS)
|
||||
|
||||
module_hal_detect_la_SOURCES = modules/module-hal-detect.c
|
||||
module_hal_detect_la_LDFLAGS = $(MODULE_LDFLAGS)
|
||||
module_hal_detect_la_LIBADD = $(AM_LIBADD) $(HAL_LIBS) libpulsecore-@PA_MAJORMINORMICRO@.la libdbus-util.la libpulsecommon-@PA_MAJORMINORMICRO@.la libpulse.la
|
||||
module_hal_detect_la_LIBADD = $(AM_LIBADD) $(HAL_LIBS) libpulsecore-@PA_MAJORMINORMICRO@.la libpulsecommon-@PA_MAJORMINORMICRO@.la libpulse.la
|
||||
module_hal_detect_la_CFLAGS = $(AM_CFLAGS) $(HAL_CFLAGS)
|
||||
|
||||
module_udev_detect_la_SOURCES = modules/module-udev-detect.c
|
||||
module_udev_detect_la_LDFLAGS = $(MODULE_LDFLAGS)
|
||||
module_udev_detect_la_LIBADD = $(AM_LIBADD) $(UDEV_LIBS) libpulsecore-@PA_MAJORMINORMICRO@.la libpulsecommon-@PA_MAJORMINORMICRO@.la libpulse.la
|
||||
module_udev_detect_la_CFLAGS = $(AM_CFLAGS) $(UDEV_CFLAGS)
|
||||
|
||||
module_console_kit_la_SOURCES = modules/module-console-kit.c
|
||||
module_console_kit_la_LDFLAGS = $(MODULE_LDFLAGS)
|
||||
module_console_kit_la_LIBADD = $(AM_LIBADD) $(DBUS_LIBS) libpulsecore-@PA_MAJORMINORMICRO@.la libdbus-util.la libpulsecommon-@PA_MAJORMINORMICRO@.la libpulse.la
|
||||
module_console_kit_la_LIBADD = $(AM_LIBADD) $(DBUS_LIBS) libpulsecore-@PA_MAJORMINORMICRO@.la libpulsecommon-@PA_MAJORMINORMICRO@.la libpulse.la
|
||||
module_console_kit_la_CFLAGS = $(AM_CFLAGS) $(DBUS_CFLAGS)
|
||||
|
||||
# GConf support
|
||||
|
|
@ -1506,7 +1605,7 @@ gconf_helper_LDFLAGS = $(AM_LDFLAGS) $(BINLDFLAGS)
|
|||
# Bluetooth proximity
|
||||
module_bluetooth_proximity_la_SOURCES = modules/bluetooth/module-bluetooth-proximity.c
|
||||
module_bluetooth_proximity_la_LDFLAGS = $(MODULE_LDFLAGS)
|
||||
module_bluetooth_proximity_la_LIBADD = $(AM_LIBADD) $(DBUS_LIBS) libpulsecore-@PA_MAJORMINORMICRO@.la libdbus-util.la libpulsecommon-@PA_MAJORMINORMICRO@.la libpulse.la
|
||||
module_bluetooth_proximity_la_LIBADD = $(AM_LIBADD) $(DBUS_LIBS) libpulsecore-@PA_MAJORMINORMICRO@.la libpulsecommon-@PA_MAJORMINORMICRO@.la libpulse.la
|
||||
module_bluetooth_proximity_la_CFLAGS = $(AM_CFLAGS) $(DBUS_CFLAGS) -DPA_BT_PROXIMITY_HELPER=\"$(pulselibexecdir)/proximity-helper\"
|
||||
|
||||
proximity_helper_SOURCES = modules/bluetooth/proximity-helper.c
|
||||
|
|
@ -1517,7 +1616,7 @@ proximity_helper_LDFLAGS = $(AM_LDFLAGS) $(BINLDFLAGS)
|
|||
# Bluetooth sink / source
|
||||
module_bluetooth_discover_la_SOURCES = modules/bluetooth/module-bluetooth-discover.c
|
||||
module_bluetooth_discover_la_LDFLAGS = $(MODULE_LDFLAGS)
|
||||
module_bluetooth_discover_la_LIBADD = $(AM_LIBADD) $(DBUS_LIBS) libpulsecore-@PA_MAJORMINORMICRO@.la libdbus-util.la libbluetooth-util.la libpulsecommon-@PA_MAJORMINORMICRO@.la libpulse.la
|
||||
module_bluetooth_discover_la_LIBADD = $(AM_LIBADD) $(DBUS_LIBS) libpulsecore-@PA_MAJORMINORMICRO@.la libbluetooth-util.la libpulsecommon-@PA_MAJORMINORMICRO@.la libpulse.la
|
||||
module_bluetooth_discover_la_CFLAGS = $(AM_CFLAGS) $(DBUS_CFLAGS)
|
||||
|
||||
libbluetooth_sbc_la_SOURCES = modules/bluetooth/sbc.c modules/bluetooth/sbc.h modules/bluetooth/sbc_tables.h modules/bluetooth/sbc_math.h modules/bluetooth/sbc_primitives.h modules/bluetooth/sbc_primitives.c modules/bluetooth/sbc_primitives_mmx.h modules/bluetooth/sbc_primitives_neon.h modules/bluetooth/sbc_primitives_mmx.c modules/bluetooth/sbc_primitives_neon.c
|
||||
|
|
@ -1534,34 +1633,35 @@ BLUETOOTH_IPC_FILES = $(subst modules/bluetooth/,,$(libbluetooth_ipc_la_SOURCES)
|
|||
|
||||
libbluetooth_util_la_SOURCES = modules/bluetooth/bluetooth-util.c modules/bluetooth/bluetooth-util.h
|
||||
libbluetooth_util_la_LDFLAGS = -avoid-version
|
||||
libbluetooth_util_la_LIBADD = $(AM_LIBADD) $(DBUS_LIBS) libpulsecore-@PA_MAJORMINORMICRO@.la libpulsecommon-@PA_MAJORMINORMICRO@.la libpulse.la libdbus-util.la
|
||||
libbluetooth_util_la_LIBADD = $(AM_LIBADD) $(DBUS_LIBS) libpulsecore-@PA_MAJORMINORMICRO@.la libpulsecommon-@PA_MAJORMINORMICRO@.la libpulse.la
|
||||
libbluetooth_util_la_CFLAGS = $(AM_CFLAGS) $(DBUS_CFLAGS)
|
||||
|
||||
module_bluetooth_device_la_SOURCES = modules/bluetooth/module-bluetooth-device.c modules/bluetooth/rtp.h
|
||||
module_bluetooth_device_la_LDFLAGS = $(MODULE_LDFLAGS)
|
||||
module_bluetooth_device_la_LIBADD = $(AM_LIBADD) $(DBUS_LIBS) libpulsecore-@PA_MAJORMINORMICRO@.la libdbus-util.la libbluetooth-util.la libbluetooth-ipc.la libbluetooth-sbc.la libpulsecommon-@PA_MAJORMINORMICRO@.la libpulse.la
|
||||
module_bluetooth_device_la_LIBADD = $(AM_LIBADD) $(DBUS_LIBS) libpulsecore-@PA_MAJORMINORMICRO@.la libbluetooth-util.la libbluetooth-ipc.la libbluetooth-sbc.la libpulsecommon-@PA_MAJORMINORMICRO@.la libpulse.la
|
||||
module_bluetooth_device_la_CFLAGS = $(AM_CFLAGS) $(DBUS_CFLAGS)
|
||||
|
||||
# Apple Airtunes/RAOP
|
||||
module_raop_sink_la_SOURCES = modules/module-raop-sink.c
|
||||
module_raop_sink_la_SOURCES = modules/raop/module-raop-sink.c
|
||||
module_raop_sink_la_LDFLAGS = $(MODULE_LDFLAGS)
|
||||
module_raop_sink_la_LIBADD = $(AM_LIBADD) libpulsecore-@PA_MAJORMINORMICRO@.la librtp.la libraop.la libpulsecommon-@PA_MAJORMINORMICRO@.la libpulse.la
|
||||
|
||||
module_raop_discover_la_SOURCES = modules/module-raop-discover.c
|
||||
module_raop_discover_la_SOURCES = modules/raop/module-raop-discover.c
|
||||
module_raop_discover_la_LDFLAGS = $(MODULE_LDFLAGS)
|
||||
module_raop_discover_la_LIBADD = $(AM_LIBADD) $(AVAHI_LIBS) libavahi-wrap.la libpulsecore-@PA_MAJORMINORMICRO@.la libpulsecommon-@PA_MAJORMINORMICRO@.la libpulse.la
|
||||
module_raop_discover_la_CFLAGS = $(AM_CFLAGS) $(AVAHI_CFLAGS)
|
||||
|
||||
# Rygel
|
||||
module_rygel_media_server_la_SOURCES = modules/module-rygel-media-server.c
|
||||
module_rygel_media_server_la_LDFLAGS = $(MODULE_LDFLAGS)
|
||||
module_rygel_media_server_la_LIBADD = $(AM_LIBADD) $(DBUS_LIBS) libpulsecore-@PA_MAJORMINORMICRO@.la libpulsecommon-@PA_MAJORMINORMICRO@.la libpulse.la libprotocol-http.la
|
||||
module_rygel_media_server_la_CFLAGS = $(AM_CFLAGS) $(DBUS_CFLAGS)
|
||||
|
||||
###################################
|
||||
# Some minor stuff #
|
||||
###################################
|
||||
|
||||
suid: pulseaudio .libs/lt-pulseaudio
|
||||
chown root $^
|
||||
chmod u+s $^
|
||||
|
||||
CLEANFILES = esdcompat client.conf default.pa system.pa daemon.conf start-pulseaudio-x11 daemon/pulseaudio.desktop daemon/org.pulseaudio.policy
|
||||
CLEANFILES = esdcompat client.conf default.pa system.pa daemon.conf start-pulseaudio-x11 daemon/pulseaudio.desktop
|
||||
|
||||
esdcompat: daemon/esdcompat.in Makefile
|
||||
sed -e 's,@PACKAGE_VERSION\@,$(PACKAGE_VERSION),g' \
|
||||
|
|
@ -1599,14 +1699,19 @@ daemon.conf: daemon/daemon.conf.in Makefile
|
|||
|
||||
install-exec-hook:
|
||||
chown root $(DESTDIR)$(bindir)/pulseaudio ; true
|
||||
chmod u+s $(DESTDIR)$(bindir)/pulseaudio
|
||||
-chmod u+s $(DESTDIR)$(pulselibexecdir)/proximity-helper
|
||||
ln -sf pacat $(DESTDIR)$(bindir)/parec
|
||||
ln -sf pacat $(DESTDIR)$(bindir)/pamon
|
||||
ln -sf pacat $(DESTDIR)$(bindir)/paplay
|
||||
ln -sf pacat $(DESTDIR)$(bindir)/parecord
|
||||
rm -f $(DESTDIR)$(libdir)/libpulsedsp.la
|
||||
rm -f $(DESTDIR)$(modlibexecdir)/*.la
|
||||
|
||||
uninstall-hook:
|
||||
rm -f $(DESTDIR)$(bindir)/parec
|
||||
rm -f $(DESTDIR)$(bindir)/pamon
|
||||
rm -f $(DESTDIR)$(bindir)/paplay
|
||||
rm -f $(DESTDIR)$(bindir)/parecord
|
||||
rm -f $(DESTDIR)$(libdir)/libpulsedsp.*
|
||||
rm -f $(DESTDIR)$(modlibexecdir)/*.so
|
||||
|
||||
|
|
@ -1628,10 +1733,15 @@ update-sbc:
|
|||
done
|
||||
|
||||
update-reserve:
|
||||
for i in reserve.c reserve.h ; do \
|
||||
for i in reserve.c reserve.h reserve-monitor.c reserve-monitor.h ; do \
|
||||
wget -O modules/$$i http://git.0pointer.de/\?p=reserve.git\;a=blob_plain\;f=$$i\;hb=master ; \
|
||||
done
|
||||
|
||||
update-rtkit:
|
||||
for i in rtkit.c rtkit.h ; do \
|
||||
wget -O pulsecore/$$i http://git.0pointer.de/\?p=rtkit.git\;a=blob_plain\;f=$$i\;hb=master ; \
|
||||
done
|
||||
|
||||
# Automatically generate linker version script. We use the same one for all public .sos
|
||||
update-map-file:
|
||||
( echo "PULSE_0 {" ; \
|
||||
|
|
|
|||
|
|
@ -39,6 +39,7 @@
|
|||
#ifdef HAVE_SYS_CAPABILITY_H
|
||||
#include <sys/capability.h>
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_SYS_PRCTL_H
|
||||
#include <sys/prctl.h>
|
||||
#endif
|
||||
|
|
@ -51,12 +52,13 @@ int setresgid(gid_t r, gid_t e, gid_t s);
|
|||
int setresuid(uid_t r, uid_t e, uid_t s);
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_GETUID
|
||||
|
||||
/* Drop root rights when called SUID root */
|
||||
void pa_drop_root(void) {
|
||||
uid_t uid = getuid();
|
||||
|
||||
#ifdef HAVE_GETUID
|
||||
uid_t uid;
|
||||
|
||||
uid = getuid();
|
||||
if (uid == 0 || geteuid() != 0)
|
||||
return;
|
||||
|
||||
|
|
@ -73,90 +75,19 @@ void pa_drop_root(void) {
|
|||
|
||||
pa_assert_se(getuid() == uid);
|
||||
pa_assert_se(geteuid() == uid);
|
||||
}
|
||||
|
||||
#else
|
||||
|
||||
void pa_drop_root(void) {
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
#if defined(HAVE_SYS_CAPABILITY_H) && defined(HAVE_SYS_PRCTL_H)
|
||||
|
||||
/* Limit permitted capabilities set to CAPSYS_NICE */
|
||||
void pa_limit_caps(void) {
|
||||
cap_t caps;
|
||||
cap_value_t nice_cap = CAP_SYS_NICE;
|
||||
|
||||
pa_assert_se(caps = cap_init());
|
||||
pa_assert_se(cap_clear(caps) == 0);
|
||||
pa_assert_se(cap_set_flag(caps, CAP_EFFECTIVE, 1, &nice_cap, CAP_SET) == 0);
|
||||
pa_assert_se(cap_set_flag(caps, CAP_PERMITTED, 1, &nice_cap, CAP_SET) == 0);
|
||||
|
||||
if (cap_set_proc(caps) < 0)
|
||||
/* Hmm, so we couldn't limit our caps, which probably means we
|
||||
* hadn't any in the first place, so let's just make sure of
|
||||
* that */
|
||||
pa_drop_caps();
|
||||
else
|
||||
pa_log_info(_("Limited capabilities successfully to CAP_SYS_NICE."));
|
||||
|
||||
pa_assert_se(cap_free(caps) == 0);
|
||||
|
||||
pa_assert_se(prctl(PR_SET_KEEPCAPS, 1, 0, 0, 0) == 0);
|
||||
}
|
||||
|
||||
/* Drop all capabilities, effectively becoming a normal user */
|
||||
void pa_drop_caps(void) {
|
||||
cap_t caps;
|
||||
|
||||
#ifndef __OPTIMIZE__
|
||||
/* Valgrind doesn't not know set_caps, so we bypass it here -- but
|
||||
* only in development builds.*/
|
||||
|
||||
if (pa_in_valgrind() && !pa_have_caps())
|
||||
return;
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_SYS_PRCTL_H
|
||||
pa_assert_se(prctl(PR_SET_KEEPCAPS, 0, 0, 0, 0) == 0);
|
||||
|
||||
pa_assert_se(caps = cap_init());
|
||||
pa_assert_se(cap_clear(caps) == 0);
|
||||
pa_assert_se(cap_set_proc(caps) == 0);
|
||||
pa_assert_se(cap_free(caps) == 0);
|
||||
|
||||
pa_assert_se(!pa_have_caps());
|
||||
}
|
||||
|
||||
pa_bool_t pa_have_caps(void) {
|
||||
cap_t caps;
|
||||
cap_flag_value_t flag = CAP_CLEAR;
|
||||
|
||||
#ifdef __OPTIMIZE__
|
||||
pa_assert_se(caps = cap_get_proc());
|
||||
#else
|
||||
if (!(caps = cap_get_proc()))
|
||||
return FALSE;
|
||||
#endif
|
||||
pa_assert_se(cap_get_flag(caps, CAP_SYS_NICE, CAP_EFFECTIVE, &flag) >= 0);
|
||||
pa_assert_se(cap_free(caps) == 0);
|
||||
|
||||
return flag == CAP_SET;
|
||||
}
|
||||
|
||||
#else
|
||||
|
||||
/* NOOPs in case capabilities are not available. */
|
||||
void pa_limit_caps(void) {
|
||||
}
|
||||
|
||||
void pa_drop_caps(void) {
|
||||
pa_drop_root();
|
||||
}
|
||||
|
||||
pa_bool_t pa_have_caps(void) {
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
#ifdef HAVE_SYS_CAPABILITY_H
|
||||
{
|
||||
cap_t caps;
|
||||
pa_assert_se(caps = cap_init());
|
||||
pa_assert_se(cap_clear(caps) == 0);
|
||||
pa_assert_se(cap_set_proc(caps) == 0);
|
||||
pa_assert_se(cap_free(caps) == 0);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
|
|
|||
|
|
@ -25,8 +25,5 @@
|
|||
#include <pulsecore/macro.h>
|
||||
|
||||
void pa_drop_root(void);
|
||||
void pa_drop_caps(void);
|
||||
void pa_limit_caps(void);
|
||||
pa_bool_t pa_have_caps(void);
|
||||
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -31,6 +31,7 @@
|
|||
|
||||
#include <pulse/xmalloc.h>
|
||||
#include <pulse/i18n.h>
|
||||
#include <pulse/util.h>
|
||||
|
||||
#include <pulsecore/core-util.h>
|
||||
#include <pulsecore/strbuf.h>
|
||||
|
|
@ -109,15 +110,8 @@ static const struct option long_options[] = {
|
|||
};
|
||||
|
||||
void pa_cmdline_help(const char *argv0) {
|
||||
const char *e;
|
||||
|
||||
pa_assert(argv0);
|
||||
|
||||
if ((e = strrchr(argv0, '/')))
|
||||
e++;
|
||||
else
|
||||
e = argv0;
|
||||
|
||||
printf(_("%s [options]\n\n"
|
||||
"COMMANDS:\n"
|
||||
" -h, --help Show this help\n"
|
||||
|
|
@ -172,7 +166,8 @@ void pa_cmdline_help(const char *argv0) {
|
|||
" -C Open a command line on the running TTY\n"
|
||||
" after startup\n\n"
|
||||
|
||||
" -n Don't load default script file\n"), e);
|
||||
" -n Don't load default script file\n"),
|
||||
pa_path_get_filename(argv0));
|
||||
}
|
||||
|
||||
int pa_cmdline_parse(pa_daemon_conf *conf, int argc, char *const argv [], int *d) {
|
||||
|
|
|
|||
|
|
@ -24,13 +24,14 @@
|
|||
#endif
|
||||
|
||||
#include <pulse/error.h>
|
||||
#include <pulse/rtclock.h>
|
||||
#include <pulse/timeval.h>
|
||||
|
||||
#include <pulsecore/core-rtclock.h>
|
||||
#include <pulsecore/core-util.h>
|
||||
#include <pulsecore/core-error.h>
|
||||
#include <pulsecore/log.h>
|
||||
#include <pulsecore/macro.h>
|
||||
#include <pulsecore/rtclock.h>
|
||||
|
||||
#include "cpulimit.h"
|
||||
|
||||
|
|
@ -125,7 +126,7 @@ static void signal_handler(int sig) {
|
|||
char t[256];
|
||||
#endif
|
||||
|
||||
now = pa_rtclock_usec();
|
||||
now = pa_rtclock_now();
|
||||
elapsed = now - last_time;
|
||||
|
||||
#ifdef PRINT_CPU_LOAD
|
||||
|
|
@ -139,7 +140,7 @@ static void signal_handler(int sig) {
|
|||
write_err("Soft CPU time limit exhausted, terminating.\n");
|
||||
|
||||
/* Try a soft cleanup */
|
||||
write(the_pipe[1], &c, sizeof(c));
|
||||
(void) write(the_pipe[1], &c, sizeof(c));
|
||||
phase = PHASE_SOFT;
|
||||
reset_cpu_time(CPUTIME_INTERVAL_HARD);
|
||||
|
||||
|
|
@ -184,7 +185,7 @@ int pa_cpu_limit_init(pa_mainloop_api *m) {
|
|||
pa_assert(the_pipe[1] == -1);
|
||||
pa_assert(!installed);
|
||||
|
||||
last_time = pa_rtclock_usec();
|
||||
last_time = pa_rtclock_now();
|
||||
|
||||
/* Prepare the main loop pipe */
|
||||
if (pipe(the_pipe) < 0) {
|
||||
|
|
|
|||
|
|
@ -60,7 +60,7 @@ static const pa_daemon_conf default_conf = {
|
|||
.fail = TRUE,
|
||||
.high_priority = TRUE,
|
||||
.nice_level = -11,
|
||||
.realtime_scheduling = FALSE,
|
||||
.realtime_scheduling = TRUE,
|
||||
.realtime_priority = 5, /* Half of JACK's default rtprio */
|
||||
.disallow_module_loading = FALSE,
|
||||
.disallow_exit = FALSE,
|
||||
|
|
@ -85,6 +85,7 @@ static const pa_daemon_conf default_conf = {
|
|||
.system_instance = FALSE,
|
||||
.no_cpu_limit = FALSE,
|
||||
.disable_shm = FALSE,
|
||||
.lock_memory = FALSE,
|
||||
.default_n_fragments = 4,
|
||||
.default_fragment_size_msec = 25,
|
||||
.default_sample_spec = { .format = PA_SAMPLE_S16NE, .rate = 44100, .channels = 2 },
|
||||
|
|
@ -446,6 +447,7 @@ int pa_daemon_conf_load(pa_daemon_conf *c, const char *filename) {
|
|||
{ "no-cpu-limit", pa_config_parse_bool, &c->no_cpu_limit, NULL },
|
||||
{ "disable-shm", pa_config_parse_bool, &c->disable_shm, NULL },
|
||||
{ "flat-volumes", pa_config_parse_bool, &c->flat_volumes, NULL },
|
||||
{ "lock-memory", pa_config_parse_bool, &c->lock_memory, NULL },
|
||||
{ "exit-idle-time", pa_config_parse_int, &c->exit_idle_time, NULL },
|
||||
{ "scache-idle-time", pa_config_parse_int, &c->scache_idle_time, NULL },
|
||||
{ "realtime-priority", parse_rtprio, c, NULL },
|
||||
|
|
@ -595,16 +597,14 @@ FILE *pa_daemon_conf_open_default_script_file(pa_daemon_conf *c) {
|
|||
return f;
|
||||
}
|
||||
|
||||
|
||||
static const char* const log_level_to_string[] = {
|
||||
[PA_LOG_DEBUG] = "debug",
|
||||
[PA_LOG_INFO] = "info",
|
||||
[PA_LOG_NOTICE] = "notice",
|
||||
[PA_LOG_WARN] = "warning",
|
||||
[PA_LOG_ERROR] = "error"
|
||||
};
|
||||
|
||||
char *pa_daemon_conf_dump(pa_daemon_conf *c) {
|
||||
static const char* const log_level_to_string[] = {
|
||||
[PA_LOG_DEBUG] = "debug",
|
||||
[PA_LOG_INFO] = "info",
|
||||
[PA_LOG_NOTICE] = "notice",
|
||||
[PA_LOG_WARN] = "warning",
|
||||
[PA_LOG_ERROR] = "error"
|
||||
};
|
||||
pa_strbuf *s;
|
||||
char cm[PA_CHANNEL_MAP_SNPRINT_MAX];
|
||||
|
||||
|
|
@ -630,6 +630,7 @@ char *pa_daemon_conf_dump(pa_daemon_conf *c) {
|
|||
pa_strbuf_printf(s, "no-cpu-limit = %s\n", pa_yes_no(c->no_cpu_limit));
|
||||
pa_strbuf_printf(s, "disable-shm = %s\n", pa_yes_no(c->disable_shm));
|
||||
pa_strbuf_printf(s, "flat-volumes = %s\n", pa_yes_no(c->flat_volumes));
|
||||
pa_strbuf_printf(s, "lock-memory = %s\n", pa_yes_no(c->lock_memory));
|
||||
pa_strbuf_printf(s, "exit-idle-time = %i\n", c->exit_idle_time);
|
||||
pa_strbuf_printf(s, "scache-idle-time = %i\n", c->scache_idle_time);
|
||||
pa_strbuf_printf(s, "dl-search-path = %s\n", pa_strempty(c->dl_search_path));
|
||||
|
|
|
|||
|
|
@ -73,7 +73,8 @@ typedef struct pa_daemon_conf {
|
|||
disallow_exit,
|
||||
log_meta,
|
||||
log_time,
|
||||
flat_volumes;
|
||||
flat_volumes,
|
||||
lock_memory;
|
||||
int exit_idle_time,
|
||||
scache_idle_time,
|
||||
auto_log_target,
|
||||
|
|
|
|||
|
|
@ -27,15 +27,16 @@
|
|||
; system-instance = no
|
||||
; disable-shm = no
|
||||
; shm-size-bytes = 0 # setting this 0 will use the system-default, usually 64 MiB
|
||||
; lock-memory = no
|
||||
; no-cpu-limit = no
|
||||
|
||||
; high-priority = yes
|
||||
; nice-level = -11
|
||||
|
||||
; realtime-scheduling = no
|
||||
; realtime-scheduling = yes
|
||||
; realtime-priority = 5
|
||||
|
||||
; exit-idle-time = 20
|
||||
; module-idle-time = 20
|
||||
; scache-idle-time = 20
|
||||
|
||||
; dl-search-path = (depends on architecture)
|
||||
|
|
@ -55,8 +56,6 @@
|
|||
|
||||
; flat-volumes = yes
|
||||
|
||||
; no-cpu-limit = no
|
||||
|
||||
; rlimit-fsize = -1
|
||||
; rlimit-data = -1
|
||||
; rlimit-stack = -1
|
||||
|
|
|
|||
|
|
@ -49,18 +49,18 @@ load-module module-augment-properties
|
|||
#load-module module-pipe-sink
|
||||
|
||||
### Automatically load driver modules depending on the hardware available
|
||||
.ifexists module-hal-detect@PA_SOEXT@
|
||||
load-module module-hal-detect
|
||||
.ifexists module-udev-detect@PA_SOEXT@
|
||||
load-module module-udev-detect
|
||||
.else
|
||||
### Alternatively use the static hardware detection module (for systems that
|
||||
### lack HAL support)
|
||||
### lack udev support)
|
||||
load-module module-detect
|
||||
.endif
|
||||
|
||||
### Automatically load driver modules for Bluetooth hardware
|
||||
#.ifexists module-bluetooth-discover@PA_SOEXT@
|
||||
#load-module module-bluetooth-discover
|
||||
#.endif
|
||||
.ifexists module-bluetooth-discover@PA_SOEXT@
|
||||
load-module module-bluetooth-discover
|
||||
.endif
|
||||
|
||||
### Load several protocols
|
||||
.ifexists module-esound-protocol-unix@PA_SOEXT@
|
||||
|
|
@ -100,6 +100,9 @@ load-module module-rescue-streams
|
|||
### Make sure we always have a sink around, even if it is a null sink.
|
||||
load-module module-always-sink
|
||||
|
||||
### Honour intended role device property
|
||||
load-module module-intended-roles
|
||||
|
||||
### Automatically suspend sinks/sources that become idle for too long
|
||||
load-module module-suspend-on-idle
|
||||
|
||||
|
|
|
|||
|
|
@ -71,6 +71,8 @@ static void long_info(const char *name, const char *path, pa_modinfo *i) {
|
|||
if (i->usage)
|
||||
printf(_("Usage: %s\n"), i->usage);
|
||||
printf(_("Load Once: %s\n"), pa_yes_no(i->load_once));
|
||||
if (i->deprecated)
|
||||
printf(_("DEPRECATION WARNING: %s\n"), i->deprecated);
|
||||
}
|
||||
|
||||
if (path)
|
||||
|
|
|
|||
|
|
@ -37,9 +37,14 @@
|
|||
#include <unistd.h>
|
||||
#include <locale.h>
|
||||
#include <sys/types.h>
|
||||
#include <sys/stat.h>
|
||||
|
||||
#include <liboil/liboil.h>
|
||||
|
||||
#ifdef HAVE_SYS_MMAN_H
|
||||
#include <sys/mman.h>
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_SYS_IOCTL_H
|
||||
#include <sys/ioctl.h>
|
||||
#endif
|
||||
|
|
@ -69,6 +74,7 @@
|
|||
#include <pulsecore/lock-autospawn.h>
|
||||
#include <pulsecore/winsock.h>
|
||||
#include <pulsecore/core-error.h>
|
||||
#include <pulsecore/core-rtclock.h>
|
||||
#include <pulsecore/core.h>
|
||||
#include <pulsecore/memblock.h>
|
||||
#include <pulsecore/module.h>
|
||||
|
|
@ -80,13 +86,15 @@
|
|||
#include <pulsecore/pid.h>
|
||||
#include <pulsecore/namereg.h>
|
||||
#include <pulsecore/random.h>
|
||||
#include <pulsecore/rtsig.h>
|
||||
#include <pulsecore/rtclock.h>
|
||||
#include <pulsecore/macro.h>
|
||||
#include <pulsecore/mutex.h>
|
||||
#include <pulsecore/thread.h>
|
||||
#include <pulsecore/once.h>
|
||||
#include <pulsecore/shm.h>
|
||||
#include <pulsecore/memtrap.h>
|
||||
#ifdef HAVE_DBUS
|
||||
#include <pulsecore/dbus-shared.h>
|
||||
#endif
|
||||
|
||||
#include "cmdline.h"
|
||||
#include "cpulimit.h"
|
||||
|
|
@ -94,7 +102,6 @@
|
|||
#include "dumpmodules.h"
|
||||
#include "caps.h"
|
||||
#include "ltdl-bind-now.h"
|
||||
#include "polkit.h"
|
||||
|
||||
#ifdef HAVE_LIBWRAP
|
||||
/* Only one instance of these variables */
|
||||
|
|
@ -125,7 +132,7 @@ static void message_cb(pa_mainloop_api*a, pa_time_event*e, const struct timeval
|
|||
}
|
||||
|
||||
pa_timeval_add(pa_gettimeofday(&tvnext), 100000);
|
||||
a->time_restart(e, &tvnext);
|
||||
a->rtclock_time_restart(e, &tvnext);
|
||||
}
|
||||
|
||||
#endif
|
||||
|
|
@ -330,6 +337,42 @@ static void set_all_rlimits(const pa_daemon_conf *conf) {
|
|||
}
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_DBUS
|
||||
static pa_dbus_connection *register_dbus(pa_core *c) {
|
||||
DBusError error;
|
||||
pa_dbus_connection *conn;
|
||||
|
||||
dbus_error_init(&error);
|
||||
|
||||
if (!(conn = pa_dbus_bus_get(c, pa_in_system_mode() ? DBUS_BUS_SYSTEM : DBUS_BUS_SESSION, &error)) || dbus_error_is_set(&error)) {
|
||||
pa_log_warn("Unable to contact D-Bus: %s: %s", error.name, error.message);
|
||||
goto fail;
|
||||
}
|
||||
|
||||
if (dbus_bus_request_name(pa_dbus_connection_get(conn), "org.pulseaudio.Server", DBUS_NAME_FLAG_DO_NOT_QUEUE, &error) == DBUS_REQUEST_NAME_REPLY_PRIMARY_OWNER) {
|
||||
pa_log_debug("Got org.pulseaudio.Server!");
|
||||
return conn;
|
||||
}
|
||||
|
||||
if (dbus_error_is_set(&error))
|
||||
pa_log_warn("Failed to acquire org.pulseaudio.Server: %s: %s", error.name, error.message);
|
||||
else
|
||||
pa_log_warn("D-Bus name org.pulseaudio.Server already taken. Weird shit!");
|
||||
|
||||
/* PA cannot be started twice by the same user and hence we can
|
||||
* ignore mostly the case that org.pulseaudio.Server is already
|
||||
* taken. */
|
||||
|
||||
fail:
|
||||
|
||||
if (conn)
|
||||
pa_dbus_connection_unref(conn);
|
||||
|
||||
dbus_error_free(&error);
|
||||
return NULL;
|
||||
}
|
||||
#endif
|
||||
|
||||
int main(int argc, char *argv[]) {
|
||||
pa_core *c = NULL;
|
||||
pa_strbuf *buf = NULL;
|
||||
|
|
@ -337,9 +380,7 @@ int main(int argc, char *argv[]) {
|
|||
pa_mainloop *mainloop = NULL;
|
||||
char *s;
|
||||
int r = 0, retval = 1, d = 0;
|
||||
pa_bool_t suid_root, real_root;
|
||||
pa_bool_t valid_pid_file = FALSE;
|
||||
gid_t gid = (gid_t) -1;
|
||||
pa_bool_t ltdl_init = FALSE;
|
||||
int passed_fd = -1;
|
||||
const char *e;
|
||||
|
|
@ -352,16 +393,20 @@ int main(int argc, char *argv[]) {
|
|||
#endif
|
||||
int autospawn_fd = -1;
|
||||
pa_bool_t autospawn_locked = FALSE;
|
||||
#ifdef HAVE_DBUS
|
||||
pa_dbus_connection *dbus = NULL;
|
||||
#endif
|
||||
|
||||
pa_log_set_ident("pulseaudio");
|
||||
pa_log_set_level(PA_LOG_INFO);
|
||||
pa_log_set_level(PA_LOG_NOTICE);
|
||||
pa_log_set_flags(PA_LOG_COLORS|PA_LOG_PRINT_FILE|PA_LOG_PRINT_LEVEL, PA_LOG_RESET);
|
||||
|
||||
#if defined(__linux__) && defined(__OPTIMIZE__)
|
||||
/*
|
||||
Disable lazy relocations to make usage of external libraries
|
||||
more deterministic for our RT threads. We abuse __OPTIMIZE__ as
|
||||
a check whether we are a debug build or not.
|
||||
a check whether we are a debug build or not. This all is
|
||||
admittedly a bit snake-oilish.
|
||||
*/
|
||||
|
||||
if (!getenv("LD_BIND_NOW")) {
|
||||
|
|
@ -372,37 +417,20 @@ int main(int argc, char *argv[]) {
|
|||
|
||||
pa_set_env("LD_BIND_NOW", "1");
|
||||
|
||||
if ((rp = pa_readlink("/proc/self/exe")))
|
||||
pa_assert_se(execv(rp, argv) == 0);
|
||||
else
|
||||
if ((rp = pa_readlink("/proc/self/exe"))) {
|
||||
|
||||
if (pa_streq(rp, PA_BINARY))
|
||||
pa_assert_se(execv(rp, argv) == 0);
|
||||
else
|
||||
pa_log_warn("/proc/self/exe does not point to " PA_BINARY ", cannot self execute. Are you playing games?");
|
||||
|
||||
pa_xfree(rp);
|
||||
|
||||
} else
|
||||
pa_log_warn("Couldn't read /proc/self/exe, cannot self execute. Running in a chroot()?");
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_GETUID
|
||||
real_root = getuid() == 0;
|
||||
suid_root = !real_root && geteuid() == 0;
|
||||
#else
|
||||
real_root = FALSE;
|
||||
suid_root = FALSE;
|
||||
#endif
|
||||
|
||||
if (!real_root) {
|
||||
/* Drop all capabilities except CAP_SYS_NICE */
|
||||
pa_limit_caps();
|
||||
|
||||
/* Drop privileges, but keep CAP_SYS_NICE */
|
||||
pa_drop_root();
|
||||
|
||||
/* After dropping root, the effective set is reset, hence,
|
||||
* let's raise it again */
|
||||
pa_limit_caps();
|
||||
|
||||
/* When capabilities are not supported we will not be able to
|
||||
* aquire RT sched anymore. But yes, that's the way it is. It
|
||||
* is just too risky tun let PA run as root all the time. */
|
||||
}
|
||||
|
||||
if ((e = getenv("PULSE_PASSED_FD"))) {
|
||||
passed_fd = atoi(e);
|
||||
|
||||
|
|
@ -410,15 +438,14 @@ int main(int argc, char *argv[]) {
|
|||
passed_fd = -1;
|
||||
}
|
||||
|
||||
/* We might be autospawned, in which case have no idea in which
|
||||
* context we have been started. Let's cleanup our execution
|
||||
* context as good as possible */
|
||||
pa_drop_root();
|
||||
pa_close_all(passed_fd, -1);
|
||||
|
||||
pa_reset_sigs(-1);
|
||||
pa_unblock_sigs(-1);
|
||||
|
||||
/* At this point, we are a normal user, possibly with CAP_NICE if
|
||||
* we were started SUID. If we are started as normal root, than we
|
||||
* still are normal root. */
|
||||
|
||||
setlocale(LC_ALL, "");
|
||||
pa_init_i18n();
|
||||
|
||||
|
|
@ -443,150 +470,6 @@ int main(int argc, char *argv[]) {
|
|||
pa_log_set_flags(PA_LOG_PRINT_TIME, PA_LOG_SET);
|
||||
pa_log_set_show_backtrace(conf->log_backtrace);
|
||||
|
||||
pa_log_debug("Started as real root: %s, suid root: %s", pa_yes_no(real_root), pa_yes_no(suid_root));
|
||||
|
||||
if (!real_root && pa_have_caps()) {
|
||||
#ifdef HAVE_SYS_RESOURCE_H
|
||||
struct rlimit rl;
|
||||
#endif
|
||||
pa_bool_t allow_high_priority = FALSE, allow_realtime = FALSE;
|
||||
|
||||
/* Let's better not enable high prio or RT by default */
|
||||
|
||||
if (conf->high_priority && !allow_high_priority) {
|
||||
if (pa_own_uid_in_group(PA_REALTIME_GROUP, &gid) > 0) {
|
||||
pa_log_info(_("We're in the group '%s', allowing high-priority scheduling."), PA_REALTIME_GROUP);
|
||||
allow_high_priority = TRUE;
|
||||
}
|
||||
}
|
||||
|
||||
if (conf->realtime_scheduling && !allow_realtime) {
|
||||
if (pa_own_uid_in_group(PA_REALTIME_GROUP, &gid) > 0) {
|
||||
pa_log_info(_("We're in the group '%s', allowing real-time scheduling."), PA_REALTIME_GROUP);
|
||||
allow_realtime = TRUE;
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef HAVE_POLKIT
|
||||
if (conf->high_priority && !allow_high_priority) {
|
||||
if (pa_polkit_check("org.pulseaudio.acquire-high-priority") > 0) {
|
||||
pa_log_info(_("PolicyKit grants us acquire-high-priority privilege."));
|
||||
allow_high_priority = TRUE;
|
||||
} else
|
||||
pa_log_info(_("PolicyKit refuses acquire-high-priority privilege."));
|
||||
}
|
||||
|
||||
if (conf->realtime_scheduling && !allow_realtime) {
|
||||
if (pa_polkit_check("org.pulseaudio.acquire-real-time") > 0) {
|
||||
pa_log_info(_("PolicyKit grants us acquire-real-time privilege."));
|
||||
allow_realtime = TRUE;
|
||||
} else
|
||||
pa_log_info(_("PolicyKit refuses acquire-real-time privilege."));
|
||||
}
|
||||
#endif
|
||||
|
||||
if (!allow_high_priority && !allow_realtime) {
|
||||
|
||||
/* OK, there's no further need to keep CAP_NICE. Hence
|
||||
* let's give it up early */
|
||||
|
||||
pa_drop_caps();
|
||||
}
|
||||
|
||||
#ifdef RLIMIT_RTPRIO
|
||||
if (getrlimit(RLIMIT_RTPRIO, &rl) >= 0)
|
||||
if (rl.rlim_cur > 0) {
|
||||
pa_log_info("RLIMIT_RTPRIO is set to %u, allowing real-time scheduling.", (unsigned) rl.rlim_cur);
|
||||
allow_realtime = TRUE;
|
||||
}
|
||||
#endif
|
||||
#ifdef RLIMIT_NICE
|
||||
if (getrlimit(RLIMIT_NICE, &rl) >= 0)
|
||||
if (rl.rlim_cur > 20 ) {
|
||||
pa_log_info("RLIMIT_NICE is set to %u, allowing high-priority scheduling.", (unsigned) rl.rlim_cur);
|
||||
allow_high_priority = TRUE;
|
||||
}
|
||||
#endif
|
||||
|
||||
if ((conf->high_priority && !allow_high_priority) ||
|
||||
(conf->realtime_scheduling && !allow_realtime))
|
||||
pa_log_notice(_("Called SUID root and real-time and/or high-priority scheduling was requested in the configuration. However, we lack the necessary privileges:\n"
|
||||
"We are not in group '%s', PolicyKit refuse to grant us the requested privileges and we have no increase RLIMIT_NICE/RLIMIT_RTPRIO resource limits.\n"
|
||||
"For enabling real-time/high-priority scheduling please acquire the appropriate PolicyKit privileges, or become a member of '%s', or increase the RLIMIT_NICE/RLIMIT_RTPRIO resource limits for this user."),
|
||||
PA_REALTIME_GROUP, PA_REALTIME_GROUP);
|
||||
|
||||
|
||||
if (!allow_realtime)
|
||||
conf->realtime_scheduling = FALSE;
|
||||
|
||||
if (!allow_high_priority)
|
||||
conf->high_priority = FALSE;
|
||||
}
|
||||
|
||||
#ifdef HAVE_SYS_RESOURCE_H
|
||||
/* Reset resource limits. If we are run as root (for system mode)
|
||||
* this might end up increasing the limits, which is intended
|
||||
* behaviour. For all other cases, i.e. started as normal user, or
|
||||
* SUID root at this point we should have no CAP_SYS_RESOURCE and
|
||||
* increasing the limits thus should fail. Which is, too, intended
|
||||
* behaviour */
|
||||
|
||||
set_all_rlimits(conf);
|
||||
#endif
|
||||
|
||||
if (conf->high_priority && !pa_can_high_priority()) {
|
||||
pa_log_warn(_("High-priority scheduling enabled in configuration but not allowed by policy."));
|
||||
conf->high_priority = FALSE;
|
||||
}
|
||||
|
||||
if (conf->high_priority && (conf->cmd == PA_CMD_DAEMON || conf->cmd == PA_CMD_START))
|
||||
pa_raise_priority(conf->nice_level);
|
||||
|
||||
pa_log_debug("Can realtime: %s, can high-priority: %s", pa_yes_no(pa_can_realtime()), pa_yes_no(pa_can_high_priority()));
|
||||
|
||||
if (!real_root && pa_have_caps()) {
|
||||
pa_bool_t drop;
|
||||
|
||||
drop = (conf->cmd != PA_CMD_DAEMON && conf->cmd != PA_CMD_START) || !conf->realtime_scheduling;
|
||||
|
||||
#ifdef RLIMIT_RTPRIO
|
||||
if (!drop) {
|
||||
struct rlimit rl;
|
||||
/* At this point we still have CAP_NICE if we were loaded
|
||||
* SUID root. If possible let's acquire RLIMIT_RTPRIO
|
||||
* instead and give CAP_NICE up. */
|
||||
|
||||
if (getrlimit(RLIMIT_RTPRIO, &rl) >= 0) {
|
||||
|
||||
if (rl.rlim_cur >= 9)
|
||||
drop = TRUE;
|
||||
else {
|
||||
rl.rlim_max = rl.rlim_cur = 9;
|
||||
|
||||
if (setrlimit(RLIMIT_RTPRIO, &rl) >= 0) {
|
||||
pa_log_info(_("Successfully increased RLIMIT_RTPRIO"));
|
||||
drop = TRUE;
|
||||
} else
|
||||
pa_log_warn(_("RLIMIT_RTPRIO failed: %s"), pa_cstrerror(errno));
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
if (drop) {
|
||||
pa_log_info(_("Giving up CAP_NICE"));
|
||||
pa_drop_caps();
|
||||
suid_root = FALSE;
|
||||
}
|
||||
}
|
||||
|
||||
if (conf->realtime_scheduling && !pa_can_realtime()) {
|
||||
pa_log_warn(_("Real-time scheduling enabled in configuration but not allowed by policy."));
|
||||
conf->realtime_scheduling = FALSE;
|
||||
}
|
||||
|
||||
pa_log_debug("Can realtime: %s, can high-priority: %s", pa_yes_no(pa_can_realtime()), pa_yes_no(pa_can_high_priority()));
|
||||
|
||||
LTDL_SET_PRELOADED_SYMBOLS();
|
||||
pa_ltdl_init();
|
||||
ltdl_init = TRUE;
|
||||
|
|
@ -671,9 +554,9 @@ int main(int argc, char *argv[]) {
|
|||
pa_assert(conf->cmd == PA_CMD_DAEMON || conf->cmd == PA_CMD_START);
|
||||
}
|
||||
|
||||
if (real_root && !conf->system_instance)
|
||||
if (getuid() == 0 && !conf->system_instance)
|
||||
pa_log_warn(_("This program is not intended to be run as root (unless --system is specified)."));
|
||||
else if (!real_root && conf->system_instance) {
|
||||
else if (getuid() != 0 && conf->system_instance) {
|
||||
pa_log(_("Root privileges required."));
|
||||
goto finish;
|
||||
}
|
||||
|
|
@ -819,6 +702,13 @@ int main(int argc, char *argv[]) {
|
|||
pa_assert_se(chdir("/") == 0);
|
||||
umask(0022);
|
||||
|
||||
#ifdef HAVE_SYS_RESOURCE_H
|
||||
set_all_rlimits(conf);
|
||||
#endif
|
||||
pa_rtclock_hrtimer_enable();
|
||||
|
||||
pa_raise_priority(conf->nice_level);
|
||||
|
||||
if (conf->system_instance)
|
||||
if (change_user() < 0)
|
||||
goto finish;
|
||||
|
|
@ -851,6 +741,14 @@ int main(int argc, char *argv[]) {
|
|||
pa_log_debug(_("Optimized build: no"));
|
||||
#endif
|
||||
|
||||
#ifdef NDEBUG
|
||||
pa_log_debug(_("NDEBUG defined, all asserts disabled."));
|
||||
#elif defined(FASTPATH)
|
||||
pa_log_debug(_("FASTPATH defined, only fast path asserts disabled."));
|
||||
#else
|
||||
pa_log_debug(_("All asserts enabled."));
|
||||
#endif
|
||||
|
||||
if (!(s = pa_machine_id())) {
|
||||
pa_log(_("Failed to get machine ID"));
|
||||
goto finish;
|
||||
|
|
@ -858,6 +756,11 @@ int main(int argc, char *argv[]) {
|
|||
pa_log_info(_("Machine ID is %s."), s);
|
||||
pa_xfree(s);
|
||||
|
||||
if ((s = pa_session_id())) {
|
||||
pa_log_info(_("Session ID is %s."), s);
|
||||
pa_xfree(s);
|
||||
}
|
||||
|
||||
if (!(s = pa_get_runtime_dir()))
|
||||
goto finish;
|
||||
pa_log_info(_("Using runtime directory %s."), s);
|
||||
|
|
@ -870,6 +773,11 @@ int main(int argc, char *argv[]) {
|
|||
|
||||
pa_log_info(_("Running in system mode: %s"), pa_yes_no(pa_in_system_mode()));
|
||||
|
||||
if (pa_in_system_mode())
|
||||
pa_log_warn(_("OK, so you are running PA in system mode. Please note that you most likely shouldn't be doing that.\n"
|
||||
"If you do it nonetheless then it's your own fault if things don't work as expected.\n"
|
||||
"Please read http://pulseaudio.org/wiki/WhatIsWrongWithSystemMode for an explanation why system mode is usually a bad idea."));
|
||||
|
||||
if (conf->use_pid_file) {
|
||||
int z;
|
||||
|
||||
|
|
@ -890,21 +798,25 @@ int main(int argc, char *argv[]) {
|
|||
valid_pid_file = TRUE;
|
||||
}
|
||||
|
||||
#ifdef SIGPIPE
|
||||
signal(SIGPIPE, SIG_IGN);
|
||||
#endif
|
||||
pa_disable_sigpipe();
|
||||
|
||||
if (pa_rtclock_hrtimer())
|
||||
pa_log_info(_("Fresh high-resolution timers available! Bon appetit!"));
|
||||
else
|
||||
pa_log_info(_("Dude, your kernel stinks! The chef's recommendation today is Linux with high-resolution timers enabled!"));
|
||||
|
||||
pa_rtclock_hrtimer_enable();
|
||||
|
||||
#ifdef SIGRTMIN
|
||||
/* Valgrind uses SIGRTMAX. To easy debugging we don't use it here */
|
||||
pa_rtsig_configure(SIGRTMIN, SIGRTMAX-1);
|
||||
if (conf->lock_memory) {
|
||||
#ifdef HAVE_SYS_MMAN_H
|
||||
if (mlockall(MCL_FUTURE) < 0)
|
||||
pa_log_warn("mlockall() failed: %s", pa_cstrerror(errno));
|
||||
else
|
||||
pa_log_info("Sucessfully locked process into memory.");
|
||||
#else
|
||||
pa_log_warn("Memory locking requested but not supported on platform.");
|
||||
#endif
|
||||
}
|
||||
|
||||
pa_memtrap_install();
|
||||
|
||||
pa_assert_se(mainloop = pa_mainloop_new());
|
||||
|
||||
|
|
@ -942,7 +854,7 @@ int main(int argc, char *argv[]) {
|
|||
#endif
|
||||
|
||||
#ifdef OS_IS_WIN32
|
||||
win32_timer = pa_mainloop_get_api(mainloop)->time_new(pa_mainloop_get_api(mainloop), pa_gettimeofday(&win32_tv), message_cb, NULL);
|
||||
win32_timer = pa_mainloop_get_api(mainloop)->rtclock_time_new(pa_mainloop_get_api(mainloop), pa_gettimeofday(&win32_tv), message_cb, NULL);
|
||||
#endif
|
||||
|
||||
oil_init();
|
||||
|
|
@ -989,6 +901,10 @@ int main(int argc, char *argv[]) {
|
|||
}
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_DBUS
|
||||
dbus = register_dbus(c);
|
||||
#endif
|
||||
|
||||
pa_log_info(_("Daemon startup complete."));
|
||||
|
||||
retval = 0;
|
||||
|
|
@ -998,6 +914,10 @@ int main(int argc, char *argv[]) {
|
|||
pa_log_info(_("Daemon shutdown initiated."));
|
||||
|
||||
finish:
|
||||
#ifdef HAVE_DBUS
|
||||
if (dbus)
|
||||
pa_dbus_connection_unref(dbus);
|
||||
#endif
|
||||
|
||||
if (autospawn_fd >= 0) {
|
||||
if (autospawn_locked)
|
||||
|
|
|
|||
|
|
@ -19,6 +19,8 @@
|
|||
|
||||
set -e
|
||||
|
||||
[ -z "$PULSE_SERVER" ]
|
||||
|
||||
@PA_BINARY@ --start "$@"
|
||||
|
||||
if [ x"$DISPLAY" != x ] ; then
|
||||
|
|
|
|||
21
src/map-file
21
src/map-file
|
|
@ -15,17 +15,20 @@ pa_channel_map_can_balance;
|
|||
pa_channel_map_can_fade;
|
||||
pa_channel_map_compatible;
|
||||
pa_channel_map_equal;
|
||||
pa_channel_map_has_position;
|
||||
pa_channel_map_init;
|
||||
pa_channel_map_init_auto;
|
||||
pa_channel_map_init_extend;
|
||||
pa_channel_map_init_mono;
|
||||
pa_channel_map_init_stereo;
|
||||
pa_channel_map_mask;
|
||||
pa_channel_map_parse;
|
||||
pa_channel_map_snprint;
|
||||
pa_channel_map_superset;
|
||||
pa_channel_map_to_name;
|
||||
pa_channel_map_to_pretty_name;
|
||||
pa_channel_map_valid;
|
||||
pa_channel_position_from_string;
|
||||
pa_channel_position_to_pretty_string;
|
||||
pa_channel_position_to_string;
|
||||
pa_context_add_autoload;
|
||||
|
|
@ -83,6 +86,8 @@ pa_context_ref;
|
|||
pa_context_remove_autoload_by_index;
|
||||
pa_context_remove_autoload_by_name;
|
||||
pa_context_remove_sample;
|
||||
pa_context_rttime_new;
|
||||
pa_context_rttime_restart;
|
||||
pa_context_set_card_profile_by_index;
|
||||
pa_context_set_card_profile_by_name;
|
||||
pa_context_set_default_sink;
|
||||
|
|
@ -93,10 +98,14 @@ pa_context_set_sink_input_mute;
|
|||
pa_context_set_sink_input_volume;
|
||||
pa_context_set_sink_mute_by_index;
|
||||
pa_context_set_sink_mute_by_name;
|
||||
pa_context_set_sink_port_by_index;
|
||||
pa_context_set_sink_port_by_name;
|
||||
pa_context_set_sink_volume_by_index;
|
||||
pa_context_set_sink_volume_by_name;
|
||||
pa_context_set_source_mute_by_index;
|
||||
pa_context_set_source_mute_by_name;
|
||||
pa_context_set_source_port_by_index;
|
||||
pa_context_set_source_port_by_name;
|
||||
pa_context_set_source_volume_by_index;
|
||||
pa_context_set_source_volume_by_name;
|
||||
pa_context_set_state_callback;
|
||||
|
|
@ -110,19 +119,24 @@ pa_context_suspend_source_by_name;
|
|||
pa_context_unload_module;
|
||||
pa_context_unref;
|
||||
pa_cvolume_avg;
|
||||
pa_cvolume_avg_mask;
|
||||
pa_cvolume_channels_equal_to;
|
||||
pa_cvolume_compatible;
|
||||
pa_cvolume_compatible_with_channel_map;
|
||||
pa_cvolume_equal;
|
||||
pa_cvolume_get_balance;
|
||||
pa_cvolume_get_fade;
|
||||
pa_cvolume_get_position;
|
||||
pa_cvolume_init;
|
||||
pa_cvolume_max;
|
||||
pa_cvolume_max_mask;
|
||||
pa_cvolume_remap;
|
||||
pa_cvolume_scale;
|
||||
pa_cvolume_scale_mask;
|
||||
pa_cvolume_set;
|
||||
pa_cvolume_set_balance;
|
||||
pa_cvolume_set_fade;
|
||||
pa_cvolume_set_position;
|
||||
pa_cvolume_snprint;
|
||||
pa_cvolume_valid;
|
||||
pa_ext_stream_restore_delete;
|
||||
|
|
@ -175,6 +189,7 @@ pa_proplist_iterate;
|
|||
pa_proplist_new;
|
||||
pa_proplist_set;
|
||||
pa_proplist_setf;
|
||||
pa_proplist_setp;
|
||||
pa_proplist_sets;
|
||||
pa_proplist_size;
|
||||
pa_proplist_to_string;
|
||||
|
|
@ -182,6 +197,9 @@ pa_proplist_to_string_sep;
|
|||
pa_proplist_unset;
|
||||
pa_proplist_unset_many;
|
||||
pa_proplist_update;
|
||||
pa_rtclock_now;
|
||||
pa_sample_format_is_be;
|
||||
pa_sample_format_is_le;
|
||||
pa_sample_format_to_string;
|
||||
pa_sample_size;
|
||||
pa_sample_size_of_format;
|
||||
|
|
@ -233,6 +251,7 @@ pa_stream_proplist_update;
|
|||
pa_stream_readable_size;
|
||||
pa_stream_ref;
|
||||
pa_stream_set_buffer_attr;
|
||||
pa_stream_set_buffer_attr_callback;
|
||||
pa_stream_set_event_callback;
|
||||
pa_stream_set_latency_update_callback;
|
||||
pa_stream_set_monitor_stream;
|
||||
|
|
@ -253,7 +272,9 @@ pa_stream_writable_size;
|
|||
pa_stream_write;
|
||||
pa_strerror;
|
||||
pa_sw_cvolume_divide;
|
||||
pa_sw_cvolume_divide_scalar;
|
||||
pa_sw_cvolume_multiply;
|
||||
pa_sw_cvolume_multiply_scalar;
|
||||
pa_sw_cvolume_snprint_dB;
|
||||
pa_sw_volume_divide;
|
||||
pa_sw_volume_from_dB;
|
||||
|
|
|
|||
3406
src/modules/alsa/alsa-mixer.c
Normal file
3406
src/modules/alsa/alsa-mixer.c
Normal file
File diff suppressed because it is too large
Load diff
292
src/modules/alsa/alsa-mixer.h
Normal file
292
src/modules/alsa/alsa-mixer.h
Normal file
|
|
@ -0,0 +1,292 @@
|
|||
#ifndef fooalsamixerhfoo
|
||||
#define fooalsamixerhfoo
|
||||
|
||||
/***
|
||||
This file is part of PulseAudio.
|
||||
|
||||
Copyright 2004-2006 Lennart Poettering
|
||||
Copyright 2006 Pierre Ossman <ossman@cendio.se> for Cendio AB
|
||||
|
||||
PulseAudio 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.
|
||||
|
||||
PulseAudio 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
|
||||
General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Lesser General Public License
|
||||
along with PulseAudio; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
|
||||
USA.
|
||||
***/
|
||||
|
||||
#include <asoundlib.h>
|
||||
|
||||
#include <pulse/sample.h>
|
||||
#include <pulse/volume.h>
|
||||
#include <pulse/mainloop-api.h>
|
||||
#include <pulse/channelmap.h>
|
||||
#include <pulse/proplist.h>
|
||||
#include <pulse/volume.h>
|
||||
|
||||
#include <pulsecore/llist.h>
|
||||
#include <pulsecore/rtpoll.h>
|
||||
#include <pulsecore/core.h>
|
||||
#include <pulsecore/log.h>
|
||||
|
||||
typedef struct pa_alsa_fdlist pa_alsa_fdlist;
|
||||
typedef struct pa_alsa_setting pa_alsa_setting;
|
||||
typedef struct pa_alsa_option pa_alsa_option;
|
||||
typedef struct pa_alsa_element pa_alsa_element;
|
||||
typedef struct pa_alsa_path pa_alsa_path;
|
||||
typedef struct pa_alsa_path_set pa_alsa_path_set;
|
||||
typedef struct pa_alsa_mapping pa_alsa_mapping;
|
||||
typedef struct pa_alsa_profile pa_alsa_profile;
|
||||
typedef struct pa_alsa_profile_set pa_alsa_profile_set;
|
||||
typedef struct pa_alsa_port_data pa_alsa_port_data;
|
||||
|
||||
#include "alsa-util.h"
|
||||
|
||||
typedef enum pa_alsa_switch_use {
|
||||
PA_ALSA_SWITCH_IGNORE,
|
||||
PA_ALSA_SWITCH_MUTE, /* make this switch follow mute status */
|
||||
PA_ALSA_SWITCH_OFF, /* set this switch to 'off' unconditionally */
|
||||
PA_ALSA_SWITCH_ON, /* set this switch to 'on' unconditionally */
|
||||
PA_ALSA_SWITCH_SELECT /* allow the user to select switch status through a setting */
|
||||
} pa_alsa_switch_use_t;
|
||||
|
||||
typedef enum pa_alsa_volume_use {
|
||||
PA_ALSA_VOLUME_IGNORE,
|
||||
PA_ALSA_VOLUME_MERGE, /* merge this volume slider into the global volume slider */
|
||||
PA_ALSA_VOLUME_OFF, /* set this volume to minimal unconditionally */
|
||||
PA_ALSA_VOLUME_ZERO /* set this volume to 0dB unconditionally */
|
||||
} pa_alsa_volume_use_t;
|
||||
|
||||
typedef enum pa_alsa_enumeration_use {
|
||||
PA_ALSA_ENUMERATION_IGNORE,
|
||||
PA_ALSA_ENUMERATION_SELECT
|
||||
} pa_alsa_enumeration_use_t;
|
||||
|
||||
typedef enum pa_alsa_required {
|
||||
PA_ALSA_REQUIRED_IGNORE,
|
||||
PA_ALSA_REQUIRED_SWITCH,
|
||||
PA_ALSA_REQUIRED_VOLUME,
|
||||
PA_ALSA_REQUIRED_ENUMERATION,
|
||||
PA_ALSA_REQUIRED_ANY
|
||||
} pa_alsa_required_t;
|
||||
|
||||
typedef enum pa_alsa_direction {
|
||||
PA_ALSA_DIRECTION_ANY,
|
||||
PA_ALSA_DIRECTION_OUTPUT,
|
||||
PA_ALSA_DIRECTION_INPUT
|
||||
} pa_alsa_direction_t;
|
||||
|
||||
/* A setting combines a couple of options into a single entity that
|
||||
* may be selected. Only one setting can be active at the same
|
||||
* time. */
|
||||
struct pa_alsa_setting {
|
||||
pa_alsa_path *path;
|
||||
PA_LLIST_FIELDS(pa_alsa_setting);
|
||||
|
||||
pa_idxset *options;
|
||||
|
||||
char *name;
|
||||
char *description;
|
||||
unsigned priority;
|
||||
};
|
||||
|
||||
/* An option belongs to an element and refers to one enumeration item
|
||||
* of the element is an enumeration item, or a switch status if the
|
||||
* element is a switch item. */
|
||||
struct pa_alsa_option {
|
||||
pa_alsa_element *element;
|
||||
PA_LLIST_FIELDS(pa_alsa_option);
|
||||
|
||||
char *alsa_name;
|
||||
int alsa_idx;
|
||||
|
||||
char *name;
|
||||
char *description;
|
||||
unsigned priority;
|
||||
};
|
||||
|
||||
/* And element wraps one specific ALSA element. A series of elements *
|
||||
make up a path (see below). If the element is an enumeration or switch
|
||||
* element it may includes a list of options. */
|
||||
struct pa_alsa_element {
|
||||
pa_alsa_path *path;
|
||||
PA_LLIST_FIELDS(pa_alsa_element);
|
||||
|
||||
char *alsa_name;
|
||||
pa_alsa_direction_t direction;
|
||||
|
||||
pa_alsa_switch_use_t switch_use;
|
||||
pa_alsa_volume_use_t volume_use;
|
||||
pa_alsa_enumeration_use_t enumeration_use;
|
||||
|
||||
pa_alsa_required_t required;
|
||||
pa_alsa_required_t required_absent;
|
||||
|
||||
pa_bool_t override_map:1;
|
||||
pa_bool_t direction_try_other:1;
|
||||
|
||||
pa_bool_t has_dB:1;
|
||||
long min_volume, max_volume;
|
||||
double min_dB, max_dB;
|
||||
|
||||
pa_channel_position_mask_t masks[SND_MIXER_SCHN_LAST][2];
|
||||
unsigned n_channels;
|
||||
|
||||
pa_channel_position_mask_t merged_mask;
|
||||
|
||||
PA_LLIST_HEAD(pa_alsa_option, options);
|
||||
};
|
||||
|
||||
/* A path wraps a series of elements into a single entity which can be
|
||||
* used to control it as if it had a single volume slider, a single
|
||||
* mute switch and a single list of selectable options. */
|
||||
struct pa_alsa_path {
|
||||
pa_alsa_path_set *path_set;
|
||||
PA_LLIST_FIELDS(pa_alsa_path);
|
||||
|
||||
pa_alsa_direction_t direction;
|
||||
|
||||
char *name;
|
||||
char *description;
|
||||
unsigned priority;
|
||||
|
||||
pa_bool_t probed:1;
|
||||
pa_bool_t supported:1;
|
||||
pa_bool_t has_mute:1;
|
||||
pa_bool_t has_volume:1;
|
||||
pa_bool_t has_dB:1;
|
||||
|
||||
long min_volume, max_volume;
|
||||
double min_dB, max_dB;
|
||||
|
||||
/* This is used during parsing only, as a shortcut so that we
|
||||
* don't have to iterate the list all the time */
|
||||
pa_alsa_element *last_element;
|
||||
pa_alsa_option *last_option;
|
||||
pa_alsa_setting *last_setting;
|
||||
|
||||
PA_LLIST_HEAD(pa_alsa_element, elements);
|
||||
PA_LLIST_HEAD(pa_alsa_setting, settings);
|
||||
};
|
||||
|
||||
/* A path set is simply a set of paths that are applicable to a
|
||||
* device */
|
||||
struct pa_alsa_path_set {
|
||||
PA_LLIST_HEAD(pa_alsa_path, paths);
|
||||
pa_alsa_direction_t direction;
|
||||
pa_bool_t probed:1;
|
||||
|
||||
/* This is used during parsing only, as a shortcut so that we
|
||||
* don't have to iterate the list all the time */
|
||||
pa_alsa_path *last_path;
|
||||
};
|
||||
|
||||
int pa_alsa_setting_select(pa_alsa_setting *s, snd_mixer_t *m);
|
||||
void pa_alsa_setting_dump(pa_alsa_setting *s);
|
||||
|
||||
void pa_alsa_option_dump(pa_alsa_option *o);
|
||||
|
||||
void pa_alsa_element_dump(pa_alsa_element *e);
|
||||
|
||||
pa_alsa_path *pa_alsa_path_new(const char *fname, pa_alsa_direction_t direction);
|
||||
pa_alsa_path *pa_alsa_path_synthesize(const char *element, pa_alsa_direction_t direction);
|
||||
int pa_alsa_path_probe(pa_alsa_path *p, snd_mixer_t *m, pa_bool_t ignore_dB);
|
||||
void pa_alsa_path_dump(pa_alsa_path *p);
|
||||
int pa_alsa_path_get_volume(pa_alsa_path *p, snd_mixer_t *m, const pa_channel_map *cm, pa_cvolume *v);
|
||||
int pa_alsa_path_get_mute(pa_alsa_path *path, snd_mixer_t *m, pa_bool_t *muted);
|
||||
int pa_alsa_path_set_volume(pa_alsa_path *path, snd_mixer_t *m, const pa_channel_map *cm, pa_cvolume *v);
|
||||
int pa_alsa_path_set_mute(pa_alsa_path *path, snd_mixer_t *m, pa_bool_t muted);
|
||||
int pa_alsa_path_select(pa_alsa_path *p, snd_mixer_t *m);
|
||||
void pa_alsa_path_set_callback(pa_alsa_path *p, snd_mixer_t *m, snd_mixer_elem_callback_t cb, void *userdata);
|
||||
void pa_alsa_path_free(pa_alsa_path *p);
|
||||
|
||||
pa_alsa_path_set *pa_alsa_path_set_new(pa_alsa_mapping *m, pa_alsa_direction_t direction);
|
||||
void pa_alsa_path_set_probe(pa_alsa_path_set *s, snd_mixer_t *m, pa_bool_t ignore_dB);
|
||||
void pa_alsa_path_set_dump(pa_alsa_path_set *s);
|
||||
void pa_alsa_path_set_set_callback(pa_alsa_path_set *ps, snd_mixer_t *m, snd_mixer_elem_callback_t cb, void *userdata);
|
||||
void pa_alsa_path_set_free(pa_alsa_path_set *s);
|
||||
|
||||
struct pa_alsa_mapping {
|
||||
pa_alsa_profile_set *profile_set;
|
||||
|
||||
char *name;
|
||||
char *description;
|
||||
unsigned priority;
|
||||
pa_alsa_direction_t direction;
|
||||
|
||||
pa_channel_map channel_map;
|
||||
|
||||
char **device_strings;
|
||||
|
||||
char **input_path_names;
|
||||
char **output_path_names;
|
||||
char **input_element; /* list of fallbacks */
|
||||
char **output_element;
|
||||
|
||||
unsigned supported;
|
||||
|
||||
/* Temporarily used during probing */
|
||||
snd_pcm_t *input_pcm;
|
||||
snd_pcm_t *output_pcm;
|
||||
|
||||
pa_sink *sink;
|
||||
pa_source *source;
|
||||
};
|
||||
|
||||
struct pa_alsa_profile {
|
||||
pa_alsa_profile_set *profile_set;
|
||||
|
||||
char *name;
|
||||
char *description;
|
||||
unsigned priority;
|
||||
|
||||
pa_bool_t supported:1;
|
||||
|
||||
char **input_mapping_names;
|
||||
char **output_mapping_names;
|
||||
|
||||
pa_idxset *input_mappings;
|
||||
pa_idxset *output_mappings;
|
||||
};
|
||||
|
||||
struct pa_alsa_profile_set {
|
||||
pa_hashmap *mappings;
|
||||
pa_hashmap *profiles;
|
||||
|
||||
pa_bool_t auto_profiles;
|
||||
pa_bool_t probed:1;
|
||||
};
|
||||
|
||||
void pa_alsa_mapping_dump(pa_alsa_mapping *m);
|
||||
void pa_alsa_profile_dump(pa_alsa_profile *p);
|
||||
|
||||
pa_alsa_profile_set* pa_alsa_profile_set_new(const char *fname, const pa_channel_map *bonus);
|
||||
void pa_alsa_profile_set_probe(pa_alsa_profile_set *ps, const char *dev_id, const pa_sample_spec *ss);
|
||||
void pa_alsa_profile_set_free(pa_alsa_profile_set *s);
|
||||
void pa_alsa_profile_set_dump(pa_alsa_profile_set *s);
|
||||
|
||||
snd_mixer_t *pa_alsa_open_mixer_for_pcm(snd_pcm_t *pcm, char **ctl_device);
|
||||
|
||||
pa_alsa_fdlist *pa_alsa_fdlist_new(void);
|
||||
void pa_alsa_fdlist_free(pa_alsa_fdlist *fdl);
|
||||
int pa_alsa_fdlist_set_mixer(pa_alsa_fdlist *fdl, snd_mixer_t *mixer_handle, pa_mainloop_api* m);
|
||||
|
||||
/* Data structure for inclusion in pa_device_port for alsa
|
||||
* sinks/sources. This contains nothing that needs to be freed
|
||||
* individually */
|
||||
struct pa_alsa_port_data {
|
||||
pa_alsa_path *path;
|
||||
pa_alsa_setting *setting;
|
||||
};
|
||||
|
||||
void pa_alsa_add_ports(pa_hashmap **p, pa_alsa_path_set *ps);
|
||||
|
||||
#endif
|
||||
File diff suppressed because it is too large
Load diff
|
|
@ -28,8 +28,9 @@
|
|||
#include <pulsecore/sink.h>
|
||||
|
||||
#include "alsa-util.h"
|
||||
#include "alsa-mixer.h"
|
||||
|
||||
pa_sink* pa_alsa_sink_new(pa_module *m, pa_modargs *ma, const char*driver, pa_card *card, const pa_alsa_profile_info *profile);
|
||||
pa_sink* pa_alsa_sink_new(pa_module *m, pa_modargs *ma, const char*driver, pa_card *card, pa_alsa_mapping *mapping);
|
||||
|
||||
void pa_alsa_sink_free(pa_sink *s);
|
||||
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load diff
|
|
@ -29,7 +29,7 @@
|
|||
|
||||
#include "alsa-util.h"
|
||||
|
||||
pa_source* pa_alsa_source_new(pa_module *m, pa_modargs *ma, const char*driver, pa_card *card, const pa_alsa_profile_info *profile);
|
||||
pa_source* pa_alsa_source_new(pa_module *m, pa_modargs *ma, const char*driver, pa_card *card, pa_alsa_mapping *mapping);
|
||||
|
||||
void pa_alsa_source_free(pa_source *s);
|
||||
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load diff
|
|
@ -30,99 +30,97 @@
|
|||
#include <pulse/mainloop-api.h>
|
||||
#include <pulse/channelmap.h>
|
||||
#include <pulse/proplist.h>
|
||||
#include <pulse/volume.h>
|
||||
|
||||
#include <pulsecore/llist.h>
|
||||
#include <pulsecore/rtpoll.h>
|
||||
#include <pulsecore/core.h>
|
||||
#include <pulsecore/log.h>
|
||||
|
||||
typedef struct pa_alsa_fdlist pa_alsa_fdlist;
|
||||
|
||||
struct pa_alsa_fdlist *pa_alsa_fdlist_new(void);
|
||||
void pa_alsa_fdlist_free(struct pa_alsa_fdlist *fdl);
|
||||
int pa_alsa_fdlist_set_mixer(struct pa_alsa_fdlist *fdl, snd_mixer_t *mixer_handle, pa_mainloop_api* m);
|
||||
#include "alsa-mixer.h"
|
||||
|
||||
int pa_alsa_set_hw_params(
|
||||
snd_pcm_t *pcm_handle,
|
||||
pa_sample_spec *ss,
|
||||
uint32_t *periods,
|
||||
snd_pcm_uframes_t *period_size,
|
||||
pa_sample_spec *ss, /* modified at return */
|
||||
uint32_t *periods, /* modified at return */
|
||||
snd_pcm_uframes_t *period_size, /* modified at return */
|
||||
snd_pcm_uframes_t tsched_size,
|
||||
pa_bool_t *use_mmap,
|
||||
pa_bool_t *use_tsched,
|
||||
pa_bool_t *use_mmap, /* modified at return */
|
||||
pa_bool_t *use_tsched, /* modified at return */
|
||||
pa_bool_t require_exact_channel_number);
|
||||
|
||||
int pa_alsa_set_sw_params(snd_pcm_t *pcm, snd_pcm_uframes_t avail_min);
|
||||
int pa_alsa_set_sw_params(
|
||||
snd_pcm_t *pcm,
|
||||
snd_pcm_uframes_t avail_min);
|
||||
|
||||
int pa_alsa_prepare_mixer(snd_mixer_t *mixer, const char *dev);
|
||||
snd_mixer_elem_t *pa_alsa_find_elem(snd_mixer_t *mixer, const char *name, const char *fallback, pa_bool_t playback);
|
||||
int pa_alsa_find_mixer_and_elem(snd_pcm_t *pcm, snd_mixer_t **_m, snd_mixer_elem_t **_e);
|
||||
|
||||
typedef struct pa_alsa_profile_info {
|
||||
pa_channel_map map;
|
||||
const char *alsa_name;
|
||||
const char *description; /* internationalized */
|
||||
const char *name;
|
||||
unsigned priority;
|
||||
} pa_alsa_profile_info;
|
||||
|
||||
/* Picks a working profile based on the specified ss/map */
|
||||
/* Picks a working mapping from the profile set based on the specified ss/map */
|
||||
snd_pcm_t *pa_alsa_open_by_device_id_auto(
|
||||
const char *dev_id,
|
||||
char **dev,
|
||||
pa_sample_spec *ss,
|
||||
pa_channel_map* map,
|
||||
char **dev, /* modified at return */
|
||||
pa_sample_spec *ss, /* modified at return */
|
||||
pa_channel_map* map, /* modified at return */
|
||||
int mode,
|
||||
uint32_t *nfrags,
|
||||
snd_pcm_uframes_t *period_size,
|
||||
uint32_t *nfrags, /* modified at return */
|
||||
snd_pcm_uframes_t *period_size, /* modified at return */
|
||||
snd_pcm_uframes_t tsched_size,
|
||||
pa_bool_t *use_mmap,
|
||||
pa_bool_t *use_tsched,
|
||||
const pa_alsa_profile_info **profile);
|
||||
pa_bool_t *use_mmap, /* modified at return */
|
||||
pa_bool_t *use_tsched, /* modified at return */
|
||||
pa_alsa_profile_set *ps,
|
||||
pa_alsa_mapping **mapping); /* modified at return */
|
||||
|
||||
/* Uses the specified profile */
|
||||
snd_pcm_t *pa_alsa_open_by_device_id_profile(
|
||||
/* Uses the specified mapping */
|
||||
snd_pcm_t *pa_alsa_open_by_device_id_mapping(
|
||||
const char *dev_id,
|
||||
char **dev,
|
||||
pa_sample_spec *ss,
|
||||
pa_channel_map* map,
|
||||
char **dev, /* modified at return */
|
||||
pa_sample_spec *ss, /* modified at return */
|
||||
pa_channel_map* map, /* modified at return */
|
||||
int mode,
|
||||
uint32_t *nfrags,
|
||||
snd_pcm_uframes_t *period_size,
|
||||
uint32_t *nfrags, /* modified at return */
|
||||
snd_pcm_uframes_t *period_size, /* modified at return */
|
||||
snd_pcm_uframes_t tsched_size,
|
||||
pa_bool_t *use_mmap,
|
||||
pa_bool_t *use_tsched,
|
||||
const pa_alsa_profile_info *profile);
|
||||
pa_bool_t *use_mmap, /* modified at return */
|
||||
pa_bool_t *use_tsched, /* modified at return */
|
||||
pa_alsa_mapping *mapping);
|
||||
|
||||
/* Opens the explicit ALSA device */
|
||||
snd_pcm_t *pa_alsa_open_by_device_string(
|
||||
const char *device,
|
||||
char **dev,
|
||||
pa_sample_spec *ss,
|
||||
pa_channel_map* map,
|
||||
const char *dir,
|
||||
char **dev, /* modified at return */
|
||||
pa_sample_spec *ss, /* modified at return */
|
||||
pa_channel_map* map, /* modified at return */
|
||||
int mode,
|
||||
uint32_t *nfrags,
|
||||
snd_pcm_uframes_t *period_size,
|
||||
uint32_t *nfrags, /* modified at return */
|
||||
snd_pcm_uframes_t *period_size, /* modified at return */
|
||||
snd_pcm_uframes_t tsched_size,
|
||||
pa_bool_t *use_mmap,
|
||||
pa_bool_t *use_tsched,
|
||||
pa_bool_t *use_mmap, /* modified at return */
|
||||
pa_bool_t *use_tsched, /* modified at return */
|
||||
pa_bool_t require_exact_channel_number);
|
||||
|
||||
int pa_alsa_probe_profiles(
|
||||
/* Opens the explicit ALSA device with a fallback list */
|
||||
snd_pcm_t *pa_alsa_open_by_template(
|
||||
char **template,
|
||||
const char *dev_id,
|
||||
const pa_sample_spec *ss,
|
||||
void (*cb)(const pa_alsa_profile_info *sink, const pa_alsa_profile_info *source, void *userdata),
|
||||
void *userdata);
|
||||
char **dev, /* modified at return */
|
||||
pa_sample_spec *ss, /* modified at return */
|
||||
pa_channel_map* map, /* modified at return */
|
||||
int mode,
|
||||
uint32_t *nfrags, /* modified at return */
|
||||
snd_pcm_uframes_t *period_size, /* modified at return */
|
||||
snd_pcm_uframes_t tsched_size,
|
||||
pa_bool_t *use_mmap, /* modified at return */
|
||||
pa_bool_t *use_tsched, /* modified at return */
|
||||
pa_bool_t require_exact_channel_number);
|
||||
|
||||
int pa_alsa_calc_mixer_map(snd_mixer_elem_t *elem, const pa_channel_map *channel_map, snd_mixer_selem_channel_id_t mixer_map[], pa_bool_t playback);
|
||||
|
||||
void pa_alsa_dump(snd_pcm_t *pcm);
|
||||
void pa_alsa_dump(pa_log_level_t level, snd_pcm_t *pcm);
|
||||
void pa_alsa_dump_status(snd_pcm_t *pcm);
|
||||
|
||||
void pa_alsa_redirect_errors_inc(void);
|
||||
void pa_alsa_redirect_errors_dec(void);
|
||||
void pa_alsa_refcnt_inc(void);
|
||||
void pa_alsa_refcnt_dec(void);
|
||||
|
||||
void pa_alsa_init_proplist_pcm_info(pa_core *c, pa_proplist *p, snd_pcm_info_t *pcm_info);
|
||||
void pa_alsa_init_proplist_card(pa_core *c, pa_proplist *p, int card);
|
||||
void pa_alsa_init_proplist_pcm(pa_core *c, pa_proplist *p, snd_pcm_t *pcm);
|
||||
void pa_alsa_init_proplist_ctl(pa_proplist *p, const char *name);
|
||||
pa_bool_t pa_alsa_init_description(pa_proplist *p);
|
||||
|
||||
int pa_alsa_recover_from_poll(snd_pcm_t *pcm, int revents);
|
||||
|
|
@ -134,9 +132,13 @@ int pa_alsa_safe_delay(snd_pcm_t *pcm, snd_pcm_sframes_t *delay, size_t hwbuf_si
|
|||
int pa_alsa_safe_mmap_begin(snd_pcm_t *pcm, const snd_pcm_channel_area_t **areas, snd_pcm_uframes_t *offset, snd_pcm_uframes_t *frames, size_t hwbuf_size, const pa_sample_spec *ss);
|
||||
|
||||
char *pa_alsa_get_driver_name(int card);
|
||||
|
||||
char *pa_alsa_get_driver_name_by_pcm(snd_pcm_t *pcm);
|
||||
|
||||
char *pa_alsa_get_reserve_name(const char *device);
|
||||
|
||||
pa_bool_t pa_alsa_pcm_is_hw(snd_pcm_t *pcm);
|
||||
pa_bool_t pa_alsa_pcm_is_modem(snd_pcm_t *pcm);
|
||||
|
||||
const char* pa_alsa_strerror(int errnum);
|
||||
|
||||
#endif
|
||||
|
|
|
|||
62
src/modules/alsa/mixer/paths/analog-input-aux.conf
Normal file
62
src/modules/alsa/mixer/paths/analog-input-aux.conf
Normal file
|
|
@ -0,0 +1,62 @@
|
|||
# This file is part of PulseAudio.
|
||||
#
|
||||
# PulseAudio 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.
|
||||
#
|
||||
# PulseAudio 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
|
||||
# General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU Lesser General Public License
|
||||
# along with PulseAudio; if not, write to the Free Software Foundation,
|
||||
# Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
|
||||
|
||||
; For devices where an 'Aux' element exists
|
||||
;
|
||||
; See analog-output.conf.common for an explanation on the directives
|
||||
|
||||
[General]
|
||||
priority = 90
|
||||
name = analog-input
|
||||
|
||||
[Element Capture]
|
||||
switch = mute
|
||||
volume = merge
|
||||
override-map.1 = all
|
||||
override-map.2 = all-left,all-right
|
||||
|
||||
[Element Mic]
|
||||
switch = off
|
||||
volume = off
|
||||
|
||||
[Element Line]
|
||||
switch = off
|
||||
volume = off
|
||||
|
||||
[Element Aux]
|
||||
required = any
|
||||
switch = mute
|
||||
volume = merge
|
||||
override-map.1 = all
|
||||
override-map.2 = all-left,all-right
|
||||
|
||||
[Element Video]
|
||||
switch = off
|
||||
volume = off
|
||||
|
||||
[Element Mic/Line]
|
||||
switch = off
|
||||
volume = off
|
||||
|
||||
[Element TV Tuner]
|
||||
switch = off
|
||||
volume = off
|
||||
|
||||
[Element FM]
|
||||
switch = off
|
||||
volume = off
|
||||
|
||||
.include analog-input.conf.common
|
||||
62
src/modules/alsa/mixer/paths/analog-input-fm.conf
Normal file
62
src/modules/alsa/mixer/paths/analog-input-fm.conf
Normal file
|
|
@ -0,0 +1,62 @@
|
|||
# This file is part of PulseAudio.
|
||||
#
|
||||
# PulseAudio 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.
|
||||
#
|
||||
# PulseAudio 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
|
||||
# General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU Lesser General Public License
|
||||
# along with PulseAudio; if not, write to the Free Software Foundation,
|
||||
# Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
|
||||
|
||||
; For devices where an 'FM' element exists
|
||||
;
|
||||
; See analog-output.conf.common for an explanation on the directives
|
||||
|
||||
[General]
|
||||
priority = 70
|
||||
name = analog-input-radio
|
||||
|
||||
[Element Capture]
|
||||
switch = mute
|
||||
volume = merge
|
||||
override-map.1 = all
|
||||
override-map.2 = all-left,all-right
|
||||
|
||||
[Element Mic]
|
||||
switch = off
|
||||
volume = off
|
||||
|
||||
[Element Line]
|
||||
switch = off
|
||||
volume = off
|
||||
|
||||
[Element Aux]
|
||||
switch = off
|
||||
volume = off
|
||||
|
||||
[Element Video]
|
||||
switch = off
|
||||
volume = off
|
||||
|
||||
[Element Mic/Line]
|
||||
switch = off
|
||||
volume = off
|
||||
|
||||
[Element TV Tuner]
|
||||
switch = off
|
||||
volume = off
|
||||
|
||||
[Element FM]
|
||||
required = any
|
||||
switch = mute
|
||||
volume = merge
|
||||
override-map.1 = all
|
||||
override-map.2 = all-left,all-right
|
||||
|
||||
.include analog-input.conf.common
|
||||
61
src/modules/alsa/mixer/paths/analog-input-linein.conf
Normal file
61
src/modules/alsa/mixer/paths/analog-input-linein.conf
Normal file
|
|
@ -0,0 +1,61 @@
|
|||
# This file is part of PulseAudio.
|
||||
#
|
||||
# PulseAudio 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.
|
||||
#
|
||||
# PulseAudio 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
|
||||
# General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU Lesser General Public License
|
||||
# along with PulseAudio; if not, write to the Free Software Foundation,
|
||||
# Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
|
||||
|
||||
; For devices where a 'Line' element exists
|
||||
;
|
||||
; See analog-output.conf.common for an explanation on the directives
|
||||
|
||||
[General]
|
||||
priority = 90
|
||||
|
||||
[Element Capture]
|
||||
switch = mute
|
||||
volume = merge
|
||||
override-map.1 = all
|
||||
override-map.2 = all-left,all-right
|
||||
|
||||
[Element Mic]
|
||||
switch = off
|
||||
volume = off
|
||||
|
||||
[Element Line]
|
||||
required = any
|
||||
switch = mute
|
||||
volume = merge
|
||||
override-map.1 = all
|
||||
override-map.2 = all-left,all-right
|
||||
|
||||
[Element Aux]
|
||||
switch = off
|
||||
volume = off
|
||||
|
||||
[Element Video]
|
||||
switch = off
|
||||
volume = off
|
||||
|
||||
[Element Mic/Line]
|
||||
switch = off
|
||||
volume = off
|
||||
|
||||
[Element TV Tuner]
|
||||
switch = off
|
||||
volume = off
|
||||
|
||||
[Element FM]
|
||||
switch = off
|
||||
volume = off
|
||||
|
||||
.include analog-input.conf.common
|
||||
63
src/modules/alsa/mixer/paths/analog-input-mic-line.conf
Normal file
63
src/modules/alsa/mixer/paths/analog-input-mic-line.conf
Normal file
|
|
@ -0,0 +1,63 @@
|
|||
# This file is part of PulseAudio.
|
||||
#
|
||||
# PulseAudio 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.
|
||||
#
|
||||
# PulseAudio 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
|
||||
# General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU Lesser General Public License
|
||||
# along with PulseAudio; if not, write to the Free Software Foundation,
|
||||
# Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
|
||||
|
||||
; For devices where a 'Mic/Line' element exists
|
||||
;
|
||||
; See analog-output.conf.common for an explanation on the directives
|
||||
|
||||
[General]
|
||||
priority = 90
|
||||
name = analog-input
|
||||
|
||||
[Element Capture]
|
||||
switch = mute
|
||||
volume = merge
|
||||
override-map.1 = all
|
||||
override-map.2 = all-left,all-right
|
||||
|
||||
[Element Mic]
|
||||
switch = off
|
||||
volume = off
|
||||
|
||||
[Element Line]
|
||||
switch = off
|
||||
volume = off
|
||||
|
||||
[Element Aux]
|
||||
switch = off
|
||||
volume = off
|
||||
|
||||
[Element Video]
|
||||
switch = off
|
||||
volume = off
|
||||
|
||||
[Element Mic/Line]
|
||||
required = any
|
||||
switch = mute
|
||||
volume = merge
|
||||
override-map.1 = all
|
||||
override-map.2 = all-left,all-right
|
||||
|
||||
[Element TV Tuner]
|
||||
switch = off
|
||||
volume = off
|
||||
|
||||
[Element FM]
|
||||
switch = off
|
||||
volume = off
|
||||
|
||||
.include analog-input.conf.common
|
||||
.include analog-input-mic.conf.common
|
||||
63
src/modules/alsa/mixer/paths/analog-input-mic.conf
Normal file
63
src/modules/alsa/mixer/paths/analog-input-mic.conf
Normal file
|
|
@ -0,0 +1,63 @@
|
|||
# This file is part of PulseAudio.
|
||||
#
|
||||
# PulseAudio 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.
|
||||
#
|
||||
# PulseAudio 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
|
||||
# General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU Lesser General Public License
|
||||
# along with PulseAudio; if not, write to the Free Software Foundation,
|
||||
# Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
|
||||
|
||||
; For devices where a 'Mic' element exists
|
||||
;
|
||||
; See analog-output.conf.common for an explanation on the directives
|
||||
|
||||
[General]
|
||||
priority = 100
|
||||
name = analog-input-microphone
|
||||
|
||||
[Element Capture]
|
||||
switch = mute
|
||||
volume = merge
|
||||
override-map.1 = all
|
||||
override-map.2 = all-left,all-right
|
||||
|
||||
[Element Mic]
|
||||
required = any
|
||||
switch = mute
|
||||
volume = merge
|
||||
override-map.1 = all
|
||||
override-map.2 = all-left,all-right
|
||||
|
||||
[Element Line]
|
||||
switch = off
|
||||
volume = off
|
||||
|
||||
[Element Aux]
|
||||
switch = off
|
||||
volume = off
|
||||
|
||||
[Element Video]
|
||||
switch = off
|
||||
volume = off
|
||||
|
||||
[Element Mic/Line]
|
||||
switch = off
|
||||
volume = off
|
||||
|
||||
[Element TV Tuner]
|
||||
switch = off
|
||||
volume = off
|
||||
|
||||
[Element FM]
|
||||
switch = off
|
||||
volume = off
|
||||
|
||||
.include analog-input.conf.common
|
||||
.include analog-input-mic.conf.common
|
||||
63
src/modules/alsa/mixer/paths/analog-input-mic.conf.common
Normal file
63
src/modules/alsa/mixer/paths/analog-input-mic.conf.common
Normal file
|
|
@ -0,0 +1,63 @@
|
|||
# This file is part of PulseAudio.
|
||||
#
|
||||
# PulseAudio 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.
|
||||
#
|
||||
# PulseAudio 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
|
||||
# General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU Lesser General Public License
|
||||
# along with PulseAudio; if not, write to the Free Software Foundation,
|
||||
# Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
|
||||
|
||||
; Common element for all microphone inputs
|
||||
;
|
||||
; See analog-output.conf.common for an explanation on the directives
|
||||
|
||||
;;; 'Mic Select'
|
||||
|
||||
[Element Mic Select]
|
||||
enumeration = select
|
||||
|
||||
[Option Mic Select:Mic1]
|
||||
name = input-microphone
|
||||
priority = 20
|
||||
|
||||
[Option Mic Select:Mic2]
|
||||
name = input-microphone
|
||||
priority = 19
|
||||
|
||||
;;; Various Boosts
|
||||
|
||||
[Element Mic Boost (+20dB)]
|
||||
switch = select
|
||||
volume = merge
|
||||
|
||||
[Option Mic Boost (+20dB):on]
|
||||
name = input-boost-on
|
||||
|
||||
[Option Mic Boost (+20dB):off]
|
||||
name = input-boost-off
|
||||
|
||||
[Element Mic Boost]
|
||||
switch = select
|
||||
volume = merge
|
||||
|
||||
[Option Mic Boost:on]
|
||||
name = input-boost-on
|
||||
|
||||
[Option Mic Boost:off]
|
||||
name = input-boost-off
|
||||
|
||||
[Element Front Mic Boost]
|
||||
switch = select
|
||||
|
||||
[Option Front Mic Boost:on]
|
||||
name = input-boost-on
|
||||
|
||||
[Option Front Mic Boost:off]
|
||||
name = input-boost-off
|
||||
62
src/modules/alsa/mixer/paths/analog-input-tvtuner.conf
Normal file
62
src/modules/alsa/mixer/paths/analog-input-tvtuner.conf
Normal file
|
|
@ -0,0 +1,62 @@
|
|||
# This file is part of PulseAudio.
|
||||
#
|
||||
# PulseAudio 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.
|
||||
#
|
||||
# PulseAudio 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
|
||||
# General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU Lesser General Public License
|
||||
# along with PulseAudio; if not, write to the Free Software Foundation,
|
||||
# Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
|
||||
|
||||
; For devices where a 'TV Tuner' element exists
|
||||
;
|
||||
; See analog-output.conf.common for an explanation on the directives
|
||||
|
||||
[General]
|
||||
priority = 70
|
||||
name = analog-input-video
|
||||
|
||||
[Element Capture]
|
||||
switch = mute
|
||||
volume = merge
|
||||
override-map.1 = all
|
||||
override-map.2 = all-left,all-right
|
||||
|
||||
[Element Mic]
|
||||
switch = off
|
||||
volume = off
|
||||
|
||||
[Element Line]
|
||||
switch = off
|
||||
volume = off
|
||||
|
||||
[Element Aux]
|
||||
switch = off
|
||||
volume = off
|
||||
|
||||
[Element Video]
|
||||
switch = off
|
||||
volume = off
|
||||
|
||||
[Element Mic/Line]
|
||||
switch = off
|
||||
volume = off
|
||||
|
||||
[Element TV Tuner]
|
||||
required = any
|
||||
switch = mute
|
||||
volume = merge
|
||||
override-map.1 = all
|
||||
override-map.2 = all-left,all-right
|
||||
|
||||
[Element FM]
|
||||
switch = off
|
||||
volume = off
|
||||
|
||||
.include analog-input.conf.common
|
||||
61
src/modules/alsa/mixer/paths/analog-input-video.conf
Normal file
61
src/modules/alsa/mixer/paths/analog-input-video.conf
Normal file
|
|
@ -0,0 +1,61 @@
|
|||
# This file is part of PulseAudio.
|
||||
#
|
||||
# PulseAudio 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.
|
||||
#
|
||||
# PulseAudio 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
|
||||
# General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU Lesser General Public License
|
||||
# along with PulseAudio; if not, write to the Free Software Foundation,
|
||||
# Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
|
||||
|
||||
; For devices where a 'Video' element exists
|
||||
;
|
||||
; See analog-output.conf.common for an explanation on the directives
|
||||
|
||||
[General]
|
||||
priority = 70
|
||||
|
||||
[Element Capture]
|
||||
switch = mute
|
||||
volume = merge
|
||||
override-map.1 = all
|
||||
override-map.2 = all-left,all-right
|
||||
|
||||
[Element Mic]
|
||||
switch = off
|
||||
volume = off
|
||||
|
||||
[Element Line]
|
||||
switch = off
|
||||
volume = off
|
||||
|
||||
[Element Aux]
|
||||
switch = off
|
||||
volume = off
|
||||
|
||||
[Element Video]
|
||||
required = any
|
||||
switch = mute
|
||||
volume = merge
|
||||
override-map.1 = all
|
||||
override-map.2 = all-left,all-right
|
||||
|
||||
[Element Mic/Line]
|
||||
switch = off
|
||||
volume = off
|
||||
|
||||
[Element TV Tuner]
|
||||
switch = off
|
||||
volume = off
|
||||
|
||||
[Element FM]
|
||||
switch = off
|
||||
volume = off
|
||||
|
||||
.include analog-input.conf.common
|
||||
54
src/modules/alsa/mixer/paths/analog-input.conf
Normal file
54
src/modules/alsa/mixer/paths/analog-input.conf
Normal file
|
|
@ -0,0 +1,54 @@
|
|||
# This file is part of PulseAudio.
|
||||
#
|
||||
# PulseAudio 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.
|
||||
#
|
||||
# PulseAudio 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
|
||||
# General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU Lesser General Public License
|
||||
# along with PulseAudio; if not, write to the Free Software Foundation,
|
||||
# Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
|
||||
|
||||
; A fallback for devices that lack seperate Mic/Line/Aux/Video/TV
|
||||
; Tuner/FM elements
|
||||
;
|
||||
; See analog-output.conf.common for an explanation on the directives
|
||||
|
||||
[General]
|
||||
priority = 100
|
||||
|
||||
[Element Capture]
|
||||
required = volume
|
||||
switch = mute
|
||||
volume = merge
|
||||
override-map.1 = all
|
||||
override-map.2 = all-left,all-right
|
||||
|
||||
[Element Mic]
|
||||
required-absent = any
|
||||
|
||||
[Element Line]
|
||||
required-absent = any
|
||||
|
||||
[Element Aux]
|
||||
required-absent = any
|
||||
|
||||
[Element Video]
|
||||
required-absent = any
|
||||
|
||||
[Element Mic/Line]
|
||||
required-absent = any
|
||||
|
||||
[Element TV Tuner]
|
||||
required-absent = any
|
||||
|
||||
[Element FM]
|
||||
required-absent = any
|
||||
|
||||
.include analog-input.conf.common
|
||||
.include analog-input-mic.conf.common
|
||||
257
src/modules/alsa/mixer/paths/analog-input.conf.common
Normal file
257
src/modules/alsa/mixer/paths/analog-input.conf.common
Normal file
|
|
@ -0,0 +1,257 @@
|
|||
# This file is part of PulseAudio.
|
||||
#
|
||||
# PulseAudio 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.
|
||||
#
|
||||
# PulseAudio 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
|
||||
# General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU Lesser General Public License
|
||||
# along with PulseAudio; if not, write to the Free Software Foundation,
|
||||
# Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
|
||||
|
||||
; Mixer path for PulseAudio's ALSA backend, common elements for all
|
||||
; input paths. If multiple options by the same id are discovered they
|
||||
; will be suffixed with a number to distuingish them, in the same
|
||||
; order they appear here.
|
||||
;
|
||||
; Source selection should use the following names:
|
||||
;
|
||||
; input -- If we don't know the exact kind of input
|
||||
; input-microphone
|
||||
; input-microphone-internal
|
||||
; input-microphone-external
|
||||
; input-linein
|
||||
; input-video
|
||||
; input-radio
|
||||
; input-docking-microphone
|
||||
; input-docking-linein
|
||||
; input-docking
|
||||
;
|
||||
; We explicitly don't want to wrap the following sources:
|
||||
;
|
||||
; CD
|
||||
; Synth/MIDI
|
||||
; Phone
|
||||
; Mix
|
||||
; Digital/SPDIF
|
||||
; Master
|
||||
; PC Speaker
|
||||
;
|
||||
; See analog-output.conf.common for an explanation on the directives
|
||||
|
||||
;;; 'Input Source Select'
|
||||
|
||||
[Element Input Source Select]
|
||||
enumeration = select
|
||||
|
||||
[Option Input Source Select:Input1]
|
||||
name = input
|
||||
priority = 10
|
||||
|
||||
[Option Input Source Select:Input2]
|
||||
name = input
|
||||
priority = 5
|
||||
|
||||
;;; 'Input Source'
|
||||
|
||||
[Element Input Source]
|
||||
enumeration = select
|
||||
|
||||
[Option Input Source:Mic]
|
||||
name = input-microphone
|
||||
priority = 20
|
||||
|
||||
[Option Input Source:Microphone]
|
||||
name = input-microphone
|
||||
priority = 20
|
||||
|
||||
[Option Input Source:Front Mic]
|
||||
name = input-microphone
|
||||
priority = 19
|
||||
|
||||
[Option Input Source:Front Microphone]
|
||||
name = input-microphone
|
||||
priority = 19
|
||||
|
||||
[Option Input Source:Line]
|
||||
name = input-linein
|
||||
priority = 18
|
||||
|
||||
[Option Input Source:Line-In]
|
||||
name = input-linein
|
||||
priority = 18
|
||||
|
||||
[Option Input Source:Line In]
|
||||
name = input-linein
|
||||
priority = 18
|
||||
|
||||
;;; ' Capture Source'
|
||||
|
||||
[Element Capture Source]
|
||||
enumeration = select
|
||||
|
||||
[Option Capture Source:TV Tuner]
|
||||
name = input-video
|
||||
|
||||
[Option Capture Source:FM]
|
||||
name = input-radio
|
||||
|
||||
[Option Capture Source:Mic/Line]
|
||||
name = input
|
||||
|
||||
[Option Capture Source:Line/Mic]
|
||||
name = input
|
||||
|
||||
[Option Capture Source:Mic]
|
||||
name = input-microphone
|
||||
|
||||
[Option Capture Source:Microphone]
|
||||
name = input-microphone
|
||||
|
||||
[Option Capture Source:Int Mic]
|
||||
name = input-microphone-internal
|
||||
|
||||
[Option Capture Source:Int DMic]
|
||||
name = input-microphone-internal
|
||||
|
||||
[Option Capture Source:Internal Mic]
|
||||
name = input-microphone-internal
|
||||
|
||||
[Option Capture Source:iMic]
|
||||
name = input-microphone-internal
|
||||
|
||||
[Option Capture Source:i-Mic]
|
||||
name = input-microphone-internal
|
||||
|
||||
[Option Capture Source:Internal Microphone]
|
||||
name = input-microphone-internal
|
||||
|
||||
[Option Capture Source:Front Mic]
|
||||
name = input-microphone
|
||||
|
||||
[Option Capture Source:Front Microphone]
|
||||
name = input-microphone
|
||||
|
||||
[Option Capture Source:Rear Mic]
|
||||
name = input-microphone
|
||||
|
||||
[Option Capture Source:Mic1]
|
||||
name = input-microphone
|
||||
|
||||
[Option Capture Source:Mic2]
|
||||
name = input-microphone
|
||||
|
||||
[Option Capture Source:D-Mic]
|
||||
name = input-microphone
|
||||
|
||||
[Option Capture Source:IntMic]
|
||||
name = input-microphone-internal
|
||||
|
||||
[Option Capture Source:ExtMic]
|
||||
name = input-microphone-external
|
||||
|
||||
[Option Capture Source:Ext Mic]
|
||||
name = input-microphone-external
|
||||
|
||||
[Option Capture Source:E-Mic]
|
||||
name = input-microphone-external
|
||||
|
||||
[Option Capture Source:e-Mic]
|
||||
name = input-microphone-external
|
||||
|
||||
[Option Capture Source:LineIn]
|
||||
name = input-linein
|
||||
|
||||
[Option Capture Source:Analog]
|
||||
name = input
|
||||
|
||||
[Option Capture Source:Line]
|
||||
name = input-linein
|
||||
|
||||
[Option Capture Source:Line-In]
|
||||
name = input-linein
|
||||
|
||||
[Option Capture Source:Line In]
|
||||
name = input-linein
|
||||
|
||||
[Option Capture Source:Video]
|
||||
name = input-video
|
||||
|
||||
[Option Capture Source:Aux]
|
||||
name = input
|
||||
|
||||
[Option Capture Source:Aux0]
|
||||
name = input
|
||||
|
||||
[Option Capture Source:Aux1]
|
||||
name = input
|
||||
|
||||
[Option Capture Source:Aux2]
|
||||
name = input
|
||||
|
||||
[Option Capture Source:Aux3]
|
||||
name = input
|
||||
|
||||
[Option Capture Source:AUX IN]
|
||||
name = input
|
||||
|
||||
[Option Capture Source:Aux In]
|
||||
name = input
|
||||
|
||||
[Option Capture Source:AOUT]
|
||||
name = input
|
||||
|
||||
[Option Capture Source:AUX]
|
||||
name = input
|
||||
|
||||
[Option Capture Source:Cam Mic]
|
||||
name = input-microphone
|
||||
|
||||
[Option Capture Source:Digital Mic]
|
||||
name = input-microphone
|
||||
|
||||
[Option Capture Source:Digital Mic 1]
|
||||
name = input-microphone
|
||||
|
||||
[Option Capture Source:Digital Mic 2]
|
||||
name = input-microphone
|
||||
|
||||
[Option Capture Source:Analog Inputs]
|
||||
name = input
|
||||
|
||||
[Option Capture Source:Unknown1]
|
||||
name = input
|
||||
|
||||
[Option Capture Source:Unknown2]
|
||||
name = input
|
||||
|
||||
[Option Capture Source:Docking-Station]
|
||||
name = input-docking
|
||||
|
||||
[Option Capture Source:Dock Mic]
|
||||
name = input-docking-microphone
|
||||
|
||||
;;; Various Boosts
|
||||
|
||||
[Element Capture Boost]
|
||||
switch = select
|
||||
|
||||
[Option Capture Boost:on]
|
||||
name = input-boost-on
|
||||
|
||||
[Option Capture Boost:off]
|
||||
name = input-boost-off
|
||||
|
||||
[Element Auto Gain Control]
|
||||
switch = select
|
||||
|
||||
[Option Auto Gain Control:on]
|
||||
name = input-agc-on
|
||||
|
||||
[Option Auto Gain Control:off]
|
||||
name = input-agc-off
|
||||
71
src/modules/alsa/mixer/paths/analog-output-headphones.conf
Normal file
71
src/modules/alsa/mixer/paths/analog-output-headphones.conf
Normal file
|
|
@ -0,0 +1,71 @@
|
|||
# This file is part of PulseAudio.
|
||||
#
|
||||
# PulseAudio 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.
|
||||
#
|
||||
# PulseAudio 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
|
||||
# General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU Lesser General Public License
|
||||
# along with PulseAudio; if not, write to the Free Software Foundation,
|
||||
# Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
|
||||
|
||||
; Path for mixers that have a 'Headphone' control
|
||||
;
|
||||
; See analog-output.conf.common for an explanation on the directives
|
||||
|
||||
[General]
|
||||
priority = 90
|
||||
|
||||
[Element Hardware Master]
|
||||
switch = mute
|
||||
volume = merge
|
||||
override-map.1 = all
|
||||
override-map.2 = all-left,all-right
|
||||
|
||||
[Element Master]
|
||||
switch = mute
|
||||
volume = merge
|
||||
override-map.1 = all
|
||||
override-map.2 = all-left,all-right
|
||||
|
||||
[Element Master Mono]
|
||||
switch = off
|
||||
volume = off
|
||||
|
||||
[Element Headphone]
|
||||
required = any
|
||||
switch = mute
|
||||
volume = merge
|
||||
override-map.1 = all
|
||||
override-map.2 = all-left,all-right
|
||||
|
||||
[Element Front]
|
||||
switch = off
|
||||
volume = off
|
||||
|
||||
[Element Rear]
|
||||
switch = off
|
||||
volume = off
|
||||
|
||||
[Element Sourround]
|
||||
switch = off
|
||||
volume = off
|
||||
|
||||
[Element Side]
|
||||
switch = off
|
||||
volume = off
|
||||
|
||||
[Element Center]
|
||||
switch = off
|
||||
volume = off
|
||||
|
||||
[Element LFE]
|
||||
switch = off
|
||||
volume = off
|
||||
|
||||
.include analog-output.conf.common
|
||||
72
src/modules/alsa/mixer/paths/analog-output-lfe-on-mono.conf
Normal file
72
src/modules/alsa/mixer/paths/analog-output-lfe-on-mono.conf
Normal file
|
|
@ -0,0 +1,72 @@
|
|||
# This file is part of PulseAudio.
|
||||
#
|
||||
# PulseAudio 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.
|
||||
#
|
||||
# PulseAudio 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
|
||||
# General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU Lesser General Public License
|
||||
# along with PulseAudio; if not, write to the Free Software Foundation,
|
||||
# Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
|
||||
|
||||
; Intended for usage in laptops that have a seperate LFE speaker
|
||||
; connected to the Master mono connector
|
||||
;
|
||||
; See analog-output.conf.common for an explanation on the directives
|
||||
|
||||
[General]
|
||||
priority = 40
|
||||
|
||||
[Element Hardware Master]
|
||||
switch = mute
|
||||
volume = merge
|
||||
override-map.1 = all
|
||||
override-map.2 = all-left,all-right
|
||||
|
||||
[Element Master]
|
||||
switch = mute
|
||||
volume = merge
|
||||
override-map.1 = all-no-lfe
|
||||
override-map.2 = all-left,all-right
|
||||
|
||||
[Element Master Mono]
|
||||
required = any
|
||||
switch = mute
|
||||
volume = merge
|
||||
override-map.1 = lfe
|
||||
override-map.2 = lfe,lfe
|
||||
|
||||
[Element Headphone]
|
||||
switch = off
|
||||
volume = off
|
||||
|
||||
[Element Front]
|
||||
switch = off
|
||||
volume = off
|
||||
|
||||
[Element Rear]
|
||||
switch = off
|
||||
volume = off
|
||||
|
||||
[Element Sourround]
|
||||
switch = off
|
||||
volume = off
|
||||
|
||||
[Element Side]
|
||||
switch = off
|
||||
volume = off
|
||||
|
||||
[Element Center]
|
||||
switch = off
|
||||
volume = off
|
||||
|
||||
[Element LFE]
|
||||
switch = off
|
||||
volume = off
|
||||
|
||||
.include analog-output.conf.common
|
||||
69
src/modules/alsa/mixer/paths/analog-output-mono.conf
Normal file
69
src/modules/alsa/mixer/paths/analog-output-mono.conf
Normal file
|
|
@ -0,0 +1,69 @@
|
|||
# This file is part of PulseAudio.
|
||||
#
|
||||
# PulseAudio 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.
|
||||
#
|
||||
# PulseAudio 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
|
||||
# General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU Lesser General Public License
|
||||
# along with PulseAudio; if not, write to the Free Software Foundation,
|
||||
# Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
|
||||
|
||||
; Intended for usage on boards that have a seperate Mono output plug.
|
||||
;
|
||||
; See analog-output.conf.common for an explanation on the directives
|
||||
|
||||
[General]
|
||||
priority = 50
|
||||
|
||||
[Element Hardware Master]
|
||||
switch = mute
|
||||
volume = merge
|
||||
override-map.1 = all
|
||||
override-map.2 = all-left,all-right
|
||||
|
||||
[Element Master]
|
||||
switch = off
|
||||
volume = off
|
||||
|
||||
[Element Master Mono]
|
||||
required = any
|
||||
switch = mute
|
||||
volume = merge
|
||||
override-map.1 = all
|
||||
override-map.2 = all-left,all-right
|
||||
|
||||
[Element Headphone]
|
||||
switch = off
|
||||
volume = off
|
||||
|
||||
[Element Front]
|
||||
switch = off
|
||||
volume = off
|
||||
|
||||
[Element Rear]
|
||||
switch = off
|
||||
volume = off
|
||||
|
||||
[Element Sourround]
|
||||
switch = off
|
||||
volume = off
|
||||
|
||||
[Element Side]
|
||||
switch = off
|
||||
volume = off
|
||||
|
||||
[Element Center]
|
||||
switch = off
|
||||
volume = off
|
||||
|
||||
[Element LFE]
|
||||
switch = off
|
||||
volume = off
|
||||
|
||||
.include analog-output.conf.common
|
||||
80
src/modules/alsa/mixer/paths/analog-output.conf
Normal file
80
src/modules/alsa/mixer/paths/analog-output.conf
Normal file
|
|
@ -0,0 +1,80 @@
|
|||
# This file is part of PulseAudio.
|
||||
#
|
||||
# PulseAudio 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.
|
||||
#
|
||||
# PulseAudio 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
|
||||
# General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU Lesser General Public License
|
||||
# along with PulseAudio; if not, write to the Free Software Foundation,
|
||||
# Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
|
||||
|
||||
; Intended for the 'default' output
|
||||
;
|
||||
; See analog-output.conf.common for an explanation on the directives
|
||||
|
||||
[General]
|
||||
priority = 100
|
||||
|
||||
[Element Hardware Master]
|
||||
switch = mute
|
||||
volume = merge
|
||||
override-map.1 = all
|
||||
override-map.2 = all-left,all-right
|
||||
|
||||
[Element Master]
|
||||
switch = mute
|
||||
volume = merge
|
||||
override-map.1 = all
|
||||
override-map.2 = all-left,all-right
|
||||
|
||||
[Element Master Mono]
|
||||
switch = off
|
||||
volume = off
|
||||
|
||||
[Element Headphone]
|
||||
switch = off
|
||||
volume = off
|
||||
|
||||
[Element Front]
|
||||
switch = mute
|
||||
volume = merge
|
||||
override-map.1 = all-front
|
||||
override-map.2 = front-left,front-right
|
||||
|
||||
[Element Rear]
|
||||
switch = mute
|
||||
volume = merge
|
||||
override-map.1 = all-rear
|
||||
override-map.2 = rear-left,rear-right
|
||||
|
||||
[Element Surround]
|
||||
switch = mute
|
||||
volume = merge
|
||||
override-map.1 = all-rear
|
||||
override-map.2 = rear-left,rear-right
|
||||
|
||||
[Element Side]
|
||||
switch = mute
|
||||
volume = merge
|
||||
override-map.1 = all-side
|
||||
override-map.2 = side-left,side-right
|
||||
|
||||
[Element Center]
|
||||
switch = mute
|
||||
volume = merge
|
||||
override-map.1 = all-center
|
||||
override-map.2 = all-center,all-center
|
||||
|
||||
[Element LFE]
|
||||
switch = mute
|
||||
volume = merge
|
||||
override-map.1 = lfe
|
||||
override-map.2 = lfe,lfe
|
||||
|
||||
.include analog-output.conf.common
|
||||
111
src/modules/alsa/mixer/paths/analog-output.conf.common
Normal file
111
src/modules/alsa/mixer/paths/analog-output.conf.common
Normal file
|
|
@ -0,0 +1,111 @@
|
|||
# This file is part of PulseAudio.
|
||||
#
|
||||
# PulseAudio 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.
|
||||
#
|
||||
# PulseAudio 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
|
||||
# General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU Lesser General Public License
|
||||
# along with PulseAudio; if not, write to the Free Software Foundation,
|
||||
# Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
|
||||
|
||||
; Common part of all paths
|
||||
|
||||
; So here's generally how mixer paths are used by PA: PA goes through
|
||||
; a mixer path file from top to bottom and checks if a mixer element
|
||||
; described therein exists. If so it is added to the list of mixer
|
||||
; elements PA will control, keeping the order it read them in. If a
|
||||
; mixer element described here has set the required= or
|
||||
; required-absent= directives a path might not be accepted as valid
|
||||
; and is ignored in its entirety (see below). However usually if a
|
||||
; element listed here is missing this one element is ignored but not
|
||||
; the entire path.
|
||||
;
|
||||
; When a device shall be muted/unmuted *all* elements listed in a path
|
||||
; file with "switch = mute" will be toggled.
|
||||
;
|
||||
; When a device shall change its volume, PA will got through the list
|
||||
; of all elements with "volume = merge" and set the volume on the
|
||||
; first element. If that element does not support dB volumes, this is
|
||||
; where the story ends. If it does support dB volumes, PA divides the
|
||||
; requested volume by the volume that was set on this element, and
|
||||
; then go on to the next element with "volume = merge" and then set
|
||||
; that there, and so on. That way the first volume element in the
|
||||
; path will be the one that does the 'biggest' part of the overall
|
||||
; volume adjustment, with the remaining elements usually being set to
|
||||
; some value next to 0dB. This logic makes sure we get the full range
|
||||
; over all volume sliders and a very high granularity of volumes
|
||||
; already in hardware.
|
||||
;
|
||||
; All switches and enumerations set to "select" are exposed via the
|
||||
; "port" functionality of sinks/sources. Basically every possible
|
||||
; switch setting and every possible enumeration setting will be
|
||||
; combined and made into a "port". So make sure you don't list too
|
||||
; many switches/enums for exposing, because the number of ports might
|
||||
; rise exponentially.
|
||||
;
|
||||
; Only one path can be selected at a time. All paths that are valid
|
||||
; for an audio device will be exposed as "port" for the sink/source.
|
||||
|
||||
|
||||
; [General]
|
||||
; priority = ... # Priority for this path
|
||||
; description = ...
|
||||
;
|
||||
; [Option ...:...] # For each option of an enumeration or switch element
|
||||
; # that shall be exposed as a sink/source port. Needs to
|
||||
; # be named after the Element, followed by a colon, followed
|
||||
; # by the option name, resp. on/off if the element is a switch.
|
||||
; name = ... # Logical name to use in the path identifier
|
||||
; priority = ... # Priority if this is made into a device port
|
||||
;
|
||||
; [Element ...] # For each element that we shall control
|
||||
; required = ignore | switch | volume | enumeration | any # If set, require this element to be of this kind and available,
|
||||
; # otherwise don't consider this path valid for the card
|
||||
; required-absent = ignore | switch | volume # If set, require this element to not be of this kind and not
|
||||
; # available, otherwise don't consider this path valid for the card
|
||||
;
|
||||
; switch = ignore | mute | off | on | select # What to do with this switch: ignore it, make it follow mute status,
|
||||
; # always set it to off, always to on, or make it selectable as port.
|
||||
; # If set to 'select' you need to define an Option section for on
|
||||
; # and off
|
||||
; volume = ignore | merge | off | zero # What to do with this volume: ignore it, merge it into the device
|
||||
; # volume slider, always set it to the lowest value possible, or always
|
||||
; # set it to 0 dB (for whatever that means)
|
||||
; enumeration = ignore | select # What to do with this enumeration, ignore it or make it selectable
|
||||
; # via device ports. If set to 'select' you need to define an Option section
|
||||
; # for each of the items you want to expose
|
||||
; direction = playback | capture # Is this relevant only for playback or capture? If not set this will implicitly be
|
||||
; # set the direction of the PCM device is opened as. Generally this doesn't need to be set
|
||||
; # unless you have a broken driver that has playback controls marked for capture or vice
|
||||
; # versa
|
||||
; direction-try-other = no | yes # If the element does not supported what is requested, try the other direction, too?
|
||||
;
|
||||
; override-map.1 = ... # Override the channel mask of the mixer control if the control only exposes a single channel
|
||||
; override-map.2 = ... # Override the channel masks of the mixer control if the control only exposes two channels
|
||||
; # Override maps should list for each element channel which high-level channels it controls via a
|
||||
; # channel mask. A channel mask may either be the name of a single channel, or the words "all-left",
|
||||
; # "all-right", "all-center", "all-front", "all-rear", and "all" to encode a specific subset of
|
||||
; # channels in a mask
|
||||
|
||||
[Element PCM]
|
||||
switch = mute
|
||||
volume = merge
|
||||
override-map.1 = all
|
||||
override-map.2 = all-left,all-right
|
||||
|
||||
[Element External Amplifier]
|
||||
switch = select
|
||||
|
||||
[Option External Amplifier:on]
|
||||
name = output-amplifier-on
|
||||
priority = 0
|
||||
|
||||
[Option External Amplifier:off]
|
||||
name = output-amplifier-off
|
||||
priority = 10
|
||||
26
src/modules/alsa/mixer/profile-sets/90-pulseaudio.rules
Normal file
26
src/modules/alsa/mixer/profile-sets/90-pulseaudio.rules
Normal file
|
|
@ -0,0 +1,26 @@
|
|||
# do not edit this file, it will be overwritten on update
|
||||
|
||||
# This file is part of PulseAudio.
|
||||
#
|
||||
# PulseAudio 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.
|
||||
#
|
||||
# PulseAudio 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
|
||||
# General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU Lesser General Public License
|
||||
# along with PulseAudio; if not, write to the Free Software Foundation,
|
||||
# Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
|
||||
|
||||
SUBSYSTEM!="sound", GOTO="pulseaudio_end"
|
||||
ACTION!="change", GOTO="pulseaudio_end"
|
||||
KERNEL!="card*", GOTO="pulseaudio_end"
|
||||
|
||||
SUBSYSTEMS=="usb", ATTRS{idVendor}=="17cc", ATTRS{idProduct}=="1978", ENV{PULSE_PROFILE_SET}="native-instruments-audio8dj.conf"
|
||||
SUBSYSTEMS=="usb", ATTRS{idVendor}=="17cc", ATTRS{idProduct}=="0839", ENV{PULSE_PROFILE_SET}="native-instruments-audio4dj.conf"
|
||||
|
||||
LABEL="pulseaudio_end"
|
||||
144
src/modules/alsa/mixer/profile-sets/default.conf
Normal file
144
src/modules/alsa/mixer/profile-sets/default.conf
Normal file
|
|
@ -0,0 +1,144 @@
|
|||
# This file is part of PulseAudio.
|
||||
#
|
||||
# PulseAudio 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.
|
||||
#
|
||||
# PulseAudio 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
|
||||
# General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU Lesser General Public License
|
||||
# along with PulseAudio; if not, write to the Free Software Foundation,
|
||||
# Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
|
||||
|
||||
; Default profile definitions for the ALSA backend of PulseAudio. This
|
||||
; is used as fallback for all cards that have no special mapping
|
||||
; assigned. (and should be good enough for the vast majority of
|
||||
; cards). Use the udev property PULSE_PROFILE_SET to assign a
|
||||
; different profile set than this one to a device. So what is this
|
||||
; about? Simply, what we do here is map ALSA devices to how they are
|
||||
; exposed in PA. We say which ALSA device string to use to open a
|
||||
; device, which channel mapping to use then, and which mixer path to
|
||||
; use. This is encoded in a 'mapping'. Multiple of these mappings can
|
||||
; be bound together in a 'profile' which is then directly exposed in
|
||||
; the UI as a card profile. Each mapping assigned to a profile will
|
||||
; result in one sink/source to be created if the profile is selected
|
||||
; for the card.
|
||||
|
||||
; [General]
|
||||
; auto-profiles = no | yes # Instead of defining all profiles manually, autogenerate
|
||||
; # them by combining every input mapping with every output mapping.
|
||||
;
|
||||
; [Mapping id]
|
||||
; device-strings = ... # ALSA device string. %f will be replaced by the card identifier.
|
||||
; channel-map = ... # Channel mapping to use for this device
|
||||
; description = ...
|
||||
; paths-input = ... # A list of mixer paths to use. Every path in this list will be probed.
|
||||
; # If multiple are found to be working they will be available as device ports
|
||||
; paths-output = ...
|
||||
; element-input = ... # Instead of configuring a full mixer path simply configure a single
|
||||
; # mixer element for volume/mute handling
|
||||
; element-output = ...
|
||||
; priority = ...
|
||||
; direction = any | input | output # Only useful for?
|
||||
;
|
||||
; [Profile id]
|
||||
; input-mappings = ... # Lists mappings for sources on this profile, those mapping must be
|
||||
; # defined in this file too
|
||||
; output-mappings = ... # Lists mappings for sinks on this profile, those mappings must be
|
||||
; # defined in this file too
|
||||
; description = ...
|
||||
; priority = ... # Numeric value to deduce priority for this profile
|
||||
; skip-probe = no | yes # Skip probing for availability? If this is yes then this profile
|
||||
; # will be assumed as working without probing. Makes initialization
|
||||
; # a bit faster but only works if the card is really known well.
|
||||
|
||||
[General]
|
||||
auto-profiles = yes
|
||||
|
||||
[Mapping analog-mono]
|
||||
device-strings = hw:%f
|
||||
channel-map = mono
|
||||
paths-output = analog-output analog-output-headphones analog-output-mono analog-output-lfe-on-mono
|
||||
paths-input = analog-input analog-input-mic analog-input-linein analog-input-aux analog-input-video analog-input-tvtuner analog-input-fm analog-input-mic-line
|
||||
priority = 1
|
||||
|
||||
[Mapping analog-stereo]
|
||||
device-strings = front:%f hw:%f
|
||||
channel-map = left,right
|
||||
paths-output = analog-output analog-output-headphones analog-output-mono analog-output-lfe-on-mono
|
||||
paths-input = analog-input analog-input-mic analog-input-linein analog-input-aux analog-input-video analog-input-tvtuner analog-input-fm analog-input-mic-line
|
||||
priority = 10
|
||||
|
||||
[Mapping analog-surround-40]
|
||||
device-strings = surround40:%f
|
||||
channel-map = front-left,front-right,rear-left,rear-right
|
||||
paths-output = analog-output analog-output-lfe-on-mono
|
||||
priority = 7
|
||||
direction = output
|
||||
|
||||
[Mapping analog-surround-41]
|
||||
device-strings = surround41:%f
|
||||
channel-map = front-left,front-right,rear-left,rear-right,lfe
|
||||
paths-output = analog-output analog-output-lfe-on-mono
|
||||
priority = 8
|
||||
direction = output
|
||||
|
||||
[Mapping analog-surround-50]
|
||||
device-strings = surround50:%f
|
||||
channel-map = front-left,front-right,rear-left,rear-right,front-center
|
||||
paths-output = analog-output analog-output-lfe-on-mono
|
||||
priority = 7
|
||||
direction = output
|
||||
|
||||
[Mapping analog-surround-51]
|
||||
device-strings = surround51:%f
|
||||
channel-map = front-left,front-right,rear-left,rear-right,front-center,lfe
|
||||
paths-output = analog-output analog-output-lfe-on-mono
|
||||
priority = 8
|
||||
direction = output
|
||||
|
||||
[Mapping analog-surround-71]
|
||||
device-strings = surround71:%f
|
||||
channel-map = front-left,front-right,rear-left,rear-right,front-center,lfe,side-left,side-right
|
||||
description = Analog Surround 7.1
|
||||
paths-output = analog-output analog-output-lfe-on-mono
|
||||
priority = 7
|
||||
direction = output
|
||||
|
||||
[Mapping iec958-stereo]
|
||||
device-strings = iec958:%f
|
||||
channel-map = left,right
|
||||
priority = 5
|
||||
|
||||
[Mapping iec958-surround-40]
|
||||
device-strings = iec958:%f
|
||||
channel-map = front-left,front-right,rear-left,rear-right
|
||||
priority = 1
|
||||
|
||||
[Mapping iec958-ac3-surround-40]
|
||||
device-strings = a52:%f
|
||||
channel-map = front-left,front-right,rear-left,rear-right
|
||||
priority = 2
|
||||
direction = output
|
||||
|
||||
[Mapping iec958-ac3-surround-51]
|
||||
device-strings = a52:%f
|
||||
channel-map = front-left,front-right,rear-left,rear-right,front-center,lfe
|
||||
priority = 3
|
||||
direction = output
|
||||
|
||||
[Mapping hdmi-stereo]
|
||||
device-strings = hdmi:%f
|
||||
channel-map = left,right
|
||||
priority = 4
|
||||
direction = output
|
||||
|
||||
; An example for defining multiple-sink profiles
|
||||
#[Profile output:analog-stereo+output:iec958-stereo+input:analog-stereo]
|
||||
#description = Foobar
|
||||
#output-mappings = analog-stereo iec958-stereo
|
||||
#input-mappings = analog-stereo
|
||||
|
|
@ -0,0 +1,91 @@
|
|||
# This file is part of PulseAudio.
|
||||
#
|
||||
# PulseAudio 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.
|
||||
#
|
||||
# PulseAudio 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
|
||||
# General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU Lesser General Public License
|
||||
# along with PulseAudio; if not, write to the Free Software Foundation,
|
||||
# Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
|
||||
|
||||
; Native Instruments Audio 4 DJ
|
||||
;
|
||||
; This card has two stereo pairs of input and two stereo pairs of
|
||||
; output, named channels A and B. Channel B has an additional
|
||||
; Headphone connector.
|
||||
;
|
||||
; We knowingly only define a subset of the theoretically possible
|
||||
; mapping combinations as profiles here.
|
||||
;
|
||||
; See default.conf for an explanation on the directives used here.
|
||||
|
||||
[General]
|
||||
auto-profiles = no
|
||||
|
||||
[Mapping analog-stereo-a]
|
||||
description = Analog Stereo Channel A
|
||||
device-strings = hw:%f,0,0
|
||||
channel-map = left,right
|
||||
|
||||
[Mapping analog-stereo-b-output]
|
||||
description = Analog Stereo Channel B (Headphones)
|
||||
device-strings = hw:%f,0,1
|
||||
channel-map = left,right
|
||||
direction = output
|
||||
|
||||
[Mapping analog-stereo-b-input]
|
||||
description = Analog Stereo Channel B
|
||||
device-strings = hw:%f,0,1
|
||||
channel-map = left,right
|
||||
direction = input
|
||||
|
||||
[Profile output:analog-stereo-all+input:analog-stereo-all]
|
||||
description = Analog Stereo Duplex Channels A, B (Headphones)
|
||||
output-mappings = analog-stereo-a analog-stereo-b-output
|
||||
input-mappings = analog-stereo-a analog-stereo-b-input
|
||||
priority = 100
|
||||
skip-probe = yes
|
||||
|
||||
[Profile output:analog-stereo-a+input:analog-stereo-a]
|
||||
description = Analog Stereo Duplex Channel A
|
||||
output-mappings = analog-stereo-a
|
||||
input-mappings = analog-stereo-a
|
||||
priority = 40
|
||||
skip-probe = yes
|
||||
|
||||
[Profile output:analog-stereo-b+input:analog-stereo-b]
|
||||
description = Analog Stereo Duplex Channel B (Headphones)
|
||||
output-mappings = analog-stereo-b-output
|
||||
input-mappings = analog-stereo-b-input
|
||||
priority = 50
|
||||
skip-probe = yes
|
||||
|
||||
[Profile output:analog-stereo-a]
|
||||
description = Analog Stereo Output Channel A
|
||||
output-mappings = analog-stereo-a
|
||||
priority = 5
|
||||
skip-probe = yes
|
||||
|
||||
[Profile output:analog-stereo-b]
|
||||
description = Analog Stereo Output Channel B (Headphones)
|
||||
output-mappings = analog-stereo-b-output
|
||||
priority = 6
|
||||
skip-probe = yes
|
||||
|
||||
[Profile input:analog-stereo-a]
|
||||
description = Analog Stereo Input Channel A
|
||||
input-mappings = analog-stereo-a
|
||||
priority = 2
|
||||
skip-probe = yes
|
||||
|
||||
[Profile input:analog-stereo-b]
|
||||
description = Analog Stereo Input Channel B
|
||||
input-mappings = analog-stereo-b-input
|
||||
priority = 1
|
||||
skip-probe = yes
|
||||
|
|
@ -0,0 +1,162 @@
|
|||
# This file is part of PulseAudio.
|
||||
#
|
||||
# PulseAudio 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.
|
||||
#
|
||||
# PulseAudio 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
|
||||
# General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU Lesser General Public License
|
||||
# along with PulseAudio; if not, write to the Free Software Foundation,
|
||||
# Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
|
||||
|
||||
; Native Instruments Audio 8 DJ
|
||||
;
|
||||
; This card has four stereo pairs of input and four stereo pairs of
|
||||
; output, named channels A to D. Channel C has an additional Mic/Line
|
||||
; connector, channel D an additional Headphone connector.
|
||||
;
|
||||
; We knowingly only define a subset of the theoretically possible
|
||||
; mapping combinations as profiles here.
|
||||
;
|
||||
; See default.conf for an explanation on the directives used here.
|
||||
|
||||
[General]
|
||||
auto-profiles = no
|
||||
|
||||
[Mapping analog-stereo-a]
|
||||
description = Analog Stereo Channel A
|
||||
device-strings = hw:%f,0,0
|
||||
channel-map = left,right
|
||||
|
||||
[Mapping analog-stereo-b]
|
||||
description = Analog Stereo Channel B
|
||||
device-strings = hw:%f,0,1
|
||||
channel-map = left,right
|
||||
|
||||
# Since we want to set a different description for channel C's/D's input
|
||||
# and output we define two seperate mappings for them
|
||||
[Mapping analog-stereo-c-output]
|
||||
description = Analog Stereo Channel C
|
||||
device-strings = hw:%f,0,2
|
||||
channel-map = left,right
|
||||
direction = output
|
||||
|
||||
[Mapping analog-stereo-c-input]
|
||||
description = Analog Stereo Channel C (Line/Mic)
|
||||
device-strings = hw:%f,0,2
|
||||
channel-map = left,right
|
||||
direction = input
|
||||
|
||||
[Mapping analog-stereo-d-output]
|
||||
description = Analog Stereo Channel D (Headphones)
|
||||
device-strings = hw:%f,0,3
|
||||
channel-map = left,right
|
||||
direction = output
|
||||
|
||||
[Mapping analog-stereo-d-input]
|
||||
description = Analog Stereo Channel D
|
||||
device-strings = hw:%f,0,3
|
||||
channel-map = left,right
|
||||
direction = input
|
||||
|
||||
[Profile output:analog-stereo-all+input:analog-stereo-all]
|
||||
description = Analog Stereo Duplex Channels A, B, C (Line/Mic), D (Headphones)
|
||||
output-mappings = analog-stereo-a analog-stereo-b analog-stereo-c-output analog-stereo-d-output
|
||||
input-mappings = analog-stereo-a analog-stereo-b analog-stereo-c-input analog-stereo-d-input
|
||||
priority = 100
|
||||
skip-probe = yes
|
||||
|
||||
[Profile output:analog-stereo-d+input:analog-stereo-c]
|
||||
description = Analog Stereo Channel D (Headphones) Output, Channel C (Line/Mic) Input
|
||||
output-mappings = analog-stereo-d-output
|
||||
input-mappings = analog-stereo-c-input
|
||||
priority = 90
|
||||
skip-probe = yes
|
||||
|
||||
[Profile output:analog-stereo-c-d+input:analog-stereo-c-d]
|
||||
description = Analog Stereo Duplex Channels C (Line/Mic), D (Line/Mic)
|
||||
output-mappings = analog-stereo-c-output analog-stereo-d-output
|
||||
input-mappings = analog-stereo-c-input analog-stereo-d-input
|
||||
priority = 80
|
||||
skip-probe = yes
|
||||
|
||||
[Profile output:analog-stereo-a+input:analog-stereo-a]
|
||||
description = Analog Stereo Duplex Channel A
|
||||
output-mappings = analog-stereo-a
|
||||
input-mappings = analog-stereo-a
|
||||
priority = 50
|
||||
skip-probe = yes
|
||||
|
||||
[Profile output:analog-stereo-b+input:analog-stereo-b]
|
||||
description = Analog Stereo Duplex Channel B
|
||||
output-mappings = analog-stereo-b
|
||||
input-mappings = analog-stereo-b
|
||||
priority = 40
|
||||
skip-probe = yes
|
||||
|
||||
[Profile output:analog-stereo-c+input:analog-stereo-c]
|
||||
description = Analog Stereo Duplex Channel C (Line/Mic)
|
||||
output-mappings = analog-stereo-c-output
|
||||
input-mappings = analog-stereo-c-input
|
||||
priority = 60
|
||||
skip-probe = yes
|
||||
|
||||
[Profile output:analog-stereo-d+input:analog-stereo-d]
|
||||
description = Analog Stereo Duplex Channel D (Headphones)
|
||||
output-mappings = analog-stereo-d-output
|
||||
input-mappings = analog-stereo-d-input
|
||||
priority = 70
|
||||
skip-probe = yes
|
||||
|
||||
[Profile output:analog-stereo-a]
|
||||
description = Analog Stereo Output Channel A
|
||||
output-mappings = analog-stereo-a
|
||||
priority = 6
|
||||
skip-probe = yes
|
||||
|
||||
[Profile output:analog-stereo-b]
|
||||
description = Analog Stereo Output Channel B
|
||||
output-mappings = analog-stereo-b
|
||||
priority = 5
|
||||
skip-probe = yes
|
||||
|
||||
[Profile output:analog-stereo-c]
|
||||
description = Analog Stereo Output Channel C
|
||||
output-mappings = analog-stereo-c-output
|
||||
priority = 7
|
||||
skip-probe = yes
|
||||
|
||||
[Profile output:analog-stereo-d]
|
||||
description = Analog Stereo Output Channel D (Headphones)
|
||||
output-mappings = analog-stereo-d-output
|
||||
priority = 8
|
||||
skip-probe = yes
|
||||
|
||||
[Profile input:analog-stereo-a]
|
||||
description = Analog Stereo Input Channel A
|
||||
input-mappings = analog-stereo-a
|
||||
priority = 2
|
||||
skip-probe = yes
|
||||
|
||||
[Profile input:analog-stereo-b]
|
||||
description = Analog Stereo Input Channel B
|
||||
input-mappings = analog-stereo-b
|
||||
priority = 1
|
||||
skip-probe = yes
|
||||
|
||||
[Profile input:analog-stereo-c]
|
||||
description = Analog Stereo Input Channel C (Line/Mic)
|
||||
input-mappings = analog-stereo-c-input
|
||||
priority = 4
|
||||
skip-probe = yes
|
||||
|
||||
[Profile input:analog-stereo-d]
|
||||
description = Analog Stereo Input Channel D
|
||||
input-mappings = analog-stereo-d-input
|
||||
priority = 3
|
||||
skip-probe = yes
|
||||
150
src/modules/alsa/mixer/samples/ATI IXP--Realtek ALC655 rev 0
Normal file
150
src/modules/alsa/mixer/samples/ATI IXP--Realtek ALC655 rev 0
Normal file
|
|
@ -0,0 +1,150 @@
|
|||
Simple mixer control 'Master',0
|
||||
Capabilities: pvolume pswitch pswitch-joined
|
||||
Playback channels: Front Left - Front Right
|
||||
Limits: Playback 0 - 31
|
||||
Mono:
|
||||
Front Left: Playback 29 [94%] [-3.00dB] [on]
|
||||
Front Right: Playback 29 [94%] [-3.00dB] [on]
|
||||
Simple mixer control 'Master Mono',0
|
||||
Capabilities: pvolume pvolume-joined pswitch pswitch-joined
|
||||
Playback channels: Mono
|
||||
Limits: Playback 0 - 31
|
||||
Mono: Playback 0 [0%] [-46.50dB] [off]
|
||||
Simple mixer control 'PCM',0
|
||||
Capabilities: pvolume pswitch pswitch-joined
|
||||
Playback channels: Front Left - Front Right
|
||||
Limits: Playback 0 - 31
|
||||
Mono:
|
||||
Front Left: Playback 23 [74%] [0.00dB] [on]
|
||||
Front Right: Playback 23 [74%] [0.00dB] [on]
|
||||
Simple mixer control 'Surround',0
|
||||
Capabilities: pvolume pswitch
|
||||
Playback channels: Front Left - Front Right
|
||||
Limits: Playback 0 - 31
|
||||
Mono:
|
||||
Front Left: Playback 0 [0%] [-46.50dB] [off]
|
||||
Front Right: Playback 0 [0%] [-46.50dB] [off]
|
||||
Simple mixer control 'Surround Jack Mode',0
|
||||
Capabilities: enum
|
||||
Items: 'Shared' 'Independent'
|
||||
Item0: 'Shared'
|
||||
Simple mixer control 'Center',0
|
||||
Capabilities: pvolume pvolume-joined pswitch pswitch-joined
|
||||
Playback channels: Mono
|
||||
Limits: Playback 0 - 31
|
||||
Mono: Playback 0 [0%] [-46.50dB] [off]
|
||||
Simple mixer control 'LFE',0
|
||||
Capabilities: pvolume pvolume-joined pswitch pswitch-joined
|
||||
Playback channels: Mono
|
||||
Limits: Playback 0 - 31
|
||||
Mono: Playback 0 [0%] [-46.50dB] [off]
|
||||
Simple mixer control 'Line',0
|
||||
Capabilities: pvolume pswitch pswitch-joined cswitch cswitch-exclusive
|
||||
Capture exclusive group: 0
|
||||
Playback channels: Front Left - Front Right
|
||||
Capture channels: Front Left - Front Right
|
||||
Limits: Playback 0 - 31
|
||||
Front Left: Playback 0 [0%] [-34.50dB] [off] Capture [off]
|
||||
Front Right: Playback 0 [0%] [-34.50dB] [off] Capture [off]
|
||||
Simple mixer control 'CD',0
|
||||
Capabilities: pvolume pswitch pswitch-joined cswitch cswitch-exclusive
|
||||
Capture exclusive group: 0
|
||||
Playback channels: Front Left - Front Right
|
||||
Capture channels: Front Left - Front Right
|
||||
Limits: Playback 0 - 31
|
||||
Front Left: Playback 0 [0%] [-34.50dB] [off] Capture [off]
|
||||
Front Right: Playback 0 [0%] [-34.50dB] [off] Capture [off]
|
||||
Simple mixer control 'Mic',0
|
||||
Capabilities: pvolume pvolume-joined pswitch pswitch-joined cswitch cswitch-exclusive
|
||||
Capture exclusive group: 0
|
||||
Playback channels: Mono
|
||||
Capture channels: Front Left - Front Right
|
||||
Limits: Playback 0 - 31
|
||||
Mono: Playback 0 [0%] [-34.50dB] [off]
|
||||
Front Left: Capture [on]
|
||||
Front Right: Capture [on]
|
||||
Simple mixer control 'Mic Boost (+20dB)',0
|
||||
Capabilities: pswitch pswitch-joined
|
||||
Playback channels: Mono
|
||||
Mono: Playback [off]
|
||||
Simple mixer control 'Mic Select',0
|
||||
Capabilities: enum
|
||||
Items: 'Mic1' 'Mic2'
|
||||
Item0: 'Mic1'
|
||||
Simple mixer control 'Video',0
|
||||
Capabilities: cswitch cswitch-exclusive
|
||||
Capture exclusive group: 0
|
||||
Capture channels: Front Left - Front Right
|
||||
Front Left: Capture [off]
|
||||
Front Right: Capture [off]
|
||||
Simple mixer control 'Phone',0
|
||||
Capabilities: pvolume pvolume-joined pswitch pswitch-joined cswitch cswitch-exclusive
|
||||
Capture exclusive group: 0
|
||||
Playback channels: Mono
|
||||
Capture channels: Front Left - Front Right
|
||||
Limits: Playback 0 - 31
|
||||
Mono: Playback 31 [100%] [12.00dB] [off]
|
||||
Front Left: Capture [off]
|
||||
Front Right: Capture [off]
|
||||
Simple mixer control 'IEC958',0
|
||||
Capabilities: pswitch pswitch-joined cswitch cswitch-joined
|
||||
Playback channels: Mono
|
||||
Capture channels: Mono
|
||||
Mono: Playback [off] Capture [off]
|
||||
Simple mixer control 'IEC958 Playback AC97-SPSA',0
|
||||
Capabilities: volume volume-joined
|
||||
Playback channels: Mono
|
||||
Capture channels: Mono
|
||||
Limits: 0 - 3
|
||||
Mono: 0 [0%]
|
||||
Simple mixer control 'IEC958 Playback Source',0
|
||||
Capabilities: enum
|
||||
Items: 'PCM' 'Analog In' 'IEC958 In'
|
||||
Item0: 'PCM'
|
||||
Simple mixer control 'PC Speaker',0
|
||||
Capabilities: pvolume pvolume-joined pswitch pswitch-joined
|
||||
Playback channels: Mono
|
||||
Limits: Playback 0 - 15
|
||||
Mono: Playback 0 [0%] [-45.00dB] [on]
|
||||
Simple mixer control 'Aux',0
|
||||
Capabilities: pvolume pswitch pswitch-joined cswitch cswitch-exclusive
|
||||
Capture exclusive group: 0
|
||||
Playback channels: Front Left - Front Right
|
||||
Capture channels: Front Left - Front Right
|
||||
Limits: Playback 0 - 31
|
||||
Front Left: Playback 0 [0%] [-34.50dB] [on] Capture [off]
|
||||
Front Right: Playback 0 [0%] [-34.50dB] [on] Capture [off]
|
||||
Simple mixer control 'Mono Output Select',0
|
||||
Capabilities: enum
|
||||
Items: 'Mix' 'Mic'
|
||||
Item0: 'Mix'
|
||||
Simple mixer control 'Capture',0
|
||||
Capabilities: cvolume cswitch cswitch-joined
|
||||
Capture channels: Front Left - Front Right
|
||||
Limits: Capture 0 - 15
|
||||
Front Left: Capture 12 [80%] [18.00dB] [on]
|
||||
Front Right: Capture 12 [80%] [18.00dB] [on]
|
||||
Simple mixer control 'Mix',0
|
||||
Capabilities: cswitch cswitch-exclusive
|
||||
Capture exclusive group: 0
|
||||
Capture channels: Front Left - Front Right
|
||||
Front Left: Capture [off]
|
||||
Front Right: Capture [off]
|
||||
Simple mixer control 'Mix Mono',0
|
||||
Capabilities: cswitch cswitch-exclusive
|
||||
Capture exclusive group: 0
|
||||
Capture channels: Front Left - Front Right
|
||||
Front Left: Capture [off]
|
||||
Front Right: Capture [off]
|
||||
Simple mixer control 'Channel Mode',0
|
||||
Capabilities: enum
|
||||
Items: '2ch' '4ch' '6ch'
|
||||
Item0: '2ch'
|
||||
Simple mixer control 'Duplicate Front',0
|
||||
Capabilities: pswitch pswitch-joined
|
||||
Playback channels: Mono
|
||||
Mono: Playback [off]
|
||||
Simple mixer control 'External Amplifier',0
|
||||
Capabilities: pswitch pswitch-joined
|
||||
Playback channels: Mono
|
||||
Mono: Playback [on]
|
||||
24
src/modules/alsa/mixer/samples/Brooktree Bt878--Bt87x
Normal file
24
src/modules/alsa/mixer/samples/Brooktree Bt878--Bt87x
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
Simple mixer control 'FM',0
|
||||
Capabilities: cswitch cswitch-joined cswitch-exclusive
|
||||
Capture exclusive group: 0
|
||||
Capture channels: Mono
|
||||
Mono: Capture [off]
|
||||
Simple mixer control 'Mic/Line',0
|
||||
Capabilities: cswitch cswitch-joined cswitch-exclusive
|
||||
Capture exclusive group: 0
|
||||
Capture channels: Mono
|
||||
Mono: Capture [off]
|
||||
Simple mixer control 'Capture',0
|
||||
Capabilities: cvolume cvolume-joined
|
||||
Capture channels: Mono
|
||||
Limits: Capture 0 - 15
|
||||
Mono: Capture 13 [87%]
|
||||
Simple mixer control 'Capture Boost',0
|
||||
Capabilities: pswitch pswitch-joined
|
||||
Playback channels: Mono
|
||||
Mono: Playback [on]
|
||||
Simple mixer control 'TV Tuner',0
|
||||
Capabilities: cswitch cswitch-joined cswitch-exclusive
|
||||
Capture exclusive group: 0
|
||||
Capture channels: Mono
|
||||
Mono: Capture [on]
|
||||
|
|
@ -0,0 +1,135 @@
|
|||
Simple mixer control 'Master',0
|
||||
Capabilities: pvolume pswitch pswitch-joined
|
||||
Playback channels: Front Left - Front Right
|
||||
Limits: Playback 0 - 63
|
||||
Mono:
|
||||
Front Left: Playback 63 [100%] [0.00dB] [on]
|
||||
Front Right: Playback 63 [100%] [0.00dB] [on]
|
||||
Simple mixer control 'Master Mono',0
|
||||
Capabilities: pvolume pvolume-joined pswitch pswitch-joined
|
||||
Playback channels: Mono
|
||||
Limits: Playback 0 - 31
|
||||
Mono: Playback 0 [0%] [-46.50dB] [off]
|
||||
Simple mixer control 'Headphone',0
|
||||
Capabilities: pvolume pswitch pswitch-joined
|
||||
Playback channels: Front Left - Front Right
|
||||
Limits: Playback 0 - 31
|
||||
Mono:
|
||||
Front Left: Playback 0 [0%] [-46.50dB] [off]
|
||||
Front Right: Playback 0 [0%] [-46.50dB] [off]
|
||||
Simple mixer control '3D Control - Center',0
|
||||
Capabilities: volume volume-joined
|
||||
Playback channels: Mono
|
||||
Capture channels: Mono
|
||||
Limits: 0 - 15
|
||||
Mono: 0 [0%]
|
||||
Simple mixer control '3D Control - Depth',0
|
||||
Capabilities: volume volume-joined
|
||||
Playback channels: Mono
|
||||
Capture channels: Mono
|
||||
Limits: 0 - 15
|
||||
Mono: 0 [0%]
|
||||
Simple mixer control '3D Control - Switch',0
|
||||
Capabilities: pswitch pswitch-joined
|
||||
Playback channels: Mono
|
||||
Mono: Playback [off]
|
||||
Simple mixer control 'PCM',0
|
||||
Capabilities: pvolume pswitch pswitch-joined
|
||||
Playback channels: Front Left - Front Right
|
||||
Limits: Playback 0 - 31
|
||||
Mono:
|
||||
Front Left: Playback 23 [74%] [0.00dB] [on]
|
||||
Front Right: Playback 23 [74%] [0.00dB] [on]
|
||||
Simple mixer control 'Line',0
|
||||
Capabilities: pvolume pswitch pswitch-joined cswitch cswitch-exclusive
|
||||
Capture exclusive group: 0
|
||||
Playback channels: Front Left - Front Right
|
||||
Capture channels: Front Left - Front Right
|
||||
Limits: Playback 0 - 31
|
||||
Front Left: Playback 0 [0%] [-34.50dB] [off] Capture [on]
|
||||
Front Right: Playback 0 [0%] [-34.50dB] [off] Capture [on]
|
||||
Simple mixer control 'CD',0
|
||||
Capabilities: pvolume pswitch pswitch-joined cswitch cswitch-exclusive
|
||||
Capture exclusive group: 0
|
||||
Playback channels: Front Left - Front Right
|
||||
Capture channels: Front Left - Front Right
|
||||
Limits: Playback 0 - 31
|
||||
Front Left: Playback 0 [0%] [-34.50dB] [off] Capture [off]
|
||||
Front Right: Playback 0 [0%] [-34.50dB] [off] Capture [off]
|
||||
Simple mixer control 'Mic',0
|
||||
Capabilities: pvolume pvolume-joined pswitch pswitch-joined cswitch cswitch-exclusive
|
||||
Capture exclusive group: 0
|
||||
Playback channels: Mono
|
||||
Capture channels: Front Left - Front Right
|
||||
Limits: Playback 0 - 31
|
||||
Mono: Playback 23 [74%] [0.00dB] [on]
|
||||
Front Left: Capture [off]
|
||||
Front Right: Capture [off]
|
||||
Simple mixer control 'Mic Boost (+20dB)',0
|
||||
Capabilities: pswitch pswitch-joined
|
||||
Playback channels: Mono
|
||||
Mono: Playback [off]
|
||||
Simple mixer control 'Mic Select',0
|
||||
Capabilities: enum
|
||||
Items: 'Mic1' 'Mic2'
|
||||
Item0: 'Mic1'
|
||||
Simple mixer control 'Video',0
|
||||
Capabilities: pvolume pswitch pswitch-joined cswitch cswitch-exclusive
|
||||
Capture exclusive group: 0
|
||||
Playback channels: Front Left - Front Right
|
||||
Capture channels: Front Left - Front Right
|
||||
Limits: Playback 0 - 31
|
||||
Front Left: Playback 0 [0%] [-34.50dB] [off] Capture [off]
|
||||
Front Right: Playback 0 [0%] [-34.50dB] [off] Capture [off]
|
||||
Simple mixer control 'Phone',0
|
||||
Capabilities: pvolume pvolume-joined pswitch pswitch-joined cswitch cswitch-exclusive
|
||||
Capture exclusive group: 0
|
||||
Playback channels: Mono
|
||||
Capture channels: Front Left - Front Right
|
||||
Limits: Playback 0 - 31
|
||||
Mono: Playback 0 [0%] [-34.50dB] [off]
|
||||
Front Left: Capture [off]
|
||||
Front Right: Capture [off]
|
||||
Simple mixer control 'IEC958',0
|
||||
Capabilities: pswitch pswitch-joined
|
||||
Playback channels: Mono
|
||||
Mono: Playback [off]
|
||||
Simple mixer control 'PC Speaker',0
|
||||
Capabilities: pvolume pvolume-joined pswitch pswitch-joined
|
||||
Playback channels: Mono
|
||||
Limits: Playback 0 - 15
|
||||
Mono: Playback 0 [0%] [-45.00dB] [off]
|
||||
Simple mixer control 'Aux',0
|
||||
Capabilities: pvolume pswitch pswitch-joined cswitch cswitch-exclusive
|
||||
Capture exclusive group: 0
|
||||
Playback channels: Front Left - Front Right
|
||||
Capture channels: Front Left - Front Right
|
||||
Limits: Playback 0 - 31
|
||||
Front Left: Playback 0 [0%] [-34.50dB] [off] Capture [off]
|
||||
Front Right: Playback 0 [0%] [-34.50dB] [off] Capture [off]
|
||||
Simple mixer control 'Mono Output Select',0
|
||||
Capabilities: enum
|
||||
Items: 'Mix' 'Mic'
|
||||
Item0: 'Mic'
|
||||
Simple mixer control 'Capture',0
|
||||
Capabilities: cvolume cswitch cswitch-joined
|
||||
Capture channels: Front Left - Front Right
|
||||
Limits: Capture 0 - 15
|
||||
Front Left: Capture 15 [100%] [22.50dB] [on]
|
||||
Front Right: Capture 15 [100%] [22.50dB] [on]
|
||||
Simple mixer control 'Mix',0
|
||||
Capabilities: cswitch cswitch-exclusive
|
||||
Capture exclusive group: 0
|
||||
Capture channels: Front Left - Front Right
|
||||
Front Left: Capture [off]
|
||||
Front Right: Capture [off]
|
||||
Simple mixer control 'Mix Mono',0
|
||||
Capabilities: cswitch cswitch-exclusive
|
||||
Capture exclusive group: 0
|
||||
Capture channels: Front Left - Front Right
|
||||
Front Left: Capture [off]
|
||||
Front Right: Capture [off]
|
||||
Simple mixer control 'External Amplifier',0
|
||||
Capabilities: pswitch pswitch-joined
|
||||
Playback channels: Mono
|
||||
Mono: Playback [off]
|
||||
|
|
@ -0,0 +1,4 @@
|
|||
Simple mixer control 'IEC958',0
|
||||
Capabilities: pswitch pswitch-joined
|
||||
Playback channels: Mono
|
||||
Mono: Playback [on]
|
||||
|
|
@ -0,0 +1,62 @@
|
|||
Simple mixer control 'Master',0
|
||||
Capabilities: pvolume pswitch
|
||||
Playback channels: Front Left - Front Right
|
||||
Limits: Playback 0 - 63
|
||||
Mono:
|
||||
Front Left: Playback 63 [100%] [3.00dB] [on]
|
||||
Front Right: Playback 63 [100%] [3.00dB] [on]
|
||||
Simple mixer control 'PCM',0
|
||||
Capabilities: pvolume pswitch
|
||||
Playback channels: Front Left - Front Right
|
||||
Limits: Playback 0 - 31
|
||||
Mono:
|
||||
Front Left: Playback 23 [74%] [0.00dB] [on]
|
||||
Front Right: Playback 23 [74%] [0.00dB] [on]
|
||||
Simple mixer control 'CD',0
|
||||
Capabilities: pvolume pswitch cswitch cswitch-joined cswitch-exclusive
|
||||
Capture exclusive group: 0
|
||||
Playback channels: Front Left - Front Right
|
||||
Capture channels: Mono
|
||||
Limits: Playback 0 - 31
|
||||
Mono: Capture [off]
|
||||
Front Left: Playback 0 [0%] [-34.50dB] [off]
|
||||
Front Right: Playback 0 [0%] [-34.50dB] [off]
|
||||
Simple mixer control 'Mic',0
|
||||
Capabilities: pvolume pswitch cswitch cswitch-joined cswitch-exclusive
|
||||
Capture exclusive group: 0
|
||||
Playback channels: Front Left - Front Right
|
||||
Capture channels: Mono
|
||||
Limits: Playback 0 - 31
|
||||
Mono: Capture [on]
|
||||
Front Left: Playback 0 [0%] [-34.50dB] [off]
|
||||
Front Right: Playback 0 [0%] [-34.50dB] [off]
|
||||
Simple mixer control 'Mic Boost',0
|
||||
Capabilities: volume
|
||||
Playback channels: Front Left - Front Right
|
||||
Capture channels: Front Left - Front Right
|
||||
Limits: 0 - 3
|
||||
Front Left: 0 [0%]
|
||||
Front Right: 0 [0%]
|
||||
Simple mixer control 'IEC958',0
|
||||
Capabilities: pswitch pswitch-joined
|
||||
Playback channels: Mono
|
||||
Mono: Playback [off]
|
||||
Simple mixer control 'IEC958 Default PCM',0
|
||||
Capabilities: pswitch pswitch-joined
|
||||
Playback channels: Mono
|
||||
Mono: Playback [off]
|
||||
Simple mixer control 'IEC958 Playback Source',0
|
||||
Capabilities: enum
|
||||
Items: 'PCM' 'ADC'
|
||||
Item0: 'PCM'
|
||||
Simple mixer control 'Capture',0
|
||||
Capabilities: cvolume cswitch
|
||||
Capture channels: Front Left - Front Right
|
||||
Limits: Capture 0 - 15
|
||||
Front Left: Capture 0 [0%] [0.00dB] [on]
|
||||
Front Right: Capture 0 [0%] [0.00dB] [on]
|
||||
Simple mixer control 'Mix',0
|
||||
Capabilities: cswitch cswitch-joined cswitch-exclusive
|
||||
Capture exclusive group: 0
|
||||
Capture channels: Mono
|
||||
Mono: Capture [off]
|
||||
|
|
@ -0,0 +1,42 @@
|
|||
Simple mixer control 'Master',0
|
||||
Capabilities: pvolume pswitch pswitch-joined
|
||||
Playback channels: Front Left - Front Right
|
||||
Limits: Playback 0 - 30
|
||||
Mono:
|
||||
Front Left: Playback 17 [57%] [-21.00dB] [on]
|
||||
Front Right: Playback 17 [57%] [-21.00dB] [on]
|
||||
Simple mixer control 'PCM',0
|
||||
Capabilities: pvolume pswitch
|
||||
Playback channels: Front Left - Front Right
|
||||
Limits: Playback 0 - 255
|
||||
Mono:
|
||||
Front Left: Playback 230 [90%] [-5.00dB] [on]
|
||||
Front Right: Playback 230 [90%] [-5.00dB] [on]
|
||||
Simple mixer control 'Mic',0
|
||||
Capabilities: pvolume pswitch
|
||||
Playback channels: Front Left - Front Right
|
||||
Limits: Playback 0 - 30
|
||||
Mono:
|
||||
Front Left: Playback 19 [63%] [-6.00dB] [on]
|
||||
Front Right: Playback 19 [63%] [-6.00dB] [on]
|
||||
Simple mixer control 'Mic Boost',0
|
||||
Capabilities: volume
|
||||
Playback channels: Front Left - Front Right
|
||||
Capture channels: Front Left - Front Right
|
||||
Limits: 0 - 3
|
||||
Front Left: 3 [100%]
|
||||
Front Right: 3 [100%]
|
||||
Simple mixer control 'IEC958',0
|
||||
Capabilities: pswitch pswitch-joined
|
||||
Playback channels: Mono
|
||||
Mono: Playback [on]
|
||||
Simple mixer control 'IEC958 Default PCM',0
|
||||
Capabilities: pswitch pswitch-joined
|
||||
Playback channels: Mono
|
||||
Mono: Playback [on]
|
||||
Simple mixer control 'Capture',0
|
||||
Capabilities: cvolume cswitch
|
||||
Capture channels: Front Left - Front Right
|
||||
Limits: Capture 0 - 14
|
||||
Front Left: Capture 0 [0%] [0.00dB] [off]
|
||||
Front Right: Capture 0 [0%] [0.00dB] [off]
|
||||
113
src/modules/alsa/mixer/samples/HDA Intel--Realtek ALC889A
Normal file
113
src/modules/alsa/mixer/samples/HDA Intel--Realtek ALC889A
Normal file
|
|
@ -0,0 +1,113 @@
|
|||
Simple mixer control 'Master',0
|
||||
Capabilities: pvolume pvolume-joined pswitch pswitch-joined
|
||||
Playback channels: Mono
|
||||
Limits: Playback 0 - 64
|
||||
Mono: Playback 64 [100%] [0.00dB] [on]
|
||||
Simple mixer control 'Headphone',0
|
||||
Capabilities: pswitch
|
||||
Playback channels: Front Left - Front Right
|
||||
Mono:
|
||||
Front Left: Playback [on]
|
||||
Front Right: Playback [on]
|
||||
Simple mixer control 'PCM',0
|
||||
Capabilities: pvolume
|
||||
Playback channels: Front Left - Front Right
|
||||
Limits: Playback 0 - 255
|
||||
Mono:
|
||||
Front Left: Playback 255 [100%] [0.00dB]
|
||||
Front Right: Playback 255 [100%] [0.00dB]
|
||||
Simple mixer control 'Front',0
|
||||
Capabilities: pvolume pswitch
|
||||
Playback channels: Front Left - Front Right
|
||||
Limits: Playback 0 - 64
|
||||
Mono:
|
||||
Front Left: Playback 44 [69%] [-20.00dB] [on]
|
||||
Front Right: Playback 44 [69%] [-20.00dB] [on]
|
||||
Simple mixer control 'Front Mic',0
|
||||
Capabilities: pvolume pswitch
|
||||
Playback channels: Front Left - Front Right
|
||||
Limits: Playback 0 - 31
|
||||
Mono:
|
||||
Front Left: Playback 0 [0%] [-34.50dB] [off]
|
||||
Front Right: Playback 0 [0%] [-34.50dB] [off]
|
||||
Simple mixer control 'Front Mic Boost',0
|
||||
Capabilities: volume
|
||||
Playback channels: Front Left - Front Right
|
||||
Capture channels: Front Left - Front Right
|
||||
Limits: 0 - 3
|
||||
Front Left: 0 [0%]
|
||||
Front Right: 0 [0%]
|
||||
Simple mixer control 'Surround',0
|
||||
Capabilities: pvolume pswitch
|
||||
Playback channels: Front Left - Front Right
|
||||
Limits: Playback 0 - 64
|
||||
Mono:
|
||||
Front Left: Playback 0 [0%] [-64.00dB] [on]
|
||||
Front Right: Playback 0 [0%] [-64.00dB] [on]
|
||||
Simple mixer control 'Center',0
|
||||
Capabilities: pvolume pvolume-joined pswitch pswitch-joined
|
||||
Playback channels: Mono
|
||||
Limits: Playback 0 - 64
|
||||
Mono: Playback 0 [0%] [-64.00dB] [on]
|
||||
Simple mixer control 'LFE',0
|
||||
Capabilities: pvolume pvolume-joined pswitch pswitch-joined
|
||||
Playback channels: Mono
|
||||
Limits: Playback 0 - 64
|
||||
Mono: Playback 0 [0%] [-64.00dB] [on]
|
||||
Simple mixer control 'Side',0
|
||||
Capabilities: pvolume pswitch
|
||||
Playback channels: Front Left - Front Right
|
||||
Limits: Playback 0 - 64
|
||||
Mono:
|
||||
Front Left: Playback 0 [0%] [-64.00dB] [on]
|
||||
Front Right: Playback 0 [0%] [-64.00dB] [on]
|
||||
Simple mixer control 'Line',0
|
||||
Capabilities: pvolume pswitch
|
||||
Playback channels: Front Left - Front Right
|
||||
Limits: Playback 0 - 31
|
||||
Mono:
|
||||
Front Left: Playback 0 [0%] [-34.50dB] [off]
|
||||
Front Right: Playback 0 [0%] [-34.50dB] [off]
|
||||
Simple mixer control 'Mic',0
|
||||
Capabilities: pvolume pswitch
|
||||
Playback channels: Front Left - Front Right
|
||||
Limits: Playback 0 - 31
|
||||
Mono:
|
||||
Front Left: Playback 0 [0%] [-34.50dB] [off]
|
||||
Front Right: Playback 0 [0%] [-34.50dB] [off]
|
||||
Simple mixer control 'Mic Boost',0
|
||||
Capabilities: volume
|
||||
Playback channels: Front Left - Front Right
|
||||
Capture channels: Front Left - Front Right
|
||||
Limits: 0 - 3
|
||||
Front Left: 0 [0%]
|
||||
Front Right: 0 [0%]
|
||||
Simple mixer control 'IEC958',0
|
||||
Capabilities: pswitch pswitch-joined cswitch cswitch-joined
|
||||
Playback channels: Mono
|
||||
Capture channels: Mono
|
||||
Mono: Playback [on] Capture [on]
|
||||
Simple mixer control 'IEC958 Default PCM',0
|
||||
Capabilities: pswitch pswitch-joined
|
||||
Playback channels: Mono
|
||||
Mono: Playback [on]
|
||||
Simple mixer control 'Capture',0
|
||||
Capabilities: cvolume cswitch
|
||||
Capture channels: Front Left - Front Right
|
||||
Limits: Capture 0 - 46
|
||||
Front Left: Capture 23 [50%] [7.00dB] [on]
|
||||
Front Right: Capture 23 [50%] [7.00dB] [on]
|
||||
Simple mixer control 'Capture',1
|
||||
Capabilities: cvolume cswitch
|
||||
Capture channels: Front Left - Front Right
|
||||
Limits: Capture 0 - 46
|
||||
Front Left: Capture 0 [0%] [-16.00dB] [off]
|
||||
Front Right: Capture 0 [0%] [-16.00dB] [off]
|
||||
Simple mixer control 'Input Source',0
|
||||
Capabilities: cenum
|
||||
Items: 'Mic' 'Front Mic' 'Line'
|
||||
Item0: 'Mic'
|
||||
Simple mixer control 'Input Source',1
|
||||
Capabilities: cenum
|
||||
Items: 'Mic' 'Front Mic' 'Line'
|
||||
Item0: 'Mic'
|
||||
|
|
@ -0,0 +1,128 @@
|
|||
Simple mixer control 'Master',0
|
||||
Capabilities: pvolume pswitch pswitch-joined
|
||||
Playback channels: Front Left - Front Right
|
||||
Limits: Playback 0 - 63
|
||||
Mono:
|
||||
Front Left: Playback 44 [70%] [-28.50dB] [on]
|
||||
Front Right: Playback 60 [95%] [-4.50dB] [on]
|
||||
Simple mixer control 'Master Mono',0
|
||||
Capabilities: pvolume pvolume-joined pswitch pswitch-joined
|
||||
Playback channels: Mono
|
||||
Limits: Playback 0 - 31
|
||||
Mono: Playback 17 [55%] [-21.00dB] [on]
|
||||
Simple mixer control '3D Control - Center',0
|
||||
Capabilities: volume volume-joined
|
||||
Playback channels: Mono
|
||||
Capture channels: Mono
|
||||
Limits: 0 - 15
|
||||
Mono: 0 [0%]
|
||||
Simple mixer control '3D Control - Depth',0
|
||||
Capabilities: volume volume-joined
|
||||
Playback channels: Mono
|
||||
Capture channels: Mono
|
||||
Limits: 0 - 15
|
||||
Mono: 0 [0%]
|
||||
Simple mixer control '3D Control - Switch',0
|
||||
Capabilities: pswitch pswitch-joined
|
||||
Playback channels: Mono
|
||||
Mono: Playback [off]
|
||||
Simple mixer control 'PCM',0
|
||||
Capabilities: pvolume pswitch pswitch-joined
|
||||
Playback channels: Front Left - Front Right
|
||||
Limits: Playback 0 - 31
|
||||
Mono:
|
||||
Front Left: Playback 9 [29%] [-21.00dB] [on]
|
||||
Front Right: Playback 9 [29%] [-21.00dB] [on]
|
||||
Simple mixer control 'PCM Out Path & Mute',0
|
||||
Capabilities: enum
|
||||
Items: 'pre 3D' 'post 3D'
|
||||
Item0: 'pre 3D'
|
||||
Simple mixer control 'Line',0
|
||||
Capabilities: pvolume pswitch pswitch-joined cswitch cswitch-exclusive
|
||||
Capture exclusive group: 0
|
||||
Playback channels: Front Left - Front Right
|
||||
Capture channels: Front Left - Front Right
|
||||
Limits: Playback 0 - 31
|
||||
Front Left: Playback 0 [0%] [-34.50dB] [off] Capture [off]
|
||||
Front Right: Playback 0 [0%] [-34.50dB] [off] Capture [off]
|
||||
Simple mixer control 'CD',0
|
||||
Capabilities: pvolume pswitch pswitch-joined cswitch cswitch-exclusive
|
||||
Capture exclusive group: 0
|
||||
Playback channels: Front Left - Front Right
|
||||
Capture channels: Front Left - Front Right
|
||||
Limits: Playback 0 - 31
|
||||
Front Left: Playback 9 [29%] [-21.00dB] [on] Capture [off]
|
||||
Front Right: Playback 9 [29%] [-21.00dB] [on] Capture [off]
|
||||
Simple mixer control 'Mic',0
|
||||
Capabilities: pvolume pvolume-joined pswitch pswitch-joined cswitch cswitch-exclusive
|
||||
Capture exclusive group: 0
|
||||
Playback channels: Mono
|
||||
Capture channels: Front Left - Front Right
|
||||
Limits: Playback 0 - 31
|
||||
Mono: Playback 0 [0%] [-34.50dB] [off]
|
||||
Front Left: Capture [on]
|
||||
Front Right: Capture [on]
|
||||
Simple mixer control 'Mic Boost (+20dB)',0
|
||||
Capabilities: pswitch pswitch-joined
|
||||
Playback channels: Mono
|
||||
Mono: Playback [off]
|
||||
Simple mixer control 'Mic Select',0
|
||||
Capabilities: enum
|
||||
Items: 'Mic1' 'Mic2'
|
||||
Item0: 'Mic1'
|
||||
Simple mixer control 'Video',0
|
||||
Capabilities: pvolume pswitch pswitch-joined cswitch cswitch-exclusive
|
||||
Capture exclusive group: 0
|
||||
Playback channels: Front Left - Front Right
|
||||
Capture channels: Front Left - Front Right
|
||||
Limits: Playback 0 - 31
|
||||
Front Left: Playback 0 [0%] [-34.50dB] [off] Capture [off]
|
||||
Front Right: Playback 0 [0%] [-34.50dB] [off] Capture [off]
|
||||
Simple mixer control 'Phone',0
|
||||
Capabilities: pvolume pvolume-joined pswitch pswitch-joined cswitch cswitch-exclusive
|
||||
Capture exclusive group: 0
|
||||
Playback channels: Mono
|
||||
Capture channels: Front Left - Front Right
|
||||
Limits: Playback 0 - 31
|
||||
Mono: Playback 0 [0%] [-34.50dB] [off]
|
||||
Front Left: Capture [off]
|
||||
Front Right: Capture [off]
|
||||
Simple mixer control 'PC Speaker',0
|
||||
Capabilities: pvolume pvolume-joined pswitch pswitch-joined
|
||||
Playback channels: Mono
|
||||
Limits: Playback 0 - 15
|
||||
Mono: Playback 8 [53%] [-21.00dB] [on]
|
||||
Simple mixer control 'Aux',0
|
||||
Capabilities: pvolume pswitch pswitch-joined cswitch cswitch-exclusive
|
||||
Capture exclusive group: 0
|
||||
Playback channels: Front Left - Front Right
|
||||
Capture channels: Front Left - Front Right
|
||||
Limits: Playback 0 - 31
|
||||
Front Left: Playback 0 [0%] [-34.50dB] [off] Capture [off]
|
||||
Front Right: Playback 0 [0%] [-34.50dB] [off] Capture [off]
|
||||
Simple mixer control 'Mono Output Select',0
|
||||
Capabilities: enum
|
||||
Items: 'Mix' 'Mic'
|
||||
Item0: 'Mix'
|
||||
Simple mixer control 'Capture',0
|
||||
Capabilities: cvolume cswitch cswitch-joined
|
||||
Capture channels: Front Left - Front Right
|
||||
Limits: Capture 0 - 15
|
||||
Front Left: Capture 13 [87%] [19.50dB] [on]
|
||||
Front Right: Capture 13 [87%] [19.50dB] [on]
|
||||
Simple mixer control 'Mix',0
|
||||
Capabilities: cswitch cswitch-exclusive
|
||||
Capture exclusive group: 0
|
||||
Capture channels: Front Left - Front Right
|
||||
Front Left: Capture [off]
|
||||
Front Right: Capture [off]
|
||||
Simple mixer control 'Mix Mono',0
|
||||
Capabilities: cswitch cswitch-exclusive
|
||||
Capture exclusive group: 0
|
||||
Capture channels: Front Left - Front Right
|
||||
Front Left: Capture [off]
|
||||
Front Right: Capture [off]
|
||||
Simple mixer control 'External Amplifier',0
|
||||
Capabilities: pswitch pswitch-joined
|
||||
Playback channels: Mono
|
||||
Mono: Playback [on]
|
||||
|
|
@ -0,0 +1,27 @@
|
|||
Simple mixer control 'Bass',0
|
||||
Capabilities: volume volume-joined
|
||||
Playback channels: Mono
|
||||
Capture channels: Mono
|
||||
Limits: 0 - 48
|
||||
Mono: 22 [46%]
|
||||
Simple mixer control 'Bass Boost',0
|
||||
Capabilities: pswitch pswitch-joined
|
||||
Playback channels: Mono
|
||||
Mono: Playback [off]
|
||||
Simple mixer control 'Treble',0
|
||||
Capabilities: volume volume-joined
|
||||
Playback channels: Mono
|
||||
Capture channels: Mono
|
||||
Limits: 0 - 48
|
||||
Mono: 25 [52%]
|
||||
Simple mixer control 'PCM',0
|
||||
Capabilities: pvolume pswitch pswitch-joined
|
||||
Playback channels: Front Left - Front Right
|
||||
Limits: Playback 0 - 44
|
||||
Mono:
|
||||
Front Left: Playback 10 [23%] [-31.00dB] [on]
|
||||
Front Right: Playback 10 [23%] [-31.00dB] [on]
|
||||
Simple mixer control 'Auto Gain Control',0
|
||||
Capabilities: pswitch pswitch-joined
|
||||
Playback channels: Mono
|
||||
Mono: Playback [off]
|
||||
37
src/modules/alsa/mixer/samples/USB Audio--USB Mixer
Normal file
37
src/modules/alsa/mixer/samples/USB Audio--USB Mixer
Normal file
|
|
@ -0,0 +1,37 @@
|
|||
Simple mixer control 'Master',0
|
||||
Capabilities: pvolume pvolume-joined pswitch pswitch-joined
|
||||
Playback channels: Mono
|
||||
Limits: Playback 0 - 255
|
||||
Mono: Playback 105 [41%] [-28.97dB] [on]
|
||||
Simple mixer control 'Line',0
|
||||
Capabilities: pvolume cvolume pswitch pswitch-joined cswitch cswitch-joined
|
||||
Playback channels: Front Left - Front Right
|
||||
Capture channels: Front Left - Front Right
|
||||
Limits: Playback 0 - 255 Capture 0 - 128
|
||||
Front Left: Playback 191 [75%] [34.38dB] [off] Capture 0 [0%] [0.18dB] [off]
|
||||
Front Right: Playback 191 [75%] [34.38dB] [off] Capture 0 [0%] [0.18dB] [off]
|
||||
Simple mixer control 'Mic',0
|
||||
Capabilities: pvolume pvolume-joined cvolume cvolume-joined pswitch pswitch-joined cswitch cswitch-joined cswitch-exclusive
|
||||
Capture exclusive group: 0
|
||||
Playback channels: Mono
|
||||
Capture channels: Mono
|
||||
Limits: Playback 0 - 255 Capture 0 - 128
|
||||
Mono: Playback 191 [75%] [34.38dB] [off] Capture 0 [0%] [0.18dB] [on]
|
||||
Simple mixer control 'Mic Capture',0
|
||||
Capabilities: pswitch pswitch-joined
|
||||
Playback channels: Mono
|
||||
Mono: Playback [off]
|
||||
Simple mixer control 'IEC958 In',0
|
||||
Capabilities: cswitch cswitch-joined
|
||||
Capture channels: Mono
|
||||
Mono: Capture [off]
|
||||
Simple mixer control 'Input 1',0
|
||||
Capabilities: cswitch cswitch-joined cswitch-exclusive
|
||||
Capture exclusive group: 0
|
||||
Capture channels: Mono
|
||||
Mono: Capture [off]
|
||||
Simple mixer control 'Input 2',0
|
||||
Capabilities: cswitch cswitch-joined cswitch-exclusive
|
||||
Capture exclusive group: 0
|
||||
Capture channels: Mono
|
||||
Mono: Capture [off]
|
||||
|
|
@ -0,0 +1,5 @@
|
|||
Simple mixer control 'Mic',0
|
||||
Capabilities: cvolume cvolume-joined cswitch cswitch-joined
|
||||
Capture channels: Mono
|
||||
Limits: Capture 0 - 3072
|
||||
Mono: Capture 1536 [50%] [23.00dB] [on]
|
||||
211
src/modules/alsa/mixer/samples/VIA 8237--Analog Devices AD1888
Normal file
211
src/modules/alsa/mixer/samples/VIA 8237--Analog Devices AD1888
Normal file
|
|
@ -0,0 +1,211 @@
|
|||
Simple mixer control 'Master',0
|
||||
Capabilities: pvolume pswitch
|
||||
Playback channels: Front Left - Front Right
|
||||
Limits: Playback 0 - 31
|
||||
Mono:
|
||||
Front Left: Playback 31 [100%] [0.00dB] [on]
|
||||
Front Right: Playback 31 [100%] [0.00dB] [on]
|
||||
Simple mixer control 'Master Mono',0
|
||||
Capabilities: pvolume pvolume-joined pswitch pswitch-joined
|
||||
Playback channels: Mono
|
||||
Limits: Playback 0 - 31
|
||||
Mono: Playback 0 [0%] [-46.50dB] [off]
|
||||
Simple mixer control 'Master Surround',0
|
||||
Capabilities: pvolume pswitch
|
||||
Playback channels: Front Left - Front Right
|
||||
Limits: Playback 0 - 31
|
||||
Mono:
|
||||
Front Left: Playback 0 [0%] [-46.50dB] [off]
|
||||
Front Right: Playback 0 [0%] [-46.50dB] [off]
|
||||
Simple mixer control 'Headphone Jack Sense',0
|
||||
Capabilities: pswitch pswitch-joined
|
||||
Playback channels: Mono
|
||||
Mono: Playback [off]
|
||||
Simple mixer control 'PCM',0
|
||||
Capabilities: pvolume pswitch
|
||||
Playback channels: Front Left - Front Right
|
||||
Limits: Playback 0 - 31
|
||||
Mono:
|
||||
Front Left: Playback 23 [74%] [0.00dB] [on]
|
||||
Front Right: Playback 23 [74%] [0.00dB] [on]
|
||||
Simple mixer control 'Surround',0
|
||||
Capabilities: pvolume pswitch
|
||||
Playback channels: Front Left - Front Right
|
||||
Limits: Playback 0 - 31
|
||||
Mono:
|
||||
Front Left: Playback 0 [0%] [-46.50dB] [off]
|
||||
Front Right: Playback 0 [0%] [-46.50dB] [off]
|
||||
Simple mixer control 'Surround Jack Mode',0
|
||||
Capabilities: enum
|
||||
Items: 'Shared' 'Independent'
|
||||
Item0: 'Shared'
|
||||
Simple mixer control 'Center',0
|
||||
Capabilities: pvolume pvolume-joined pswitch pswitch-joined
|
||||
Playback channels: Mono
|
||||
Limits: Playback 0 - 31
|
||||
Mono: Playback 31 [100%] [0.00dB] [off]
|
||||
Simple mixer control 'LFE',0
|
||||
Capabilities: pvolume pvolume-joined pswitch pswitch-joined
|
||||
Playback channels: Mono
|
||||
Limits: Playback 0 - 31
|
||||
Mono: Playback 0 [0%] [-46.50dB] [off]
|
||||
Simple mixer control 'Line',0
|
||||
Capabilities: pvolume pswitch cswitch cswitch-exclusive
|
||||
Capture exclusive group: 0
|
||||
Playback channels: Front Left - Front Right
|
||||
Capture channels: Front Left - Front Right
|
||||
Limits: Playback 0 - 31
|
||||
Front Left: Playback 0 [0%] [-34.50dB] [off] Capture [off]
|
||||
Front Right: Playback 0 [0%] [-34.50dB] [off] Capture [off]
|
||||
Simple mixer control 'Line Jack Sense',0
|
||||
Capabilities: pswitch pswitch-joined
|
||||
Playback channels: Mono
|
||||
Mono: Playback [off]
|
||||
Simple mixer control 'CD',0
|
||||
Capabilities: pvolume pswitch cswitch cswitch-exclusive
|
||||
Capture exclusive group: 0
|
||||
Playback channels: Front Left - Front Right
|
||||
Capture channels: Front Left - Front Right
|
||||
Limits: Playback 0 - 31
|
||||
Front Left: Playback 0 [0%] [-34.50dB] [off] Capture [off]
|
||||
Front Right: Playback 0 [0%] [-34.50dB] [off] Capture [off]
|
||||
Simple mixer control 'Mic',0
|
||||
Capabilities: pvolume pvolume-joined pswitch pswitch-joined cswitch cswitch-exclusive
|
||||
Capture exclusive group: 0
|
||||
Playback channels: Mono
|
||||
Capture channels: Front Left - Front Right
|
||||
Limits: Playback 0 - 31
|
||||
Mono: Playback 0 [0%] [-34.50dB] [off]
|
||||
Front Left: Capture [on]
|
||||
Front Right: Capture [on]
|
||||
Simple mixer control 'Mic Boost (+20dB)',0
|
||||
Capabilities: pswitch pswitch-joined
|
||||
Playback channels: Mono
|
||||
Mono: Playback [off]
|
||||
Simple mixer control 'Mic Select',0
|
||||
Capabilities: enum
|
||||
Items: 'Mic1' 'Mic2'
|
||||
Item0: 'Mic1'
|
||||
Simple mixer control 'Video',0
|
||||
Capabilities: cswitch cswitch-exclusive
|
||||
Capture exclusive group: 0
|
||||
Capture channels: Front Left - Front Right
|
||||
Front Left: Capture [off]
|
||||
Front Right: Capture [off]
|
||||
Simple mixer control 'Phone',0
|
||||
Capabilities: pvolume pvolume-joined pswitch pswitch-joined cswitch cswitch-exclusive
|
||||
Capture exclusive group: 0
|
||||
Playback channels: Mono
|
||||
Capture channels: Front Left - Front Right
|
||||
Limits: Playback 0 - 31
|
||||
Mono: Playback 0 [0%] [-34.50dB] [off]
|
||||
Front Left: Capture [off]
|
||||
Front Right: Capture [off]
|
||||
Simple mixer control 'IEC958',0
|
||||
Capabilities: pswitch pswitch-joined
|
||||
Playback channels: Mono
|
||||
Mono: Playback [off]
|
||||
Simple mixer control 'IEC958 Output',0
|
||||
Capabilities: pswitch pswitch-joined
|
||||
Playback channels: Mono
|
||||
Mono: Playback [off]
|
||||
Simple mixer control 'IEC958 Playback AC97-SPSA',0
|
||||
Capabilities: volume volume-joined
|
||||
Playback channels: Mono
|
||||
Capture channels: Mono
|
||||
Limits: 0 - 3
|
||||
Mono: 3 [100%]
|
||||
Simple mixer control 'IEC958 Playback Source',0
|
||||
Capabilities: enum
|
||||
Items: 'AC-Link' 'A/D Converter'
|
||||
Item0: 'AC-Link'
|
||||
Simple mixer control 'Aux',0
|
||||
Capabilities: pvolume pswitch cswitch cswitch-exclusive
|
||||
Capture exclusive group: 0
|
||||
Playback channels: Front Left - Front Right
|
||||
Capture channels: Front Left - Front Right
|
||||
Limits: Playback 0 - 31
|
||||
Front Left: Playback 0 [0%] [-34.50dB] [off] Capture [off]
|
||||
Front Right: Playback 0 [0%] [-34.50dB] [off] Capture [off]
|
||||
Simple mixer control 'Capture',0
|
||||
Capabilities: cvolume cswitch
|
||||
Capture channels: Front Left - Front Right
|
||||
Limits: Capture 0 - 15
|
||||
Front Left: Capture 0 [0%] [0.00dB] [on]
|
||||
Front Right: Capture 0 [0%] [0.00dB] [on]
|
||||
Simple mixer control 'Mix',0
|
||||
Capabilities: cswitch cswitch-exclusive
|
||||
Capture exclusive group: 0
|
||||
Capture channels: Front Left - Front Right
|
||||
Front Left: Capture [off]
|
||||
Front Right: Capture [off]
|
||||
Simple mixer control 'Mix Mono',0
|
||||
Capabilities: cswitch cswitch-exclusive
|
||||
Capture exclusive group: 0
|
||||
Capture channels: Front Left - Front Right
|
||||
Front Left: Capture [off]
|
||||
Front Right: Capture [off]
|
||||
Simple mixer control 'Channel Mode',0
|
||||
Capabilities: enum
|
||||
Items: '2ch' '4ch' '6ch'
|
||||
Item0: '2ch'
|
||||
Simple mixer control 'Downmix',0
|
||||
Capabilities: enum
|
||||
Items: 'Off' '6 -> 4' '6 -> 2'
|
||||
Item0: 'Off'
|
||||
Simple mixer control 'Exchange Front/Surround',0
|
||||
Capabilities: pswitch pswitch-joined
|
||||
Playback channels: Mono
|
||||
Mono: Playback [off]
|
||||
Simple mixer control 'External Amplifier',0
|
||||
Capabilities: pswitch pswitch-joined
|
||||
Playback channels: Mono
|
||||
Mono: Playback [on]
|
||||
Simple mixer control 'High Pass Filter Enable',0
|
||||
Capabilities: pswitch pswitch-joined
|
||||
Playback channels: Mono
|
||||
Mono: Playback [off]
|
||||
Simple mixer control 'Input Source Select',0
|
||||
Capabilities: enum
|
||||
Items: 'Input1' 'Input2'
|
||||
Item0: 'Input1'
|
||||
Simple mixer control 'Input Source Select',1
|
||||
Capabilities: enum
|
||||
Items: 'Input1' 'Input2'
|
||||
Item0: 'Input1'
|
||||
Simple mixer control 'Spread Front to Surround and Center/LFE',0
|
||||
Capabilities: pswitch pswitch-joined
|
||||
Playback channels: Mono
|
||||
Mono: Playback [off]
|
||||
Simple mixer control 'VIA DXS',0
|
||||
Capabilities: pvolume
|
||||
Playback channels: Front Left - Front Right
|
||||
Limits: Playback 0 - 31
|
||||
Mono:
|
||||
Front Left: Playback 31 [100%] [-48.00dB]
|
||||
Front Right: Playback 31 [100%] [-48.00dB]
|
||||
Simple mixer control 'VIA DXS',1
|
||||
Capabilities: pvolume
|
||||
Playback channels: Front Left - Front Right
|
||||
Limits: Playback 0 - 31
|
||||
Mono:
|
||||
Front Left: Playback 31 [100%] [-48.00dB]
|
||||
Front Right: Playback 31 [100%] [-48.00dB]
|
||||
Simple mixer control 'VIA DXS',2
|
||||
Capabilities: pvolume
|
||||
Playback channels: Front Left - Front Right
|
||||
Limits: Playback 0 - 31
|
||||
Mono:
|
||||
Front Left: Playback 31 [100%] [-48.00dB]
|
||||
Front Right: Playback 31 [100%] [-48.00dB]
|
||||
Simple mixer control 'VIA DXS',3
|
||||
Capabilities: pvolume
|
||||
Playback channels: Front Left - Front Right
|
||||
Limits: Playback 0 - 31
|
||||
Mono:
|
||||
Front Left: Playback 31 [100%] [-48.00dB]
|
||||
Front Right: Playback 31 [100%] [-48.00dB]
|
||||
Simple mixer control 'V_REFOUT Enable',0
|
||||
Capabilities: pswitch pswitch-joined
|
||||
Playback channels: Mono
|
||||
Mono: Playback [on]
|
||||
|
|
@ -0,0 +1,160 @@
|
|||
Simple mixer control 'Master',0
|
||||
Capabilities: pvolume pswitch pswitch-joined
|
||||
Playback channels: Front Left - Front Right
|
||||
Limits: Playback 0 - 31
|
||||
Mono:
|
||||
Front Left: Playback 0 [0%] [-46.50dB] [off]
|
||||
Front Right: Playback 0 [0%] [-46.50dB] [off]
|
||||
Simple mixer control 'PCM',0
|
||||
Capabilities: pvolume pswitch pswitch-joined
|
||||
Playback channels: Front Left - Front Right
|
||||
Limits: Playback 0 - 31
|
||||
Mono:
|
||||
Front Left: Playback 31 [100%] [-48.00dB] [off]
|
||||
Front Right: Playback 31 [100%] [-48.00dB] [off]
|
||||
Simple mixer control 'Surround',0
|
||||
Capabilities: pswitch
|
||||
Playback channels: Front Left - Front Right
|
||||
Mono:
|
||||
Front Left: Playback [off]
|
||||
Front Right: Playback [off]
|
||||
Simple mixer control 'Surround Jack Mode',0
|
||||
Capabilities: enum
|
||||
Items: 'Shared' 'Independent'
|
||||
Item0: 'Shared'
|
||||
Simple mixer control 'Center',0
|
||||
Capabilities: pvolume pvolume-joined pswitch pswitch-joined
|
||||
Playback channels: Mono
|
||||
Limits: Playback 0 - 31
|
||||
Mono: Playback 31 [100%] [0.00dB] [off]
|
||||
Simple mixer control 'LFE',0
|
||||
Capabilities: pvolume pvolume-joined pswitch pswitch-joined
|
||||
Playback channels: Mono
|
||||
Limits: Playback 0 - 31
|
||||
Mono: Playback 0 [0%] [-46.50dB] [off]
|
||||
Simple mixer control 'Line',0
|
||||
Capabilities: pvolume pswitch pswitch-joined cswitch cswitch-exclusive
|
||||
Capture exclusive group: 0
|
||||
Playback channels: Front Left - Front Right
|
||||
Capture channels: Front Left - Front Right
|
||||
Limits: Playback 0 - 31
|
||||
Front Left: Playback 0 [0%] [-34.50dB] [off] Capture [off]
|
||||
Front Right: Playback 0 [0%] [-34.50dB] [off] Capture [off]
|
||||
Simple mixer control 'CD',0
|
||||
Capabilities: pvolume pswitch pswitch-joined cswitch cswitch-exclusive
|
||||
Capture exclusive group: 0
|
||||
Playback channels: Front Left - Front Right
|
||||
Capture channels: Front Left - Front Right
|
||||
Limits: Playback 0 - 31
|
||||
Front Left: Playback 0 [0%] [-34.50dB] [off] Capture [off]
|
||||
Front Right: Playback 0 [0%] [-34.50dB] [off] Capture [off]
|
||||
Simple mixer control 'Mic',0
|
||||
Capabilities: pvolume pswitch pswitch-joined cswitch cswitch-exclusive
|
||||
Capture exclusive group: 0
|
||||
Playback channels: Front Left - Front Right
|
||||
Capture channels: Front Left - Front Right
|
||||
Limits: Playback 0 - 31
|
||||
Front Left: Playback 0 [0%] [-34.50dB] [off] Capture [on]
|
||||
Front Right: Playback 0 [0%] [-34.50dB] [off] Capture [on]
|
||||
Simple mixer control 'Mic Boost (+20dB)',0
|
||||
Capabilities: pswitch pswitch-joined
|
||||
Playback channels: Mono
|
||||
Mono: Playback [off]
|
||||
Simple mixer control 'Mic Select',0
|
||||
Capabilities: enum
|
||||
Items: 'Mic1' 'Mic2'
|
||||
Item0: 'Mic1'
|
||||
Simple mixer control 'Video',0
|
||||
Capabilities: cswitch cswitch-exclusive
|
||||
Capture exclusive group: 0
|
||||
Capture channels: Front Left - Front Right
|
||||
Front Left: Capture [off]
|
||||
Front Right: Capture [off]
|
||||
Simple mixer control 'Phone',0
|
||||
Capabilities: cswitch cswitch-exclusive
|
||||
Capture exclusive group: 0
|
||||
Capture channels: Front Left - Front Right
|
||||
Front Left: Capture [off]
|
||||
Front Right: Capture [off]
|
||||
Simple mixer control 'IEC958',0
|
||||
Capabilities: pswitch pswitch-joined cswitch cswitch-joined
|
||||
Playback channels: Mono
|
||||
Capture channels: Mono
|
||||
Mono: Playback [off] Capture [off]
|
||||
Simple mixer control 'IEC958 Capture Monitor',0
|
||||
Capabilities: pswitch pswitch-joined
|
||||
Playback channels: Mono
|
||||
Mono: Playback [off]
|
||||
Simple mixer control 'IEC958 Capture Valid',0
|
||||
Capabilities: pswitch pswitch-joined
|
||||
Playback channels: Mono
|
||||
Mono: Playback [off]
|
||||
Simple mixer control 'IEC958 Output',0
|
||||
Capabilities: pswitch pswitch-joined
|
||||
Playback channels: Mono
|
||||
Mono: Playback [off]
|
||||
Simple mixer control 'IEC958 Playback AC97-SPSA',0
|
||||
Capabilities: volume volume-joined
|
||||
Playback channels: Mono
|
||||
Capture channels: Mono
|
||||
Limits: 0 - 3
|
||||
Mono: 3 [100%]
|
||||
Simple mixer control 'IEC958 Playback Source',0
|
||||
Capabilities: enum
|
||||
Items: 'AC-Link' 'ADC' 'SPDIF-In'
|
||||
Item0: 'AC-Link'
|
||||
Simple mixer control 'PC Speaker',0
|
||||
Capabilities: pvolume pvolume-joined pswitch pswitch-joined
|
||||
Playback channels: Mono
|
||||
Limits: Playback 0 - 15
|
||||
Mono: Playback 0 [0%] [-45.00dB] [off]
|
||||
Simple mixer control 'Aux',0
|
||||
Capabilities: pvolume pswitch pswitch-joined cswitch cswitch-exclusive
|
||||
Capture exclusive group: 0
|
||||
Playback channels: Front Left - Front Right
|
||||
Capture channels: Front Left - Front Right
|
||||
Limits: Playback 0 - 31
|
||||
Front Left: Playback 0 [0%] [-34.50dB] [off] Capture [off]
|
||||
Front Right: Playback 0 [0%] [-34.50dB] [off] Capture [off]
|
||||
Simple mixer control 'Mono Output Select',0
|
||||
Capabilities: enum
|
||||
Items: 'Mix' 'Mic'
|
||||
Item0: 'Mix'
|
||||
Simple mixer control 'Capture',0
|
||||
Capabilities: cvolume cswitch cswitch-joined
|
||||
Capture channels: Front Left - Front Right
|
||||
Limits: Capture 0 - 15
|
||||
Front Left: Capture 0 [0%] [0.00dB] [on]
|
||||
Front Right: Capture 0 [0%] [0.00dB] [on]
|
||||
Simple mixer control 'Mix',0
|
||||
Capabilities: cswitch cswitch-exclusive
|
||||
Capture exclusive group: 0
|
||||
Capture channels: Front Left - Front Right
|
||||
Front Left: Capture [off]
|
||||
Front Right: Capture [off]
|
||||
Simple mixer control 'Mix Mono',0
|
||||
Capabilities: cswitch cswitch-exclusive
|
||||
Capture exclusive group: 0
|
||||
Capture channels: Front Left - Front Right
|
||||
Front Left: Capture [off]
|
||||
Front Right: Capture [off]
|
||||
Simple mixer control 'Channel Mode',0
|
||||
Capabilities: enum
|
||||
Items: '2ch' '4ch' '6ch'
|
||||
Item0: '2ch'
|
||||
Simple mixer control 'DAC Clock Source',0
|
||||
Capabilities: enum
|
||||
Items: 'AC-Link' 'SPDIF-In' 'Both'
|
||||
Item0: 'AC-Link'
|
||||
Simple mixer control 'External Amplifier',0
|
||||
Capabilities: pswitch pswitch-joined
|
||||
Playback channels: Mono
|
||||
Mono: Playback [on]
|
||||
Simple mixer control 'Input Source Select',0
|
||||
Capabilities: enum
|
||||
Items: 'Input1' 'Input2'
|
||||
Item0: 'Input1'
|
||||
Simple mixer control 'Input Source Select',1
|
||||
Capabilities: enum
|
||||
Items: 'Input1' 'Input2'
|
||||
Item0: 'Input1'
|
||||
|
|
@ -32,6 +32,10 @@
|
|||
|
||||
#include <modules/reserve-wrap.h>
|
||||
|
||||
#ifdef HAVE_UDEV
|
||||
#include <modules/udev-util.h>
|
||||
#endif
|
||||
|
||||
#include "alsa-util.h"
|
||||
#include "alsa-sink.h"
|
||||
#include "alsa-source.h"
|
||||
|
|
@ -43,9 +47,12 @@ PA_MODULE_VERSION(PACKAGE_VERSION);
|
|||
PA_MODULE_LOAD_ONCE(FALSE);
|
||||
PA_MODULE_USAGE(
|
||||
"name=<name for the card/sink/source, to be prefixed> "
|
||||
"card_name=<name for card> "
|
||||
"sink_name=<name for sink> "
|
||||
"source_name=<name for source> "
|
||||
"card_name=<name for the card> "
|
||||
"card_properties=<properties for the card> "
|
||||
"sink_name=<name for the sink> "
|
||||
"sink_properties=<properties for the sink> "
|
||||
"source_name=<name for the source> "
|
||||
"source_properties=<properties for the source> "
|
||||
"device_id=<ALSA card index> "
|
||||
"format=<sample format> "
|
||||
"rate=<sample rate> "
|
||||
|
|
@ -61,8 +68,11 @@ PA_MODULE_USAGE(
|
|||
static const char* const valid_modargs[] = {
|
||||
"name",
|
||||
"card_name",
|
||||
"card_properties",
|
||||
"sink_name",
|
||||
"sink_properties",
|
||||
"source_name",
|
||||
"source_properties",
|
||||
"device_id",
|
||||
"format",
|
||||
"rate",
|
||||
|
|
@ -86,81 +96,53 @@ struct userdata {
|
|||
char *device_id;
|
||||
|
||||
pa_card *card;
|
||||
pa_sink *sink;
|
||||
pa_source *source;
|
||||
|
||||
pa_modargs *modargs;
|
||||
|
||||
pa_hashmap *profiles;
|
||||
pa_alsa_profile_set *profile_set;
|
||||
};
|
||||
|
||||
struct profile_data {
|
||||
const pa_alsa_profile_info *sink_profile, *source_profile;
|
||||
pa_alsa_profile *profile;
|
||||
};
|
||||
|
||||
static void enumerate_cb(
|
||||
const pa_alsa_profile_info *sink,
|
||||
const pa_alsa_profile_info *source,
|
||||
void *userdata) {
|
||||
static void add_profiles(struct userdata *u, pa_hashmap *h) {
|
||||
pa_alsa_profile *ap;
|
||||
void *state;
|
||||
|
||||
struct userdata *u = userdata;
|
||||
char *t, *n;
|
||||
pa_card_profile *p;
|
||||
struct profile_data *d;
|
||||
unsigned bonus = 0;
|
||||
pa_assert(u);
|
||||
pa_assert(h);
|
||||
|
||||
if (sink && source) {
|
||||
n = pa_sprintf_malloc("output-%s+input-%s", sink->name, source->name);
|
||||
t = pa_sprintf_malloc(_("Output %s + Input %s"), sink->description, _(source->description));
|
||||
} else if (sink) {
|
||||
n = pa_sprintf_malloc("output-%s", sink->name);
|
||||
t = pa_sprintf_malloc(_("Output %s"), _(sink->description));
|
||||
} else {
|
||||
pa_assert(source);
|
||||
n = pa_sprintf_malloc("input-%s", source->name);
|
||||
t = pa_sprintf_malloc(_("Input %s"), _(source->description));
|
||||
PA_HASHMAP_FOREACH(ap, u->profile_set->profiles, state) {
|
||||
struct profile_data *d;
|
||||
pa_card_profile *cp;
|
||||
pa_alsa_mapping *m;
|
||||
uint32_t idx;
|
||||
|
||||
cp = pa_card_profile_new(ap->name, ap->description, sizeof(struct profile_data));
|
||||
cp->priority = ap->priority;
|
||||
|
||||
if (ap->output_mappings) {
|
||||
cp->n_sinks = pa_idxset_size(ap->output_mappings);
|
||||
|
||||
PA_IDXSET_FOREACH(m, ap->output_mappings, idx)
|
||||
if (m->channel_map.channels > cp->max_sink_channels)
|
||||
cp->max_sink_channels = m->channel_map.channels;
|
||||
}
|
||||
|
||||
if (ap->input_mappings) {
|
||||
cp->n_sources = pa_idxset_size(ap->input_mappings);
|
||||
|
||||
PA_IDXSET_FOREACH(m, ap->input_mappings, idx)
|
||||
if (m->channel_map.channels > cp->max_source_channels)
|
||||
cp->max_source_channels = m->channel_map.channels;
|
||||
}
|
||||
|
||||
d = PA_CARD_PROFILE_DATA(cp);
|
||||
d->profile = ap;
|
||||
|
||||
pa_hashmap_put(h, cp->name, cp);
|
||||
}
|
||||
|
||||
if (sink) {
|
||||
if (pa_channel_map_equal(&sink->map, &u->core->default_channel_map))
|
||||
bonus += 50000;
|
||||
else if (sink->map.channels == u->core->default_channel_map.channels)
|
||||
bonus += 40000;
|
||||
}
|
||||
|
||||
if (source) {
|
||||
if (pa_channel_map_equal(&source->map, &u->core->default_channel_map))
|
||||
bonus += 30000;
|
||||
else if (source->map.channels == u->core->default_channel_map.channels)
|
||||
bonus += 20000;
|
||||
}
|
||||
|
||||
pa_log_info("Found output profile '%s'", t);
|
||||
|
||||
p = pa_card_profile_new(n, t, sizeof(struct profile_data));
|
||||
|
||||
pa_xfree(t);
|
||||
pa_xfree(n);
|
||||
|
||||
p->priority =
|
||||
(sink ? sink->priority : 0) * 100 +
|
||||
(source ? source->priority : 0) +
|
||||
bonus;
|
||||
|
||||
p->n_sinks = !!sink;
|
||||
p->n_sources = !!source;
|
||||
|
||||
if (sink)
|
||||
p->max_sink_channels = sink->map.channels;
|
||||
if (source)
|
||||
p->max_source_channels = source->map.channels;
|
||||
|
||||
d = PA_CARD_PROFILE_DATA(p);
|
||||
|
||||
d->sink_profile = sink;
|
||||
d->source_profile = source;
|
||||
|
||||
pa_hashmap_put(u->profiles, p->name, p);
|
||||
}
|
||||
|
||||
static void add_disabled_profile(pa_hashmap *profiles) {
|
||||
|
|
@ -170,7 +152,7 @@ static void add_disabled_profile(pa_hashmap *profiles) {
|
|||
p = pa_card_profile_new("off", _("Off"), sizeof(struct profile_data));
|
||||
|
||||
d = PA_CARD_PROFILE_DATA(p);
|
||||
d->sink_profile = d->source_profile = NULL;
|
||||
d->profile = NULL;
|
||||
|
||||
pa_hashmap_put(profiles, p->name, p);
|
||||
}
|
||||
|
|
@ -178,6 +160,9 @@ static void add_disabled_profile(pa_hashmap *profiles) {
|
|||
static int card_set_profile(pa_card *c, pa_card_profile *new_profile) {
|
||||
struct userdata *u;
|
||||
struct profile_data *nd, *od;
|
||||
uint32_t idx;
|
||||
pa_alsa_mapping *am;
|
||||
pa_queue *sink_inputs = NULL, *source_outputs = NULL;
|
||||
|
||||
pa_assert(c);
|
||||
pa_assert(new_profile);
|
||||
|
|
@ -186,67 +171,85 @@ static int card_set_profile(pa_card *c, pa_card_profile *new_profile) {
|
|||
nd = PA_CARD_PROFILE_DATA(new_profile);
|
||||
od = PA_CARD_PROFILE_DATA(c->active_profile);
|
||||
|
||||
if (od->sink_profile != nd->sink_profile) {
|
||||
pa_queue *inputs = NULL;
|
||||
if (od->profile && od->profile->output_mappings)
|
||||
PA_IDXSET_FOREACH(am, od->profile->output_mappings, idx) {
|
||||
if (!am->sink)
|
||||
continue;
|
||||
|
||||
if (u->sink) {
|
||||
if (nd->sink_profile)
|
||||
inputs = pa_sink_move_all_start(u->sink);
|
||||
if (nd->profile &&
|
||||
nd->profile->output_mappings &&
|
||||
pa_idxset_get_by_data(nd->profile->output_mappings, am, NULL))
|
||||
continue;
|
||||
|
||||
pa_alsa_sink_free(u->sink);
|
||||
u->sink = NULL;
|
||||
sink_inputs = pa_sink_move_all_start(am->sink, sink_inputs);
|
||||
pa_alsa_sink_free(am->sink);
|
||||
am->sink = NULL;
|
||||
}
|
||||
|
||||
if (nd->sink_profile) {
|
||||
u->sink = pa_alsa_sink_new(c->module, u->modargs, __FILE__, c, nd->sink_profile);
|
||||
if (od->profile && od->profile->input_mappings)
|
||||
PA_IDXSET_FOREACH(am, od->profile->input_mappings, idx) {
|
||||
if (!am->source)
|
||||
continue;
|
||||
|
||||
if (inputs) {
|
||||
if (u->sink)
|
||||
pa_sink_move_all_finish(u->sink, inputs, FALSE);
|
||||
else
|
||||
pa_sink_move_all_fail(inputs);
|
||||
if (nd->profile &&
|
||||
nd->profile->input_mappings &&
|
||||
pa_idxset_get_by_data(nd->profile->input_mappings, am, NULL))
|
||||
continue;
|
||||
|
||||
source_outputs = pa_source_move_all_start(am->source, source_outputs);
|
||||
pa_alsa_source_free(am->source);
|
||||
am->source = NULL;
|
||||
}
|
||||
|
||||
if (nd->profile && nd->profile->output_mappings)
|
||||
PA_IDXSET_FOREACH(am, nd->profile->output_mappings, idx) {
|
||||
|
||||
if (!am->sink)
|
||||
am->sink = pa_alsa_sink_new(c->module, u->modargs, __FILE__, c, am);
|
||||
|
||||
if (sink_inputs && am->sink) {
|
||||
pa_sink_move_all_finish(am->sink, sink_inputs, FALSE);
|
||||
sink_inputs = NULL;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (od->source_profile != nd->source_profile) {
|
||||
pa_queue *outputs = NULL;
|
||||
if (nd->profile && nd->profile->input_mappings)
|
||||
PA_IDXSET_FOREACH(am, nd->profile->input_mappings, idx) {
|
||||
|
||||
if (u->source) {
|
||||
if (nd->source_profile)
|
||||
outputs = pa_source_move_all_start(u->source);
|
||||
if (!am->source)
|
||||
am->source = pa_alsa_source_new(c->module, u->modargs, __FILE__, c, am);
|
||||
|
||||
pa_alsa_source_free(u->source);
|
||||
u->source = NULL;
|
||||
}
|
||||
|
||||
if (nd->source_profile) {
|
||||
u->source = pa_alsa_source_new(c->module, u->modargs, __FILE__, c, nd->source_profile);
|
||||
|
||||
if (outputs) {
|
||||
if (u->source)
|
||||
pa_source_move_all_finish(u->source, outputs, FALSE);
|
||||
else
|
||||
pa_source_move_all_fail(outputs);
|
||||
if (source_outputs && am->source) {
|
||||
pa_source_move_all_finish(am->source, source_outputs, FALSE);
|
||||
source_outputs = NULL;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (sink_inputs)
|
||||
pa_sink_move_all_fail(sink_inputs);
|
||||
|
||||
if (source_outputs)
|
||||
pa_source_move_all_fail(source_outputs);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static void init_profile(struct userdata *u) {
|
||||
uint32_t idx;
|
||||
pa_alsa_mapping *am;
|
||||
struct profile_data *d;
|
||||
|
||||
pa_assert(u);
|
||||
|
||||
d = PA_CARD_PROFILE_DATA(u->card->active_profile);
|
||||
|
||||
if (d->sink_profile)
|
||||
u->sink = pa_alsa_sink_new(u->module, u->modargs, __FILE__, u->card, d->sink_profile);
|
||||
if (d->profile && d->profile->output_mappings)
|
||||
PA_IDXSET_FOREACH(am, d->profile->output_mappings, idx)
|
||||
am->sink = pa_alsa_sink_new(u->module, u->modargs, __FILE__, u->card, am);
|
||||
|
||||
if (d->source_profile)
|
||||
u->source = pa_alsa_source_new(u->module, u->modargs, __FILE__, u->card, d->source_profile);
|
||||
if (d->profile && d->profile->input_mappings)
|
||||
PA_IDXSET_FOREACH(am, d->profile->input_mappings, idx)
|
||||
am->source = pa_alsa_source_new(u->module, u->modargs, __FILE__, u->card, am);
|
||||
}
|
||||
|
||||
static void set_card_name(pa_card_new_data *data, pa_modargs *ma, const char *device_id) {
|
||||
|
|
@ -280,12 +283,11 @@ int pa__init(pa_module *m) {
|
|||
pa_modargs *ma;
|
||||
int alsa_card_index;
|
||||
struct userdata *u;
|
||||
char rname[32];
|
||||
pa_reserve_wrapper *reserve = NULL;
|
||||
const char *description;
|
||||
char *fn = NULL;
|
||||
|
||||
pa_alsa_redirect_errors_inc();
|
||||
snd_config_update_free_global();
|
||||
pa_alsa_refcnt_inc();
|
||||
|
||||
pa_assert(m);
|
||||
|
||||
|
|
@ -294,30 +296,47 @@ int pa__init(pa_module *m) {
|
|||
goto fail;
|
||||
}
|
||||
|
||||
m->userdata = u = pa_xnew(struct userdata, 1);
|
||||
m->userdata = u = pa_xnew0(struct userdata, 1);
|
||||
u->core = m->core;
|
||||
u->module = m;
|
||||
u->device_id = pa_xstrdup(pa_modargs_get_value(ma, "device_id", DEFAULT_DEVICE_ID));
|
||||
u->card = NULL;
|
||||
u->sink = NULL;
|
||||
u->source = NULL;
|
||||
u->modargs = ma;
|
||||
|
||||
if ((alsa_card_index = snd_card_get_index(u->device_id)) < 0) {
|
||||
pa_log("Card '%s' doesn't exist: %s", u->device_id, snd_strerror(alsa_card_index));
|
||||
pa_log("Card '%s' doesn't exist: %s", u->device_id, pa_alsa_strerror(alsa_card_index));
|
||||
goto fail;
|
||||
}
|
||||
|
||||
pa_snprintf(rname, sizeof(rname), "Audio%i", alsa_card_index);
|
||||
if (!pa_in_system_mode()) {
|
||||
char *rname;
|
||||
|
||||
if (!pa_in_system_mode())
|
||||
if (!(reserve = pa_reserve_wrapper_get(m->core, rname)))
|
||||
goto fail;
|
||||
if ((rname = pa_alsa_get_reserve_name(u->device_id))) {
|
||||
reserve = pa_reserve_wrapper_get(m->core, rname);
|
||||
pa_xfree(rname);
|
||||
|
||||
if (!reserve)
|
||||
goto fail;
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef HAVE_UDEV
|
||||
fn = pa_udev_get_property(alsa_card_index, "PULSE_PROFILE_SET");
|
||||
#endif
|
||||
|
||||
u->profile_set = pa_alsa_profile_set_new(fn, &u->core->default_channel_map);
|
||||
pa_xfree(fn);
|
||||
|
||||
if (!u->profile_set)
|
||||
goto fail;
|
||||
|
||||
pa_alsa_profile_set_probe(u->profile_set, u->device_id, &m->core->default_sample_spec);
|
||||
|
||||
pa_card_new_data_init(&data);
|
||||
data.driver = __FILE__;
|
||||
data.module = m;
|
||||
|
||||
pa_alsa_init_proplist_card(m->core, data.proplist, alsa_card_index);
|
||||
|
||||
pa_proplist_sets(data.proplist, PA_PROP_DEVICE_STRING, u->device_id);
|
||||
pa_alsa_init_description(data.proplist);
|
||||
set_card_name(&data, ma, u->device_id);
|
||||
|
|
@ -326,11 +345,8 @@ int pa__init(pa_module *m) {
|
|||
if ((description = pa_proplist_gets(data.proplist, PA_PROP_DEVICE_DESCRIPTION)))
|
||||
pa_reserve_wrapper_set_application_device_name(reserve, description);
|
||||
|
||||
u->profiles = data.profiles = pa_hashmap_new(pa_idxset_string_hash_func, pa_idxset_string_compare_func);
|
||||
if (pa_alsa_probe_profiles(u->device_id, &m->core->default_sample_spec, enumerate_cb, u) < 0) {
|
||||
pa_card_new_data_done(&data);
|
||||
goto fail;
|
||||
}
|
||||
data.profiles = pa_hashmap_new(pa_idxset_string_hash_func, pa_idxset_string_compare_func);
|
||||
add_profiles(u, data.profiles);
|
||||
|
||||
if (pa_hashmap_isempty(data.profiles)) {
|
||||
pa_log("Failed to find a working profile.");
|
||||
|
|
@ -340,6 +356,12 @@ int pa__init(pa_module *m) {
|
|||
|
||||
add_disabled_profile(data.profiles);
|
||||
|
||||
if (pa_modargs_get_proplist(ma, "card_properties", data.proplist, PA_UPDATE_REPLACE) < 0) {
|
||||
pa_log("Invalid properties");
|
||||
pa_card_new_data_done(&data);
|
||||
goto fail;
|
||||
}
|
||||
|
||||
u->card = pa_card_new(m->core, &data);
|
||||
pa_card_new_data_done(&data);
|
||||
|
||||
|
|
@ -351,7 +373,8 @@ int pa__init(pa_module *m) {
|
|||
|
||||
init_profile(u);
|
||||
|
||||
pa_reserve_wrapper_unref(reserve);
|
||||
if (reserve)
|
||||
pa_reserve_wrapper_unref(reserve);
|
||||
|
||||
return 0;
|
||||
|
||||
|
|
@ -366,13 +389,22 @@ fail:
|
|||
|
||||
int pa__get_n_used(pa_module *m) {
|
||||
struct userdata *u;
|
||||
int n = 0;
|
||||
uint32_t idx;
|
||||
pa_sink *sink;
|
||||
pa_source *source;
|
||||
|
||||
pa_assert(m);
|
||||
pa_assert_se(u = m->userdata);
|
||||
pa_assert(u->card);
|
||||
|
||||
return
|
||||
(u->sink ? pa_sink_linked_by(u->sink) : 0) +
|
||||
(u->source ? pa_source_linked_by(u->source) : 0);
|
||||
PA_IDXSET_FOREACH(sink, u->card->sinks, idx)
|
||||
n += pa_sink_linked_by(sink);
|
||||
|
||||
PA_IDXSET_FOREACH(source, u->card->sources, idx)
|
||||
n += pa_source_linked_by(source);
|
||||
|
||||
return n;
|
||||
}
|
||||
|
||||
void pa__done(pa_module*m) {
|
||||
|
|
@ -383,11 +415,19 @@ void pa__done(pa_module*m) {
|
|||
if (!(u = m->userdata))
|
||||
goto finish;
|
||||
|
||||
if (u->sink)
|
||||
pa_alsa_sink_free(u->sink);
|
||||
if (u->card && u->card->sinks) {
|
||||
pa_sink *s;
|
||||
|
||||
if (u->source)
|
||||
pa_alsa_source_free(u->source);
|
||||
while ((s = pa_idxset_steal_first(u->card->sinks, NULL)))
|
||||
pa_alsa_sink_free(s);
|
||||
}
|
||||
|
||||
if (u->card && u->card->sources) {
|
||||
pa_source *s;
|
||||
|
||||
while ((s = pa_idxset_steal_first(u->card->sources, NULL)))
|
||||
pa_alsa_source_free(s);
|
||||
}
|
||||
|
||||
if (u->card)
|
||||
pa_card_free(u->card);
|
||||
|
|
@ -395,10 +435,12 @@ void pa__done(pa_module*m) {
|
|||
if (u->modargs)
|
||||
pa_modargs_free(u->modargs);
|
||||
|
||||
if (u->profile_set)
|
||||
pa_alsa_profile_set_free(u->profile_set);
|
||||
|
||||
pa_xfree(u->device_id);
|
||||
pa_xfree(u);
|
||||
|
||||
finish:
|
||||
snd_config_update_free_global();
|
||||
pa_alsa_redirect_errors_dec();
|
||||
pa_alsa_refcnt_dec();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -40,6 +40,7 @@ PA_MODULE_LOAD_ONCE(FALSE);
|
|||
PA_MODULE_USAGE(
|
||||
"name=<name of the sink, to be prefixed> "
|
||||
"sink_name=<name for the sink> "
|
||||
"sink_properities=<properties for the sink> "
|
||||
"device=<ALSA device> "
|
||||
"device_id=<ALSA card index> "
|
||||
"format=<sample format> "
|
||||
|
|
@ -52,11 +53,13 @@ PA_MODULE_USAGE(
|
|||
"tsched=<enable system timer based scheduling mode?> "
|
||||
"tsched_buffer_size=<buffer size when using timer based scheduling> "
|
||||
"tsched_buffer_watermark=<lower fill watermark> "
|
||||
"ignore_dB=<ignore dB information from the device?>");
|
||||
"ignore_dB=<ignore dB information from the device?> "
|
||||
"control=<name of mixer control>");
|
||||
|
||||
static const char* const valid_modargs[] = {
|
||||
"name",
|
||||
"sink_name",
|
||||
"sink_properties",
|
||||
"device",
|
||||
"device_id",
|
||||
"format",
|
||||
|
|
@ -70,6 +73,7 @@ static const char* const valid_modargs[] = {
|
|||
"tsched_buffer_size",
|
||||
"tsched_buffer_watermark",
|
||||
"ignore_dB",
|
||||
"control",
|
||||
NULL
|
||||
};
|
||||
|
||||
|
|
@ -78,8 +82,7 @@ int pa__init(pa_module*m) {
|
|||
|
||||
pa_assert(m);
|
||||
|
||||
pa_alsa_redirect_errors_inc();
|
||||
snd_config_update_free_global();
|
||||
pa_alsa_refcnt_inc();
|
||||
|
||||
if (!(ma = pa_modargs_new(m->argument, valid_modargs))) {
|
||||
pa_log("Failed to parse module arguments");
|
||||
|
|
@ -120,6 +123,5 @@ void pa__done(pa_module*m) {
|
|||
if ((sink = m->userdata))
|
||||
pa_alsa_sink_free(sink);
|
||||
|
||||
snd_config_update_free_global();
|
||||
pa_alsa_redirect_errors_dec();
|
||||
pa_alsa_refcnt_dec();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -37,6 +37,7 @@
|
|||
#include <pulse/timeval.h>
|
||||
|
||||
#include <pulsecore/core-error.h>
|
||||
#include <pulsecore/core-rtclock.h>
|
||||
#include <pulsecore/core.h>
|
||||
#include <pulsecore/module.h>
|
||||
#include <pulsecore/memchunk.h>
|
||||
|
|
@ -51,7 +52,6 @@
|
|||
#include <pulsecore/thread-mq.h>
|
||||
#include <pulsecore/rtpoll.h>
|
||||
#include <pulsecore/time-smoother.h>
|
||||
#include <pulsecore/rtclock.h>
|
||||
|
||||
#include "alsa-util.h"
|
||||
#include "alsa-source.h"
|
||||
|
|
@ -64,6 +64,7 @@ PA_MODULE_LOAD_ONCE(FALSE);
|
|||
PA_MODULE_USAGE(
|
||||
"name=<name for the source, to be prefixed> "
|
||||
"source_name=<name for the source> "
|
||||
"source_properties=<properties for the source> "
|
||||
"device=<ALSA device> "
|
||||
"device_id=<ALSA card index> "
|
||||
"format=<sample format> "
|
||||
|
|
@ -76,11 +77,13 @@ PA_MODULE_USAGE(
|
|||
"tsched=<enable system timer based scheduling mode?> "
|
||||
"tsched_buffer_size=<buffer size when using timer based scheduling> "
|
||||
"tsched_buffer_watermark=<upper fill watermark> "
|
||||
"ignore_dB=<ignore dB information from the device?>");
|
||||
"ignore_dB=<ignore dB information from the device?> "
|
||||
"control=<name of mixer control>");
|
||||
|
||||
static const char* const valid_modargs[] = {
|
||||
"name",
|
||||
"source_name",
|
||||
"source_properties",
|
||||
"device",
|
||||
"device_id",
|
||||
"format",
|
||||
|
|
@ -94,6 +97,7 @@ static const char* const valid_modargs[] = {
|
|||
"tsched_buffer_size",
|
||||
"tsched_buffer_watermark",
|
||||
"ignore_dB",
|
||||
"control",
|
||||
NULL
|
||||
};
|
||||
|
||||
|
|
@ -102,8 +106,7 @@ int pa__init(pa_module*m) {
|
|||
|
||||
pa_assert(m);
|
||||
|
||||
pa_alsa_redirect_errors_inc();
|
||||
snd_config_update_free_global();
|
||||
pa_alsa_refcnt_inc();
|
||||
|
||||
if (!(ma = pa_modargs_new(m->argument, valid_modargs))) {
|
||||
pa_log("Failed to parse module arguments");
|
||||
|
|
@ -144,6 +147,5 @@ void pa__done(pa_module*m) {
|
|||
if ((source = m->userdata))
|
||||
pa_alsa_source_free(source);
|
||||
|
||||
snd_config_update_free_global();
|
||||
pa_alsa_redirect_errors_dec();
|
||||
pa_alsa_refcnt_dec();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -24,33 +24,39 @@
|
|||
#endif
|
||||
|
||||
#include <pulsecore/core-util.h>
|
||||
#include <modules/dbus-util.h>
|
||||
#include <pulsecore/shared.h>
|
||||
#include <pulsecore/dbus-shared.h>
|
||||
|
||||
#include "bluetooth-util.h"
|
||||
|
||||
enum mode {
|
||||
MODE_FIND,
|
||||
MODE_GET,
|
||||
MODE_DISCOVER
|
||||
};
|
||||
|
||||
struct pa_bluetooth_discovery {
|
||||
DBusConnection *connection;
|
||||
PA_REFCNT_DECLARE;
|
||||
|
||||
pa_core *core;
|
||||
pa_dbus_connection *connection;
|
||||
PA_LLIST_HEAD(pa_dbus_pending, pending);
|
||||
|
||||
enum mode mode;
|
||||
|
||||
/* If mode == MODE_FIND look for a specific device by its address.
|
||||
If mode == MODE_GET look for a specific device by its path. */
|
||||
const char *looking_for;
|
||||
pa_bluetooth_device *found_device;
|
||||
|
||||
/* If looking_for is NULL we do long-time discovery */
|
||||
pa_hashmap *devices;
|
||||
pa_bluetooth_device_callback_t callback;
|
||||
struct userdata *userdata;
|
||||
pa_hook hook;
|
||||
};
|
||||
|
||||
static void get_properties_reply(DBusPendingCall *pending, void *userdata);
|
||||
static pa_dbus_pending* send_and_add_to_pending(pa_bluetooth_discovery *y, pa_bluetooth_device *d, DBusMessage *m, DBusPendingCallNotifyFunction func);
|
||||
|
||||
static pa_bt_audio_state_t pa_bt_audio_state_from_string(const char* value) {
|
||||
pa_assert(value);
|
||||
|
||||
if (pa_streq(value, "disconnected"))
|
||||
return PA_BT_AUDIO_STATE_DISCONNECTED;
|
||||
else if (pa_streq(value, "connecting"))
|
||||
return PA_BT_AUDIO_STATE_CONNECTING;
|
||||
else if (pa_streq(value, "connected"))
|
||||
return PA_BT_AUDIO_STATE_CONNECTED;
|
||||
else if (pa_streq(value, "playing"))
|
||||
return PA_BT_AUDIO_STATE_PLAYING;
|
||||
|
||||
return PA_BT_AUDIO_STATE_INVALID;
|
||||
}
|
||||
|
||||
static pa_bluetooth_uuid *uuid_new(const char *uuid) {
|
||||
pa_bluetooth_uuid *u;
|
||||
|
||||
|
|
@ -73,9 +79,9 @@ static pa_bluetooth_device* device_new(const char *path) {
|
|||
|
||||
d = pa_xnew(pa_bluetooth_device, 1);
|
||||
|
||||
d->device_info_valid = d->audio_sink_info_valid = d->headset_info_valid = 0;
|
||||
d->dead = FALSE;
|
||||
|
||||
d->data = NULL;
|
||||
d->device_info_valid = 0;
|
||||
|
||||
d->name = NULL;
|
||||
d->path = pa_xstrdup(path);
|
||||
|
|
@ -87,14 +93,14 @@ static pa_bluetooth_device* device_new(const char *path) {
|
|||
d->class = -1;
|
||||
d->trusted = -1;
|
||||
|
||||
d->audio_sink_connected = -1;
|
||||
|
||||
d->headset_connected = -1;
|
||||
d->audio_state = PA_BT_AUDIO_STATE_INVALID;
|
||||
d->audio_sink_state = PA_BT_AUDIO_STATE_INVALID;
|
||||
d->headset_state = PA_BT_AUDIO_STATE_INVALID;
|
||||
|
||||
return d;
|
||||
}
|
||||
|
||||
void pa_bluetooth_device_free(pa_bluetooth_device *d) {
|
||||
static void device_free(pa_bluetooth_device *d) {
|
||||
pa_bluetooth_uuid *u;
|
||||
|
||||
pa_assert(d);
|
||||
|
|
@ -111,24 +117,14 @@ void pa_bluetooth_device_free(pa_bluetooth_device *d) {
|
|||
pa_xfree(d);
|
||||
}
|
||||
|
||||
static pa_bool_t device_is_loaded(pa_bluetooth_device *d) {
|
||||
pa_assert(d);
|
||||
|
||||
/* FIXME: e83621724d7939b97b4f01f0d7e965d61ef8e55e, f1daa282f030e4e2381341e0f65faca47c4b891b is borked, probably needs to be reversed */
|
||||
|
||||
return d->device_info_valid && (d->audio_sink_info_valid || d->headset_info_valid);
|
||||
}
|
||||
|
||||
static pa_bool_t device_is_audio(pa_bluetooth_device *d) {
|
||||
pa_assert(d);
|
||||
|
||||
pa_assert(d->device_info_valid);
|
||||
pa_assert(d->audio_sink_info_valid || d->headset_info_valid);
|
||||
|
||||
/* FIXME: e83621724d7939b97b4f01f0d7e965d61ef8e55e, f1daa282f030e4e2381341e0f65faca47c4b891b is borked, probably needs to be reversed */
|
||||
|
||||
return d->device_info_valid > 0 &&
|
||||
(d->audio_sink_info_valid > 0 || d->headset_info_valid > 0);
|
||||
return
|
||||
d->device_info_valid &&
|
||||
(d->audio_state != PA_BT_AUDIO_STATE_INVALID ||
|
||||
d->audio_sink_state != PA_BT_AUDIO_STATE_INVALID ||
|
||||
d->headset_state != PA_BT_AUDIO_STATE_INVALID);
|
||||
}
|
||||
|
||||
static int parse_device_property(pa_bluetooth_discovery *y, pa_bluetooth_device *d, DBusMessageIter *i) {
|
||||
|
|
@ -224,11 +220,25 @@ static int parse_device_property(pa_bluetooth_discovery *y, pa_bluetooth_device
|
|||
while (dbus_message_iter_get_arg_type(&ai) != DBUS_TYPE_INVALID) {
|
||||
pa_bluetooth_uuid *node;
|
||||
const char *value;
|
||||
DBusMessage *m;
|
||||
|
||||
dbus_message_iter_get_basic(&ai, &value);
|
||||
node = uuid_new(value);
|
||||
PA_LLIST_PREPEND(pa_bluetooth_uuid, d->uuids, node);
|
||||
|
||||
/* this might eventually be racy if .Audio is not there yet, but the State change will come anyway later, so this call is for cold-detection mostly */
|
||||
pa_assert_se(m = dbus_message_new_method_call("org.bluez", d->path, "org.bluez.Audio", "GetProperties"));
|
||||
send_and_add_to_pending(y, d, m, get_properties_reply);
|
||||
|
||||
/* Vudentz said the interfaces are here when the UUIDs are announced */
|
||||
if (strcasecmp(HSP_HS_UUID, value) == 0 || strcasecmp(HFP_HS_UUID, value) == 0) {
|
||||
pa_assert_se(m = dbus_message_new_method_call("org.bluez", d->path, "org.bluez.Headset", "GetProperties"));
|
||||
send_and_add_to_pending(y, d, m, get_properties_reply);
|
||||
} else if (strcasecmp(A2DP_SINK_UUID, value) == 0) {
|
||||
pa_assert_se(m = dbus_message_new_method_call("org.bluez", d->path, "org.bluez.AudioSink", "GetProperties"));
|
||||
send_and_add_to_pending(y, d, m, get_properties_reply);
|
||||
}
|
||||
|
||||
if (!dbus_message_iter_next(&ai))
|
||||
break;
|
||||
}
|
||||
|
|
@ -241,12 +251,12 @@ static int parse_device_property(pa_bluetooth_discovery *y, pa_bluetooth_device
|
|||
return 0;
|
||||
}
|
||||
|
||||
static int parse_audio_property(pa_bluetooth_discovery *u, int *connected, DBusMessageIter *i) {
|
||||
static int parse_audio_property(pa_bluetooth_discovery *u, int *state, DBusMessageIter *i) {
|
||||
const char *key;
|
||||
DBusMessageIter variant_i;
|
||||
|
||||
pa_assert(u);
|
||||
pa_assert(connected);
|
||||
pa_assert(state);
|
||||
pa_assert(i);
|
||||
|
||||
if (dbus_message_iter_get_arg_type(i) != DBUS_TYPE_STRING) {
|
||||
|
|
@ -268,19 +278,18 @@ static int parse_audio_property(pa_bluetooth_discovery *u, int *connected, DBusM
|
|||
|
||||
dbus_message_iter_recurse(i, &variant_i);
|
||||
|
||||
/* pa_log_debug("Parsing property org.bluez.{AudioSink|Headset}.%s", key); */
|
||||
/* pa_log_debug("Parsing property org.bluez.{Audio|AudioSink|Headset}.%s", key); */
|
||||
|
||||
switch (dbus_message_iter_get_arg_type(&variant_i)) {
|
||||
|
||||
case DBUS_TYPE_BOOLEAN: {
|
||||
case DBUS_TYPE_STRING: {
|
||||
|
||||
dbus_bool_t value;
|
||||
const char *value;
|
||||
dbus_message_iter_get_basic(&variant_i, &value);
|
||||
|
||||
if (pa_streq(key, "Connected"))
|
||||
*connected = !!value;
|
||||
|
||||
/* pa_log_debug("Value %s", pa_yes_no(value)); */
|
||||
if (pa_streq(key, "State"))
|
||||
*state = pa_bt_audio_state_from_string(value);
|
||||
/* pa_log_debug("Value %s", value); */
|
||||
|
||||
break;
|
||||
}
|
||||
|
|
@ -289,21 +298,26 @@ static int parse_audio_property(pa_bluetooth_discovery *u, int *connected, DBusM
|
|||
return 0;
|
||||
}
|
||||
|
||||
static void run_callback(pa_bluetooth_discovery *y, pa_bluetooth_device *d, pa_bool_t good) {
|
||||
static void run_callback(pa_bluetooth_discovery *y, pa_bluetooth_device *d, pa_bool_t dead) {
|
||||
pa_assert(y);
|
||||
pa_assert(d);
|
||||
|
||||
if (y->mode != MODE_DISCOVER)
|
||||
return;
|
||||
|
||||
if (!device_is_loaded(d))
|
||||
return;
|
||||
|
||||
if (!device_is_audio(d))
|
||||
return;
|
||||
|
||||
y->callback(y->userdata, d, good);
|
||||
d->dead = dead;
|
||||
pa_hook_fire(&y->hook, d);
|
||||
}
|
||||
|
||||
static void remove_all_devices(pa_bluetooth_discovery *y) {
|
||||
pa_bluetooth_device *d;
|
||||
|
||||
pa_assert(y);
|
||||
|
||||
while ((d = pa_hashmap_steal_first(y->devices))) {
|
||||
run_callback(y, d, TRUE);
|
||||
device_free(d);
|
||||
}
|
||||
}
|
||||
|
||||
static void get_properties_reply(DBusPendingCall *pending, void *userdata) {
|
||||
|
|
@ -328,10 +342,12 @@ static void get_properties_reply(DBusPendingCall *pending, void *userdata) {
|
|||
|
||||
if (dbus_message_is_method_call(p->message, "org.bluez.Device", "GetProperties"))
|
||||
d->device_info_valid = valid;
|
||||
else if (dbus_message_is_method_call(p->message, "org.bluez.Headset", "GetProperties"))
|
||||
d->headset_info_valid = valid;
|
||||
else if (dbus_message_is_method_call(p->message, "org.bluez.AudioSink", "GetProperties"))
|
||||
d->audio_sink_info_valid = valid;
|
||||
|
||||
if (dbus_message_is_error(r, DBUS_ERROR_SERVICE_UNKNOWN)) {
|
||||
pa_log_debug("Bluetooth daemon is apparently not available.");
|
||||
remove_all_devices(y);
|
||||
goto finish2;
|
||||
}
|
||||
|
||||
if (dbus_message_get_type(r) == DBUS_MESSAGE_TYPE_ERROR) {
|
||||
|
||||
|
|
@ -363,12 +379,16 @@ static void get_properties_reply(DBusPendingCall *pending, void *userdata) {
|
|||
if (parse_device_property(y, d, &dict_i) < 0)
|
||||
goto finish;
|
||||
|
||||
} else if (dbus_message_has_interface(p->message, "org.bluez.Audio")) {
|
||||
if (parse_audio_property(y, &d->audio_state, &dict_i) < 0)
|
||||
goto finish;
|
||||
|
||||
} else if (dbus_message_has_interface(p->message, "org.bluez.Headset")) {
|
||||
if (parse_audio_property(y, &d->headset_connected, &dict_i) < 0)
|
||||
if (parse_audio_property(y, &d->headset_state, &dict_i) < 0)
|
||||
goto finish;
|
||||
|
||||
} else if (dbus_message_has_interface(p->message, "org.bluez.AudioSink")) {
|
||||
if (parse_audio_property(y, &d->audio_sink_connected, &dict_i) < 0)
|
||||
if (parse_audio_property(y, &d->audio_sink_state, &dict_i) < 0)
|
||||
goto finish;
|
||||
}
|
||||
}
|
||||
|
|
@ -378,8 +398,9 @@ static void get_properties_reply(DBusPendingCall *pending, void *userdata) {
|
|||
}
|
||||
|
||||
finish:
|
||||
run_callback(y, d, TRUE);
|
||||
run_callback(y, d, FALSE);
|
||||
|
||||
finish2:
|
||||
dbus_message_unref(r);
|
||||
|
||||
PA_LLIST_REMOVE(pa_dbus_pending, y->pending, p);
|
||||
|
|
@ -393,9 +414,9 @@ static pa_dbus_pending* send_and_add_to_pending(pa_bluetooth_discovery *y, pa_bl
|
|||
pa_assert(y);
|
||||
pa_assert(m);
|
||||
|
||||
pa_assert_se(dbus_connection_send_with_reply(y->connection, m, &call, -1));
|
||||
pa_assert_se(dbus_connection_send_with_reply(pa_dbus_connection_get(y->connection), m, &call, -1));
|
||||
|
||||
p = pa_dbus_pending_new(m, call, y, d);
|
||||
p = pa_dbus_pending_new(pa_dbus_connection_get(y->connection), m, call, y, d);
|
||||
PA_LLIST_PREPEND(pa_dbus_pending, y->pending, p);
|
||||
dbus_pending_call_set_notify(call, func, p, NULL);
|
||||
|
||||
|
|
@ -409,24 +430,18 @@ static void found_device(pa_bluetooth_discovery *y, const char* path) {
|
|||
pa_assert(y);
|
||||
pa_assert(path);
|
||||
|
||||
if (pa_hashmap_get(y->devices, path))
|
||||
return;
|
||||
|
||||
d = device_new(path);
|
||||
|
||||
if (y->mode == MODE_DISCOVER) {
|
||||
pa_assert(y->devices);
|
||||
pa_hashmap_put(y->devices, d->path, d);
|
||||
} else {
|
||||
pa_assert(!y->found_device);
|
||||
y->found_device = d;
|
||||
}
|
||||
pa_hashmap_put(y->devices, d->path, d);
|
||||
|
||||
pa_assert_se(m = dbus_message_new_method_call("org.bluez", path, "org.bluez.Device", "GetProperties"));
|
||||
send_and_add_to_pending(y, d, m, get_properties_reply);
|
||||
|
||||
pa_assert_se(m = dbus_message_new_method_call("org.bluez", path, "org.bluez.Headset", "GetProperties"));
|
||||
send_and_add_to_pending(y, d, m, get_properties_reply);
|
||||
|
||||
pa_assert_se(m = dbus_message_new_method_call("org.bluez", path, "org.bluez.AudioSink", "GetProperties"));
|
||||
send_and_add_to_pending(y, d, m, get_properties_reply);
|
||||
/* Before we read the other properties (Audio, AudioSink, Headset) we wait
|
||||
* that the UUID is read */
|
||||
}
|
||||
|
||||
static void list_devices_reply(DBusPendingCall *pending, void *userdata) {
|
||||
|
|
@ -445,9 +460,15 @@ static void list_devices_reply(DBusPendingCall *pending, void *userdata) {
|
|||
pa_assert_se(y = p->context_data);
|
||||
pa_assert_se(r = dbus_pending_call_steal_reply(pending));
|
||||
|
||||
if (dbus_message_is_error(r, DBUS_ERROR_SERVICE_UNKNOWN)) {
|
||||
pa_log_debug("Bluetooth daemon is apparently not available.");
|
||||
remove_all_devices(y);
|
||||
goto finish;
|
||||
}
|
||||
|
||||
if (dbus_message_get_type(r) == DBUS_MESSAGE_TYPE_ERROR) {
|
||||
pa_log("Error from ListDevices reply: %s", dbus_message_get_error_name(r));
|
||||
goto end;
|
||||
goto finish;
|
||||
}
|
||||
|
||||
if (!dbus_message_get_args(r, &e, DBUS_TYPE_ARRAY, DBUS_TYPE_OBJECT_PATH, &paths, &num, DBUS_TYPE_INVALID)) {
|
||||
|
|
@ -460,7 +481,7 @@ static void list_devices_reply(DBusPendingCall *pending, void *userdata) {
|
|||
found_device(y, paths[i]);
|
||||
}
|
||||
|
||||
end:
|
||||
finish:
|
||||
if (paths)
|
||||
dbus_free_string_array (paths);
|
||||
|
||||
|
|
@ -470,57 +491,11 @@ end:
|
|||
pa_dbus_pending_free(p);
|
||||
}
|
||||
|
||||
static void find_device_reply(DBusPendingCall *pending, void *userdata) {
|
||||
DBusError e;
|
||||
DBusMessage *r;
|
||||
char *path = NULL;
|
||||
pa_dbus_pending *p;
|
||||
pa_bluetooth_discovery *y;
|
||||
|
||||
pa_assert(pending);
|
||||
|
||||
dbus_error_init(&e);
|
||||
|
||||
pa_assert_se(p = userdata);
|
||||
pa_assert_se(y = p->context_data);
|
||||
pa_assert_se(r = dbus_pending_call_steal_reply(pending));
|
||||
|
||||
if (dbus_message_get_type(r) == DBUS_MESSAGE_TYPE_ERROR) {
|
||||
pa_log("Error from FindDevice reply: %s", dbus_message_get_error_name(r));
|
||||
goto end;
|
||||
}
|
||||
|
||||
if (!dbus_message_get_args(r, &e, DBUS_TYPE_OBJECT_PATH, &path, DBUS_TYPE_INVALID)) {
|
||||
pa_log("org.bluez.Adapter.FindDevice returned an error: '%s'\n", e.message);
|
||||
dbus_error_free(&e);
|
||||
} else
|
||||
found_device(y, path);
|
||||
|
||||
end:
|
||||
dbus_message_unref(r);
|
||||
|
||||
PA_LLIST_REMOVE(pa_dbus_pending, y->pending, p);
|
||||
pa_dbus_pending_free(p);
|
||||
}
|
||||
|
||||
static void found_adapter(pa_bluetooth_discovery *y, const char *path) {
|
||||
DBusMessage *m;
|
||||
|
||||
if (y->mode == MODE_FIND) {
|
||||
pa_assert_se(m = dbus_message_new_method_call("org.bluez", path, "org.bluez.Adapter", "FindDevice"));
|
||||
|
||||
pa_assert_se(dbus_message_append_args(m,
|
||||
DBUS_TYPE_STRING, &y->looking_for,
|
||||
DBUS_TYPE_INVALID));
|
||||
|
||||
send_and_add_to_pending(y, NULL, m, find_device_reply);
|
||||
|
||||
} else {
|
||||
pa_assert(y->mode == MODE_DISCOVER);
|
||||
|
||||
pa_assert_se(m = dbus_message_new_method_call("org.bluez", path, "org.bluez.Adapter", "ListDevices"));
|
||||
send_and_add_to_pending(y, NULL, m, list_devices_reply);
|
||||
}
|
||||
pa_assert_se(m = dbus_message_new_method_call("org.bluez", path, "org.bluez.Adapter", "ListDevices"));
|
||||
send_and_add_to_pending(y, NULL, m, list_devices_reply);
|
||||
}
|
||||
|
||||
static void list_adapters_reply(DBusPendingCall *pending, void *userdata) {
|
||||
|
|
@ -539,9 +514,15 @@ static void list_adapters_reply(DBusPendingCall *pending, void *userdata) {
|
|||
pa_assert_se(y = p->context_data);
|
||||
pa_assert_se(r = dbus_pending_call_steal_reply(pending));
|
||||
|
||||
if (dbus_message_is_error(r, DBUS_ERROR_SERVICE_UNKNOWN)) {
|
||||
pa_log_debug("Bluetooth daemon is apparently not available.");
|
||||
remove_all_devices(y);
|
||||
goto finish;
|
||||
}
|
||||
|
||||
if (dbus_message_get_type(r) == DBUS_MESSAGE_TYPE_ERROR) {
|
||||
pa_log("Error from ListAdapters reply: %s", dbus_message_get_error_name(r));
|
||||
goto end;
|
||||
goto finish;
|
||||
}
|
||||
|
||||
if (!dbus_message_get_args(r, &e, DBUS_TYPE_ARRAY, DBUS_TYPE_OBJECT_PATH, &paths, &num, DBUS_TYPE_INVALID)) {
|
||||
|
|
@ -554,7 +535,7 @@ static void list_adapters_reply(DBusPendingCall *pending, void *userdata) {
|
|||
found_adapter(y, paths[i]);
|
||||
}
|
||||
|
||||
end:
|
||||
finish:
|
||||
if (paths)
|
||||
dbus_free_string_array (paths);
|
||||
|
||||
|
|
@ -600,11 +581,8 @@ static DBusHandlerResult filter_cb(DBusConnection *bus, DBusMessage *m, void *us
|
|||
pa_log_debug("Device %s removed", path);
|
||||
|
||||
if ((d = pa_hashmap_remove(y->devices, path))) {
|
||||
|
||||
pa_assert_se(y->mode == MODE_DISCOVER);
|
||||
run_callback(y, d, FALSE);
|
||||
|
||||
pa_bluetooth_device_free(d);
|
||||
run_callback(y, d, TRUE);
|
||||
device_free(d);
|
||||
}
|
||||
|
||||
return DBUS_HANDLER_RESULT_NOT_YET_HANDLED;
|
||||
|
|
@ -635,7 +613,8 @@ static DBusHandlerResult filter_cb(DBusConnection *bus, DBusMessage *m, void *us
|
|||
found_adapter(y, path);
|
||||
return DBUS_HANDLER_RESULT_NOT_YET_HANDLED;
|
||||
|
||||
} else if (dbus_message_is_signal(m, "org.bluez.Headset", "PropertyChanged") ||
|
||||
} else if (dbus_message_is_signal(m, "org.bluez.Audio", "PropertyChanged") ||
|
||||
dbus_message_is_signal(m, "org.bluez.Headset", "PropertyChanged") ||
|
||||
dbus_message_is_signal(m, "org.bluez.AudioSink", "PropertyChanged") ||
|
||||
dbus_message_is_signal(m, "org.bluez.Device", "PropertyChanged")) {
|
||||
|
||||
|
|
@ -653,19 +632,46 @@ static DBusHandlerResult filter_cb(DBusConnection *bus, DBusMessage *m, void *us
|
|||
if (parse_device_property(y, d, &arg_i) < 0)
|
||||
goto fail;
|
||||
|
||||
} else if (dbus_message_has_interface(m, "org.bluez.Headset")) {
|
||||
if (parse_audio_property(y, &d->headset_connected, &arg_i) < 0)
|
||||
} else if (dbus_message_has_interface(m, "org.bluez.Audio")) {
|
||||
if (parse_audio_property(y, &d->audio_state, &arg_i) < 0)
|
||||
goto fail;
|
||||
|
||||
} else if (dbus_message_has_interface(m, "org.bluez.Headset")) {
|
||||
if (parse_audio_property(y, &d->headset_state, &arg_i) < 0)
|
||||
goto fail;
|
||||
d->headset_info_valid = 1;
|
||||
|
||||
} else if (dbus_message_has_interface(m, "org.bluez.AudioSink")) {
|
||||
if (parse_audio_property(y, &d->audio_sink_connected, &arg_i) < 0)
|
||||
if (parse_audio_property(y, &d->audio_sink_state, &arg_i) < 0)
|
||||
goto fail;
|
||||
d->audio_sink_info_valid = 1;
|
||||
}
|
||||
|
||||
pa_assert_se(y->mode == MODE_DISCOVER);
|
||||
run_callback(y, d, TRUE);
|
||||
run_callback(y, d, FALSE);
|
||||
}
|
||||
|
||||
return DBUS_HANDLER_RESULT_NOT_YET_HANDLED;
|
||||
|
||||
} else if (dbus_message_is_signal(m, "org.freedesktop.DBus", "NameOwnerChanged")) {
|
||||
const char *name, *old_owner, *new_owner;
|
||||
|
||||
if (!dbus_message_get_args(m, &err,
|
||||
DBUS_TYPE_STRING, &name,
|
||||
DBUS_TYPE_STRING, &old_owner,
|
||||
DBUS_TYPE_STRING, &new_owner,
|
||||
DBUS_TYPE_INVALID)) {
|
||||
pa_log("Failed to parse org.freedesktop.DBus.NameOwnerChanged: %s", err.message);
|
||||
goto fail;
|
||||
}
|
||||
|
||||
if (pa_streq(name, "org.bluez")) {
|
||||
if (old_owner && *old_owner) {
|
||||
pa_log_debug("Bluetooth daemon disappeared.");
|
||||
remove_all_devices(y);
|
||||
}
|
||||
|
||||
if (new_owner && *new_owner) {
|
||||
pa_log_debug("Bluetooth daemon appeared.");
|
||||
list_adapters(y);
|
||||
}
|
||||
}
|
||||
|
||||
return DBUS_HANDLER_RESULT_NOT_YET_HANDLED;
|
||||
|
|
@ -677,86 +683,87 @@ fail:
|
|||
return DBUS_HANDLER_RESULT_NOT_YET_HANDLED;
|
||||
}
|
||||
|
||||
pa_bluetooth_device* pa_bluetooth_find_device(DBusConnection *c, const char* address) {
|
||||
pa_bluetooth_discovery y;
|
||||
const pa_bluetooth_device* pa_bluetooth_discovery_get_by_address(pa_bluetooth_discovery *y, const char* address) {
|
||||
pa_bluetooth_device *d;
|
||||
void *state = NULL;
|
||||
|
||||
memset(&y, 0, sizeof(y));
|
||||
y.mode = MODE_FIND;
|
||||
y.looking_for = address;
|
||||
y.connection = c;
|
||||
PA_LLIST_HEAD_INIT(pa_dbus_pending, y.pending);
|
||||
pa_assert(y);
|
||||
pa_assert(PA_REFCNT_VALUE(y) > 0);
|
||||
pa_assert(address);
|
||||
|
||||
list_adapters(&y);
|
||||
if (!pa_hook_is_firing(&y->hook))
|
||||
pa_bluetooth_discovery_sync(y);
|
||||
|
||||
pa_dbus_sync_pending_list(&y.pending);
|
||||
pa_assert(!y.pending);
|
||||
while ((d = pa_hashmap_iterate(y->devices, &state, NULL)))
|
||||
if (pa_streq(d->address, address))
|
||||
return d;
|
||||
|
||||
if (y.found_device) {
|
||||
pa_assert(device_is_loaded(y.found_device));
|
||||
|
||||
if (!device_is_audio(y.found_device)) {
|
||||
pa_bluetooth_device_free(y.found_device);
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
|
||||
return y.found_device;
|
||||
return NULL;
|
||||
}
|
||||
|
||||
pa_bluetooth_device* pa_bluetooth_get_device(DBusConnection *c, const char* path) {
|
||||
pa_bluetooth_discovery y;
|
||||
const pa_bluetooth_device* pa_bluetooth_discovery_get_by_path(pa_bluetooth_discovery *y, const char* path) {
|
||||
pa_assert(y);
|
||||
pa_assert(PA_REFCNT_VALUE(y) > 0);
|
||||
pa_assert(path);
|
||||
|
||||
memset(&y, 0, sizeof(y));
|
||||
y.mode = MODE_GET;
|
||||
y.connection = c;
|
||||
PA_LLIST_HEAD_INIT(pa_dbus_pending, y.pending);
|
||||
if (!pa_hook_is_firing(&y->hook))
|
||||
pa_bluetooth_discovery_sync(y);
|
||||
|
||||
found_device(&y, path);
|
||||
|
||||
pa_dbus_sync_pending_list(&y.pending);
|
||||
pa_assert(!y.pending);
|
||||
|
||||
if (y.found_device) {
|
||||
pa_assert(device_is_loaded(y.found_device));
|
||||
|
||||
if (!device_is_audio(y.found_device)) {
|
||||
pa_bluetooth_device_free(y.found_device);
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
|
||||
return y.found_device;
|
||||
return pa_hashmap_get(y->devices, path);
|
||||
}
|
||||
|
||||
pa_bluetooth_discovery* pa_bluetooth_discovery_new(DBusConnection *c, pa_bluetooth_device_callback_t cb, struct userdata *u) {
|
||||
static int setup_dbus(pa_bluetooth_discovery *y) {
|
||||
DBusError err;
|
||||
|
||||
dbus_error_init(&err);
|
||||
|
||||
y->connection = pa_dbus_bus_get(y->core, DBUS_BUS_SYSTEM, &err);
|
||||
|
||||
if (dbus_error_is_set(&err) || !y->connection) {
|
||||
pa_log("Failed to get D-Bus connection: %s", err.message);
|
||||
dbus_error_free(&err);
|
||||
return -1;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
pa_bluetooth_discovery* pa_bluetooth_discovery_get(pa_core *c) {
|
||||
DBusError err;
|
||||
pa_bluetooth_discovery *y;
|
||||
|
||||
pa_assert(c);
|
||||
pa_assert(cb);
|
||||
|
||||
dbus_error_init(&err);
|
||||
|
||||
if ((y = pa_shared_get(c, "bluetooth-discovery")))
|
||||
return pa_bluetooth_discovery_ref(y);
|
||||
|
||||
y = pa_xnew0(pa_bluetooth_discovery, 1);
|
||||
y->mode = MODE_DISCOVER;
|
||||
y->connection = c;
|
||||
y->callback = cb;
|
||||
y->userdata = u;
|
||||
PA_REFCNT_INIT(y);
|
||||
y->core = c;
|
||||
y->devices = pa_hashmap_new(pa_idxset_string_hash_func, pa_idxset_string_compare_func);
|
||||
PA_LLIST_HEAD_INIT(pa_dbus_pending, y->pending);
|
||||
pa_hook_init(&y->hook, y);
|
||||
pa_shared_set(c, "bluetooth-discovery", y);
|
||||
|
||||
if (setup_dbus(y) < 0)
|
||||
goto fail;
|
||||
|
||||
/* dynamic detection of bluetooth audio devices */
|
||||
if (!dbus_connection_add_filter(c, filter_cb, y, NULL)) {
|
||||
if (!dbus_connection_add_filter(pa_dbus_connection_get(y->connection), filter_cb, y, NULL)) {
|
||||
pa_log_error("Failed to add filter function");
|
||||
goto fail;
|
||||
}
|
||||
|
||||
if (pa_dbus_add_matches(
|
||||
c, &err,
|
||||
pa_dbus_connection_get(y->connection), &err,
|
||||
"type='signal',sender='org.freedesktop.DBus',interface='org.freedesktop.DBus',member='NameOwnerChanged'",
|
||||
"type='signal',sender='org.bluez',interface='org.bluez.Manager',member='AdapterAdded'",
|
||||
"type='signal',sender='org.bluez',interface='org.bluez.Adapter',member='DeviceRemoved'",
|
||||
"type='signal',sender='org.bluez',interface='org.bluez.Adapter',member='DeviceCreated'",
|
||||
"type='signal',sender='org.bluez',interface='org.bluez.Device',member='PropertyChanged'",
|
||||
"type='signal',sender='org.bluez',interface='org.bluez.Audio',member='PropertyChanged'",
|
||||
"type='signal',sender='org.bluez',interface='org.bluez.Headset',member='PropertyChanged'",
|
||||
"type='signal',sender='org.bluez',interface='org.bluez.AudioSink',member='PropertyChanged'", NULL) < 0) {
|
||||
pa_log("Failed to add D-Bus matches: %s", err.message);
|
||||
|
|
@ -768,46 +775,77 @@ pa_bluetooth_discovery* pa_bluetooth_discovery_new(DBusConnection *c, pa_bluetoo
|
|||
return y;
|
||||
|
||||
fail:
|
||||
|
||||
if (y)
|
||||
pa_bluetooth_discovery_unref(y);
|
||||
|
||||
dbus_error_free(&err);
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
||||
void pa_bluetooth_discovery_free(pa_bluetooth_discovery *y) {
|
||||
pa_bluetooth_device *d;
|
||||
|
||||
pa_bluetooth_discovery* pa_bluetooth_discovery_ref(pa_bluetooth_discovery *y) {
|
||||
pa_assert(y);
|
||||
pa_assert(PA_REFCNT_VALUE(y) > 0);
|
||||
|
||||
PA_REFCNT_INC(y);
|
||||
|
||||
return y;
|
||||
}
|
||||
|
||||
void pa_bluetooth_discovery_unref(pa_bluetooth_discovery *y) {
|
||||
pa_assert(y);
|
||||
pa_assert(PA_REFCNT_VALUE(y) > 0);
|
||||
|
||||
if (PA_REFCNT_DEC(y) > 0)
|
||||
return;
|
||||
|
||||
pa_dbus_free_pending_list(&y->pending);
|
||||
|
||||
if (y->devices) {
|
||||
while ((d = pa_hashmap_steal_first(y->devices))) {
|
||||
run_callback(y, d, FALSE);
|
||||
pa_bluetooth_device_free(d);
|
||||
}
|
||||
|
||||
remove_all_devices(y);
|
||||
pa_hashmap_free(y->devices, NULL, NULL);
|
||||
}
|
||||
|
||||
if (y->connection) {
|
||||
pa_dbus_remove_matches(y->connection,
|
||||
pa_dbus_remove_matches(pa_dbus_connection_get(y->connection),
|
||||
"type='signal',sender='org.freedesktop.DBus',interface='org.freedesktop.DBus',member='NameOwnerChanged'",
|
||||
"type='signal',sender='org.bluez',interface='org.bluez.Manager',member='AdapterAdded'",
|
||||
"type='signal',sender='org.bluez',interface='org.bluez.Manager',member='AdapterRemoved'",
|
||||
"type='signal',sender='org.bluez',interface='org.bluez.Adapter',member='DeviceRemoved'",
|
||||
"type='signal',sender='org.bluez',interface='org.bluez.Adapter',member='DeviceCreated'",
|
||||
"type='signal',sender='org.bluez',interface='org.bluez.Device',member='PropertyChanged'",
|
||||
"type='signal',sender='org.bluez',interface='org.bluez.Audio',member='PropertyChanged'",
|
||||
"type='signal',sender='org.bluez',interface='org.bluez.Headset',member='PropertyChanged'",
|
||||
"type='signal',sender='org.bluez',interface='org.bluez.AudioSink',member='PropertyChanged'", NULL);
|
||||
|
||||
dbus_connection_remove_filter(y->connection, filter_cb, y);
|
||||
dbus_connection_remove_filter(pa_dbus_connection_get(y->connection), filter_cb, y);
|
||||
|
||||
pa_dbus_connection_unref(y->connection);
|
||||
}
|
||||
|
||||
pa_hook_done(&y->hook);
|
||||
|
||||
if (y->core)
|
||||
pa_shared_remove(y->core, "bluetooth-discovery");
|
||||
|
||||
pa_xfree(y);
|
||||
}
|
||||
|
||||
void pa_bluetooth_discovery_sync(pa_bluetooth_discovery *y) {
|
||||
pa_assert(y);
|
||||
pa_assert(PA_REFCNT_VALUE(y) > 0);
|
||||
|
||||
pa_dbus_sync_pending_list(&y->pending);
|
||||
}
|
||||
|
||||
pa_hook* pa_bluetooth_discovery_hook(pa_bluetooth_discovery *y) {
|
||||
pa_assert(y);
|
||||
pa_assert(PA_REFCNT_VALUE(y) > 0);
|
||||
|
||||
return &y->hook;
|
||||
}
|
||||
|
||||
const char*pa_bluetooth_get_form_factor(uint32_t class) {
|
||||
unsigned i;
|
||||
const char *r;
|
||||
|
|
@ -867,3 +905,16 @@ char *pa_bluetooth_cleanup_name(const char *name) {
|
|||
|
||||
return t;
|
||||
}
|
||||
|
||||
pa_bool_t pa_bluetooth_uuid_has(pa_bluetooth_uuid *uuids, const char *uuid) {
|
||||
pa_assert(uuid);
|
||||
|
||||
while (uuids) {
|
||||
if (strcasecmp(uuids->uuid, uuid) == 0)
|
||||
return TRUE;
|
||||
|
||||
uuids = uuids->next;
|
||||
}
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -28,6 +28,20 @@
|
|||
#include <pulsecore/macro.h>
|
||||
#include <pulsecore/core-util.h>
|
||||
|
||||
/* UUID copied from bluez/audio/device.h */
|
||||
#define GENERIC_AUDIO_UUID "00001203-0000-1000-8000-00805F9B34FB"
|
||||
|
||||
#define HSP_HS_UUID "00001108-0000-1000-8000-00805F9B34FB"
|
||||
#define HSP_AG_UUID "00001112-0000-1000-8000-00805F9B34FB"
|
||||
|
||||
#define HFP_HS_UUID "0000111E-0000-1000-8000-00805F9B34FB"
|
||||
#define HFP_AG_UUID "0000111F-0000-1000-8000-00805F9B34FB"
|
||||
|
||||
#define ADVANCED_AUDIO_UUID "0000110D-0000-1000-8000-00805F9B34FB"
|
||||
|
||||
#define A2DP_SOURCE_UUID "0000110A-0000-1000-8000-00805F9B34FB"
|
||||
#define A2DP_SINK_UUID "0000110B-0000-1000-8000-00805F9B34FB"
|
||||
|
||||
typedef struct pa_bluetooth_uuid pa_bluetooth_uuid;
|
||||
typedef struct pa_bluetooth_device pa_bluetooth_device;
|
||||
typedef struct pa_bluetooth_discovery pa_bluetooth_discovery;
|
||||
|
|
@ -39,12 +53,20 @@ struct pa_bluetooth_uuid {
|
|||
PA_LLIST_FIELDS(pa_bluetooth_uuid);
|
||||
};
|
||||
|
||||
/* This enum is shared among Audio, Headset, and AudioSink, although not all values are acceptable in all profiles */
|
||||
typedef enum pa_bt_audio_state {
|
||||
PA_BT_AUDIO_STATE_INVALID = -1,
|
||||
PA_BT_AUDIO_STATE_DISCONNECTED,
|
||||
PA_BT_AUDIO_STATE_CONNECTING,
|
||||
PA_BT_AUDIO_STATE_CONNECTED,
|
||||
PA_BT_AUDIO_STATE_PLAYING,
|
||||
PA_BT_AUDIO_STATE_LAST
|
||||
} pa_bt_audio_state_t;
|
||||
|
||||
struct pa_bluetooth_device {
|
||||
void *data; /* arbitrary information for the one owning the discovery object */
|
||||
pa_bool_t dead;
|
||||
|
||||
int device_info_valid; /* 0: no results yet; 1: good results; -1: bad results ... */
|
||||
int audio_sink_info_valid; /* ... same here ... */
|
||||
int headset_info_valid; /* ... and here */
|
||||
|
||||
/* Device information */
|
||||
char *name;
|
||||
|
|
@ -57,25 +79,31 @@ struct pa_bluetooth_device {
|
|||
int class;
|
||||
int trusted;
|
||||
|
||||
/* AudioSink information */
|
||||
int audio_sink_connected;
|
||||
/* Audio state */
|
||||
pa_bt_audio_state_t audio_state;
|
||||
|
||||
/* Headset information */
|
||||
int headset_connected;
|
||||
/* AudioSink state */
|
||||
pa_bt_audio_state_t audio_sink_state;
|
||||
|
||||
/* Headset state */
|
||||
pa_bt_audio_state_t headset_state;
|
||||
};
|
||||
|
||||
void pa_bluetooth_device_free(pa_bluetooth_device *d);
|
||||
pa_bluetooth_discovery* pa_bluetooth_discovery_get(pa_core *core);
|
||||
pa_bluetooth_discovery* pa_bluetooth_discovery_ref(pa_bluetooth_discovery *y);
|
||||
void pa_bluetooth_discovery_unref(pa_bluetooth_discovery *d);
|
||||
|
||||
pa_bluetooth_device* pa_bluetooth_get_device(DBusConnection *c, const char* path);
|
||||
pa_bluetooth_device* pa_bluetooth_find_device(DBusConnection *c, const char* address);
|
||||
|
||||
typedef void (*pa_bluetooth_device_callback_t)(struct userdata *u, pa_bluetooth_device *d, pa_bool_t good);
|
||||
pa_bluetooth_discovery* pa_bluetooth_discovery_new(DBusConnection *c, pa_bluetooth_device_callback_t cb, struct userdata *u);
|
||||
void pa_bluetooth_discovery_free(pa_bluetooth_discovery *d);
|
||||
void pa_bluetooth_discovery_sync(pa_bluetooth_discovery *d);
|
||||
|
||||
const char*pa_bluetooth_get_form_factor(uint32_t class);
|
||||
const pa_bluetooth_device* pa_bluetooth_discovery_get_by_path(pa_bluetooth_discovery *d, const char* path);
|
||||
const pa_bluetooth_device* pa_bluetooth_discovery_get_by_address(pa_bluetooth_discovery *d, const char* address);
|
||||
|
||||
pa_hook* pa_bluetooth_discovery_hook(pa_bluetooth_discovery *d);
|
||||
|
||||
const char* pa_bluetooth_get_form_factor(uint32_t class);
|
||||
|
||||
char *pa_bluetooth_cleanup_name(const char *name);
|
||||
|
||||
pa_bool_t pa_bluetooth_uuid_has(pa_bluetooth_uuid *uuids, const char *uuid);
|
||||
|
||||
#endif
|
||||
|
|
|
|||
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Add a link
Reference in a new issue