summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2009-03-04 22:07:56 +0100
committerLennart Poettering <lennart@poettering.net>2009-03-04 22:07:56 +0100
commitdcee8888650583abd106f818ee56d5dff9028bba (patch)
tree0c37a0f0d2766b5a00a74bc0d3a0a6d5b03a189a
parent3dd8800e6d0ab1f11e981d368ec2bef38c88ce99 (diff)
parent656fc6660fac6ad4524fd2b679cbd35c69033d3b (diff)
Merge branch 'master' of ssh://rootserver/home/lennart/git/public/pulseaudio
-rw-r--r--Makefile.am6
-rwxr-xr-xbootstrap.sh2
-rw-r--r--configure.ac18
-rw-r--r--m4/shave.m450
-rw-r--r--shave-libtool.in2
-rw-r--r--shave.in8
-rw-r--r--src/Makefile.am20
-rw-r--r--src/daemon/caps.c2
-rw-r--r--src/daemon/caps.h2
-rw-r--r--src/daemon/cmdline.c2
-rw-r--r--src/daemon/cmdline.h2
-rw-r--r--src/daemon/cpulimit.c2
-rw-r--r--src/daemon/cpulimit.h2
-rw-r--r--src/daemon/daemon-conf.c12
-rw-r--r--src/daemon/daemon-conf.h8
-rw-r--r--src/daemon/dumpmodules.c2
-rw-r--r--src/daemon/dumpmodules.h2
-rw-r--r--src/daemon/ltdl-bind-now.c2
-rw-r--r--src/daemon/ltdl-bind-now.h2
-rw-r--r--src/daemon/main.c4
-rw-r--r--src/daemon/polkit.c2
-rw-r--r--src/daemon/polkit.h2
-rw-r--r--src/modules/alsa/alsa-sink.c30
-rw-r--r--src/modules/alsa/alsa-sink.h2
-rw-r--r--src/modules/alsa/alsa-source.c9
-rw-r--r--src/modules/alsa/alsa-source.h2
-rw-r--r--src/modules/alsa/alsa-util.c2
-rw-r--r--src/modules/alsa/alsa-util.h2
-rw-r--r--src/modules/alsa/module-alsa-card.c7
-rw-r--r--src/modules/alsa/module-alsa-sink.c2
-rw-r--r--src/modules/alsa/module-alsa-source.c2
-rw-r--r--src/modules/bluetooth/bluetooth-util.c2
-rw-r--r--src/modules/bluetooth/bluetooth-util.h2
-rw-r--r--src/modules/bluetooth/ipc.h3
-rw-r--r--src/modules/bluetooth/module-bluetooth-device.c2
-rw-r--r--src/modules/bluetooth/module-bluetooth-discover.c2
-rw-r--r--src/modules/bluetooth/module-bluetooth-proximity.c2
-rw-r--r--src/modules/dbus-util.c2
-rw-r--r--src/modules/dbus-util.h2
-rw-r--r--src/modules/gconf/gconf-helper.c2
-rw-r--r--src/modules/gconf/module-gconf.c2
-rw-r--r--src/modules/hal-util.c2
-rw-r--r--src/modules/hal-util.h2
-rw-r--r--src/modules/module-always-sink.c2
-rw-r--r--src/modules/module-augment-properties.c2
-rw-r--r--src/modules/module-card-restore.c2
-rw-r--r--src/modules/module-cli.c2
-rw-r--r--src/modules/module-combine.c4
-rw-r--r--src/modules/module-console-kit.c2
-rw-r--r--src/modules/module-cork-music-on-phone.c2
-rw-r--r--src/modules/module-default-device-restore.c2
-rw-r--r--src/modules/module-detect.c2
-rw-r--r--src/modules/module-device-restore.c2
-rw-r--r--src/modules/module-esound-compat-spawnfd.c2
-rw-r--r--src/modules/module-esound-compat-spawnpid.c2
-rw-r--r--src/modules/module-esound-sink.c2
-rw-r--r--src/modules/module-hal-detect.c2
-rw-r--r--src/modules/module-jack-sink.c2
-rw-r--r--src/modules/module-jack-source.c4
-rw-r--r--src/modules/module-ladspa-sink.c2
-rw-r--r--src/modules/module-lirc.c2
-rw-r--r--src/modules/module-match.c2
-rw-r--r--src/modules/module-mmkbd-evdev.c2
-rw-r--r--src/modules/module-native-protocol-fd.c2
-rw-r--r--src/modules/module-null-sink.c2
-rw-r--r--src/modules/module-pipe-sink.c2
-rw-r--r--src/modules/module-pipe-source.c2
-rw-r--r--src/modules/module-position-event-sounds.c2
-rw-r--r--src/modules/module-protocol-stub.c2
-rw-r--r--src/modules/module-raop-discover.c29
-rw-r--r--src/modules/module-raop-sink.c11
-rw-r--r--src/modules/module-remap-sink.c2
-rw-r--r--src/modules/module-rescue-streams.c2
-rw-r--r--src/modules/module-sine-source.c2
-rw-r--r--src/modules/module-sine.c2
-rw-r--r--src/modules/module-solaris.c957
-rw-r--r--src/modules/module-stream-restore.c2
-rw-r--r--src/modules/module-suspend-on-idle.c65
-rw-r--r--src/modules/module-tunnel.c2
-rw-r--r--src/modules/module-volume-restore.c2
-rw-r--r--src/modules/module-waveout.c2
-rw-r--r--src/modules/module-x11-bell.c2
-rw-r--r--src/modules/module-x11-cork-request.c2
-rw-r--r--src/modules/module-x11-publish.c2
-rw-r--r--src/modules/module-x11-xsmp.c2
-rw-r--r--src/modules/module-zeroconf-discover.c2
-rw-r--r--src/modules/module-zeroconf-publish.c2
-rw-r--r--src/modules/oss/module-oss.c2
-rw-r--r--src/modules/oss/oss-util.c2
-rw-r--r--src/modules/oss/oss-util.h2
-rw-r--r--src/modules/raop/base64.c2
-rw-r--r--src/modules/raop/base64.h2
-rw-r--r--src/modules/raop/raop_client.c11
-rw-r--r--src/modules/raop/raop_client.h2
-rw-r--r--src/modules/reserve-wrap.c2
-rw-r--r--src/modules/reserve-wrap.h2
-rw-r--r--src/modules/reserve.h21
-rw-r--r--src/modules/rtp/module-rtp-recv.c2
-rw-r--r--src/modules/rtp/module-rtp-send.c2
-rw-r--r--src/modules/rtp/rtp.c2
-rw-r--r--src/modules/rtp/rtp.h2
-rw-r--r--src/modules/rtp/rtsp_client.c65
-rw-r--r--src/modules/rtp/rtsp_client.h2
-rw-r--r--src/modules/rtp/sap.c2
-rw-r--r--src/modules/rtp/sap.h2
-rw-r--r--src/modules/rtp/sdp.c2
-rw-r--r--src/modules/rtp/sdp.h2
-rw-r--r--src/modules/udev-util.c2
-rw-r--r--src/modules/udev-util.h2
-rw-r--r--src/pulse/browser.c2
-rw-r--r--src/pulse/browser.h2
-rw-r--r--src/pulse/cdecl.h2
-rw-r--r--src/pulse/channelmap.c2
-rw-r--r--src/pulse/channelmap.h2
-rw-r--r--src/pulse/client-conf-x11.c2
-rw-r--r--src/pulse/client-conf-x11.h2
-rw-r--r--src/pulse/client-conf.c2
-rw-r--r--src/pulse/client-conf.h2
-rw-r--r--src/pulse/context.c2
-rw-r--r--src/pulse/context.h2
-rw-r--r--src/pulse/error.c7
-rw-r--r--src/pulse/error.h2
-rw-r--r--src/pulse/ext-stream-restore.c2
-rw-r--r--src/pulse/ext-stream-restore.h2
-rw-r--r--src/pulse/gccmacro.h2
-rw-r--r--src/pulse/glib-mainloop.c2
-rw-r--r--src/pulse/glib-mainloop.h2
-rw-r--r--src/pulse/internal.h2
-rw-r--r--src/pulse/introspect.c5
-rw-r--r--src/pulse/introspect.h3
-rw-r--r--src/pulse/mainloop-signal.c2
-rw-r--r--src/pulse/mainloop-signal.h2
-rw-r--r--src/pulse/mainloop.c2
-rw-r--r--src/pulse/mainloop.h2
-rw-r--r--src/pulse/operation.c2
-rw-r--r--src/pulse/operation.h2
-rw-r--r--src/pulse/sample.c2
-rw-r--r--src/pulse/sample.h2
-rw-r--r--src/pulse/scache.c2
-rw-r--r--src/pulse/scache.h2
-rw-r--r--src/pulse/simple.c2
-rw-r--r--src/pulse/simple.h2
-rw-r--r--src/pulse/stream.c2
-rw-r--r--src/pulse/stream.h2
-rw-r--r--src/pulse/subscribe.c2
-rw-r--r--src/pulse/subscribe.h2
-rw-r--r--src/pulse/thread-mainloop.c2
-rw-r--r--src/pulse/thread-mainloop.h2
-rw-r--r--src/pulse/volume.c2
-rw-r--r--src/pulse/volume.h2
-rw-r--r--src/pulse/xmalloc.c2
-rw-r--r--src/pulse/xmalloc.h2
-rw-r--r--src/pulsecore/atomic.h2
-rw-r--r--src/pulsecore/auth-cookie.c2
-rw-r--r--src/pulsecore/auth-cookie.h2
-rw-r--r--src/pulsecore/avahi-wrap.c2
-rw-r--r--src/pulsecore/avahi-wrap.h2
-rw-r--r--src/pulsecore/bitset.c2
-rw-r--r--src/pulsecore/bitset.h2
-rw-r--r--src/pulsecore/card.c2
-rw-r--r--src/pulsecore/card.h2
-rw-r--r--src/pulsecore/cli-command.c27
-rw-r--r--src/pulsecore/cli-command.h2
-rw-r--r--src/pulsecore/cli-text.c2
-rw-r--r--src/pulsecore/cli-text.h2
-rw-r--r--src/pulsecore/cli.c2
-rw-r--r--src/pulsecore/cli.h2
-rw-r--r--src/pulsecore/client.c2
-rw-r--r--src/pulsecore/client.h2
-rw-r--r--src/pulsecore/conf-parser.c2
-rw-r--r--src/pulsecore/conf-parser.h2
-rw-r--r--src/pulsecore/core-error.c2
-rw-r--r--src/pulsecore/core-error.h2
-rw-r--r--src/pulsecore/core-scache.c2
-rw-r--r--src/pulsecore/core-scache.h2
-rw-r--r--src/pulsecore/core-subscribe.c2
-rw-r--r--src/pulsecore/core-subscribe.h2
-rw-r--r--src/pulsecore/core-util.c2
-rw-r--r--src/pulsecore/core.c2
-rw-r--r--src/pulsecore/core.h2
-rw-r--r--src/pulsecore/dllmain.c2
-rw-r--r--src/pulsecore/endianmacros.h2
-rw-r--r--src/pulsecore/esound.h2
-rw-r--r--src/pulsecore/ffmpeg/resample2.c27
-rw-r--r--src/pulsecore/flist.h2
-rw-r--r--src/pulsecore/hashmap.c2
-rw-r--r--src/pulsecore/hashmap.h2
-rw-r--r--src/pulsecore/hook-list.c2
-rw-r--r--src/pulsecore/hook-list.h2
-rw-r--r--src/pulsecore/ioline.c2
-rw-r--r--src/pulsecore/ioline.h2
-rw-r--r--src/pulsecore/llist.h2
-rw-r--r--src/pulsecore/lock-autospawn.c2
-rw-r--r--src/pulsecore/log.c2
-rw-r--r--src/pulsecore/log.h2
-rw-r--r--src/pulsecore/ltdl-helper.c2
-rw-r--r--src/pulsecore/ltdl-helper.h2
-rw-r--r--src/pulsecore/macro.h2
-rw-r--r--src/pulsecore/memblockq.c2
-rw-r--r--src/pulsecore/memblockq.h2
-rw-r--r--src/pulsecore/modargs.c2
-rw-r--r--src/pulsecore/modargs.h2
-rw-r--r--src/pulsecore/modinfo.c2
-rw-r--r--src/pulsecore/modinfo.h2
-rw-r--r--src/pulsecore/module.c2
-rw-r--r--src/pulsecore/module.h2
-rw-r--r--src/pulsecore/msgobject.c2
-rw-r--r--src/pulsecore/msgobject.h2
-rw-r--r--src/pulsecore/mutex-posix.c2
-rw-r--r--src/pulsecore/mutex-win32.c2
-rw-r--r--src/pulsecore/mutex.h2
-rw-r--r--src/pulsecore/namereg.c2
-rw-r--r--src/pulsecore/namereg.h2
-rw-r--r--src/pulsecore/object.c2
-rw-r--r--src/pulsecore/object.h2
-rw-r--r--src/pulsecore/once.c2
-rw-r--r--src/pulsecore/once.h2
-rw-r--r--src/pulsecore/pid.c2
-rw-r--r--src/pulsecore/pid.h2
-rw-r--r--src/pulsecore/pipe.c2
-rw-r--r--src/pulsecore/pipe.h2
-rw-r--r--src/pulsecore/play-memblockq.c2
-rw-r--r--src/pulsecore/play-memblockq.h2
-rw-r--r--src/pulsecore/play-memchunk.c2
-rw-r--r--src/pulsecore/play-memchunk.h2
-rw-r--r--src/pulsecore/poll.c2
-rw-r--r--src/pulsecore/poll.h2
-rw-r--r--src/pulsecore/prioq.c2
-rw-r--r--src/pulsecore/protocol-cli.c2
-rw-r--r--src/pulsecore/protocol-cli.h2
-rw-r--r--src/pulsecore/protocol-esound.c5
-rw-r--r--src/pulsecore/protocol-esound.h2
-rw-r--r--src/pulsecore/protocol-http.c2
-rw-r--r--src/pulsecore/protocol-http.h2
-rw-r--r--src/pulsecore/protocol-native.c4
-rw-r--r--src/pulsecore/protocol-native.h2
-rw-r--r--src/pulsecore/protocol-simple.c5
-rw-r--r--src/pulsecore/protocol-simple.h2
-rw-r--r--src/pulsecore/ratelimit.c2
-rw-r--r--src/pulsecore/ratelimit.h2
-rw-r--r--src/pulsecore/refcnt.h2
-rw-r--r--src/pulsecore/resampler.c2
-rw-r--r--src/pulsecore/resampler.h2
-rw-r--r--src/pulsecore/rtclock.c5
-rw-r--r--src/pulsecore/sample-util.c2
-rw-r--r--src/pulsecore/sample-util.h2
-rw-r--r--src/pulsecore/sconv-s16be.c2
-rw-r--r--src/pulsecore/sconv-s16be.h2
-rw-r--r--src/pulsecore/sconv-s16le.c2
-rw-r--r--src/pulsecore/sconv-s16le.h2
-rw-r--r--src/pulsecore/sconv.c2
-rw-r--r--src/pulsecore/sconv.h2
-rw-r--r--src/pulsecore/semaphore-posix.c2
-rw-r--r--src/pulsecore/semaphore-win32.c2
-rw-r--r--src/pulsecore/semaphore.h2
-rw-r--r--src/pulsecore/shared.c2
-rw-r--r--src/pulsecore/shared.h2
-rw-r--r--src/pulsecore/sink-input.c2
-rw-r--r--src/pulsecore/sink-input.h2
-rw-r--r--src/pulsecore/sink.c21
-rw-r--r--src/pulsecore/sink.h2
-rw-r--r--src/pulsecore/sioman.c2
-rw-r--r--src/pulsecore/sioman.h2
-rw-r--r--src/pulsecore/socket-server.c2
-rw-r--r--src/pulsecore/socket-server.h2
-rw-r--r--src/pulsecore/socket-util.c2
-rw-r--r--src/pulsecore/socket-util.h2
-rw-r--r--src/pulsecore/sound-file-stream.c2
-rw-r--r--src/pulsecore/sound-file-stream.h2
-rw-r--r--src/pulsecore/sound-file.c2
-rw-r--r--src/pulsecore/sound-file.h2
-rw-r--r--src/pulsecore/source-output.c2
-rw-r--r--src/pulsecore/source-output.h2
-rw-r--r--src/pulsecore/source.c34
-rw-r--r--src/pulsecore/source.h4
-rw-r--r--src/pulsecore/strbuf.c2
-rw-r--r--src/pulsecore/strbuf.h2
-rw-r--r--src/pulsecore/strlist.c2
-rw-r--r--src/pulsecore/strlist.h2
-rw-r--r--src/pulsecore/thread-posix.c2
-rw-r--r--src/pulsecore/thread-win32.c2
-rw-r--r--src/pulsecore/thread.h2
-rw-r--r--src/pulsecore/tokenizer.c2
-rw-r--r--src/pulsecore/tokenizer.h2
-rw-r--r--src/pulsecore/vector.h2
-rw-r--r--src/pulsecore/x11prop.c2
-rw-r--r--src/pulsecore/x11prop.h2
-rw-r--r--src/pulsecore/x11wrap.c2
-rw-r--r--src/pulsecore/x11wrap.h2
-rw-r--r--src/tests/asyncmsgq-test.c2
-rw-r--r--src/tests/asyncq-test.c2
-rw-r--r--src/tests/cpulimit-test.c2
-rw-r--r--src/tests/envelope-test.c2
-rw-r--r--src/tests/flist-test.c2
-rw-r--r--src/tests/get-binary-name-test.c2
-rw-r--r--src/tests/gtk-test.c2
-rw-r--r--src/tests/interpol-test.c2
-rw-r--r--src/tests/lock-autospawn-test.c2
-rw-r--r--src/tests/mainloop-test.c2
-rw-r--r--src/tests/memblock-test.c2
-rw-r--r--src/tests/memblockq-test.c2
-rw-r--r--src/tests/mix-test.c2
-rw-r--r--src/tests/pacat-simple.c2
-rw-r--r--src/tests/parec-simple.c2
-rw-r--r--src/tests/proplist-test.c2
-rw-r--r--src/tests/queue-test.c2
-rw-r--r--src/tests/remix-test.c2
-rw-r--r--src/tests/resampler-test.c2
-rw-r--r--src/tests/rtpoll-test.c2
-rw-r--r--src/tests/rtstutter.c2
-rw-r--r--src/tests/sig2str-test.c2
-rw-r--r--src/tests/smoother-test.c2
-rw-r--r--src/tests/stripnul.c2
-rw-r--r--src/tests/sync-playback.c2
-rw-r--r--src/tests/thread-mainloop-test.c2
-rw-r--r--src/tests/thread-test.c2
-rw-r--r--src/tests/vector-test.c2
-rw-r--r--src/utils/pabrowse.c2
-rw-r--r--src/utils/pacat.c2
-rw-r--r--src/utils/pacmd.c2
-rw-r--r--src/utils/pactl.c4
-rw-r--r--src/utils/padsp.c2
-rw-r--r--src/utils/paplay.c2
-rw-r--r--src/utils/pasuspender.c2
-rw-r--r--src/utils/pax11publish.c2
325 files changed, 1255 insertions, 820 deletions
diff --git a/Makefile.am b/Makefile.am
index 8735d312..9a3ca7b7 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -61,6 +61,12 @@ dist-hook:
( 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/
+
.PHONY: homepage distcleancheck doxygen
DISTCLEANFILES = \
diff --git a/bootstrap.sh b/bootstrap.sh
index 4e223e32..cb74121e 100755
--- a/bootstrap.sh
+++ b/bootstrap.sh
@@ -62,7 +62,7 @@ else
rm -f Makefile.am~ configure.ac~
# Evil, evil, evil, evil hack
- sed 's/read dummy/\#/' `which gettextize` | sh -s -- --copy --force
+ sed 's/read dummy/\#/' `which gettextize` | bash -s -- --copy --force
test -f Makefile.am~ && mv Makefile.am~ Makefile.am
test -f configure.ac~ && mv configure.ac~ configure.ac
diff --git a/configure.ac b/configure.ac
index b2131299..049589d4 100644
--- a/configure.ac
+++ b/configure.ac
@@ -70,8 +70,7 @@ fi
case $host in
*-*-solaris* )
- AC_DEFINE(_XOPEN_SOURCE_EXTENDED, 1, Needed to get declarations for msg_control and msg_controllen on Solaris)
- AC_DEFINE(_XOPEN_SOURCE, 2, Needed to get declarations for msg_control and msg_controllen on Solaris)
+ AC_DEFINE(_XOPEN_SOURCE, 600, Needed to get declarations for msg_control and msg_controllen on Solaris)
AC_DEFINE(__EXTENSIONS__, 1, Needed to get declarations for msg_control and msg_controllen on Solaris)
;;
esac
@@ -92,11 +91,20 @@ AC_USE_SYSTEM_EXTENSIONS
# M4
-AC_PATH_PROG([M4], [m4 gm4], [no])
+AC_CHECK_PROGS([M4], gm4 m4, no)
if test "x$M4" = xno ; then
AC_MSG_ERROR([m4 missing])
fi
+# Linker
+
+AC_PROG_LD
+AC_PROG_LD_GNU
+
+AC_SUBST(HAVE_GNU_LD)
+AM_CONDITIONAL([HAVE_GNU_LD], [test "x$HAVE_GNU_LD" = x1])
+
+
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"
@@ -990,7 +998,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 ],
+ PKG_CHECK_MODULES(UDEV, [ libudev >= 137 ],
[
HAVE_UDEV=1
AC_DEFINE([HAVE_UDEV], 1, [Have UDEV.])
@@ -1059,7 +1067,7 @@ if test "x$HAVE_HAL" = x1 ; then
dbus=yes
fi
-if test "x${dbus}" != xno || test "x${bluez}" != xno || "x${hal}" != xno ; then
+if test "x${dbus}" != xno || test "x${bluez}" != xno || test "x${hal}" != xno ; then
PKG_CHECK_MODULES(DBUS, [ dbus-1 >= 1.0.0 ],
[
diff --git a/m4/shave.m4 b/m4/shave.m4
index 44d3908b..0c2c9f5a 100644
--- a/m4/shave.m4
+++ b/m4/shave.m4
@@ -1,9 +1,12 @@
dnl Make automake/libtool output more friendly to humans
dnl
-dnl SHAVE_INIT([shavedir])
+dnl SHAVE_INIT([shavedir],[default_mode])
dnl
dnl shavedir: the directory where the shave scripts are, it defaults to
dnl $(top_builddir)
+dnl default_mode: (enable|disable) default shave mode. This parameter
+dnl controls shave's behaviour when no option has been
+dnl given to configure. It defaults to disable.
dnl
dnl * SHAVE_INIT should be called late in your configure.(ac|in) file (just
dnl before AC_CONFIG_FILE/AC_OUTPUT is perfect. This macro rewrites CC and
@@ -11,19 +14,26 @@ dnl LIBTOOL, you don't want the configure tests to have these variables
dnl re-defined.
dnl * This macro requires GNU make's -s option.
-AC_DEFUN([SHAVE_INIT],
+AC_DEFUN([_SHAVE_ARG_ENABLE],
[
- dnl enable/disable shave
AC_ARG_ENABLE([shave],
- AS_HELP_STRING([--enable-shave],
- [use shave to make the build pretty [[default=no]]]),,
- [enable_shave=no])
+ AS_HELP_STRING(
+ [--enable-shave],
+ [use shave to make the build pretty [[default=$1]]]),,
+ [enable_shave=$1]
+ )
+])
+
+AC_DEFUN([SHAVE_INIT],
+[
+ dnl you can tweak the default value of enable_shave
+ m4_if([$2], [enable], [_SHAVE_ARG_ENABLE(yes)], [_SHAVE_ARG_ENABLE(no)])
if test x"$enable_shave" = xyes; then
dnl where can we find the shave scripts?
m4_if([$1],,
- [shavedir='$(top_builddir)'],
- [shavedir='$(top_builddir)'/$1])
+ [shavedir="$ac_pwd"],
+ [shavedir="$ac_pwd/$1"])
AC_SUBST(shavedir)
dnl make is now quiet
@@ -35,19 +45,22 @@ AC_DEFUN([SHAVE_INIT],
dnl substitute libtool
SHAVE_SAVED_LIBTOOL=$LIBTOOL
- AC_SUBST(SHAVE_SAVED_LIBTOOL)
- LIBTOOL="\$(SHELL) \$(shavedir)/shave-libtool '\$(SHAVE_SAVED_LIBTOOL)'"
+ LIBTOOL="${SHELL} ${shavedir}/shave-libtool '${SHAVE_SAVED_LIBTOOL}'"
AC_SUBST(LIBTOOL)
dnl substitute cc/cxx
SHAVE_SAVED_CC=$CC
SHAVE_SAVED_CXX=$CXX
- AC_SUBST(SHAVE_SAVED_CC)
- AC_SUBST(SHAVE_SAVED_CXX)
- CC="\$(SHELL) \$(shavedir)/shave cc '\$(SHAVE_SAVED_CC)'"
- CXX="\$(SHELL) \$(shavedir)/shave cxx '\$(SHAVE_SAVED_CXX)'"
+ SHAVE_SAVED_FC=$FC
+ SHAVE_SAVED_F77=$F77
+ CC="${SHELL} ${shavedir}/shave cc ${SHAVE_SAVED_CC}"
+ CXX="${SHELL} ${shavedir}/shave cxx ${SHAVE_SAVED_CXX}"
+ FC="${SHELL} ${shavedir}/shave fc ${SHAVE_SAVED_FC}"
+ F77="${SHELL} ${shavedir}/shave f77 ${SHAVE_SAVED_F77}"
AC_SUBST(CC)
AC_SUBST(CXX)
+ AC_SUBST(FC)
+ AC_SUBST(F77)
V=@
else
@@ -58,12 +71,3 @@ AC_DEFUN([SHAVE_INIT],
AC_SUBST(Q)
])
-AC_DEFUN([SHAVE_OUTPUT],
-[
- if test x"$enable_shave" = xyes; then
- dnl small workaround to fix libtool itself
- dnl it's shokingly hard to find a better way, really! wtf...
- test -f $srcdir/libtool && (tmpfile=`mktemp` && cat $srcdir/libtool | sed "s,^LTCC=.*$,LTCC=\"$SHELL $ac_pwd/shave cc $SHAVE_SAVED_CC\"," > $tmpfile && mv $tmpfile $srcdir/libtool)
- fi
-
-])
diff --git a/shave-libtool.in b/shave-libtool.in
index 30e6f138..1f3a720c 100644
--- a/shave-libtool.in
+++ b/shave-libtool.in
@@ -8,7 +8,7 @@ fi
lt_unmangle ()
{
- last_result=`echo $1 | $SED -e 's#.libs/##' -e 's#[0-9a-zA-Z_]\*_la-##'`
+ last_result=`echo $1 | $SED -e 's#.libs/##' -e 's#[0-9a-zA-Z_\-\.]*_la-##'`
}
# the real libtool to use
diff --git a/shave.in b/shave.in
index dc46ec96..174641e9 100644
--- a/shave.in
+++ b/shave.in
@@ -8,7 +8,7 @@ fi
lt_unmangle ()
{
- last_result=`echo $1 | $SED -e 's#.libs/##' -e 's#[0-9a-zA-Z_]\*_la-##'`
+ last_result=`echo $1 | $SED -e 's#.libs/##' -e 's#[0-9a-zA-Z_\-\.]*_la-##'`
}
# the tool to wrap (cc, cxx, ar, ranlib, ..)
@@ -50,6 +50,12 @@ link,*)
*,cc)
Q=" CC "
;;
+*,fc)
+ Q=" FC "
+ ;;
+*,f77)
+ Q=" F77 "
+ ;;
*,*)
# should not happen
Q=" CC "
diff --git a/src/Makefile.am b/src/Makefile.am
index a70a19a1..84896778 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -713,8 +713,11 @@ libpulse_la_SOURCES = \
pulse/xmalloc.c pulse/xmalloc.h
libpulse_la_CFLAGS = $(AM_CFLAGS)
-libpulse_la_LDFLAGS = $(AM_LDFLAGS) -version-info $(LIBPULSE_VERSION_INFO) -Wl,-version-script=$(srcdir)/map-file
libpulse_la_LIBADD = $(AM_LIBADD) $(WINSOCK_LIBS) $(LTLIBICONV) libpulsecommon-@PA_MAJORMINORMICRO@.la
+libpulse_la_LDFLAGS = $(AM_LDFLAGS) -version-info $(LIBPULSE_VERSION_INFO)
+if HAVE_GNU_LD
+libpulse_la_LDFLAGS += -Wl,-version-script=$(srcdir)/map-file
+endif
if HAVE_X11
libpulse_la_SOURCES += pulse/client-conf-x11.c pulse/client-conf-x11.h
@@ -725,17 +728,26 @@ endif
libpulse_simple_la_SOURCES = pulse/simple.c pulse/simple.h
libpulse_simple_la_CFLAGS = $(AM_CFLAGS)
libpulse_simple_la_LIBADD = $(AM_LIBADD) libpulse.la libpulsecommon-@PA_MAJORMINORMICRO@.la
-libpulse_simple_la_LDFLAGS = $(AM_LDFLAGS) -version-info $(LIBPULSE_SIMPLE_VERSION_INFO) -Wl,-version-script=$(srcdir)/map-file
+libpulse_simple_la_LDFLAGS = $(AM_LDFLAGS) -version-info $(LIBPULSE_SIMPLE_VERSION_INFO)
+if HAVE_GNU_LD
+libpulse_simple_la_LDFLAGS += -Wl,-version-script=$(srcdir)/map-file
+endif
libpulse_browse_la_SOURCES = pulse/browser.c pulse/browser.h pulsecore/avahi-wrap.c pulsecore/avahi-wrap.h
libpulse_browse_la_CFLAGS = $(AM_CFLAGS) $(AVAHI_CFLAGS)
libpulse_browse_la_LIBADD = $(AM_LIBADD) libpulse.la libpulsecommon-@PA_MAJORMINORMICRO@.la $(AVAHI_LIBS)
-libpulse_browse_la_LDFLAGS = $(AM_LDFLAGS) -version-info $(LIBPULSE_BROWSE_VERSION_INFO) -Wl,-version-script=$(srcdir)/map-file
+libpulse_browse_la_LDFLAGS = $(AM_LDFLAGS) -version-info $(LIBPULSE_BROWSE_VERSION_INFO)
+if HAVE_GNU_LD
+libpulse_browse_la_LDFLAGS += -Wl,-version-script=$(srcdir)/map-file
+endif
libpulse_mainloop_glib_la_SOURCES = pulse/glib-mainloop.h pulse/glib-mainloop.c
libpulse_mainloop_glib_la_CFLAGS = $(AM_CFLAGS) $(GLIB20_CFLAGS)
libpulse_mainloop_glib_la_LIBADD = $(AM_LIBADD) libpulse.la libpulsecommon-@PA_MAJORMINORMICRO@.la $(GLIB20_LIBS)
-libpulse_mainloop_glib_la_LDFLAGS = $(AM_LDFLAGS) -version-info $(LIBPULSE_MAINLOOP_GLIB_VERSION_INFO) -Wl,-version-script=$(srcdir)/map-file
+libpulse_mainloop_glib_la_LDFLAGS = $(AM_LDFLAGS) -version-info $(LIBPULSE_MAINLOOP_GLIB_VERSION_INFO)
+if HAVE_GNU_LD
+libpulse_mainloop_glib_la_LDFLAGS += -Wl,-version-script=$(srcdir)/map-file
+endif
###################################
# OSS emulation #
diff --git a/src/daemon/caps.c b/src/daemon/caps.c
index b5cbbc63..d2ae8d0e 100644
--- a/src/daemon/caps.c
+++ b/src/daemon/caps.c
@@ -6,7 +6,7 @@
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 of the License,
+ 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
diff --git a/src/daemon/caps.h b/src/daemon/caps.h
index 176aa90e..94241a9a 100644
--- a/src/daemon/caps.h
+++ b/src/daemon/caps.h
@@ -8,7 +8,7 @@
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 of the License,
+ 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
diff --git a/src/daemon/cmdline.c b/src/daemon/cmdline.c
index f4224ea8..d78089e1 100644
--- a/src/daemon/cmdline.c
+++ b/src/daemon/cmdline.c
@@ -5,7 +5,7 @@
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 of the License,
+ 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
diff --git a/src/daemon/cmdline.h b/src/daemon/cmdline.h
index fd72a6d3..e34d7f50 100644
--- a/src/daemon/cmdline.h
+++ b/src/daemon/cmdline.h
@@ -8,7 +8,7 @@
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 of the License,
+ 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
diff --git a/src/daemon/cpulimit.c b/src/daemon/cpulimit.c
index 5f24474d..64728e27 100644
--- a/src/daemon/cpulimit.c
+++ b/src/daemon/cpulimit.c
@@ -5,7 +5,7 @@
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 of the
+ 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
diff --git a/src/daemon/cpulimit.h b/src/daemon/cpulimit.h
index cb9a123d..ce78d483 100644
--- a/src/daemon/cpulimit.h
+++ b/src/daemon/cpulimit.h
@@ -8,7 +8,7 @@
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 of the License,
+ 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
diff --git a/src/daemon/daemon-conf.c b/src/daemon/daemon-conf.c
index 10144ea4..ac6cc8aa 100644
--- a/src/daemon/daemon-conf.c
+++ b/src/daemon/daemon-conf.c
@@ -6,7 +6,7 @@
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 of the License,
+ 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
@@ -94,8 +94,10 @@ static const pa_daemon_conf default_conf = {
,.rlimit_fsize = { .value = 0, .is_set = FALSE },
.rlimit_data = { .value = 0, .is_set = FALSE },
.rlimit_stack = { .value = 0, .is_set = FALSE },
- .rlimit_core = { .value = 0, .is_set = FALSE },
- .rlimit_rss = { .value = 0, .is_set = FALSE }
+ .rlimit_core = { .value = 0, .is_set = FALSE }
+#ifdef RLIMIT_RSS
+ ,.rlimit_rss = { .value = 0, .is_set = FALSE }
+#endif
#ifdef RLIMIT_NPROC
,.rlimit_nproc = { .value = 0, .is_set = FALSE }
#endif
@@ -472,7 +474,9 @@ int pa_daemon_conf_load(pa_daemon_conf *c, const char *filename) {
{ "rlimit-data", parse_rlimit, &c->rlimit_data, NULL },
{ "rlimit-stack", parse_rlimit, &c->rlimit_stack, NULL },
{ "rlimit-core", parse_rlimit, &c->rlimit_core, NULL },
+#ifdef RLIMIT_RSS
{ "rlimit-rss", parse_rlimit, &c->rlimit_rss, NULL },
+#endif
#ifdef RLIMIT_NOFILE
{ "rlimit-nofile", parse_rlimit, &c->rlimit_nofile, NULL },
#endif
@@ -651,7 +655,9 @@ char *pa_daemon_conf_dump(pa_daemon_conf *c) {
pa_strbuf_printf(s, "rlimit-data = %li\n", c->rlimit_data.is_set ? (long int) c->rlimit_data.value : -1);
pa_strbuf_printf(s, "rlimit-stack = %li\n", c->rlimit_stack.is_set ? (long int) c->rlimit_stack.value : -1);
pa_strbuf_printf(s, "rlimit-core = %li\n", c->rlimit_core.is_set ? (long int) c->rlimit_core.value : -1);
+#ifdef RLIMIT_RSS
pa_strbuf_printf(s, "rlimit-rss = %li\n", c->rlimit_rss.is_set ? (long int) c->rlimit_rss.value : -1);
+#endif
#ifdef RLIMIT_AS
pa_strbuf_printf(s, "rlimit-as = %li\n", c->rlimit_as.is_set ? (long int) c->rlimit_as.value : -1);
#endif
diff --git a/src/daemon/daemon-conf.h b/src/daemon/daemon-conf.h
index 9331280b..9cec189f 100644
--- a/src/daemon/daemon-conf.h
+++ b/src/daemon/daemon-conf.h
@@ -9,7 +9,7 @@
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 of the License,
+ 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
@@ -87,8 +87,10 @@ typedef struct pa_daemon_conf {
char *config_file;
#ifdef HAVE_SYS_RESOURCE_H
- pa_rlimit rlimit_fsize, rlimit_data, rlimit_stack, rlimit_core, rlimit_rss;
-
+ pa_rlimit rlimit_fsize, rlimit_data, rlimit_stack, rlimit_core;
+#ifdef RLIMIT_RSS
+ pa_rlimit rlimit_rss;
+#endif
#ifdef RLIMIT_NOFILE
pa_rlimit rlimit_nofile;
#endif
diff --git a/src/daemon/dumpmodules.c b/src/daemon/dumpmodules.c
index 9c9f1c81..0ffc0fc0 100644
--- a/src/daemon/dumpmodules.c
+++ b/src/daemon/dumpmodules.c
@@ -6,7 +6,7 @@
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 of the License,
+ 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
diff --git a/src/daemon/dumpmodules.h b/src/daemon/dumpmodules.h
index c49a5eda..c3595e54 100644
--- a/src/daemon/dumpmodules.h
+++ b/src/daemon/dumpmodules.h
@@ -8,7 +8,7 @@
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 of the License,
+ 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
diff --git a/src/daemon/ltdl-bind-now.c b/src/daemon/ltdl-bind-now.c
index 8444cfb4..276b2a06 100644
--- a/src/daemon/ltdl-bind-now.c
+++ b/src/daemon/ltdl-bind-now.c
@@ -6,7 +6,7 @@
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 of the License,
+ 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
diff --git a/src/daemon/ltdl-bind-now.h b/src/daemon/ltdl-bind-now.h
index f95d13b4..07600706 100644
--- a/src/daemon/ltdl-bind-now.h
+++ b/src/daemon/ltdl-bind-now.h
@@ -8,7 +8,7 @@
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 of the License,
+ 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
diff --git a/src/daemon/main.c b/src/daemon/main.c
index b630bd17..0048e7b7 100644
--- a/src/daemon/main.c
+++ b/src/daemon/main.c
@@ -6,7 +6,7 @@
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 of the License,
+ 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
@@ -294,7 +294,9 @@ static void set_all_rlimits(const pa_daemon_conf *conf) {
set_one_rlimit(&conf->rlimit_data, RLIMIT_DATA, "RLIMIT_DATA");
set_one_rlimit(&conf->rlimit_stack, RLIMIT_STACK, "RLIMIT_STACK");
set_one_rlimit(&conf->rlimit_core, RLIMIT_CORE, "RLIMIT_CORE");
+#ifdef RLIMIT_RSS
set_one_rlimit(&conf->rlimit_rss, RLIMIT_RSS, "RLIMIT_RSS");
+#endif
#ifdef RLIMIT_NPROC
set_one_rlimit(&conf->rlimit_nproc, RLIMIT_NPROC, "RLIMIT_NPROC");
#endif
diff --git a/src/daemon/polkit.c b/src/daemon/polkit.c
index 921e5d1d..9799e094 100644
--- a/src/daemon/polkit.c
+++ b/src/daemon/polkit.c
@@ -6,7 +6,7 @@
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 of the License,
+ 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
diff --git a/src/daemon/polkit.h b/src/daemon/polkit.h
index 0d65ec52..018f6ef1 100644
--- a/src/daemon/polkit.h
+++ b/src/daemon/polkit.h
@@ -8,7 +8,7 @@
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 of the License,
+ 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
diff --git a/src/modules/alsa/alsa-sink.c b/src/modules/alsa/alsa-sink.c
index 7768b38e..7bf16c3c 100644
--- a/src/modules/alsa/alsa-sink.c
+++ b/src/modules/alsa/alsa-sink.c
@@ -6,7 +6,7 @@
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 of the License,
+ 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
@@ -148,7 +148,7 @@ static void reserve_update(struct userdata *u) {
const char *description;
pa_assert(u);
- if (!u->sink)
+ if (!u->sink || !u->reserve)
return;
if ((description = pa_proplist_gets(u->sink->proplist, PA_PROP_DEVICE_DESCRIPTION)))
@@ -164,6 +164,9 @@ static int reserve_init(struct userdata *u, const char *dname) {
if (u->reserve)
return 0;
+ if (pa_in_system_mode())
+ return 0;
+
/* We are resuming, try to lock the device */
if (!(rname = pa_alsa_get_reserve_name(dname)))
return 0;
@@ -1187,17 +1190,11 @@ static int process_rewind(struct userdata *u) {
/* Figure out how much we shall rewind and reset the counter */
rewind_nbytes = u->sink->thread_info.rewind_nbytes;
- u->sink->thread_info.rewind_nbytes = 0;
- if (rewind_nbytes <= 0)
- goto finish;
-
- pa_assert(rewind_nbytes > 0);
pa_log_debug("Requested to rewind %lu bytes.", (unsigned long) rewind_nbytes);
- snd_pcm_hwsync(u->pcm_handle);
- if ((unused = snd_pcm_avail_update(u->pcm_handle)) < 0) {
- pa_log("snd_pcm_avail_update() failed: %s", snd_strerror((int) unused));
+ if (PA_UNLIKELY((unused = pa_alsa_safe_avail(u->pcm_handle, u->hwbuf_size, &u->sink->sample_spec)) < 0)) {
+ pa_log("snd_pcm_avail() failed: %s", snd_strerror((int) unused));
return -1;
}
@@ -1239,12 +1236,8 @@ static int process_rewind(struct userdata *u) {
} else
pa_log_debug("Mhmm, actually there is nothing to rewind.");
-finish:
-
pa_sink_process_rewind(u->sink, 0);
-
return 0;
-
}
static void thread_func(void *userdata) {
@@ -1273,7 +1266,7 @@ static void thread_func(void *userdata) {
int work_done;
pa_usec_t sleep_usec = 0;
- if (u->sink->thread_info.rewind_requested)
+ if (PA_UNLIKELY(u->sink->thread_info.rewind_requested))
if (process_rewind(u) < 0)
goto fail;
@@ -1699,11 +1692,10 @@ pa_sink *pa_alsa_sink_new(pa_module *m, pa_modargs *ma, const char*driver, pa_ca
u->watermark_step = pa_usec_to_bytes(TSCHED_WATERMARK_STEP_USEC, &u->sink->sample_spec);
}
- u->sink->thread_info.max_rewind = use_tsched ? u->hwbuf_size : 0;
- u->sink->thread_info.max_request = u->hwbuf_size;
-
+ pa_sink_set_max_rewind(u->sink, use_tsched ? u->hwbuf_size : 0);
+ pa_sink_set_max_request(u->sink, u->hwbuf_size);
pa_sink_set_latency_range(u->sink,
- !use_tsched ? pa_bytes_to_usec(u->hwbuf_size, &ss) : (pa_usec_t) -1,
+ use_tsched ? (pa_usec_t) -1 : pa_bytes_to_usec(u->hwbuf_size, &ss),
pa_bytes_to_usec(u->hwbuf_size, &ss));
pa_log_info("Using %u fragments of size %lu bytes, buffer time is %0.2fms",
diff --git a/src/modules/alsa/alsa-sink.h b/src/modules/alsa/alsa-sink.h
index 47ece9e0..bbf64234 100644
--- a/src/modules/alsa/alsa-sink.h
+++ b/src/modules/alsa/alsa-sink.h
@@ -9,7 +9,7 @@
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 of the License,
+ 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
diff --git a/src/modules/alsa/alsa-source.c b/src/modules/alsa/alsa-source.c
index def638ec..f4acad8c 100644
--- a/src/modules/alsa/alsa-source.c
+++ b/src/modules/alsa/alsa-source.c
@@ -6,7 +6,7 @@
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 of the License,
+ 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
@@ -146,7 +146,7 @@ static void reserve_update(struct userdata *u) {
const char *description;
pa_assert(u);
- if (!u->source)
+ if (!u->source || !u->reserve)
return;
if ((description = pa_proplist_gets(u->source->proplist, PA_PROP_DEVICE_DESCRIPTION)))
@@ -162,6 +162,9 @@ static int reserve_init(struct userdata *u, const char *dname) {
if (u->reserve)
return 0;
+ if (pa_in_system_mode())
+ return 0;
+
/* We are resuming, try to lock the device */
if (!(rname = pa_alsa_get_reserve_name(dname)))
return 0;
@@ -1542,7 +1545,7 @@ pa_source *pa_alsa_source_new(pa_module *m, pa_modargs *ma, const char*driver, p
}
pa_source_set_latency_range(u->source,
- !use_tsched ? pa_bytes_to_usec(u->hwbuf_size, &ss) : (pa_usec_t) -1,
+ use_tsched ? (pa_usec_t) -1 : pa_bytes_to_usec(u->hwbuf_size, &ss),
pa_bytes_to_usec(u->hwbuf_size, &ss));
pa_log_info("Using %u fragments of size %lu bytes, buffer time is %0.2fms",
diff --git a/src/modules/alsa/alsa-source.h b/src/modules/alsa/alsa-source.h
index 5fed6cc8..9cbb0e17 100644
--- a/src/modules/alsa/alsa-source.h
+++ b/src/modules/alsa/alsa-source.h
@@ -9,7 +9,7 @@
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 of the License,
+ 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
diff --git a/src/modules/alsa/alsa-util.c b/src/modules/alsa/alsa-util.c
index 7d833ff7..454cfd4e 100644
--- a/src/modules/alsa/alsa-util.c
+++ b/src/modules/alsa/alsa-util.c
@@ -6,7 +6,7 @@
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 of the License,
+ 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
diff --git a/src/modules/alsa/alsa-util.h b/src/modules/alsa/alsa-util.h
index a8397ae9..fe0f71e0 100644
--- a/src/modules/alsa/alsa-util.h
+++ b/src/modules/alsa/alsa-util.h
@@ -9,7 +9,7 @@
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 of the License,
+ 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
diff --git a/src/modules/alsa/module-alsa-card.c b/src/modules/alsa/module-alsa-card.c
index 9e149a48..d5e2cdc2 100644
--- a/src/modules/alsa/module-alsa-card.c
+++ b/src/modules/alsa/module-alsa-card.c
@@ -5,7 +5,7 @@
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 of the License,
+ 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
@@ -310,8 +310,9 @@ int pa__init(pa_module *m) {
pa_snprintf(rname, sizeof(rname), "Audio%i", alsa_card_index);
- if (!(reserve = pa_reserve_wrapper_get(m->core, rname)))
- goto fail;
+ if (!pa_in_system_mode())
+ if (!(reserve = pa_reserve_wrapper_get(m->core, rname)))
+ goto fail;
pa_card_new_data_init(&data);
data.driver = __FILE__;
diff --git a/src/modules/alsa/module-alsa-sink.c b/src/modules/alsa/module-alsa-sink.c
index 4f844e08..c728a446 100644
--- a/src/modules/alsa/module-alsa-sink.c
+++ b/src/modules/alsa/module-alsa-sink.c
@@ -6,7 +6,7 @@
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 of the License,
+ 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
diff --git a/src/modules/alsa/module-alsa-source.c b/src/modules/alsa/module-alsa-source.c
index c35936df..6188019f 100644
--- a/src/modules/alsa/module-alsa-source.c
+++ b/src/modules/alsa/module-alsa-source.c
@@ -6,7 +6,7 @@
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 of the License,
+ 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
diff --git a/src/modules/bluetooth/bluetooth-util.c b/src/modules/bluetooth/bluetooth-util.c
index 6b522200..dfd3a306 100644
--- a/src/modules/bluetooth/bluetooth-util.c
+++ b/src/modules/bluetooth/bluetooth-util.c
@@ -5,7 +5,7 @@
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 of the
+ 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
diff --git a/src/modules/bluetooth/bluetooth-util.h b/src/modules/bluetooth/bluetooth-util.h
index 2c3ec649..0364c972 100644
--- a/src/modules/bluetooth/bluetooth-util.h
+++ b/src/modules/bluetooth/bluetooth-util.h
@@ -8,7 +8,7 @@
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 of the
+ 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
diff --git a/src/modules/bluetooth/ipc.h b/src/modules/bluetooth/ipc.h
index 4203150b..f030acfa 100644
--- a/src/modules/bluetooth/ipc.h
+++ b/src/modules/bluetooth/ipc.h
@@ -160,7 +160,8 @@ struct bt_get_capabilities_req {
#define BT_HFP_CODEC_PCM 0x00
-#define BT_PCM_FLAG_NREC 1
+#define BT_PCM_FLAG_NREC 0x01
+#define BT_PCM_FLAG_PCM_ROUTING 0x02
typedef struct {
uint8_t transport;
diff --git a/src/modules/bluetooth/module-bluetooth-device.c b/src/modules/bluetooth/module-bluetooth-device.c
index 3332df2c..72cf2084 100644
--- a/src/modules/bluetooth/module-bluetooth-device.c
+++ b/src/modules/bluetooth/module-bluetooth-device.c
@@ -5,7 +5,7 @@
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 of the
+ 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
diff --git a/src/modules/bluetooth/module-bluetooth-discover.c b/src/modules/bluetooth/module-bluetooth-discover.c
index e9740749..521a9127 100644
--- a/src/modules/bluetooth/module-bluetooth-discover.c
+++ b/src/modules/bluetooth/module-bluetooth-discover.c
@@ -5,7 +5,7 @@
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 of the
+ 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
diff --git a/src/modules/bluetooth/module-bluetooth-proximity.c b/src/modules/bluetooth/module-bluetooth-proximity.c
index f30d39fe..a3b525ee 100644
--- a/src/modules/bluetooth/module-bluetooth-proximity.c
+++ b/src/modules/bluetooth/module-bluetooth-proximity.c
@@ -5,7 +5,7 @@
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 of the License,
+ 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
diff --git a/src/modules/dbus-util.c b/src/modules/dbus-util.c
index 4218bca5..d51befb9 100644
--- a/src/modules/dbus-util.c
+++ b/src/modules/dbus-util.c
@@ -6,7 +6,7 @@
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 of the License,
+ 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
diff --git a/src/modules/dbus-util.h b/src/modules/dbus-util.h
index fd974673..90abbc7b 100644
--- a/src/modules/dbus-util.h
+++ b/src/modules/dbus-util.h
@@ -8,7 +8,7 @@
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 of the License,
+ 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
diff --git a/src/modules/gconf/gconf-helper.c b/src/modules/gconf/gconf-helper.c
index f5016faf..fbd8cfd8 100644
--- a/src/modules/gconf/gconf-helper.c
+++ b/src/modules/gconf/gconf-helper.c
@@ -5,7 +5,7 @@
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 of the License,
+ 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
diff --git a/src/modules/gconf/module-gconf.c b/src/modules/gconf/module-gconf.c
index 845ede50..c01ebbf6 100644
--- a/src/modules/gconf/module-gconf.c
+++ b/src/modules/gconf/module-gconf.c
@@ -5,7 +5,7 @@
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 of the License,
+ 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
diff --git a/src/modules/hal-util.c b/src/modules/hal-util.c
index 6959a706..422ae4ec 100644
--- a/src/modules/hal-util.c
+++ b/src/modules/hal-util.c
@@ -5,7 +5,7 @@
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 of the
+ 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
diff --git a/src/modules/hal-util.h b/src/modules/hal-util.h
index 3c0e0943..19e41d77 100644
--- a/src/modules/hal-util.h
+++ b/src/modules/hal-util.h
@@ -8,7 +8,7 @@
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 of the
+ 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
diff --git a/src/modules/module-always-sink.c b/src/modules/module-always-sink.c
index 591695fb..aee1c650 100644
--- a/src/modules/module-always-sink.c
+++ b/src/modules/module-always-sink.c
@@ -5,7 +5,7 @@
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 of the License,
+ 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
diff --git a/src/modules/module-augment-properties.c b/src/modules/module-augment-properties.c
index 99111868..c3e5997a 100644
--- a/src/modules/module-augment-properties.c
+++ b/src/modules/module-augment-properties.c
@@ -5,7 +5,7 @@
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 of the License,
+ 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
diff --git a/src/modules/module-card-restore.c b/src/modules/module-card-restore.c
index c7696058..0afb9353 100644
--- a/src/modules/module-card-restore.c
+++ b/src/modules/module-card-restore.c
@@ -5,7 +5,7 @@
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 of the License,
+ 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
diff --git a/src/modules/module-cli.c b/src/modules/module-cli.c
index 439aa8b0..fd9452b4 100644
--- a/src/modules/module-cli.c
+++ b/src/modules/module-cli.c
@@ -5,7 +5,7 @@
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 of the License,
+ 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
diff --git a/src/modules/module-combine.c b/src/modules/module-combine.c
index 6ed4f141..4b2d6f9b 100644
--- a/src/modules/module-combine.c
+++ b/src/modules/module-combine.c
@@ -5,7 +5,7 @@
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 of the License,
+ 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
@@ -487,7 +487,7 @@ static void sink_input_kill_cb(pa_sink_input *i) {
struct output *o;
pa_sink_input_assert_ref(i);
- pa_assert(o = i->userdata);
+ pa_assert_se(o = i->userdata);
pa_module_unload_request(o->userdata->module, TRUE);
output_free(o);
diff --git a/src/modules/module-console-kit.c b/src/modules/module-console-kit.c
index 805f5eef..3fba7ef6 100644
--- a/src/modules/module-console-kit.c
+++ b/src/modules/module-console-kit.c
@@ -5,7 +5,7 @@
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 of the License,
+ 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
diff --git a/src/modules/module-cork-music-on-phone.c b/src/modules/module-cork-music-on-phone.c
index fb90cf34..c0f5eea4 100644
--- a/src/modules/module-cork-music-on-phone.c
+++ b/src/modules/module-cork-music-on-phone.c
@@ -5,7 +5,7 @@
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 of the License,
+ 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
diff --git a/src/modules/module-default-device-restore.c b/src/modules/module-default-device-restore.c
index d299f40b..a25aafcb 100644
--- a/src/modules/module-default-device-restore.c
+++ b/src/modules/module-default-device-restore.c
@@ -5,7 +5,7 @@
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 of the License,
+ 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
diff --git a/src/modules/module-detect.c b/src/modules/module-detect.c
index 773e1d87..49127abc 100644
--- a/src/modules/module-detect.c
+++ b/src/modules/module-detect.c
@@ -7,7 +7,7 @@
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 of the License,
+ 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
diff --git a/src/modules/module-device-restore.c b/src/modules/module-device-restore.c
index e6a48814..0ca3dd83 100644
--- a/src/modules/module-device-restore.c
+++ b/src/modules/module-device-restore.c
@@ -5,7 +5,7 @@
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 of the License,
+ 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
diff --git a/src/modules/module-esound-compat-spawnfd.c b/src/modules/module-esound-compat-spawnfd.c
index 578ad3b5..56cda4df 100644
--- a/src/modules/module-esound-compat-spawnfd.c
+++ b/src/modules/module-esound-compat-spawnfd.c
@@ -5,7 +5,7 @@
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 of the License,
+ 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
diff --git a/src/modules/module-esound-compat-spawnpid.c b/src/modules/module-esound-compat-spawnpid.c
index 882dba8c..5925f591 100644
--- a/src/modules/module-esound-compat-spawnpid.c
+++ b/src/modules/module-esound-compat-spawnpid.c
@@ -6,7 +6,7 @@
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 of the License,
+ 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
diff --git a/src/modules/module-esound-sink.c b/src/modules/module-esound-sink.c
index 552cf75e..2b45e302 100644
--- a/src/modules/module-esound-sink.c
+++ b/src/modules/module-esound-sink.c
@@ -5,7 +5,7 @@
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 of the License,
+ 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
diff --git a/src/modules/module-hal-detect.c b/src/modules/module-hal-detect.c
index ce04f367..fe601100 100644
--- a/src/modules/module-hal-detect.c
+++ b/src/modules/module-hal-detect.c
@@ -6,7 +6,7 @@
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 of the License,
+ 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
diff --git a/src/modules/module-jack-sink.c b/src/modules/module-jack-sink.c
index 1739f46a..63fdd2db 100644
--- a/src/modules/module-jack-sink.c
+++ b/src/modules/module-jack-sink.c
@@ -5,7 +5,7 @@
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 of the License,
+ 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
diff --git a/src/modules/module-jack-source.c b/src/modules/module-jack-source.c
index 38b63751..c77c9581 100644
--- a/src/modules/module-jack-source.c
+++ b/src/modules/module-jack-source.c
@@ -5,7 +5,7 @@
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 of the License,
+ 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
@@ -163,7 +163,7 @@ static int jack_process(jack_nframes_t nframes, void *arg) {
pa_assert(u);
for (c = 0; c < u->channels; c++)
- pa_assert(buffer[c] = jack_port_get_buffer(u->port[c], nframes));
+ pa_assert_se(buffer[c] = jack_port_get_buffer(u->port[c], nframes));
/* We interleave the data and pass it on to the other RT thread */
diff --git a/src/modules/module-ladspa-sink.c b/src/modules/module-ladspa-sink.c
index a4007b1a..33562b10 100644
--- a/src/modules/module-ladspa-sink.c
+++ b/src/modules/module-ladspa-sink.c
@@ -5,7 +5,7 @@
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 of the License,
+ 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
diff --git a/src/modules/module-lirc.c b/src/modules/module-lirc.c
index 9a782cac..bdb8bb71 100644
--- a/src/modules/module-lirc.c
+++ b/src/modules/module-lirc.c
@@ -5,7 +5,7 @@
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 of the License,
+ 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
diff --git a/src/modules/module-match.c b/src/modules/module-match.c
index 17936110..d7365ca7 100644
--- a/src/modules/module-match.c
+++ b/src/modules/module-match.c
@@ -5,7 +5,7 @@
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 of the License,
+ 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
diff --git a/src/modules/module-mmkbd-evdev.c b/src/modules/module-mmkbd-evdev.c
index a379923a..2f87dd22 100644
--- a/src/modules/module-mmkbd-evdev.c
+++ b/src/modules/module-mmkbd-evdev.c
@@ -5,7 +5,7 @@
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 of the License,
+ 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
diff --git a/src/modules/module-native-protocol-fd.c b/src/modules/module-native-protocol-fd.c
index f17f435a..eed0505b 100644
--- a/src/modules/module-native-protocol-fd.c
+++ b/src/modules/module-native-protocol-fd.c
@@ -5,7 +5,7 @@
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 of the License,
+ 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
diff --git a/src/modules/module-null-sink.c b/src/modules/module-null-sink.c
index e18da5fd..183d4b2e 100644
--- a/src/modules/module-null-sink.c
+++ b/src/modules/module-null-sink.c
@@ -5,7 +5,7 @@
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 of the License,
+ 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
diff --git a/src/modules/module-pipe-sink.c b/src/modules/module-pipe-sink.c
index f3b0e8b0..def4f758 100644
--- a/src/modules/module-pipe-sink.c
+++ b/src/modules/module-pipe-sink.c
@@ -5,7 +5,7 @@
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 of the License,
+ 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
diff --git a/src/modules/module-pipe-source.c b/src/modules/module-pipe-source.c
index a42c53c3..3d40fdf3 100644
--- a/src/modules/module-pipe-source.c
+++ b/src/modules/module-pipe-source.c
@@ -5,7 +5,7 @@
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 of the License,
+ 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
diff --git a/src/modules/module-position-event-sounds.c b/src/modules/module-position-event-sounds.c
index 6252ebab..e191ec33 100644
--- a/src/modules/module-position-event-sounds.c
+++ b/src/modules/module-position-event-sounds.c
@@ -5,7 +5,7 @@
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 of the License,
+ 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
diff --git a/src/modules/module-protocol-stub.c b/src/modules/module-protocol-stub.c
index ca9274d8..ce3dcd03 100644
--- a/src/modules/module-protocol-stub.c
+++ b/src/modules/module-protocol-stub.c
@@ -6,7 +6,7 @@
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 of the License,
+ 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
diff --git a/src/modules/module-raop-discover.c b/src/modules/module-raop-discover.c
index df393151..5c2e0623 100644
--- a/src/modules/module-raop-discover.c
+++ b/src/modules/module-raop-discover.c
@@ -6,7 +6,7 @@
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 of the
+ 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
@@ -152,11 +152,18 @@ static void resolver_cb(
if (event != AVAHI_RESOLVER_FOUND)
pa_log("Resolving of '%s' failed: %s", name, avahi_strerror(avahi_client_errno(u->client)));
else {
- char *device = NULL, *dname, *vname, *args;
+ char *device = NULL, *nicename, *dname, *vname, *args;
char at[AVAHI_ADDRESS_STR_MAX];
AvahiStringList *l;
pa_module *m;
+ if ((nicename = strstr(name, "@"))) {
+ ++nicename;
+ if (strlen(nicename) > 0) {
+ pa_log_debug("Found RAOP: %s", nicename);
+ }
+ }
+
for (l = txt; l; l = l->next) {
char *key, *value;
pa_assert_se(avahi_string_list_get_pair(l, &key, &value, NULL) == 0);
@@ -190,10 +197,20 @@ static void resolver_cb(
"sink_name=%s",
avahi_address_snprint(at, sizeof(at), a), port,
vname);*/
- args = pa_sprintf_malloc("server=%s "
- "sink_name=%s",
- avahi_address_snprint(at, sizeof(at), a),
- vname);
+ if (nicename) {
+ args = pa_sprintf_malloc("server=%s "
+ "sink_name=%s "
+ "description=\"%s\"",
+ avahi_address_snprint(at, sizeof(at), a),
+ vname,
+ nicename);
+
+ } else {
+ args = pa_sprintf_malloc("server=%s "
+ "sink_name=%s",
+ avahi_address_snprint(at, sizeof(at), a),
+ vname);
+ }
pa_log_debug("Loading module-raop-sink with arguments '%s'", args);
diff --git a/src/modules/module-raop-sink.c b/src/modules/module-raop-sink.c
index da338f5d..00f0c63c 100644
--- a/src/modules/module-raop-sink.c
+++ b/src/modules/module-raop-sink.c
@@ -6,7 +6,7 @@
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 of the License,
+ 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
@@ -72,6 +72,7 @@ PA_MODULE_VERSION(PACKAGE_VERSION);
PA_MODULE_LOAD_ONCE(FALSE);
PA_MODULE_USAGE(
"sink_name=<name for the sink> "
+ "description=<description for the sink> "
"server=<address> "
"format=<sample format> "
"channels=<number of channels> "
@@ -122,6 +123,7 @@ static const char* const valid_modargs[] = {
"format",
"channels",
"sink_name",
+ "description",
NULL
};
@@ -502,7 +504,7 @@ int pa__init(pa_module*m) {
struct userdata *u = NULL;
pa_sample_spec ss;
pa_modargs *ma = NULL;
- const char *server;
+ const char *server, *desc;
pa_sink_new_data data;
pa_assert(m);
@@ -564,7 +566,10 @@ int pa__init(pa_module*m) {
pa_sink_new_data_set_name(&data, pa_modargs_get_value(ma, "sink_name", DEFAULT_SINK_NAME));
pa_sink_new_data_set_sample_spec(&data, &ss);
pa_proplist_sets(data.proplist, PA_PROP_DEVICE_STRING, server);
- pa_proplist_setf(data.proplist, PA_PROP_DEVICE_DESCRIPTION, "RAOP sink '%s'", server);
+ if ((desc = pa_modargs_get_value(ma, "description", NULL)))
+ pa_proplist_sets(data.proplist, PA_PROP_DEVICE_DESCRIPTION, desc);
+ else
+ pa_proplist_setf(data.proplist, PA_PROP_DEVICE_DESCRIPTION, "RAOP sink '%s'", server);
u->sink = pa_sink_new(m->core, &data, PA_SINK_LATENCY|PA_SINK_NETWORK);
pa_sink_new_data_done(&data);
diff --git a/src/modules/module-remap-sink.c b/src/modules/module-remap-sink.c
index 89ddf953..31824bc5 100644
--- a/src/modules/module-remap-sink.c
+++ b/src/modules/module-remap-sink.c
@@ -5,7 +5,7 @@
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 of the License,
+ 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
diff --git a/src/modules/module-rescue-streams.c b/src/modules/module-rescue-streams.c
index e52e39c1..4f616e05 100644
--- a/src/modules/module-rescue-streams.c
+++ b/src/modules/module-rescue-streams.c
@@ -5,7 +5,7 @@
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 of the License,
+ 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
diff --git a/src/modules/module-sine-source.c b/src/modules/module-sine-source.c
index 5626c2ab..206c45f4 100644
--- a/src/modules/module-sine-source.c
+++ b/src/modules/module-sine-source.c
@@ -5,7 +5,7 @@
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 of the License,
+ 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
diff --git a/src/modules/module-sine.c b/src/modules/module-sine.c
index ce08c01d..0be1d722 100644
--- a/src/modules/module-sine.c
+++ b/src/modules/module-sine.c
@@ -5,7 +5,7 @@
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 of the License,
+ 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
diff --git a/src/modules/module-solaris.c b/src/modules/module-solaris.c
index 6f50543a..995b3c63 100644
--- a/src/modules/module-solaris.c
+++ b/src/modules/module-solaris.c
@@ -3,10 +3,11 @@
Copyright 2006 Lennart Poettering
Copyright 2006-2007 Pierre Ossman <ossman@cendio.se> for Cendio AB
+ Copyright 2009 Finn Thain
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 of the License,
+ 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
@@ -44,6 +45,7 @@
#include <pulse/mainloop-signal.h>
#include <pulse/xmalloc.h>
#include <pulse/timeval.h>
+#include <pulse/util.h>
#include <pulsecore/iochannel.h>
#include <pulsecore/sink.h>
@@ -57,22 +59,25 @@
#include <pulsecore/thread-mq.h>
#include <pulsecore/rtpoll.h>
#include <pulsecore/thread.h>
+#include <pulsecore/rtclock.h>
#include "module-solaris-symdef.h"
-PA_MODULE_AUTHOR("Pierre Ossman")
-PA_MODULE_DESCRIPTION("Solaris Sink/Source")
-PA_MODULE_VERSION(PACKAGE_VERSION)
+PA_MODULE_AUTHOR("Pierre Ossman");
+PA_MODULE_DESCRIPTION("Solaris Sink/Source");
+PA_MODULE_VERSION(PACKAGE_VERSION);
PA_MODULE_USAGE(
"sink_name=<name for the sink> "
"source_name=<name for the source> "
- "device=<OSS device> record=<enable source?> "
+ "device=<audio device file name> "
+ "record=<enable source?> "
"playback=<enable sink?> "
"format=<sample format> "
"channels=<number of channels> "
"rate=<sample rate> "
"buffer_size=<record buffer size> "
- "channel_map=<channel map>")
+ "channel_map=<channel map>");
+PA_MODULE_LOAD_ONCE(FALSE);
struct userdata {
pa_core *core;
@@ -87,15 +92,24 @@ struct userdata {
pa_memchunk memchunk;
- unsigned int page_size;
-
uint32_t frame_size;
- uint32_t buffer_size;
- unsigned int written_bytes, read_bytes;
+ int32_t buffer_size;
+ volatile uint64_t written_bytes, read_bytes;
+ pa_mutex *written_bytes_lock;
+ char *device_name;
+ int mode;
int fd;
pa_rtpoll_item *rtpoll_item;
pa_module *module;
+
+ pa_bool_t sink_suspended, source_suspended;
+
+ uint32_t play_samples_msw, record_samples_msw;
+ uint32_t prev_playback_samples, prev_record_samples;
+ pa_mutex *sample_counter_lock;
+
+ size_t min_request;
};
static const char* const valid_modargs[] = {
@@ -112,89 +126,303 @@ static const char* const valid_modargs[] = {
NULL
};
-#define DEFAULT_SINK_NAME "solaris_output"
-#define DEFAULT_SOURCE_NAME "solaris_input"
#define DEFAULT_DEVICE "/dev/audio"
+#define MIN_BUFFER_SIZE (640)
+#define MAX_RENDER_HZ (300)
-static int sink_process_msg(pa_msgobject *o, int code, void *data, int64_t offset, pa_memchunk *chunk) {
- struct userdata *u = PA_SINK(o)->userdata;
+/* This render rate limit implies a minimum latency, but without it we waste too much CPU time in the
+ * IO thread. The maximum render rate and minimum latency (or minimum buffer size) are unachievable on
+ * common hardware anyway. Note that MIN_BUFFER_SIZE * MAX_RENDER_HZ >= 4 * 48000 Bps.
+ */
+
+static uint64_t get_playback_buffered_bytes(struct userdata *u) {
+ audio_info_t info;
+ uint64_t played_bytes;
int err;
+
+ pa_assert(u->sink);
+
+ pa_mutex_lock(u->sample_counter_lock);
+
+ err = ioctl(u->fd, AUDIO_GETINFO, &info);
+ pa_assert(err >= 0);
+
+ /* Handle wrap-around of the device's sample counter, which is a uint_32. */
+ if (u->prev_playback_samples > info.play.samples) {
+ /* Unfortunately info.play.samples can sometimes go backwards, even before it wraps! */
+ if (u->prev_playback_samples + info.play.samples < 240000) {
+ ++u->play_samples_msw;
+ } else {
+ pa_log_debug("play.samples went backwards %d bytes", u->prev_playback_samples - info.play.samples);
+ }
+ }
+ u->prev_playback_samples = info.play.samples;
+ played_bytes = (((uint64_t)u->play_samples_msw << 32) + info.play.samples) * u->frame_size;
+
+ pa_mutex_unlock(u->sample_counter_lock);
+
+ return u->written_bytes - played_bytes;
+}
+
+static pa_usec_t sink_get_latency(struct userdata *u, pa_sample_spec *ss) {
+ pa_usec_t r = 0;
+
+ pa_assert(u);
+ pa_assert(ss);
+
+ if (u->fd >= 0) {
+ pa_mutex_lock(u->written_bytes_lock);
+ r = pa_bytes_to_usec(get_playback_buffered_bytes(u), ss);
+ if (u->memchunk.memblock)
+ r += pa_bytes_to_usec(u->memchunk.length, ss);
+ pa_mutex_unlock(u->written_bytes_lock);
+ }
+ return r;
+}
+
+static uint64_t get_recorded_bytes(struct userdata *u) {
audio_info_t info;
+ uint64_t result;
+ int err;
- switch (code) {
- case PA_SINK_MESSAGE_GET_LATENCY: {
- pa_usec_t r = 0;
+ pa_assert(u->source);
- if (u->fd >= 0) {
+ err = ioctl(u->fd, AUDIO_GETINFO, &info);
+ pa_assert(err >= 0);
- err = ioctl(u->fd, AUDIO_GETINFO, &info);
- pa_assert(err >= 0);
+ if (u->prev_record_samples > info.record.samples)
+ ++u->record_samples_msw;
+ u->prev_record_samples = info.record.samples;
+ result = (((uint64_t)u->record_samples_msw << 32) + info.record.samples) * u->frame_size;
- r += pa_bytes_to_usec(u->written_bytes, &PA_SINK(o)->sample_spec);
- r -= pa_bytes_to_usec(info.play.samples * u->frame_size, &PA_SINK(o)->sample_spec);
+ return result;
+}
- if (u->memchunk.memblock)
- r += pa_bytes_to_usec(u->memchunk.length, &PA_SINK(o)->sample_spec);
- }
+static pa_usec_t source_get_latency(struct userdata *u, pa_sample_spec *ss) {
+ pa_usec_t r = 0;
+ audio_info_t info;
+
+ pa_assert(u);
+ pa_assert(ss);
- *((pa_usec_t*) data) = r;
+ if (u->fd) {
+ int err = ioctl(u->fd, AUDIO_GETINFO, &info);
+ pa_assert(err >= 0);
- return 0;
+ r = pa_bytes_to_usec(get_recorded_bytes(u), ss) - pa_bytes_to_usec(u->read_bytes, ss);
}
+ return r;
+}
- case PA_SINK_MESSAGE_SET_VOLUME:
- if (u->fd >= 0) {
- AUDIO_INITINFO(&info);
+static void build_pollfd(struct userdata *u) {
+ struct pollfd *pollfd;
- info.play.gain = pa_cvolume_avg((pa_cvolume*)data) * AUDIO_MAX_GAIN / PA_VOLUME_NORM;
- assert(info.play.gain <= AUDIO_MAX_GAIN);
+ pa_assert(u);
+ pa_assert(!u->rtpoll_item);
+ u->rtpoll_item = pa_rtpoll_item_new(u->rtpoll, PA_RTPOLL_NEVER, 1);
- if (ioctl(u->fd, AUDIO_SETINFO, &info) < 0) {
- if (errno == EINVAL)
- pa_log("AUDIO_SETINFO: Unsupported volume.");
- else
- pa_log("AUDIO_SETINFO: %s", pa_cstrerror(errno));
- } else {
- return 0;
- }
- }
- break;
+ pollfd = pa_rtpoll_item_get_pollfd(u->rtpoll_item, NULL);
+ pollfd->fd = u->fd;
+ pollfd->events = 0;
+ pollfd->revents = 0;
+}
- case PA_SINK_MESSAGE_GET_VOLUME:
- if (u->fd >= 0) {
- err = ioctl(u->fd, AUDIO_GETINFO, &info);
- assert(err >= 0);
+static int set_buffer(int fd, int buffer_size) {
+ audio_info_t info;
- pa_cvolume_set((pa_cvolume*) data, ((pa_cvolume*) data)->channels,
- info.play.gain * PA_VOLUME_NORM / AUDIO_MAX_GAIN);
+ pa_assert(fd >= 0);
- return 0;
- }
- break;
+ AUDIO_INITINFO(&info);
+ info.play.buffer_size = buffer_size;
+ info.record.buffer_size = buffer_size;
- case PA_SINK_MESSAGE_SET_MUTE:
- if (u->fd >= 0) {
- AUDIO_INITINFO(&info);
+ if (ioctl(fd, AUDIO_SETINFO, &info) < 0) {
+ if (errno == EINVAL)
+ pa_log("AUDIO_SETINFO: Unsupported buffer size.");
+ else
+ pa_log("AUDIO_SETINFO: %s", pa_cstrerror(errno));
+ return -1;
+ }
- info.output_muted = !!PA_PTR_TO_UINT(data);
+ return 0;
+}
- if (ioctl(u->fd, AUDIO_SETINFO, &info) < 0)
- pa_log("AUDIO_SETINFO: %s", pa_cstrerror(errno));
- else
- return 0;
+static int auto_format(int fd, int mode, pa_sample_spec *ss) {
+ audio_info_t info;
+
+ pa_assert(fd >= 0);
+ pa_assert(ss);
+
+ AUDIO_INITINFO(&info);
+
+ if (mode != O_RDONLY) {
+ info.play.sample_rate = ss->rate;
+ info.play.channels = ss->channels;
+ switch (ss->format) {
+ case PA_SAMPLE_U8:
+ info.play.precision = 8;
+ info.play.encoding = AUDIO_ENCODING_LINEAR;
+ break;
+ case PA_SAMPLE_ALAW:
+ info.play.precision = 8;
+ info.play.encoding = AUDIO_ENCODING_ALAW;
+ break;
+ case PA_SAMPLE_ULAW:
+ info.play.precision = 8;
+ info.play.encoding = AUDIO_ENCODING_ULAW;
+ break;
+ case PA_SAMPLE_S16NE:
+ info.play.precision = 16;
+ info.play.encoding = AUDIO_ENCODING_LINEAR;
+ break;
+ default:
+ pa_log("AUDIO_SETINFO: Unsupported sample format.");
+ return -1;
}
- break;
+ }
- case PA_SINK_MESSAGE_GET_MUTE:
- if (u->fd >= 0) {
- err = ioctl(u->fd, AUDIO_GETINFO, &info);
- pa_assert(err >= 0);
+ if (mode != O_WRONLY) {
+ info.record.sample_rate = ss->rate;
+ info.record.channels = ss->channels;
+ switch (ss->format) {
+ case PA_SAMPLE_U8:
+ info.record.precision = 8;
+ info.record.encoding = AUDIO_ENCODING_LINEAR;
+ break;
+ case PA_SAMPLE_ALAW:
+ info.record.precision = 8;
+ info.record.encoding = AUDIO_ENCODING_ALAW;
+ break;
+ case PA_SAMPLE_ULAW:
+ info.record.precision = 8;
+ info.record.encoding = AUDIO_ENCODING_ULAW;
+ break;
+ case PA_SAMPLE_S16NE:
+ info.record.precision = 16;
+ info.record.encoding = AUDIO_ENCODING_LINEAR;
+ break;
+ default:
+ pa_log("AUDIO_SETINFO: Unsupported sample format.");
+ return -1;
+ }
+ }
+
+ if (ioctl(fd, AUDIO_SETINFO, &info) < 0) {
+ if (errno == EINVAL)
+ pa_log("AUDIO_SETINFO: Failed to set sample format.");
+ else
+ pa_log("AUDIO_SETINFO: %s", pa_cstrerror(errno));
+ return -1;
+ }
+
+ return 0;
+}
+
+static int open_audio_device(struct userdata *u, pa_sample_spec *ss) {
+ pa_assert(u);
+ pa_assert(ss);
+
+ if ((u->fd = open(u->device_name, u->mode | O_NONBLOCK)) < 0) {
+ pa_log_warn("open %s failed (%s)", u->device_name, pa_cstrerror(errno));
+ return -1;
+ }
+
+ pa_log_info("device opened in %s mode.", u->mode == O_WRONLY ? "O_WRONLY" : (u->mode == O_RDONLY ? "O_RDONLY" : "O_RDWR"));
+
+ if (auto_format(u->fd, u->mode, ss) < 0)
+ return -1;
+
+ if (set_buffer(u->fd, u->buffer_size) < 0)
+ return -1;
+
+ u->written_bytes = u->read_bytes = 0;
+ u->play_samples_msw = u->record_samples_msw = 0;
+ u->prev_playback_samples = u->prev_record_samples = 0;
+
+ return u->fd;
+}
+
+static int suspend(struct userdata *u) {
+ pa_assert(u);
+ pa_assert(u->fd >= 0);
+
+ pa_log_info("Suspending...");
+
+ ioctl(u->fd, AUDIO_DRAIN, NULL);
+ pa_close(u->fd);
+ u->fd = -1;
+
+ if (u->rtpoll_item) {
+ pa_rtpoll_item_free(u->rtpoll_item);
+ u->rtpoll_item = NULL;
+ }
+
+ pa_log_info("Device suspended.");
+
+ return 0;
+}
+
+static int unsuspend(struct userdata *u) {
+ pa_assert(u);
+ pa_assert(u->fd < 0);
- *(int*)data = !!info.output_muted;
+ pa_log_info("Resuming...");
+ if (open_audio_device(u, u->sink ? &u->sink->sample_spec : &u->source->sample_spec) < 0)
+ return -1;
+
+ build_pollfd(u);
+
+ pa_log_info("Device resumed.");
+
+ return 0;
+}
+
+static int sink_process_msg(pa_msgobject *o, int code, void *data, int64_t offset, pa_memchunk *chunk) {
+ struct userdata *u = PA_SINK(o)->userdata;
+
+ switch (code) {
+
+ case PA_SINK_MESSAGE_GET_LATENCY:
+ *((pa_usec_t*) data) = sink_get_latency(u, &PA_SINK(o)->sample_spec);
return 0;
- }
- break;
+
+ case PA_SINK_MESSAGE_SET_STATE:
+
+ switch ((pa_sink_state_t) PA_PTR_TO_UINT(data)) {
+
+ case PA_SINK_SUSPENDED:
+
+ pa_assert(PA_SINK_IS_OPENED(u->sink->thread_info.state));
+
+ if (!u->source || u->source_suspended) {
+ if (suspend(u) < 0)
+ return -1;
+ }
+ u->sink_suspended = TRUE;
+ break;
+
+ case PA_SINK_IDLE:
+ case PA_SINK_RUNNING:
+
+ if (u->sink->thread_info.state == PA_SINK_SUSPENDED) {
+ if (!u->source || u->source_suspended) {
+ if (unsuspend(u) < 0)
+ return -1;
+ u->sink->get_volume(u->sink);
+ u->sink->get_mute(u->sink);
+ }
+ u->sink_suspended = FALSE;
+ }
+ break;
+
+ case PA_SINK_INVALID_STATE:
+ case PA_SINK_UNLINKED:
+ case PA_SINK_INIT:
+ ;
+ }
+
+ break;
}
return pa_sink_process_msg(o, code, data, offset, chunk);
@@ -202,95 +430,168 @@ static int sink_process_msg(pa_msgobject *o, int code, void *data, int64_t offse
static int source_process_msg(pa_msgobject *o, int code, void *data, int64_t offset, pa_memchunk *chunk) {
struct userdata *u = PA_SOURCE(o)->userdata;
- int err;
- audio_info_t info;
switch (code) {
- case PA_SOURCE_MESSAGE_GET_LATENCY: {
- pa_usec_t r = 0;
- if (u->fd) {
- err = ioctl(u->fd, AUDIO_GETINFO, &info);
- pa_assert(err >= 0);
+ case PA_SOURCE_MESSAGE_GET_LATENCY:
+ *((pa_usec_t*) data) = source_get_latency(u, &PA_SOURCE(o)->sample_spec);
+ return 0;
- r += pa_bytes_to_usec(info.record.samples * u->frame_size, &PA_SOURCE(o)->sample_spec);
- r -= pa_bytes_to_usec(u->read_bytes, &PA_SOURCE(o)->sample_spec);
- }
+ case PA_SOURCE_MESSAGE_SET_STATE:
- *((pa_usec_t*) data) = r;
+ switch ((pa_source_state_t) PA_PTR_TO_UINT(data)) {
- return 0;
- }
+ case PA_SOURCE_SUSPENDED:
- case PA_SOURCE_MESSAGE_SET_VOLUME:
- if (u->fd >= 0) {
- AUDIO_INITINFO(&info);
+ pa_assert(PA_SOURCE_IS_OPENED(u->source->thread_info.state));
- info.record.gain = pa_cvolume_avg((pa_cvolume*) data) * AUDIO_MAX_GAIN / PA_VOLUME_NORM;
- assert(info.record.gain <= AUDIO_MAX_GAIN);
+ if (!u->sink || u->sink_suspended) {
+ if (suspend(u) < 0)
+ return -1;
+ }
+ u->source_suspended = TRUE;
+ break;
+
+ case PA_SOURCE_IDLE:
+ case PA_SOURCE_RUNNING:
+
+ if (u->source->thread_info.state == PA_SOURCE_SUSPENDED) {
+ if (!u->sink || u->sink_suspended) {
+ if (unsuspend(u) < 0)
+ return -1;
+ u->source->get_volume(u->source);
+ }
+ u->source_suspended = FALSE;
+ }
+ break;
+
+ case PA_SOURCE_UNLINKED:
+ case PA_SOURCE_INIT:
+ case PA_SOURCE_INVALID_STATE:
+ ;
- if (ioctl(u->fd, AUDIO_SETINFO, &info) < 0) {
- if (errno == EINVAL)
- pa_log("AUDIO_SETINFO: Unsupported volume.");
- else
- pa_log("AUDIO_SETINFO: %s", pa_cstrerror(errno));
- } else {
- return 0;
- }
}
break;
- case PA_SOURCE_MESSAGE_GET_VOLUME:
- if (u->fd >= 0) {
- err = ioctl(u->fd, AUDIO_GETINFO, &info);
- pa_assert(err >= 0);
+ }
- pa_cvolume_set((pa_cvolume*) data, ((pa_cvolume*) data)->channels,
- info.record.gain * PA_VOLUME_NORM / AUDIO_MAX_GAIN);
+ return pa_source_process_msg(o, code, data, offset, chunk);
+}
- return 0;
- }
- break;
+static void sink_set_volume(pa_sink *s) {
+ struct userdata *u;
+ audio_info_t info;
+
+ pa_assert_se(u = s->userdata);
+
+ if (u->fd >= 0) {
+ AUDIO_INITINFO(&info);
+
+ info.play.gain = pa_cvolume_avg(&s->virtual_volume) * AUDIO_MAX_GAIN / PA_VOLUME_NORM;
+ assert(info.play.gain <= AUDIO_MAX_GAIN);
+
+ if (ioctl(u->fd, AUDIO_SETINFO, &info) < 0) {
+ if (errno == EINVAL)
+ pa_log("AUDIO_SETINFO: Unsupported volume.");
+ else
+ pa_log("AUDIO_SETINFO: %s", pa_cstrerror(errno));
+ }
}
+}
- return pa_source_process_msg(o, code, data, offset, chunk);
+static void sink_get_volume(pa_sink *s) {
+ struct userdata *u;
+ audio_info_t info;
+
+ pa_assert_se(u = s->userdata);
+
+ if (u->fd >= 0) {
+ if (ioctl(u->fd, AUDIO_GETINFO, &info) < 0)
+ pa_log("AUDIO_SETINFO: %s", pa_cstrerror(errno));
+ else
+ pa_cvolume_set(&s->virtual_volume, s->sample_spec.channels,
+ info.play.gain * PA_VOLUME_NORM / AUDIO_MAX_GAIN);
+ }
}
-static void clear_underflow(struct userdata *u)
-{
+static void source_set_volume(pa_source *s) {
+ struct userdata *u;
audio_info_t info;
- AUDIO_INITINFO(&info);
+ pa_assert_se(u = s->userdata);
+
+ if (u->fd >= 0) {
+ AUDIO_INITINFO(&info);
- info.play.error = 0;
+ info.play.gain = pa_cvolume_avg(&s->virtual_volume) * AUDIO_MAX_GAIN / PA_VOLUME_NORM;
+ assert(info.play.gain <= AUDIO_MAX_GAIN);
- if (ioctl(u->fd, AUDIO_SETINFO, &info) < 0)
- pa_log("AUDIO_SETINFO: %s", pa_cstrerror(errno));
+ if (ioctl(u->fd, AUDIO_SETINFO, &info) < 0) {
+ if (errno == EINVAL)
+ pa_log("AUDIO_SETINFO: Unsupported volume.");
+ else
+ pa_log("AUDIO_SETINFO: %s", pa_cstrerror(errno));
+ }
+ }
}
-static void clear_overflow(struct userdata *u)
-{
+static void source_get_volume(pa_source *s) {
+ struct userdata *u;
audio_info_t info;
- AUDIO_INITINFO(&info);
+ pa_assert_se(u = s->userdata);
- info.record.error = 0;
+ if (u->fd >= 0) {
+ if (ioctl(u->fd, AUDIO_GETINFO, &info) < 0)
+ pa_log("AUDIO_SETINFO: %s", pa_cstrerror(errno));
+ else
+ pa_cvolume_set(&s->virtual_volume, s->sample_spec.channels,
+ info.play.gain * PA_VOLUME_NORM / AUDIO_MAX_GAIN);
+ }
+}
+
+static void sink_set_mute(pa_sink *s) {
+ struct userdata *u = s->userdata;
+ audio_info_t info;
- if (ioctl(u->fd, AUDIO_SETINFO, &info) < 0)
- pa_log("AUDIO_SETINFO: %s", pa_cstrerror(errno));
+ pa_assert(u);
+
+ if (u->fd >= 0) {
+ AUDIO_INITINFO(&info);
+
+ info.output_muted = !!s->muted;
+
+ if (ioctl(u->fd, AUDIO_SETINFO, &info) < 0)
+ pa_log("AUDIO_SETINFO: %s", pa_cstrerror(errno));
+ }
+}
+
+static void sink_get_mute(pa_sink *s) {
+ struct userdata *u = s->userdata;
+ audio_info_t info;
+
+ pa_assert(u);
+
+ if (u->fd >= 0) {
+ if (ioctl(u->fd, AUDIO_GETINFO, &info) < 0)
+ pa_log("AUDIO_SETINFO: %s", pa_cstrerror(errno));
+ else
+ s->muted = !!info.output_muted;
+ }
}
static void thread_func(void *userdata) {
struct userdata *u = userdata;
unsigned short revents = 0;
- int ret;
+ int ret, err;
+ audio_info_t info;
pa_assert(u);
pa_log_debug("Thread starting up");
- if (u->core->high_priority)
- pa_make_realtime();
+ if (u->core->realtime_scheduling)
+ pa_make_realtime(u->core->realtime_priority);
pa_thread_mq_install(&u->thread_mq);
pa_rtpoll_install(u->rtpoll);
@@ -298,139 +599,158 @@ static void thread_func(void *userdata) {
for (;;) {
/* Render some data and write it to the dsp */
- if (u->sink && PA_SINK_OPENED(u->sink->thread_info.state)) {
- audio_info_t info;
- int err;
- size_t len;
+ if (u->sink && PA_SINK_IS_OPENED(u->sink->thread_info.state)) {
+ pa_usec_t xtime0;
+ uint64_t buffered_bytes;
+
+ if (u->sink->thread_info.rewind_requested)
+ pa_sink_process_rewind(u->sink, 0);
err = ioctl(u->fd, AUDIO_GETINFO, &info);
pa_assert(err >= 0);
- /*
- * Since we cannot modify the size of the output buffer we fake it
- * by not filling it more than u->buffer_size.
- */
- len = u->buffer_size;
- len -= u->written_bytes - (info.play.samples * u->frame_size);
-
- /* The sample counter can sometimes go backwards :( */
- if (len > u->buffer_size)
- len = 0;
-
if (info.play.error) {
- pa_log_debug("Solaris buffer underflow!");
- clear_underflow(u);
- }
+ pa_log_debug("buffer under-run!");
- len -= len % u->frame_size;
+ AUDIO_INITINFO(&info);
+ info.play.error = 0;
+ if (ioctl(u->fd, AUDIO_SETINFO, &info) < 0)
+ pa_log("AUDIO_SETINFO: %s", pa_cstrerror(errno));
+ }
- while (len) {
+ for (;;) {
void *p;
- ssize_t r;
+ ssize_t w;
+ size_t len;
+
+ /*
+ * Since we cannot modify the size of the output buffer we fake it
+ * by not filling it more than u->buffer_size.
+ */
+ xtime0 = pa_rtclock_usec();
+ buffered_bytes = get_playback_buffered_bytes(u);
+ if (buffered_bytes >= (uint64_t)u->buffer_size)
+ break;
- if (!u->memchunk.length)
- pa_sink_render(u->sink, len, &u->memchunk);
+ len = u->buffer_size - buffered_bytes;
+ len -= len % u->frame_size;
- pa_assert(u->memchunk.length);
+ if (len < u->min_request)
+ break;
+
+ if (u->memchunk.length < len)
+ pa_sink_render(u->sink, u->sink->thread_info.max_request, &u->memchunk);
p = pa_memblock_acquire(u->memchunk.memblock);
- r = pa_write(u->fd, (uint8_t*) p + u->memchunk.index, u->memchunk.length, NULL);
+ w = pa_write(u->fd, (uint8_t*) p + u->memchunk.index, u->memchunk.length, NULL);
pa_memblock_release(u->memchunk.memblock);
- if (r < 0) {
- if (errno == EINTR)
- continue;
- else if (errno != EAGAIN) {
- pa_log("Failed to read data from DSP: %s", pa_cstrerror(errno));
- goto fail;
+ if (w <= 0) {
+ switch (errno) {
+ case EINTR:
+ break;
+ case EAGAIN:
+ u->buffer_size = u->buffer_size * 18 / 25;
+ u->buffer_size -= u->buffer_size % u->frame_size;
+ u->buffer_size = PA_MAX(u->buffer_size, (int32_t)MIN_BUFFER_SIZE);
+ pa_sink_set_max_request(u->sink, u->buffer_size);
+ pa_log("EAGAIN. Buffer size is now %u bytes (%llu buffered)", u->buffer_size, buffered_bytes);
+ break;
+ default:
+ pa_log("Failed to write data to DSP: %s", pa_cstrerror(errno));
+ goto fail;
}
} else {
- pa_assert(r % u->frame_size == 0);
+ pa_assert(w % u->frame_size == 0);
- u->memchunk.index += r;
- u->memchunk.length -= r;
+ pa_mutex_lock(u->written_bytes_lock);
+ u->written_bytes += w;
+ u->memchunk.length -= w;
+ pa_mutex_unlock(u->written_bytes_lock);
+ u->memchunk.index += w;
if (u->memchunk.length <= 0) {
pa_memblock_unref(u->memchunk.memblock);
pa_memchunk_reset(&u->memchunk);
}
-
- len -= r;
- u->written_bytes += r;
}
}
+
+ pa_rtpoll_set_timer_absolute(u->rtpoll, xtime0 + pa_bytes_to_usec(buffered_bytes / 2, &u->sink->sample_spec));
+ } else {
+ pa_rtpoll_set_timer_disabled(u->rtpoll);
}
/* Try to read some data and pass it on to the source driver */
- if (u->source && PA_SOURCE_OPENED(u->source->thread_info.state) && ((revents & POLLIN))) {
+ if (u->source && PA_SOURCE_IS_OPENED(u->source->thread_info.state) && (revents & POLLIN)) {
pa_memchunk memchunk;
- int err;
- size_t l;
void *p;
ssize_t r;
- audio_info_t info;
+ size_t len;
err = ioctl(u->fd, AUDIO_GETINFO, &info);
pa_assert(err >= 0);
if (info.record.error) {
- pa_log_debug("Solaris buffer overflow!");
- clear_overflow(u);
+ pa_log_debug("buffer overflow!");
+
+ AUDIO_INITINFO(&info);
+ info.record.error = 0;
+ if (ioctl(u->fd, AUDIO_SETINFO, &info) < 0)
+ pa_log("AUDIO_SETINFO: %s", pa_cstrerror(errno));
}
- err = ioctl(u->fd, I_NREAD, &l);
+ err = ioctl(u->fd, I_NREAD, &len);
pa_assert(err >= 0);
- if (l > 0) {
- /* This is to make sure it fits in the memory pool. Also, a page
- should be the most efficient transfer size. */
- if (l > u->page_size)
- l = u->page_size;
-
- memchunk.memblock = pa_memblock_new(u->core->mempool, l);
+ if (len > 0) {
+ memchunk.memblock = pa_memblock_new(u->core->mempool, len);
pa_assert(memchunk.memblock);
p = pa_memblock_acquire(memchunk.memblock);
- r = pa_read(u->fd, p, l, NULL);
+ r = pa_read(u->fd, p, len, NULL);
pa_memblock_release(memchunk.memblock);
if (r < 0) {
pa_memblock_unref(memchunk.memblock);
- if (errno != EAGAIN) {
+ if (errno == EAGAIN)
+ break;
+ else {
pa_log("Failed to read data from DSP: %s", pa_cstrerror(errno));
goto fail;
}
} else {
+ u->read_bytes += r;
+
memchunk.index = 0;
memchunk.length = r;
pa_source_post(u->source, &memchunk);
pa_memblock_unref(memchunk.memblock);
- u->read_bytes += r;
-
revents &= ~POLLIN;
}
}
}
- if (u->fd >= 0) {
+ if (u->rtpoll_item) {
struct pollfd *pollfd;
+ pa_assert(u->fd >= 0);
+
pollfd = pa_rtpoll_item_get_pollfd(u->rtpoll_item, NULL);
- pollfd->events =
- ((u->source && PA_SOURCE_OPENED(u->source->thread_info.state)) ? POLLIN : 0);
+ pollfd->events = (u->source && PA_SOURCE_IS_OPENED(u->source->thread_info.state)) ? POLLIN : 0;
}
/* Hmm, nothing to do. Let's sleep */
- if ((ret = pa_rtpoll_run(u->rtpoll, 1)) < 0)
+ if ((ret = pa_rtpoll_run(u->rtpoll, TRUE)) < 0)
goto fail;
if (ret == 0)
goto finish;
- if (u->fd >= 0) {
+ if (u->rtpoll_item) {
struct pollfd *pollfd;
pollfd = pa_rtpoll_item_get_pollfd(u->rtpoll_item, NULL);
@@ -460,112 +780,29 @@ static void sig_callback(pa_mainloop_api *api, pa_signal_event*e, int sig, void
assert(u);
+ pa_log_debug("caught signal");
+
if (u->sink) {
- pa_sink_get_volume(u->sink);
- pa_sink_get_mute(u->sink);
+ pa_sink_get_volume(u->sink, TRUE);
+ pa_sink_get_mute(u->sink, TRUE);
}
if (u->source)
- pa_source_get_volume(u->source);
-}
-
-static int pa_solaris_auto_format(int fd, int mode, pa_sample_spec *ss) {
- audio_info_t info;
-
- AUDIO_INITINFO(&info);
-
- if (mode != O_RDONLY) {
- info.play.sample_rate = ss->rate;
- info.play.channels = ss->channels;
- switch (ss->format) {
- case PA_SAMPLE_U8:
- info.play.precision = 8;
- info.play.encoding = AUDIO_ENCODING_LINEAR;
- break;
- case PA_SAMPLE_ALAW:
- info.play.precision = 8;
- info.play.encoding = AUDIO_ENCODING_ALAW;
- break;
- case PA_SAMPLE_ULAW:
- info.play.precision = 8;
- info.play.encoding = AUDIO_ENCODING_ULAW;
- break;
- case PA_SAMPLE_S16NE:
- info.play.precision = 16;
- info.play.encoding = AUDIO_ENCODING_LINEAR;
- break;
- default:
- return -1;
- }
- }
-
- if (mode != O_WRONLY) {
- info.record.sample_rate = ss->rate;
- info.record.channels = ss->channels;
- switch (ss->format) {
- case PA_SAMPLE_U8:
- info.record.precision = 8;
- info.record.encoding = AUDIO_ENCODING_LINEAR;
- break;
- case PA_SAMPLE_ALAW:
- info.record.precision = 8;
- info.record.encoding = AUDIO_ENCODING_ALAW;
- break;
- case PA_SAMPLE_ULAW:
- info.record.precision = 8;
- info.record.encoding = AUDIO_ENCODING_ULAW;
- break;
- case PA_SAMPLE_S16NE:
- info.record.precision = 16;
- info.record.encoding = AUDIO_ENCODING_LINEAR;
- break;
- default:
- return -1;
- }
- }
-
- if (ioctl(fd, AUDIO_SETINFO, &info) < 0) {
- if (errno == EINVAL)
- pa_log("AUDIO_SETINFO: Unsupported sample format.");
- else
- pa_log("AUDIO_SETINFO: %s", pa_cstrerror(errno));
- return -1;
- }
-
- return 0;
-}
-
-static int pa_solaris_set_buffer(int fd, int buffer_size) {
- audio_info_t info;
-
- AUDIO_INITINFO(&info);
-
- info.play.buffer_size = buffer_size;
- info.record.buffer_size = buffer_size;
-
- if (ioctl(fd, AUDIO_SETINFO, &info) < 0) {
- if (errno == EINVAL)
- pa_log("AUDIO_SETINFO: Unsupported buffer size.");
- else
- pa_log("AUDIO_SETINFO: %s", pa_cstrerror(errno));
- return -1;
- }
-
- return 0;
+ pa_source_get_volume(u->source, TRUE);
}
int pa__init(pa_module *m) {
struct userdata *u = NULL;
- const char *p;
- int fd = -1;
- int buffer_size;
- int mode;
- int record = 1, playback = 1;
+ pa_bool_t record = TRUE, playback = TRUE;
pa_sample_spec ss;
pa_channel_map map;
pa_modargs *ma = NULL;
- char *t;
- struct pollfd *pollfd;
+ int fd;
+ pa_sink_new_data sink_new_data;
+ pa_source_new_data source_new_data;
+ char const *name;
+ char *name_buf;
+ pa_bool_t namereg_fail;
pa_assert(m);
@@ -575,7 +812,7 @@ int pa__init(pa_module *m) {
}
if (pa_modargs_get_value_boolean(ma, "record", &record) < 0 || pa_modargs_get_value_boolean(ma, "playback", &playback) < 0) {
- pa_log("record= and playback= expect numeric argument.");
+ pa_log("record= and playback= expect a boolean argument.");
goto fail;
}
@@ -584,97 +821,133 @@ int pa__init(pa_module *m) {
goto fail;
}
- mode = (playback&&record) ? O_RDWR : (playback ? O_WRONLY : (record ? O_RDONLY : 0));
+ u = pa_xnew0(struct userdata, 1);
+ u->sample_counter_lock = pa_mutex_new(FALSE, FALSE);
+ u->written_bytes_lock = pa_mutex_new(FALSE, FALSE);
- buffer_size = 16384;
- if (pa_modargs_get_value_s32(ma, "buffer_size", &buffer_size) < 0) {
- pa_log("failed to parse buffer size argument");
- goto fail;
- }
+ /*
+ * For a process (or several processes) to use the same audio device for both
+ * record and playback at the same time, the device's mixer must be enabled.
+ * See mixerctl(1). It may be turned off for playback only or record only.
+ */
+ u->mode = (playback && record) ? O_RDWR : (playback ? O_WRONLY : (record ? O_RDONLY : 0));
ss = m->core->default_sample_spec;
if (pa_modargs_get_sample_spec_and_channel_map(ma, &ss, &map, PA_CHANNEL_MAP_DEFAULT) < 0) {
pa_log("failed to parse sample specification");
goto fail;
}
+ u->frame_size = pa_frame_size(&ss);
- if ((fd = open(p = pa_modargs_get_value(ma, "device", DEFAULT_DEVICE), mode | O_NONBLOCK)) < 0)
+ u->buffer_size = 16384;
+ if (pa_modargs_get_value_s32(ma, "buffer_size", &u->buffer_size) < 0) {
+ pa_log("failed to parse buffer size argument");
goto fail;
-
- pa_log_info("device opened in %s mode.", mode == O_WRONLY ? "O_WRONLY" : (mode == O_RDONLY ? "O_RDONLY" : "O_RDWR"));
-
- if (pa_solaris_auto_format(fd, mode, &ss) < 0)
+ }
+ u->buffer_size -= u->buffer_size % u->frame_size;
+ if (u->buffer_size < (int32_t)MIN_BUFFER_SIZE) {
+ pa_log("supplied buffer size argument is too small");
goto fail;
+ }
+
+ u->device_name = pa_xstrdup(pa_modargs_get_value(ma, "device", DEFAULT_DEVICE));
- if (pa_solaris_set_buffer(fd, buffer_size) < 0)
+ if ((fd = open_audio_device(u, &ss)) < 0)
goto fail;
- u = pa_xmalloc(sizeof(struct userdata));
u->core = m->core;
-
- u->fd = fd;
-
- pa_memchunk_reset(&u->memchunk);
-
- /* We use this to get a reasonable chunk size */
- u->page_size = PA_PAGE_SIZE;
-
- u->frame_size = pa_frame_size(&ss);
- u->buffer_size = buffer_size;
-
- u->written_bytes = 0;
- u->read_bytes = 0;
-
u->module = m;
m->userdata = u;
- pa_thread_mq_init(&u->thread_mq, m->core->mainloop);
+ pa_memchunk_reset(&u->memchunk);
u->rtpoll = pa_rtpoll_new();
- pa_rtpoll_item_new_asyncmsgq(u->rtpoll, PA_RTPOLL_EARLY, u->thread_mq.inq);
+ pa_thread_mq_init(&u->thread_mq, m->core->mainloop, u->rtpoll);
- pa_rtpoll_set_timer_periodic(u->rtpoll, pa_bytes_to_usec(u->buffer_size / 10, &ss));
+ u->rtpoll_item = NULL;
+ build_pollfd(u);
- u->rtpoll_item = pa_rtpoll_item_new(u->rtpoll, PA_RTPOLL_NEVER, 1);
- pollfd = pa_rtpoll_item_get_pollfd(u->rtpoll_item, NULL);
- pollfd->fd = fd;
- pollfd->events = 0;
- pollfd->revents = 0;
+ if (u->mode != O_WRONLY) {
+ name_buf = NULL;
+ namereg_fail = TRUE;
- if (mode != O_WRONLY) {
- u->source = pa_source_new(m->core, __FILE__, pa_modargs_get_value(ma, "source_name", DEFAULT_SOURCE_NAME), 0, &ss, &map);
- pa_assert(u->source);
+ if (!(name = pa_modargs_get_value(ma, "source_name", NULL))) {
+ name = name_buf = pa_sprintf_malloc("solaris_input.%s", pa_path_get_filename(u->device_name));
+ namereg_fail = FALSE;
+ }
+
+ pa_source_new_data_init(&source_new_data);
+ source_new_data.driver = __FILE__;
+ source_new_data.module = m;
+ pa_source_new_data_set_name(&source_new_data, name);
+ source_new_data.namereg_fail = namereg_fail;
+ pa_source_new_data_set_sample_spec(&source_new_data, &ss);
+ pa_source_new_data_set_channel_map(&source_new_data, &map);
+ pa_proplist_sets(source_new_data.proplist, PA_PROP_DEVICE_STRING, u->device_name);
+ pa_proplist_sets(source_new_data.proplist, PA_PROP_DEVICE_API, "solaris");
+ pa_proplist_setf(source_new_data.proplist, PA_PROP_DEVICE_DESCRIPTION, "Solaris PCM source");
+ pa_proplist_sets(source_new_data.proplist, PA_PROP_DEVICE_ACCESS_MODE, "serial");
+ pa_proplist_setf(source_new_data.proplist, PA_PROP_DEVICE_BUFFERING_BUFFER_SIZE, "%lu", (unsigned long) u->buffer_size);
+
+ u->source = pa_source_new(m->core, &source_new_data, PA_SOURCE_HARDWARE|PA_SOURCE_LATENCY|PA_SOURCE_HW_VOLUME_CTRL);
+ pa_source_new_data_done(&source_new_data);
+ pa_xfree(name_buf);
+
+ if (!u->source) {
+ pa_log("Failed to create source object");
+ goto fail;
+ }
u->source->userdata = u;
u->source->parent.process_msg = source_process_msg;
- pa_source_set_module(u->source, m);
- pa_source_set_description(u->source, t = pa_sprintf_malloc("Solaris PCM on '%s'", p));
- pa_xfree(t);
pa_source_set_asyncmsgq(u->source, u->thread_mq.inq);
pa_source_set_rtpoll(u->source, u->rtpoll);
- u->source->flags = PA_SOURCE_HARDWARE|PA_SOURCE_LATENCY|PA_SOURCE_HW_VOLUME_CTRL;
- u->source->refresh_volume = 1;
+ u->source->get_volume = source_get_volume;
+ u->source->set_volume = source_set_volume;
+ u->source->refresh_volume = TRUE;
} else
u->source = NULL;
- if (mode != O_RDONLY) {
- u->sink = pa_sink_new(m->core, __FILE__, pa_modargs_get_value(ma, "sink_name", DEFAULT_SINK_NAME), 0, &ss, &map);
- pa_assert(u->sink);
+ if (u->mode != O_RDONLY) {
+ name_buf = NULL;
+ namereg_fail = TRUE;
+ if (!(name = pa_modargs_get_value(ma, "sink_name", NULL))) {
+ name = name_buf = pa_sprintf_malloc("solaris_output.%s", pa_path_get_filename(u->device_name));
+ namereg_fail = FALSE;
+ }
+
+ pa_sink_new_data_init(&sink_new_data);
+ sink_new_data.driver = __FILE__;
+ sink_new_data.module = m;
+ pa_sink_new_data_set_name(&sink_new_data, name);
+ sink_new_data.namereg_fail = namereg_fail;
+ pa_sink_new_data_set_sample_spec(&sink_new_data, &ss);
+ pa_sink_new_data_set_channel_map(&sink_new_data, &map);
+ pa_proplist_sets(sink_new_data.proplist, PA_PROP_DEVICE_STRING, u->device_name);
+ pa_proplist_sets(sink_new_data.proplist, PA_PROP_DEVICE_API, "solaris");
+ pa_proplist_setf(sink_new_data.proplist, PA_PROP_DEVICE_DESCRIPTION, "Solaris PCM sink");
+ pa_proplist_sets(sink_new_data.proplist, PA_PROP_DEVICE_ACCESS_MODE, "serial");
+
+ u->sink = pa_sink_new(m->core, &sink_new_data, PA_SINK_HARDWARE|PA_SINK_LATENCY|PA_SINK_HW_VOLUME_CTRL|PA_SINK_HW_MUTE_CTRL);
+ pa_sink_new_data_done(&sink_new_data);
+ pa_assert(u->sink);
u->sink->userdata = u;
u->sink->parent.process_msg = sink_process_msg;
- pa_sink_set_module(u->sink, m);
- pa_sink_set_description(u->sink, t = pa_sprintf_malloc("Solaris PCM on '%s'", p));
- pa_xfree(t);
pa_sink_set_asyncmsgq(u->sink, u->thread_mq.inq);
pa_sink_set_rtpoll(u->sink, u->rtpoll);
- u->sink->flags = PA_SINK_HARDWARE|PA_SINK_LATENCY|PA_SINK_HW_VOLUME_CTRL;
- u->sink->refresh_volume = 1;
- u->sink->refresh_mute = 1;
+ u->sink->get_volume = sink_get_volume;
+ u->sink->set_volume = sink_set_volume;
+ u->sink->get_mute = sink_get_mute;
+ u->sink->set_mute = sink_set_mute;
+ u->sink->refresh_volume = u->sink->refresh_muted = TRUE;
+
+ u->sink->thread_info.max_request = u->buffer_size;
+ u->min_request = pa_usec_to_bytes(PA_USEC_PER_SEC / MAX_RENDER_HZ, &ss);
} else
u->sink = NULL;
@@ -690,17 +963,28 @@ int pa__init(pa_module *m) {
}
/* Read mixer settings */
- if (u->source)
- pa_asyncmsgq_send(u->thread_mq.inq, PA_MSGOBJECT(u->source), PA_SOURCE_MESSAGE_GET_VOLUME, &u->source->volume, 0, NULL);
if (u->sink) {
- pa_asyncmsgq_send(u->thread_mq.inq, PA_MSGOBJECT(u->sink), PA_SINK_MESSAGE_GET_VOLUME, &u->sink->volume, 0, NULL);
- pa_asyncmsgq_send(u->thread_mq.inq, PA_MSGOBJECT(u->sink), PA_SINK_MESSAGE_GET_MUTE, &u->sink->muted, 0, NULL);
- }
+ if (sink_new_data.volume_is_set)
+ u->sink->set_volume(u->sink);
+ else
+ u->sink->get_volume(u->sink);
+
+ if (sink_new_data.muted_is_set)
+ u->sink->set_mute(u->sink);
+ else
+ u->sink->get_mute(u->sink);
- if (u->sink)
pa_sink_put(u->sink);
- if (u->source)
+ }
+
+ if (u->source) {
+ if (source_new_data.volume_is_set)
+ u->source->set_volume(u->source);
+ else
+ u->source->get_volume(u->source);
+
pa_source_put(u->source);
+ }
pa_modargs_free(ma);
@@ -748,7 +1032,7 @@ void pa__done(pa_module *m) {
if (u->source)
pa_source_unref(u->source);
- if (u->memchunk.memblock)
+ if (u->memchunk.memblock)
pa_memblock_unref(u->memchunk.memblock);
if (u->rtpoll_item)
@@ -760,5 +1044,10 @@ void pa__done(pa_module *m) {
if (u->fd >= 0)
close(u->fd);
+ pa_mutex_free(u->written_bytes_lock);
+ pa_mutex_free(u->sample_counter_lock);
+
+ pa_xfree(u->device_name);
+
pa_xfree(u);
}
diff --git a/src/modules/module-stream-restore.c b/src/modules/module-stream-restore.c
index d935caf6..723b5d73 100644
--- a/src/modules/module-stream-restore.c
+++ b/src/modules/module-stream-restore.c
@@ -5,7 +5,7 @@
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 of the License,
+ 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
diff --git a/src/modules/module-suspend-on-idle.c b/src/modules/module-suspend-on-idle.c
index a5a3571c..7e17f8f7 100644
--- a/src/modules/module-suspend-on-idle.c
+++ b/src/modules/module-suspend-on-idle.c
@@ -5,7 +5,7 @@
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 of the License,
+ 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
@@ -149,7 +149,12 @@ static pa_hook_result_t source_output_fixate_hook_cb(pa_core *c, pa_source_outpu
pa_assert(data);
pa_assert(u);
- if ((d = pa_hashmap_get(u->device_infos, data->source)))
+ if (data->source->monitor_of)
+ d = pa_hashmap_get(u->device_infos, data->source->monitor_of);
+ else
+ d = pa_hashmap_get(u->device_infos, data->source);
+
+ if (d)
resume(d);
return PA_HOOK_OK;
@@ -173,6 +178,8 @@ static pa_hook_result_t sink_input_unlink_hook_cb(pa_core *c, pa_sink_input *s,
}
static pa_hook_result_t source_output_unlink_hook_cb(pa_core *c, pa_source_output *s, struct userdata *u) {
+ struct device_info *d = NULL;
+
pa_assert(c);
pa_source_output_assert_ref(s);
pa_assert(u);
@@ -180,12 +187,17 @@ static pa_hook_result_t source_output_unlink_hook_cb(pa_core *c, pa_source_outpu
if (!s->source)
return PA_HOOK_OK;
- if (pa_source_check_suspend(s->source) <= 0) {
- struct device_info *d;
- if ((d = pa_hashmap_get(u->device_infos, s->source)))
- restart(d);
+ if (s->source->monitor_of) {
+ if (pa_sink_check_suspend(s->source->monitor_of) <= 0)
+ d = pa_hashmap_get(u->device_infos, s->source->monitor_of);
+ } else {
+ if (pa_source_check_suspend(s->source) <= 0)
+ d = pa_hashmap_get(u->device_infos, s->source);
}
+ if (d)
+ restart(d);
+
return PA_HOOK_OK;
}
@@ -217,15 +229,22 @@ static pa_hook_result_t sink_input_move_finish_hook_cb(pa_core *c, pa_sink_input
}
static pa_hook_result_t source_output_move_start_hook_cb(pa_core *c, pa_source_output *s, struct userdata *u) {
- struct device_info *d;
+ struct device_info *d = NULL;
pa_assert(c);
pa_source_output_assert_ref(s);
pa_assert(u);
- if (pa_source_check_suspend(s->source) <= 1)
- if ((d = pa_hashmap_get(u->device_infos, s->source)))
- restart(d);
+ if (s->source->monitor_of) {
+ if (pa_sink_check_suspend(s->source->monitor_of) <= 1)
+ d = pa_hashmap_get(u->device_infos, s->source->monitor_of);
+ } else {
+ if (pa_source_check_suspend(s->source) <= 1)
+ d = pa_hashmap_get(u->device_infos, s->source);
+ }
+
+ if (d)
+ restart(d);
return PA_HOOK_OK;
}
@@ -237,7 +256,12 @@ static pa_hook_result_t source_output_move_finish_hook_cb(pa_core *c, pa_source_
pa_source_output_assert_ref(s);
pa_assert(u);
- if ((d = pa_hashmap_get(u->device_infos, s->source)))
+ if (s->source->monitor_of)
+ d = pa_hashmap_get(u->device_infos, s->source->monitor_of);
+ else
+ d = pa_hashmap_get(u->device_infos, s->source);
+
+ if (d)
resume(d);
return PA_HOOK_OK;
@@ -259,16 +283,25 @@ static pa_hook_result_t sink_input_state_changed_hook_cb(pa_core *c, pa_sink_inp
}
static pa_hook_result_t source_output_state_changed_hook_cb(pa_core *c, pa_source_output *s, struct userdata *u) {
- struct device_info *d;
pa_source_output_state_t state;
+
pa_assert(c);
pa_source_output_assert_ref(s);
pa_assert(u);
state = pa_source_output_get_state(s);
- if (state == PA_SOURCE_OUTPUT_RUNNING)
- if ((d = pa_hashmap_get(u->device_infos, s->source)))
+
+ if (state == PA_SOURCE_OUTPUT_RUNNING) {
+ struct device_info *d;
+
+ if (s->source->monitor_of)
+ d = pa_hashmap_get(u->device_infos, s->source->monitor_of);
+ else
+ d = pa_hashmap_get(u->device_infos, s->source);
+
+ if (d)
resume(d);
+ }
return PA_HOOK_OK;
}
@@ -285,6 +318,10 @@ static pa_hook_result_t device_new_hook_cb(pa_core *c, pa_object *o, struct user
source = pa_source_isinstance(o) ? PA_SOURCE(o) : NULL;
sink = pa_sink_isinstance(o) ? PA_SINK(o) : NULL;
+ /* Never suspend monitors */
+ if (source && source->monitor_of)
+ return PA_HOOK_OK;
+
pa_assert(source || sink);
d = pa_xnew(struct device_info, 1);
diff --git a/src/modules/module-tunnel.c b/src/modules/module-tunnel.c
index 63ae740a..c1488841 100644
--- a/src/modules/module-tunnel.c
+++ b/src/modules/module-tunnel.c
@@ -6,7 +6,7 @@
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 of the License,
+ 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
diff --git a/src/modules/module-volume-restore.c b/src/modules/module-volume-restore.c
index 21c71491..61858afa 100644
--- a/src/modules/module-volume-restore.c
+++ b/src/modules/module-volume-restore.c
@@ -5,7 +5,7 @@
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 of the License,
+ 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
diff --git a/src/modules/module-waveout.c b/src/modules/module-waveout.c
index b452c3bf..2d35828d 100644
--- a/src/modules/module-waveout.c
+++ b/src/modules/module-waveout.c
@@ -6,7 +6,7 @@
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 of the License,
+ 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
diff --git a/src/modules/module-x11-bell.c b/src/modules/module-x11-bell.c
index bef02536..ac303c3b 100644
--- a/src/modules/module-x11-bell.c
+++ b/src/modules/module-x11-bell.c
@@ -5,7 +5,7 @@
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 of the License,
+ 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
diff --git a/src/modules/module-x11-cork-request.c b/src/modules/module-x11-cork-request.c
index 0c9aedf4..c1380c27 100644
--- a/src/modules/module-x11-cork-request.c
+++ b/src/modules/module-x11-cork-request.c
@@ -5,7 +5,7 @@
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 of the License,
+ 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
diff --git a/src/modules/module-x11-publish.c b/src/modules/module-x11-publish.c
index fb27eba2..7d71067b 100644
--- a/src/modules/module-x11-publish.c
+++ b/src/modules/module-x11-publish.c
@@ -5,7 +5,7 @@
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 of the License,
+ 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
diff --git a/src/modules/module-x11-xsmp.c b/src/modules/module-x11-xsmp.c
index 5fc8047d..28fd373a 100644
--- a/src/modules/module-x11-xsmp.c
+++ b/src/modules/module-x11-xsmp.c
@@ -5,7 +5,7 @@
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 of the License,
+ 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
diff --git a/src/modules/module-zeroconf-discover.c b/src/modules/module-zeroconf-discover.c
index 5123ead8..3da946e0 100644
--- a/src/modules/module-zeroconf-discover.c
+++ b/src/modules/module-zeroconf-discover.c
@@ -5,7 +5,7 @@
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 of the
+ 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
diff --git a/src/modules/module-zeroconf-publish.c b/src/modules/module-zeroconf-publish.c
index 985564f4..692ffe91 100644
--- a/src/modules/module-zeroconf-publish.c
+++ b/src/modules/module-zeroconf-publish.c
@@ -5,7 +5,7 @@
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 of the
+ 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
diff --git a/src/modules/oss/module-oss.c b/src/modules/oss/module-oss.c
index 54d1679f..7bce8d00 100644
--- a/src/modules/oss/module-oss.c
+++ b/src/modules/oss/module-oss.c
@@ -6,7 +6,7 @@
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 of the License,
+ 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
diff --git a/src/modules/oss/oss-util.c b/src/modules/oss/oss-util.c
index f04b875d..5a109ae9 100644
--- a/src/modules/oss/oss-util.c
+++ b/src/modules/oss/oss-util.c
@@ -6,7 +6,7 @@
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 of the License,
+ 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
diff --git a/src/modules/oss/oss-util.h b/src/modules/oss/oss-util.h
index 654f7bba..845b0c8f 100644
--- a/src/modules/oss/oss-util.h
+++ b/src/modules/oss/oss-util.h
@@ -9,7 +9,7 @@
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 of the License,
+ 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
diff --git a/src/modules/raop/base64.c b/src/modules/raop/base64.c
index 059c7028..e1cbed02 100644
--- a/src/modules/raop/base64.c
+++ b/src/modules/raop/base64.c
@@ -5,7 +5,7 @@
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 of the License,
+ 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
diff --git a/src/modules/raop/base64.h b/src/modules/raop/base64.h
index dac0e707..7a973b68 100644
--- a/src/modules/raop/base64.h
+++ b/src/modules/raop/base64.h
@@ -9,7 +9,7 @@
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 of the License,
+ 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
diff --git a/src/modules/raop/raop_client.c b/src/modules/raop/raop_client.c
index 4627545e..b3f243c3 100644
--- a/src/modules/raop/raop_client.c
+++ b/src/modules/raop/raop_client.c
@@ -5,7 +5,7 @@
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 of the License,
+ 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
@@ -51,7 +51,12 @@
#include <pulsecore/macro.h>
#include <pulsecore/strbuf.h>
#include <pulsecore/random.h>
+
+#ifdef HAVE_POLL_H
+#include <poll.h>
+#else
#include <pulsecore/poll.h>
+#endif
#include "raop_client.h"
#include "rtsp_client.h"
@@ -339,9 +344,13 @@ static void rtsp_cb(pa_rtsp_client *rtsp, pa_rtsp_state state, pa_headerlist* he
break;
case STATE_TEARDOWN:
+ pa_log_debug("RAOP: TEARDOWN");
+ break;
+
case STATE_SET_PARAMETER:
pa_log_debug("RAOP: SET_PARAMETER");
break;
+
case STATE_DISCONNECTED:
pa_assert(c->closed_callback);
pa_assert(c->rtsp);
diff --git a/src/modules/raop/raop_client.h b/src/modules/raop/raop_client.h
index ec3136a7..5ad3e3fa 100644
--- a/src/modules/raop/raop_client.h
+++ b/src/modules/raop/raop_client.h
@@ -8,7 +8,7 @@
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 of the License,
+ 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
diff --git a/src/modules/reserve-wrap.c b/src/modules/reserve-wrap.c
index 709cb060..7d339270 100644
--- a/src/modules/reserve-wrap.c
+++ b/src/modules/reserve-wrap.c
@@ -5,7 +5,7 @@
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 of the License,
+ 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
diff --git a/src/modules/reserve-wrap.h b/src/modules/reserve-wrap.h
index 4625fe68..2b97c91c 100644
--- a/src/modules/reserve-wrap.h
+++ b/src/modules/reserve-wrap.h
@@ -8,7 +8,7 @@
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 of the License,
+ 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
diff --git a/src/modules/reserve.h b/src/modules/reserve.h
index ceb1ad11..b315a08c 100644
--- a/src/modules/reserve.h
+++ b/src/modules/reserve.h
@@ -31,10 +31,11 @@
typedef struct rd_device rd_device;
/* Prototype for a function that is called whenever someone else wants
- * your app to release the device you having locked. A return value <=
- * 0 denies the request, a positive return value agrees to it. Before
- * returning your application should close the device in question
- * completely to make sure the new application may acceess it. */
+ * your application to release the device it has locked. A return
+ * value <= 0 denies the request, a positive return value agrees to
+ * it. Before returning your application should close the device in
+ * question completely to make sure the new application may access
+ * it. */
typedef int (*rd_request_cb_t)(
rd_device *d,
int forced); /* Non-zero if an application forcibly took the lock away without asking. If this is the case then the return value of this call is ignored. */
@@ -48,20 +49,20 @@ int rd_acquire(
const char *device_name, /* The device to lock, e.g. "Audio0" */
const char *application_name, /* A human readable name of the application, e.g. "PulseAudio Sound Server" */
int32_t priority, /* The priority for this application. If unsure use 0 */
- rd_request_cb_t request_cb, /* Will be called whenever someone asks that this device shall be released. May be NULL if priority is INT32_MAX */
+ rd_request_cb_t request_cb, /* Will be called whenever someone requests that this device shall be released. May be NULL if priority is INT32_MAX */
DBusError *error); /* If we fail due to a D-Bus related issue the error will be filled in here. May be NULL. */
-/* Unlock (if needed) and destroy a rd_device object again */
+/* Unlock (if needed) and destroy an rd_device object again */
void rd_release(rd_device *d);
-/* Set the application device name for a rd_device object Returns 0 on
- * success, a negative errno style return value on error. */
+/* Set the application device name for an rd_device object. Returns 0
+ * on success, a negative errno style return value on error. */
int rd_set_application_device_name(rd_device *d, const char *name);
-/* Attach a userdata pointer to a rd_device */
+/* Attach a userdata pointer to an rd_device */
void rd_set_userdata(rd_device *d, void *userdata);
-/* Query the userdata pointer from a rd_device. Returns NULL if no
+/* Query the userdata pointer from an rd_device. Returns NULL if no
* userdata was set. */
void* rd_get_userdata(rd_device *d);
diff --git a/src/modules/rtp/module-rtp-recv.c b/src/modules/rtp/module-rtp-recv.c
index 0d86459e..33e23af2 100644
--- a/src/modules/rtp/module-rtp-recv.c
+++ b/src/modules/rtp/module-rtp-recv.c
@@ -6,7 +6,7 @@
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 of the License,
+ 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
diff --git a/src/modules/rtp/module-rtp-send.c b/src/modules/rtp/module-rtp-send.c
index fef745a1..722d12bd 100644
--- a/src/modules/rtp/module-rtp-send.c
+++ b/src/modules/rtp/module-rtp-send.c
@@ -5,7 +5,7 @@
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 of the License,
+ 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
diff --git a/src/modules/rtp/rtp.c b/src/modules/rtp/rtp.c
index c09c321f..7537c1f5 100644
--- a/src/modules/rtp/rtp.c
+++ b/src/modules/rtp/rtp.c
@@ -5,7 +5,7 @@
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 of the License,
+ 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
diff --git a/src/modules/rtp/rtp.h b/src/modules/rtp/rtp.h
index a2728f05..eff5e75b 100644
--- a/src/modules/rtp/rtp.h
+++ b/src/modules/rtp/rtp.h
@@ -8,7 +8,7 @@
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 of the License,
+ 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
diff --git a/src/modules/rtp/rtsp_client.c b/src/modules/rtp/rtsp_client.c
index 9eb3d964..98db05dd 100644
--- a/src/modules/rtp/rtsp_client.c
+++ b/src/modules/rtp/rtsp_client.c
@@ -5,7 +5,7 @@
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 of the License,
+ 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
@@ -43,9 +43,14 @@
#include <pulsecore/log.h>
#include <pulsecore/macro.h>
#include <pulsecore/strbuf.h>
-#include <pulsecore/poll.h>
#include <pulsecore/ioline.h>
+#ifdef HAVE_POLL_H
+#include <poll.h>
+#else
+#include <pulsecore/poll.h>
+#endif
+
#include "rtsp_client.h"
struct pa_rtsp_client {
@@ -101,26 +106,27 @@ pa_rtsp_client* pa_rtsp_client_new(pa_mainloop_api *mainloop, const char* hostna
void pa_rtsp_client_free(pa_rtsp_client* c) {
- if (c) {
- if (c->sc)
- pa_socket_client_unref(c->sc);
- if (c->ioline)
- pa_ioline_close(c->ioline);
- else if (c->io)
- pa_iochannel_free(c->io);
-
- pa_xfree(c->hostname);
- pa_xfree(c->url);
- pa_xfree(c->localip);
- pa_xfree(c->session);
- pa_xfree(c->transport);
- pa_xfree(c->last_header);
- if (c->header_buffer)
- pa_strbuf_free(c->header_buffer);
- if (c->response_headers)
- pa_headerlist_free(c->response_headers);
- pa_headerlist_free(c->headers);
- }
+ pa_assert(c);
+
+ if (c->sc)
+ pa_socket_client_unref(c->sc);
+ if (c->ioline)
+ pa_ioline_close(c->ioline);
+ else if (c->io)
+ pa_iochannel_free(c->io);
+
+ pa_xfree(c->hostname);
+ pa_xfree(c->url);
+ pa_xfree(c->localip);
+ pa_xfree(c->session);
+ pa_xfree(c->transport);
+ pa_xfree(c->last_header);
+ if (c->header_buffer)
+ pa_strbuf_free(c->header_buffer);
+ if (c->response_headers)
+ pa_headerlist_free(c->response_headers);
+ pa_headerlist_free(c->headers);
+
pa_xfree(c);
}
@@ -141,8 +147,6 @@ static void headers_read(pa_rtsp_client *c) {
c->transport = pa_xstrdup(pa_headerlist_gets(c->response_headers, "Transport"));
if (!c->session || !c->transport) {
- pa_headerlist_free(c->response_headers);
- c->response_headers = NULL;
pa_log("Invalid SETUP response.");
return;
}
@@ -160,8 +164,6 @@ static void headers_read(pa_rtsp_client *c) {
}
if (0 == c->rtp_port) {
/* Error no server_port in response */
- pa_headerlist_free(c->response_headers);
- c->response_headers = NULL;
pa_log("Invalid SETUP response (no port number).");
return;
}
@@ -169,9 +171,6 @@ static void headers_read(pa_rtsp_client *c) {
/* Call our callback */
c->callback(c, c->state, c->response_headers, c->userdata);
-
- pa_headerlist_free(c->response_headers);
- c->response_headers = NULL;
}
@@ -201,7 +200,8 @@ static void line_callback(pa_ioline *line, const char *s, void *userdata) {
}
if (c->waiting && 0 == strcmp("RTSP/1.0 200 OK", s2)) {
c->waiting = 0;
- pa_assert(!c->response_headers);
+ if (c->response_headers)
+ pa_headerlist_free(c->response_headers);
c->response_headers = pa_headerlist_new();
goto exit;
}
@@ -353,9 +353,12 @@ void pa_rtsp_set_callback(pa_rtsp_client *c, pa_rtsp_cb_t callback, void *userda
void pa_rtsp_disconnect(pa_rtsp_client *c) {
pa_assert(c);
- if (c->io)
+ if (c->ioline)
+ pa_ioline_close(c->ioline);
+ else if (c->io)
pa_iochannel_free(c->io);
c->io = NULL;
+ c->ioline = NULL;
}
diff --git a/src/modules/rtp/rtsp_client.h b/src/modules/rtp/rtsp_client.h
index 88fb3839..b229f261 100644
--- a/src/modules/rtp/rtsp_client.h
+++ b/src/modules/rtp/rtsp_client.h
@@ -8,7 +8,7 @@
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 of the License,
+ 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
diff --git a/src/modules/rtp/sap.c b/src/modules/rtp/sap.c
index b5d9df62..adde16df 100644
--- a/src/modules/rtp/sap.c
+++ b/src/modules/rtp/sap.c
@@ -5,7 +5,7 @@
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 of the License,
+ 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
diff --git a/src/modules/rtp/sap.h b/src/modules/rtp/sap.h
index 69c757cb..ae4ad426 100644
--- a/src/modules/rtp/sap.h
+++ b/src/modules/rtp/sap.h
@@ -8,7 +8,7 @@
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 of the License,
+ 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
diff --git a/src/modules/rtp/sdp.c b/src/modules/rtp/sdp.c
index 7c547430..7fc7e38c 100644
--- a/src/modules/rtp/sdp.c
+++ b/src/modules/rtp/sdp.c
@@ -5,7 +5,7 @@
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 of the License,
+ 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
diff --git a/src/modules/rtp/sdp.h b/src/modules/rtp/sdp.h
index 933a602b..4cb3b203 100644
--- a/src/modules/rtp/sdp.h
+++ b/src/modules/rtp/sdp.h
@@ -8,7 +8,7 @@
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 of the License,
+ 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
diff --git a/src/modules/udev-util.c b/src/modules/udev-util.c
index a72bc8f8..8ffb76a8 100644
--- a/src/modules/udev-util.c
+++ b/src/modules/udev-util.c
@@ -5,7 +5,7 @@
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 of the
+ 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
diff --git a/src/modules/udev-util.h b/src/modules/udev-util.h
index 86fbba7f..5120abdd 100644
--- a/src/modules/udev-util.h
+++ b/src/modules/udev-util.h
@@ -8,7 +8,7 @@
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 of the
+ 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
diff --git a/src/pulse/browser.c b/src/pulse/browser.c
index 1a3f657f..4cf5d0c3 100644
--- a/src/pulse/browser.c
+++ b/src/pulse/browser.c
@@ -5,7 +5,7 @@
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 of the
+ 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
diff --git a/src/pulse/browser.h b/src/pulse/browser.h
index 499fae2e..c843e2a2 100644
--- a/src/pulse/browser.h
+++ b/src/pulse/browser.h
@@ -8,7 +8,7 @@
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 of the
+ 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
diff --git a/src/pulse/cdecl.h b/src/pulse/cdecl.h
index 8c5b2d0f..dd0d14f7 100644
--- a/src/pulse/cdecl.h
+++ b/src/pulse/cdecl.h
@@ -8,7 +8,7 @@
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 of the License,
+ 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
diff --git a/src/pulse/channelmap.c b/src/pulse/channelmap.c
index 82e36c00..ce7dadc9 100644
--- a/src/pulse/channelmap.c
+++ b/src/pulse/channelmap.c
@@ -6,7 +6,7 @@
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 of the License,
+ 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
diff --git a/src/pulse/channelmap.h b/src/pulse/channelmap.h
index a6d37d85..eef0ac17 100644
--- a/src/pulse/channelmap.h
+++ b/src/pulse/channelmap.h
@@ -9,7 +9,7 @@
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 of the License,
+ 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
diff --git a/src/pulse/client-conf-x11.c b/src/pulse/client-conf-x11.c
index a8a90fb8..3bec742f 100644
--- a/src/pulse/client-conf-x11.c
+++ b/src/pulse/client-conf-x11.c
@@ -5,7 +5,7 @@
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 of the License,
+ 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
diff --git a/src/pulse/client-conf-x11.h b/src/pulse/client-conf-x11.h
index f2f40e03..dca9f0d2 100644
--- a/src/pulse/client-conf-x11.h
+++ b/src/pulse/client-conf-x11.h
@@ -8,7 +8,7 @@
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 of the License,
+ 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
diff --git a/src/pulse/client-conf.c b/src/pulse/client-conf.c
index 71f8443d..58bc3f90 100644
--- a/src/pulse/client-conf.c
+++ b/src/pulse/client-conf.c
@@ -6,7 +6,7 @@
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 of the License,
+ 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
diff --git a/src/pulse/client-conf.h b/src/pulse/client-conf.h
index 4eac467e..78844a12 100644
--- a/src/pulse/client-conf.h
+++ b/src/pulse/client-conf.h
@@ -8,7 +8,7 @@
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 of the License,
+ 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
diff --git a/src/pulse/context.c b/src/pulse/context.c
index 62fe5356..1284153f 100644
--- a/src/pulse/context.c
+++ b/src/pulse/context.c
@@ -6,7 +6,7 @@
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 of the License,
+ 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
diff --git a/src/pulse/context.h b/src/pulse/context.h
index 2ae4c013..c32cf443 100644
--- a/src/pulse/context.h
+++ b/src/pulse/context.h
@@ -9,7 +9,7 @@
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 of the License,
+ 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
diff --git a/src/pulse/error.c b/src/pulse/error.c
index d37084bb..9551d98e 100644
--- a/src/pulse/error.c
+++ b/src/pulse/error.c
@@ -6,7 +6,7 @@
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 of the License,
+ 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
@@ -68,7 +68,10 @@ const char*pa_strerror(int error) {
pa_init_i18n();
- if (error < 0 || error >= PA_ERR_MAX)
+ if (error < 0)
+ error = -error;
+
+ if (error >= PA_ERR_MAX)
return NULL;
return _(errortab[error]);
diff --git a/src/pulse/error.h b/src/pulse/error.h
index c30b80bd..ea535608 100644
--- a/src/pulse/error.h
+++ b/src/pulse/error.h
@@ -9,7 +9,7 @@
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 of the License,
+ 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
diff --git a/src/pulse/ext-stream-restore.c b/src/pulse/ext-stream-restore.c
index 469c822a..809c6a4c 100644
--- a/src/pulse/ext-stream-restore.c
+++ b/src/pulse/ext-stream-restore.c
@@ -5,7 +5,7 @@
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 of the License,
+ 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
diff --git a/src/pulse/ext-stream-restore.h b/src/pulse/ext-stream-restore.h
index cf9f4ccc..0b5d8eb6 100644
--- a/src/pulse/ext-stream-restore.h
+++ b/src/pulse/ext-stream-restore.h
@@ -8,7 +8,7 @@
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 of the License,
+ 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
diff --git a/src/pulse/gccmacro.h b/src/pulse/gccmacro.h
index 58188ee2..e85ecb66 100644
--- a/src/pulse/gccmacro.h
+++ b/src/pulse/gccmacro.h
@@ -8,7 +8,7 @@
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 of the License,
+ 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
diff --git a/src/pulse/glib-mainloop.c b/src/pulse/glib-mainloop.c
index 5f5dc494..6afb7a2d 100644
--- a/src/pulse/glib-mainloop.c
+++ b/src/pulse/glib-mainloop.c
@@ -5,7 +5,7 @@
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 of the License,
+ 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
diff --git a/src/pulse/glib-mainloop.h b/src/pulse/glib-mainloop.h
index fd68f8ac..189513a8 100644
--- a/src/pulse/glib-mainloop.h
+++ b/src/pulse/glib-mainloop.h
@@ -9,7 +9,7 @@
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 of the License,
+ 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
diff --git a/src/pulse/internal.h b/src/pulse/internal.h
index e533625d..9646d8a6 100644
--- a/src/pulse/internal.h
+++ b/src/pulse/internal.h
@@ -9,7 +9,7 @@
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 of the License,
+ 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
diff --git a/src/pulse/introspect.c b/src/pulse/introspect.c
index befeb242..847ead0d 100644
--- a/src/pulse/introspect.c
+++ b/src/pulse/introspect.c
@@ -6,7 +6,7 @@
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 of the License,
+ 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
@@ -528,7 +528,8 @@ static void context_get_card_info_callback(pa_pdispatch *pd, uint32_t command, u
if (pa_tagstruct_gets(t, &i.profiles[j].name) < 0 ||
pa_tagstruct_gets(t, &i.profiles[j].description) < 0 ||
pa_tagstruct_getu32(t, &i.profiles[j].n_sinks) < 0 ||
- pa_tagstruct_getu32(t, &i.profiles[j].n_sources)< 0) {
+ pa_tagstruct_getu32(t, &i.profiles[j].n_sources) < 0 ||
+ pa_tagstruct_getu32(t, &i.profiles[j].priority) < 0) {
pa_context_fail(o->context, PA_ERR_PROTOCOL);
pa_xfree(i.profiles);
diff --git a/src/pulse/introspect.h b/src/pulse/introspect.h
index aa67e43d..ec8a2c06 100644
--- a/src/pulse/introspect.h
+++ b/src/pulse/introspect.h
@@ -9,7 +9,7 @@
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 of the License,
+ 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
@@ -401,6 +401,7 @@ typedef struct pa_card_profile_info {
const char *description; /**< Description of this profile */
uint32_t n_sinks; /**< Number of sinks this profile would create */
uint32_t n_sources; /**< Number of sources this profile would create */
+ uint32_t priority; /**< The higher this value is the more useful this profile is as a default */
} pa_card_profile_info;
/** Stores information about cards. Please note that this structure
diff --git a/src/pulse/mainloop-signal.c b/src/pulse/mainloop-signal.c
index d09f4b0a..52f11c80 100644
--- a/src/pulse/mainloop-signal.c
+++ b/src/pulse/mainloop-signal.c
@@ -6,7 +6,7 @@
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 of the License,
+ 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
diff --git a/src/pulse/mainloop-signal.h b/src/pulse/mainloop-signal.h
index a9e250bc..fdb1f9db 100644
--- a/src/pulse/mainloop-signal.h
+++ b/src/pulse/mainloop-signal.h
@@ -9,7 +9,7 @@
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 of the License,
+ 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
diff --git a/src/pulse/mainloop.c b/src/pulse/mainloop.c
index 60e5d1ff..225fd098 100644
--- a/src/pulse/mainloop.c
+++ b/src/pulse/mainloop.c
@@ -6,7 +6,7 @@
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 of the License,
+ 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
diff --git a/src/pulse/mainloop.h b/src/pulse/mainloop.h
index 907e94a7..3a03ac9a 100644
--- a/src/pulse/mainloop.h
+++ b/src/pulse/mainloop.h
@@ -9,7 +9,7 @@
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 of the License,
+ 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
diff --git a/src/pulse/operation.c b/src/pulse/operation.c
index aa2bbc05..fe160a3c 100644
--- a/src/pulse/operation.c
+++ b/src/pulse/operation.c
@@ -5,7 +5,7 @@
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 of the License,
+ 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
diff --git a/src/pulse/operation.h b/src/pulse/operation.h
index b68e7816..7b0dabdd 100644
--- a/src/pulse/operation.h
+++ b/src/pulse/operation.h
@@ -8,7 +8,7 @@
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 of the License,
+ 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
diff --git a/src/pulse/sample.c b/src/pulse/sample.c
index 4b13a337..1e67b037 100644
--- a/src/pulse/sample.c
+++ b/src/pulse/sample.c
@@ -6,7 +6,7 @@
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 of the License,
+ 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
diff --git a/src/pulse/sample.h b/src/pulse/sample.h
index 3c05b54a..aef34b6b 100644
--- a/src/pulse/sample.h
+++ b/src/pulse/sample.h
@@ -9,7 +9,7 @@
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 of the License,
+ 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
diff --git a/src/pulse/scache.c b/src/pulse/scache.c
index a7e3cd81..77f60d72 100644
--- a/src/pulse/scache.c
+++ b/src/pulse/scache.c
@@ -5,7 +5,7 @@
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 of the License,
+ 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
diff --git a/src/pulse/scache.h b/src/pulse/scache.h
index 79fcfbc5..cd579d2e 100644
--- a/src/pulse/scache.h
+++ b/src/pulse/scache.h
@@ -9,7 +9,7 @@
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 of the License,
+ 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
diff --git a/src/pulse/simple.c b/src/pulse/simple.c
index 79e39ebb..e70b7b1f 100644
--- a/src/pulse/simple.c
+++ b/src/pulse/simple.c
@@ -6,7 +6,7 @@
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 of the License,
+ 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
diff --git a/src/pulse/simple.h b/src/pulse/simple.h
index 3f57a654..6f1ba414 100644
--- a/src/pulse/simple.h
+++ b/src/pulse/simple.h
@@ -9,7 +9,7 @@
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 of the License,
+ 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
diff --git a/src/pulse/stream.c b/src/pulse/stream.c
index b36bf9b1..2455fe7b 100644
--- a/src/pulse/stream.c
+++ b/src/pulse/stream.c
@@ -6,7 +6,7 @@
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 of the License,
+ 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
diff --git a/src/pulse/stream.h b/src/pulse/stream.h
index 3965e9a2..e80bc65d 100644
--- a/src/pulse/stream.h
+++ b/src/pulse/stream.h
@@ -9,7 +9,7 @@
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 of the License,
+ 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
diff --git a/src/pulse/subscribe.c b/src/pulse/subscribe.c
index e12d1446..203bc928 100644
--- a/src/pulse/subscribe.c
+++ b/src/pulse/subscribe.c
@@ -5,7 +5,7 @@
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 of the License,
+ 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
diff --git a/src/pulse/subscribe.h b/src/pulse/subscribe.h
index 2707cec5..a93510ad 100644
--- a/src/pulse/subscribe.h
+++ b/src/pulse/subscribe.h
@@ -9,7 +9,7 @@
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 of the License,
+ 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
diff --git a/src/pulse/thread-mainloop.c b/src/pulse/thread-mainloop.c
index fb73ff1b..c77cc64e 100644
--- a/src/pulse/thread-mainloop.c
+++ b/src/pulse/thread-mainloop.c
@@ -6,7 +6,7 @@
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 of the License,
+ 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
diff --git a/src/pulse/thread-mainloop.h b/src/pulse/thread-mainloop.h
index f0b1a84b..8eddce4c 100644
--- a/src/pulse/thread-mainloop.h
+++ b/src/pulse/thread-mainloop.h
@@ -9,7 +9,7 @@
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 of the License,
+ 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
diff --git a/src/pulse/volume.c b/src/pulse/volume.c
index 54838e89..c865058d 100644
--- a/src/pulse/volume.c
+++ b/src/pulse/volume.c
@@ -5,7 +5,7 @@
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 of the License,
+ 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
diff --git a/src/pulse/volume.h b/src/pulse/volume.h
index 8bfd0687..c3c396c8 100644
--- a/src/pulse/volume.h
+++ b/src/pulse/volume.h
@@ -9,7 +9,7 @@
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 of the License,
+ 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
diff --git a/src/pulse/xmalloc.c b/src/pulse/xmalloc.c
index c570e40f..e17a354a 100644
--- a/src/pulse/xmalloc.c
+++ b/src/pulse/xmalloc.c
@@ -5,7 +5,7 @@
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 of the License,
+ 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
diff --git a/src/pulse/xmalloc.h b/src/pulse/xmalloc.h
index c30d4df1..db20496f 100644
--- a/src/pulse/xmalloc.h
+++ b/src/pulse/xmalloc.h
@@ -8,7 +8,7 @@
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 of the License,
+ 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
diff --git a/src/pulsecore/atomic.h b/src/pulsecore/atomic.h
index 6e33a0e6..119c445b 100644
--- a/src/pulsecore/atomic.h
+++ b/src/pulsecore/atomic.h
@@ -9,7 +9,7 @@
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 of the
+ 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
diff --git a/src/pulsecore/auth-cookie.c b/src/pulsecore/auth-cookie.c
index 68b01473..2f45eca0 100644
--- a/src/pulsecore/auth-cookie.c
+++ b/src/pulsecore/auth-cookie.c
@@ -5,7 +5,7 @@
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 of the License,
+ 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
diff --git a/src/pulsecore/auth-cookie.h b/src/pulsecore/auth-cookie.h
index c08cbd82..3db40bcd 100644
--- a/src/pulsecore/auth-cookie.h
+++ b/src/pulsecore/auth-cookie.h
@@ -8,7 +8,7 @@
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 of the License,
+ 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
diff --git a/src/pulsecore/avahi-wrap.c b/src/pulsecore/avahi-wrap.c
index d5f40d83..56d9d3dd 100644
--- a/src/pulsecore/avahi-wrap.c
+++ b/src/pulsecore/avahi-wrap.c
@@ -5,7 +5,7 @@
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 of the
+ 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
diff --git a/src/pulsecore/avahi-wrap.h b/src/pulsecore/avahi-wrap.h
index 7d8995bb..5a0c2ef8 100644
--- a/src/pulsecore/avahi-wrap.h
+++ b/src/pulsecore/avahi-wrap.h
@@ -8,7 +8,7 @@
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 of the
+ 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
diff --git a/src/pulsecore/bitset.c b/src/pulsecore/bitset.c
index 4beeb1cc..4b62fc4f 100644
--- a/src/pulsecore/bitset.c
+++ b/src/pulsecore/bitset.c
@@ -5,7 +5,7 @@
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 of the License,
+ 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
diff --git a/src/pulsecore/bitset.h b/src/pulsecore/bitset.h
index 95f5cfce..a86a15e7 100644
--- a/src/pulsecore/bitset.h
+++ b/src/pulsecore/bitset.h
@@ -8,7 +8,7 @@
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 of the License,
+ 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
diff --git a/src/pulsecore/card.c b/src/pulsecore/card.c
index 94064c72..6419c234 100644
--- a/src/pulsecore/card.c
+++ b/src/pulsecore/card.c
@@ -5,7 +5,7 @@
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 of the License,
+ 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
diff --git a/src/pulsecore/card.h b/src/pulsecore/card.h
index b179831e..c80d4e2e 100644
--- a/src/pulsecore/card.h
+++ b/src/pulsecore/card.h
@@ -8,7 +8,7 @@
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 of the License,
+ 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
diff --git a/src/pulsecore/cli-command.c b/src/pulsecore/cli-command.c
index 4ce87d6d..b5f7e7f5 100644
--- a/src/pulsecore/cli-command.c
+++ b/src/pulsecore/cli-command.c
@@ -6,7 +6,7 @@
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 of the License,
+ 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
@@ -32,6 +32,7 @@
#include <ltdl.h>
#include <pulse/xmalloc.h>
+#include <pulse/error.h>
#include <pulsecore/module.h>
#include <pulsecore/sink.h>
@@ -1236,7 +1237,7 @@ static int pa_cli_command_move_source_output(pa_core *c, pa_tokenizer *t, pa_str
static int pa_cli_command_suspend_sink(pa_core *c, pa_tokenizer *t, pa_strbuf *buf, pa_bool_t *fail) {
const char *n, *m;
pa_sink *sink;
- int suspend;
+ int suspend, r;
pa_core_assert_ref(c);
pa_assert(t);
@@ -1263,14 +1264,16 @@ static int pa_cli_command_suspend_sink(pa_core *c, pa_tokenizer *t, pa_strbuf *b
return -1;
}
- pa_sink_suspend(sink, suspend);
+ if ((r = pa_sink_suspend(sink, suspend)) < 0)
+ pa_strbuf_printf(buf, "Failed to resume/suspend sink: %s\n", pa_strerror(r));
+
return 0;
}
static int pa_cli_command_suspend_source(pa_core *c, pa_tokenizer *t, pa_strbuf *buf, pa_bool_t *fail) {
const char *n, *m;
pa_source *source;
- int suspend;
+ int suspend, r;
pa_core_assert_ref(c);
pa_assert(t);
@@ -1297,14 +1300,15 @@ static int pa_cli_command_suspend_source(pa_core *c, pa_tokenizer *t, pa_strbuf
return -1;
}
- pa_source_suspend(source, suspend);
+ if ((r = pa_source_suspend(source, suspend)) < 0)
+ pa_strbuf_printf(buf, "Failed to resume/suspend source: %s\n", pa_strerror(r));
+
return 0;
}
static int pa_cli_command_suspend(pa_core *c, pa_tokenizer *t, pa_strbuf *buf, pa_bool_t *fail) {
const char *m;
- int suspend;
- int ret;
+ int suspend, r;
pa_core_assert_ref(c);
pa_assert(t);
@@ -1321,12 +1325,11 @@ static int pa_cli_command_suspend(pa_core *c, pa_tokenizer *t, pa_strbuf *buf, p
return -1;
}
- ret = - (pa_sink_suspend_all(c, suspend) < 0);
- if (pa_source_suspend_all(c, suspend) < 0)
- ret = -1;
+ if ((r = pa_sink_suspend_all(c, suspend)) < 0)
+ pa_strbuf_printf(buf, "Failed to resume/suspend all sinks: %s\n", pa_strerror(r));
- if (ret < 0)
- pa_strbuf_puts(buf, "Failed to resume/suspend all sinks/sources.\n");
+ if ((r = pa_source_suspend_all(c, suspend)) < 0)
+ pa_strbuf_printf(buf, "Failed to resume/suspend all sources: %s\n", pa_strerror(r));
return 0;
}
diff --git a/src/pulsecore/cli-command.h b/src/pulsecore/cli-command.h
index 9bf35dc3..8c33ec08 100644
--- a/src/pulsecore/cli-command.h
+++ b/src/pulsecore/cli-command.h
@@ -8,7 +8,7 @@
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 of the License,
+ 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
diff --git a/src/pulsecore/cli-text.c b/src/pulsecore/cli-text.c
index 8ca8f2d9..76adc4dd 100644
--- a/src/pulsecore/cli-text.c
+++ b/src/pulsecore/cli-text.c
@@ -5,7 +5,7 @@
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 of the License,
+ 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
diff --git a/src/pulsecore/cli-text.h b/src/pulsecore/cli-text.h
index aad51648..a5dd10e2 100644
--- a/src/pulsecore/cli-text.h
+++ b/src/pulsecore/cli-text.h
@@ -8,7 +8,7 @@
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 of the License,
+ 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
diff --git a/src/pulsecore/cli.c b/src/pulsecore/cli.c
index 25a4f748..a784f583 100644
--- a/src/pulsecore/cli.c
+++ b/src/pulsecore/cli.c
@@ -5,7 +5,7 @@
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 of the License,
+ 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
diff --git a/src/pulsecore/cli.h b/src/pulsecore/cli.h
index d8604611..ebab6c21 100644
--- a/src/pulsecore/cli.h
+++ b/src/pulsecore/cli.h
@@ -8,7 +8,7 @@
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 of the License,
+ 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
diff --git a/src/pulsecore/client.c b/src/pulsecore/client.c
index e6e8b528..c956b101 100644
--- a/src/pulsecore/client.c
+++ b/src/pulsecore/client.c
@@ -6,7 +6,7 @@
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 of the License,
+ 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
diff --git a/src/pulsecore/client.h b/src/pulsecore/client.h
index 845a8bab..18b62dac 100644
--- a/src/pulsecore/client.h
+++ b/src/pulsecore/client.h
@@ -8,7 +8,7 @@
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 of the License,
+ 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
diff --git a/src/pulsecore/conf-parser.c b/src/pulsecore/conf-parser.c
index 1d98f36c..a6eb581c 100644
--- a/src/pulsecore/conf-parser.c
+++ b/src/pulsecore/conf-parser.c
@@ -5,7 +5,7 @@
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 of the License,
+ 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
diff --git a/src/pulsecore/conf-parser.h b/src/pulsecore/conf-parser.h
index f8f059fe..08e17ca7 100644
--- a/src/pulsecore/conf-parser.h
+++ b/src/pulsecore/conf-parser.h
@@ -8,7 +8,7 @@
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 of the License,
+ 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
diff --git a/src/pulsecore/core-error.c b/src/pulsecore/core-error.c
index d9caa946..c4408069 100644
--- a/src/pulsecore/core-error.c
+++ b/src/pulsecore/core-error.c
@@ -6,7 +6,7 @@
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 of the License,
+ 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
diff --git a/src/pulsecore/core-error.h b/src/pulsecore/core-error.h
index b0c306c7..e7bc4fca 100644
--- a/src/pulsecore/core-error.h
+++ b/src/pulsecore/core-error.h
@@ -9,7 +9,7 @@
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 of the License,
+ 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
diff --git a/src/pulsecore/core-scache.c b/src/pulsecore/core-scache.c
index e5489415..34d60a8f 100644
--- a/src/pulsecore/core-scache.c
+++ b/src/pulsecore/core-scache.c
@@ -6,7 +6,7 @@
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 of the License,
+ 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
diff --git a/src/pulsecore/core-scache.h b/src/pulsecore/core-scache.h
index 1fe3c309..fdfc7754 100644
--- a/src/pulsecore/core-scache.h
+++ b/src/pulsecore/core-scache.h
@@ -9,7 +9,7 @@
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 of the License,
+ 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
diff --git a/src/pulsecore/core-subscribe.c b/src/pulsecore/core-subscribe.c
index c70d8adc..54fb7ec2 100644
--- a/src/pulsecore/core-subscribe.c
+++ b/src/pulsecore/core-subscribe.c
@@ -5,7 +5,7 @@
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 of the License,
+ 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
diff --git a/src/pulsecore/core-subscribe.h b/src/pulsecore/core-subscribe.h
index 2f9730d9..dd748d36 100644
--- a/src/pulsecore/core-subscribe.h
+++ b/src/pulsecore/core-subscribe.h
@@ -8,7 +8,7 @@
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 of the License,
+ 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
diff --git a/src/pulsecore/core-util.c b/src/pulsecore/core-util.c
index a184bebd..0d243ee6 100644
--- a/src/pulsecore/core-util.c
+++ b/src/pulsecore/core-util.c
@@ -2505,7 +2505,7 @@ char *pa_machine_id(void) {
char *pa_uname_string(void) {
struct utsname u;
- pa_assert_se(uname(&u) == 0);
+ pa_assert_se(uname(&u) >= 0);
return pa_sprintf_malloc("%s %s %s %s", u.sysname, u.machine, u.release, u.version);
}
diff --git a/src/pulsecore/core.c b/src/pulsecore/core.c
index c064e67e..06573f17 100644
--- a/src/pulsecore/core.c
+++ b/src/pulsecore/core.c
@@ -6,7 +6,7 @@
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 of the License,
+ 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
diff --git a/src/pulsecore/core.h b/src/pulsecore/core.h
index 093fa8f7..c6794445 100644
--- a/src/pulsecore/core.h
+++ b/src/pulsecore/core.h
@@ -8,7 +8,7 @@
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 of the License,
+ 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
diff --git a/src/pulsecore/dllmain.c b/src/pulsecore/dllmain.c
index 269de604..491ec75f 100644
--- a/src/pulsecore/dllmain.c
+++ b/src/pulsecore/dllmain.c
@@ -5,7 +5,7 @@
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 of the License,
+ 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
diff --git a/src/pulsecore/endianmacros.h b/src/pulsecore/endianmacros.h
index eea1c743..22579376 100644
--- a/src/pulsecore/endianmacros.h
+++ b/src/pulsecore/endianmacros.h
@@ -9,7 +9,7 @@
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 of the License,
+ 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
diff --git a/src/pulsecore/esound.h b/src/pulsecore/esound.h
index 79322ae4..abc2355f 100644
--- a/src/pulsecore/esound.h
+++ b/src/pulsecore/esound.h
@@ -8,7 +8,7 @@
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 of the License,
+ 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
diff --git a/src/pulsecore/ffmpeg/resample2.c b/src/pulsecore/ffmpeg/resample2.c
index ed59448a..ac9db73c 100644
--- a/src/pulsecore/ffmpeg/resample2.c
+++ b/src/pulsecore/ffmpeg/resample2.c
@@ -20,7 +20,7 @@
*/
/**
- * @file resample2.c
+ * @file libavcodec/resample2.c
* audio resampling
* @author Michael Niedermayer <michaelni@gmx.at>
*/
@@ -175,10 +175,6 @@ void av_build_filter(FELEM *filter, double factor, int tap_count, int phase_coun
#endif
}
-/**
- * Initializes an audio resampler.
- * Note, if either rate is not an integer then simply scale both rates up so they are.
- */
AVResampleContext *av_resample_init(int out_rate, int in_rate, int filter_size, int phase_shift, int linear, double cutoff){
AVResampleContext *c= av_mallocz(sizeof(AVResampleContext));
double factor= FFMIN(out_rate * cutoff / in_rate, 1.0);
@@ -206,33 +202,12 @@ void av_resample_close(AVResampleContext *c){
av_freep(&c);
}
-/**
- * Compensates samplerate/timestamp drift. The compensation is done by changing
- * the resampler parameters, so no audible clicks or similar distortions occur
- * @param compensation_distance distance in output samples over which the compensation should be performed
- * @param sample_delta number of output samples which should be output less
- *
- * example: av_resample_compensate(c, 10, 500)
- * here instead of 510 samples only 500 samples would be output
- *
- * note, due to rounding the actual compensation might be slightly different,
- * especially if the compensation_distance is large and the in_rate used during init is small
- */
void av_resample_compensate(AVResampleContext *c, int sample_delta, int compensation_distance){
// sample_delta += (c->ideal_dst_incr - c->dst_incr)*(int64_t)c->compensation_distance / c->ideal_dst_incr;
c->compensation_distance= compensation_distance;
c->dst_incr = c->ideal_dst_incr - c->ideal_dst_incr * (int64_t)sample_delta / compensation_distance;
}
-/**
- * resamples.
- * @param src an array of unconsumed samples
- * @param consumed the number of samples of src which have been consumed are returned here
- * @param src_size the number of unconsumed samples available
- * @param dst_size the amount of space in samples available in dst
- * @param update_ctx if this is 0 then the context wont be modified, that way several channels can be resampled with the same context
- * @return the number of samples written in dst or -1 if an error occurred
- */
int av_resample(AVResampleContext *c, short *dst, short *src, int *consumed, int src_size, int dst_size, int update_ctx){
int dst_index, i;
int index= c->index;
diff --git a/src/pulsecore/flist.h b/src/pulsecore/flist.h
index 512dd357..e147486e 100644
--- a/src/pulsecore/flist.h
+++ b/src/pulsecore/flist.h
@@ -8,7 +8,7 @@
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 of the
+ 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
diff --git a/src/pulsecore/hashmap.c b/src/pulsecore/hashmap.c
index 57607b69..e957c5ba 100644
--- a/src/pulsecore/hashmap.c
+++ b/src/pulsecore/hashmap.c
@@ -5,7 +5,7 @@
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 of the License,
+ 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
diff --git a/src/pulsecore/hashmap.h b/src/pulsecore/hashmap.h
index 70d78b75..08e18ead 100644
--- a/src/pulsecore/hashmap.h
+++ b/src/pulsecore/hashmap.h
@@ -8,7 +8,7 @@
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 of the License,
+ 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
diff --git a/src/pulsecore/hook-list.c b/src/pulsecore/hook-list.c
index 39694038..5f7a8665 100644
--- a/src/pulsecore/hook-list.c
+++ b/src/pulsecore/hook-list.c
@@ -5,7 +5,7 @@
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 of the
+ 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
diff --git a/src/pulsecore/hook-list.h b/src/pulsecore/hook-list.h
index de947ad5..8514cced 100644
--- a/src/pulsecore/hook-list.h
+++ b/src/pulsecore/hook-list.h
@@ -8,7 +8,7 @@
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 of the
+ 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
diff --git a/src/pulsecore/ioline.c b/src/pulsecore/ioline.c
index 88174c05..5c38d6e5 100644
--- a/src/pulsecore/ioline.c
+++ b/src/pulsecore/ioline.c
@@ -5,7 +5,7 @@
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 of the License,
+ 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
diff --git a/src/pulsecore/ioline.h b/src/pulsecore/ioline.h
index b9a3d9f4..9f32d60f 100644
--- a/src/pulsecore/ioline.h
+++ b/src/pulsecore/ioline.h
@@ -8,7 +8,7 @@
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 of the License,
+ 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
diff --git a/src/pulsecore/llist.h b/src/pulsecore/llist.h
index 46b54eb3..77a1749f 100644
--- a/src/pulsecore/llist.h
+++ b/src/pulsecore/llist.h
@@ -8,7 +8,7 @@
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 of the
+ 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
diff --git a/src/pulsecore/lock-autospawn.c b/src/pulsecore/lock-autospawn.c
index d36b669e..4436974d 100644
--- a/src/pulsecore/lock-autospawn.c
+++ b/src/pulsecore/lock-autospawn.c
@@ -5,7 +5,7 @@
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 of the License,
+ 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
diff --git a/src/pulsecore/log.c b/src/pulsecore/log.c
index 9931586d..d4d3b76e 100644
--- a/src/pulsecore/log.c
+++ b/src/pulsecore/log.c
@@ -6,7 +6,7 @@
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 of the
+ 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
diff --git a/src/pulsecore/log.h b/src/pulsecore/log.h
index 6e7bfc35..153e11e8 100644
--- a/src/pulsecore/log.h
+++ b/src/pulsecore/log.h
@@ -9,7 +9,7 @@
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 of the License,
+ 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
diff --git a/src/pulsecore/ltdl-helper.c b/src/pulsecore/ltdl-helper.c
index ed0b63af..be200ca2 100644
--- a/src/pulsecore/ltdl-helper.c
+++ b/src/pulsecore/ltdl-helper.c
@@ -6,7 +6,7 @@
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 of the License,
+ 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
diff --git a/src/pulsecore/ltdl-helper.h b/src/pulsecore/ltdl-helper.h
index ea73de54..4c4f018a 100644
--- a/src/pulsecore/ltdl-helper.h
+++ b/src/pulsecore/ltdl-helper.h
@@ -8,7 +8,7 @@
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 of the License,
+ 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
diff --git a/src/pulsecore/macro.h b/src/pulsecore/macro.h
index 59460012..20015bf5 100644
--- a/src/pulsecore/macro.h
+++ b/src/pulsecore/macro.h
@@ -8,7 +8,7 @@
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 of the License,
+ 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
diff --git a/src/pulsecore/memblockq.c b/src/pulsecore/memblockq.c
index 265da37f..e2be42b3 100644
--- a/src/pulsecore/memblockq.c
+++ b/src/pulsecore/memblockq.c
@@ -5,7 +5,7 @@
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 of the License,
+ 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
diff --git a/src/pulsecore/memblockq.h b/src/pulsecore/memblockq.h
index 31f908df..0a74aa37 100644
--- a/src/pulsecore/memblockq.h
+++ b/src/pulsecore/memblockq.h
@@ -8,7 +8,7 @@
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 of the
+ 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
diff --git a/src/pulsecore/modargs.c b/src/pulsecore/modargs.c
index 4a30f52a..73c67a8b 100644
--- a/src/pulsecore/modargs.c
+++ b/src/pulsecore/modargs.c
@@ -5,7 +5,7 @@
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 of the License,
+ 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
diff --git a/src/pulsecore/modargs.h b/src/pulsecore/modargs.h
index 23766cfc..809fb27e 100644
--- a/src/pulsecore/modargs.h
+++ b/src/pulsecore/modargs.h
@@ -8,7 +8,7 @@
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 of the License,
+ 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
diff --git a/src/pulsecore/modinfo.c b/src/pulsecore/modinfo.c
index ac4ca88a..00fb9c43 100644
--- a/src/pulsecore/modinfo.c
+++ b/src/pulsecore/modinfo.c
@@ -5,7 +5,7 @@
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 of the
+ 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
diff --git a/src/pulsecore/modinfo.h b/src/pulsecore/modinfo.h
index 605637c4..407e602a 100644
--- a/src/pulsecore/modinfo.h
+++ b/src/pulsecore/modinfo.h
@@ -8,7 +8,7 @@
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 of the License,
+ 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
diff --git a/src/pulsecore/module.c b/src/pulsecore/module.c
index 1eb70c8e..42fd912c 100644
--- a/src/pulsecore/module.c
+++ b/src/pulsecore/module.c
@@ -6,7 +6,7 @@
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 of the License,
+ 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
diff --git a/src/pulsecore/module.h b/src/pulsecore/module.h
index 6ab43dcf..3f697348 100644
--- a/src/pulsecore/module.h
+++ b/src/pulsecore/module.h
@@ -8,7 +8,7 @@
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 of the License,
+ 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
diff --git a/src/pulsecore/msgobject.c b/src/pulsecore/msgobject.c
index 81417ea4..6a2a612d 100644
--- a/src/pulsecore/msgobject.c
+++ b/src/pulsecore/msgobject.c
@@ -6,7 +6,7 @@
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 of the License,
+ 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
diff --git a/src/pulsecore/msgobject.h b/src/pulsecore/msgobject.h
index 1a43fa35..a35a23b5 100644
--- a/src/pulsecore/msgobject.h
+++ b/src/pulsecore/msgobject.h
@@ -9,7 +9,7 @@
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 of the License,
+ 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
diff --git a/src/pulsecore/mutex-posix.c b/src/pulsecore/mutex-posix.c
index c3ead97d..b3e5256a 100644
--- a/src/pulsecore/mutex-posix.c
+++ b/src/pulsecore/mutex-posix.c
@@ -5,7 +5,7 @@
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 of the License,
+ 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
diff --git a/src/pulsecore/mutex-win32.c b/src/pulsecore/mutex-win32.c
index 5e884e7f..3a910b03 100644
--- a/src/pulsecore/mutex-win32.c
+++ b/src/pulsecore/mutex-win32.c
@@ -5,7 +5,7 @@
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 of the License,
+ 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
diff --git a/src/pulsecore/mutex.h b/src/pulsecore/mutex.h
index 8e0b1f2e..a4dd6738 100644
--- a/src/pulsecore/mutex.h
+++ b/src/pulsecore/mutex.h
@@ -8,7 +8,7 @@
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 of the
+ 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
diff --git a/src/pulsecore/namereg.c b/src/pulsecore/namereg.c
index 5ab3036e..9df2f583 100644
--- a/src/pulsecore/namereg.c
+++ b/src/pulsecore/namereg.c
@@ -5,7 +5,7 @@
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 of the License,
+ 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
diff --git a/src/pulsecore/namereg.h b/src/pulsecore/namereg.h
index ff99525e..38fae6f5 100644
--- a/src/pulsecore/namereg.h
+++ b/src/pulsecore/namereg.h
@@ -8,7 +8,7 @@
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 of the License,
+ 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
diff --git a/src/pulsecore/object.c b/src/pulsecore/object.c
index 9a2f28f3..8fd05fb6 100644
--- a/src/pulsecore/object.c
+++ b/src/pulsecore/object.c
@@ -6,7 +6,7 @@
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 of the License,
+ 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
diff --git a/src/pulsecore/object.h b/src/pulsecore/object.h
index 2ee4fc31..43e79327 100644
--- a/src/pulsecore/object.h
+++ b/src/pulsecore/object.h
@@ -9,7 +9,7 @@
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 of the License,
+ 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
diff --git a/src/pulsecore/once.c b/src/pulsecore/once.c
index 3d4543cb..05a3ad2c 100644
--- a/src/pulsecore/once.c
+++ b/src/pulsecore/once.c
@@ -5,7 +5,7 @@
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 of the License,
+ 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
diff --git a/src/pulsecore/once.h b/src/pulsecore/once.h
index c0191ef0..50ac18c1 100644
--- a/src/pulsecore/once.h
+++ b/src/pulsecore/once.h
@@ -8,7 +8,7 @@
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 of the
+ 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
diff --git a/src/pulsecore/pid.c b/src/pulsecore/pid.c
index bf9ba983..00878462 100644
--- a/src/pulsecore/pid.c
+++ b/src/pulsecore/pid.c
@@ -6,7 +6,7 @@
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 of the
+ 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
diff --git a/src/pulsecore/pid.h b/src/pulsecore/pid.h
index 3c8a9de3..d8458bf7 100644
--- a/src/pulsecore/pid.h
+++ b/src/pulsecore/pid.h
@@ -8,7 +8,7 @@
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 of the
+ 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
diff --git a/src/pulsecore/pipe.c b/src/pulsecore/pipe.c
index 93d78a22..c21e4b1f 100644
--- a/src/pulsecore/pipe.c
+++ b/src/pulsecore/pipe.c
@@ -5,7 +5,7 @@
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 of the License,
+ 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
diff --git a/src/pulsecore/pipe.h b/src/pulsecore/pipe.h
index 9a7e62c8..597d5e52 100644
--- a/src/pulsecore/pipe.h
+++ b/src/pulsecore/pipe.h
@@ -8,7 +8,7 @@
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 of the License,
+ 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
diff --git a/src/pulsecore/play-memblockq.c b/src/pulsecore/play-memblockq.c
index 44aa6bf0..fceb2ca1 100644
--- a/src/pulsecore/play-memblockq.c
+++ b/src/pulsecore/play-memblockq.c
@@ -5,7 +5,7 @@
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 of the License,
+ 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
diff --git a/src/pulsecore/play-memblockq.h b/src/pulsecore/play-memblockq.h
index 1a42867b..9d5f40fd 100644
--- a/src/pulsecore/play-memblockq.h
+++ b/src/pulsecore/play-memblockq.h
@@ -8,7 +8,7 @@
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 of the License,
+ 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
diff --git a/src/pulsecore/play-memchunk.c b/src/pulsecore/play-memchunk.c
index 0dd48251..f127d7a4 100644
--- a/src/pulsecore/play-memchunk.c
+++ b/src/pulsecore/play-memchunk.c
@@ -5,7 +5,7 @@
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 of the License,
+ 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
diff --git a/src/pulsecore/play-memchunk.h b/src/pulsecore/play-memchunk.h
index c312ae82..c813611e 100644
--- a/src/pulsecore/play-memchunk.h
+++ b/src/pulsecore/play-memchunk.h
@@ -8,7 +8,7 @@
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 of the License,
+ 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
diff --git a/src/pulsecore/poll.c b/src/pulsecore/poll.c
index 88ac21e4..46a69c5f 100644
--- a/src/pulsecore/poll.c
+++ b/src/pulsecore/poll.c
@@ -6,7 +6,7 @@
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 of the License,
+ 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
diff --git a/src/pulsecore/poll.h b/src/pulsecore/poll.h
index 86c37a08..fe0c6af6 100644
--- a/src/pulsecore/poll.h
+++ b/src/pulsecore/poll.h
@@ -5,7 +5,7 @@
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 of the License,
+ 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
diff --git a/src/pulsecore/prioq.c b/src/pulsecore/prioq.c
index 693dc517..983db0f1 100644
--- a/src/pulsecore/prioq.c
+++ b/src/pulsecore/prioq.c
@@ -5,7 +5,7 @@
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 of the License,
+ 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
diff --git a/src/pulsecore/protocol-cli.c b/src/pulsecore/protocol-cli.c
index 9247bb40..da648744 100644
--- a/src/pulsecore/protocol-cli.c
+++ b/src/pulsecore/protocol-cli.c
@@ -5,7 +5,7 @@
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 of the License,
+ 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
diff --git a/src/pulsecore/protocol-cli.h b/src/pulsecore/protocol-cli.h
index 9e26dcd9..906b13f3 100644
--- a/src/pulsecore/protocol-cli.h
+++ b/src/pulsecore/protocol-cli.h
@@ -8,7 +8,7 @@
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 of the License,
+ 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
diff --git a/src/pulsecore/protocol-esound.c b/src/pulsecore/protocol-esound.c
index 2d4e62fa..2b80c65f 100644
--- a/src/pulsecore/protocol-esound.c
+++ b/src/pulsecore/protocol-esound.c
@@ -6,7 +6,7 @@
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 of the License,
+ 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
@@ -1290,6 +1290,9 @@ static int connection_process_msg(pa_msgobject *o, int code, void*userdata, int6
connection *c = CONNECTION(o);
connection_assert_ref(c);
+ if (!c->protocol)
+ return -1;
+
switch (code) {
case CONNECTION_MESSAGE_REQUEST_DATA:
do_work(c);
diff --git a/src/pulsecore/protocol-esound.h b/src/pulsecore/protocol-esound.h
index 232df660..63a29ce8 100644
--- a/src/pulsecore/protocol-esound.h
+++ b/src/pulsecore/protocol-esound.h
@@ -9,7 +9,7 @@
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 of the License,
+ 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
diff --git a/src/pulsecore/protocol-http.c b/src/pulsecore/protocol-http.c
index 5379a36c..f3b93819 100644
--- a/src/pulsecore/protocol-http.c
+++ b/src/pulsecore/protocol-http.c
@@ -5,7 +5,7 @@
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 of the License,
+ 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
diff --git a/src/pulsecore/protocol-http.h b/src/pulsecore/protocol-http.h
index 7e8f9760..40b3d82c 100644
--- a/src/pulsecore/protocol-http.h
+++ b/src/pulsecore/protocol-http.h
@@ -8,7 +8,7 @@
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 of the License,
+ 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
diff --git a/src/pulsecore/protocol-native.c b/src/pulsecore/protocol-native.c
index 10b9e7da..50a9191b 100644
--- a/src/pulsecore/protocol-native.c
+++ b/src/pulsecore/protocol-native.c
@@ -6,7 +6,7 @@
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 of the License,
+ 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
@@ -2829,6 +2829,7 @@ static void card_fill_tagstruct(pa_native_connection *c, pa_tagstruct *t, pa_car
pa_tagstruct_puts(t, p->description);
pa_tagstruct_putu32(t, p->n_sinks);
pa_tagstruct_putu32(t, p->n_sources);
+ pa_tagstruct_putu32(t, p->priority);
}
}
@@ -2955,7 +2956,6 @@ static void command_get_info(pa_pdispatch *pd, uint32_t command, uint32_t tag, p
if (pa_tagstruct_getu32(t, &idx) < 0 ||
(command != PA_COMMAND_GET_CLIENT_INFO &&
- command != PA_COMMAND_GET_CARD_INFO &&
command != PA_COMMAND_GET_MODULE_INFO &&
command != PA_COMMAND_GET_SINK_INPUT_INFO &&
command != PA_COMMAND_GET_SOURCE_OUTPUT_INFO &&
diff --git a/src/pulsecore/protocol-native.h b/src/pulsecore/protocol-native.h
index 06731c0c..8a8d601c 100644
--- a/src/pulsecore/protocol-native.h
+++ b/src/pulsecore/protocol-native.h
@@ -9,7 +9,7 @@
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 of the License,
+ 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
diff --git a/src/pulsecore/protocol-simple.c b/src/pulsecore/protocol-simple.c
index e149c40d..44fe5973 100644
--- a/src/pulsecore/protocol-simple.c
+++ b/src/pulsecore/protocol-simple.c
@@ -5,7 +5,7 @@
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 of the License,
+ 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
@@ -283,6 +283,9 @@ static int connection_process_msg(pa_msgobject *o, int code, void*userdata, int6
connection *c = CONNECTION(o);
connection_assert_ref(c);
+ if (!c->protocol)
+ return -1;
+
switch (code) {
case CONNECTION_MESSAGE_REQUEST_DATA:
do_work(c);
diff --git a/src/pulsecore/protocol-simple.h b/src/pulsecore/protocol-simple.h
index c10eabe7..a25ab80a 100644
--- a/src/pulsecore/protocol-simple.h
+++ b/src/pulsecore/protocol-simple.h
@@ -8,7 +8,7 @@
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 of the License,
+ 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
diff --git a/src/pulsecore/ratelimit.c b/src/pulsecore/ratelimit.c
index 8ce78579..29e6fb10 100644
--- a/src/pulsecore/ratelimit.c
+++ b/src/pulsecore/ratelimit.c
@@ -5,7 +5,7 @@
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 of the
+ 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
diff --git a/src/pulsecore/ratelimit.h b/src/pulsecore/ratelimit.h
index e652c520..ec3b5a38 100644
--- a/src/pulsecore/ratelimit.h
+++ b/src/pulsecore/ratelimit.h
@@ -8,7 +8,7 @@
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 of the
+ 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
diff --git a/src/pulsecore/refcnt.h b/src/pulsecore/refcnt.h
index 291f4504..1e988326 100644
--- a/src/pulsecore/refcnt.h
+++ b/src/pulsecore/refcnt.h
@@ -8,7 +8,7 @@
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 of the
+ 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
diff --git a/src/pulsecore/resampler.c b/src/pulsecore/resampler.c
index 78ad5530..17fb8480 100644
--- a/src/pulsecore/resampler.c
+++ b/src/pulsecore/resampler.c
@@ -5,7 +5,7 @@
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 of the License,
+ 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
diff --git a/src/pulsecore/resampler.h b/src/pulsecore/resampler.h
index 54dfa559..742de6af 100644
--- a/src/pulsecore/resampler.h
+++ b/src/pulsecore/resampler.h
@@ -8,7 +8,7 @@
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 of the License,
+ 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
diff --git a/src/pulsecore/rtclock.c b/src/pulsecore/rtclock.c
index dcbd1184..56ab2ef0 100644
--- a/src/pulsecore/rtclock.c
+++ b/src/pulsecore/rtclock.c
@@ -27,9 +27,12 @@
#include <stddef.h>
#include <time.h>
#include <sys/time.h>
-#include <sys/prctl.h>
#include <errno.h>
+#ifdef HAVE_SYS_PRCTL_H
+#include <sys/prctl.h>
+#endif
+
#include <pulse/timeval.h>
#include <pulsecore/macro.h>
#include <pulsecore/core-error.h>
diff --git a/src/pulsecore/sample-util.c b/src/pulsecore/sample-util.c
index 905ba5df..3a9b384d 100644
--- a/src/pulsecore/sample-util.c
+++ b/src/pulsecore/sample-util.c
@@ -6,7 +6,7 @@
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 of the License,
+ 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
diff --git a/src/pulsecore/sample-util.h b/src/pulsecore/sample-util.h
index 2230aaf0..79af9efc 100644
--- a/src/pulsecore/sample-util.h
+++ b/src/pulsecore/sample-util.h
@@ -9,7 +9,7 @@
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 of the License,
+ 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
diff --git a/src/pulsecore/sconv-s16be.c b/src/pulsecore/sconv-s16be.c
index 0d5146aa..bf4f717d 100644
--- a/src/pulsecore/sconv-s16be.c
+++ b/src/pulsecore/sconv-s16be.c
@@ -5,7 +5,7 @@
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 of the License,
+ 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
diff --git a/src/pulsecore/sconv-s16be.h b/src/pulsecore/sconv-s16be.h
index 02633333..ae9e2313 100644
--- a/src/pulsecore/sconv-s16be.h
+++ b/src/pulsecore/sconv-s16be.h
@@ -8,7 +8,7 @@
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 of the License,
+ 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
diff --git a/src/pulsecore/sconv-s16le.c b/src/pulsecore/sconv-s16le.c
index 79f0391c..307ce7b7 100644
--- a/src/pulsecore/sconv-s16le.c
+++ b/src/pulsecore/sconv-s16le.c
@@ -5,7 +5,7 @@
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 of the License,
+ 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
diff --git a/src/pulsecore/sconv-s16le.h b/src/pulsecore/sconv-s16le.h
index f7b00645..609fa04b 100644
--- a/src/pulsecore/sconv-s16le.h
+++ b/src/pulsecore/sconv-s16le.h
@@ -8,7 +8,7 @@
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 of the License,
+ 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
diff --git a/src/pulsecore/sconv.c b/src/pulsecore/sconv.c
index fcd0309c..29a9a453 100644
--- a/src/pulsecore/sconv.c
+++ b/src/pulsecore/sconv.c
@@ -6,7 +6,7 @@
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 of the License,
+ 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
diff --git a/src/pulsecore/sconv.h b/src/pulsecore/sconv.h
index 59710369..b00a16a4 100644
--- a/src/pulsecore/sconv.h
+++ b/src/pulsecore/sconv.h
@@ -9,7 +9,7 @@
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 of the License,
+ 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
diff --git a/src/pulsecore/semaphore-posix.c b/src/pulsecore/semaphore-posix.c
index 7c9f859d..616d897d 100644
--- a/src/pulsecore/semaphore-posix.c
+++ b/src/pulsecore/semaphore-posix.c
@@ -5,7 +5,7 @@
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 of the License,
+ 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
diff --git a/src/pulsecore/semaphore-win32.c b/src/pulsecore/semaphore-win32.c
index 41e0b8d4..9ffbde66 100644
--- a/src/pulsecore/semaphore-win32.c
+++ b/src/pulsecore/semaphore-win32.c
@@ -5,7 +5,7 @@
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 of the License,
+ 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
diff --git a/src/pulsecore/semaphore.h b/src/pulsecore/semaphore.h
index 850ae817..dc3ca6a5 100644
--- a/src/pulsecore/semaphore.h
+++ b/src/pulsecore/semaphore.h
@@ -8,7 +8,7 @@
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 of the
+ 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
diff --git a/src/pulsecore/shared.c b/src/pulsecore/shared.c
index 9485dc33..edd7b7fe 100644
--- a/src/pulsecore/shared.c
+++ b/src/pulsecore/shared.c
@@ -5,7 +5,7 @@
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 of the License,
+ 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
diff --git a/src/pulsecore/shared.h b/src/pulsecore/shared.h
index f6f8d3cf..82819f07 100644
--- a/src/pulsecore/shared.h
+++ b/src/pulsecore/shared.h
@@ -8,7 +8,7 @@
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 of the License,
+ 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
diff --git a/src/pulsecore/sink-input.c b/src/pulsecore/sink-input.c
index 34de9bb3..53e727bb 100644
--- a/src/pulsecore/sink-input.c
+++ b/src/pulsecore/sink-input.c
@@ -6,7 +6,7 @@
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 of the License,
+ 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
diff --git a/src/pulsecore/sink-input.h b/src/pulsecore/sink-input.h
index b4f05319..e3801687 100644
--- a/src/pulsecore/sink-input.h
+++ b/src/pulsecore/sink-input.h
@@ -9,7 +9,7 @@
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 of the License,
+ 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
diff --git a/src/pulsecore/sink.c b/src/pulsecore/sink.c
index fadbb857..667ae761 100644
--- a/src/pulsecore/sink.c
+++ b/src/pulsecore/sink.c
@@ -6,7 +6,7 @@
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 of the License,
+ 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
@@ -326,6 +326,9 @@ static int sink_set_state(pa_sink *s, pa_sink_state_t state) {
pa_sink_input_kill(i);
else if (i->suspend)
i->suspend(i, state == PA_SINK_SUSPENDED);
+
+ if (s->monitor_source)
+ pa_source_sync_suspend(s->monitor_source);
}
return 0;
@@ -1529,8 +1532,10 @@ int pa_sink_process_msg(pa_msgobject *o, int code, void *userdata, int64_t offse
s->thread_info.state = PA_PTR_TO_UINT(userdata);
- if (s->thread_info.state == PA_SINK_SUSPENDED)
+ if (s->thread_info.state == PA_SINK_SUSPENDED) {
+ s->thread_info.rewind_nbytes = 0;
s->thread_info.rewind_requested = FALSE;
+ }
return 0;
@@ -1600,8 +1605,12 @@ int pa_sink_suspend_all(pa_core *c, pa_bool_t suspend) {
pa_core_assert_ref(c);
- for (sink = PA_SINK(pa_idxset_first(c->sinks, &idx)); sink; sink = PA_SINK(pa_idxset_next(c->sinks, &idx)))
- ret -= pa_sink_suspend(sink, suspend) < 0;
+ for (sink = PA_SINK(pa_idxset_first(c->sinks, &idx)); sink; sink = PA_SINK(pa_idxset_next(c->sinks, &idx))) {
+ int r;
+
+ if ((r = pa_sink_suspend(sink, suspend)) < 0)
+ ret = r;
+ }
return ret;
}
@@ -1730,7 +1739,7 @@ pa_usec_t pa_sink_get_requested_latency(pa_sink *s) {
return usec;
}
-/* Called from IO thread */
+/* Called from IO as well as the main thread -- the latter only before the IO thread started up */
void pa_sink_set_max_rewind(pa_sink *s, size_t max_rewind) {
pa_sink_input *i;
void *state = NULL;
@@ -1751,7 +1760,7 @@ void pa_sink_set_max_rewind(pa_sink *s, size_t max_rewind) {
pa_source_set_max_rewind(s->monitor_source, s->thread_info.max_rewind);
}
-/* Called from IO thread */
+/* Called from IO as well as the main thread -- the latter only before the IO thread started up */
void pa_sink_set_max_request(pa_sink *s, size_t max_request) {
void *state = NULL;
diff --git a/src/pulsecore/sink.h b/src/pulsecore/sink.h
index 2eaae697..0d33679f 100644
--- a/src/pulsecore/sink.h
+++ b/src/pulsecore/sink.h
@@ -9,7 +9,7 @@
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 of the License,
+ 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
diff --git a/src/pulsecore/sioman.c b/src/pulsecore/sioman.c
index 7e5b186c..24c046cf 100644
--- a/src/pulsecore/sioman.c
+++ b/src/pulsecore/sioman.c
@@ -5,7 +5,7 @@
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 of the License,
+ 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
diff --git a/src/pulsecore/sioman.h b/src/pulsecore/sioman.h
index d0cacc9b..88ff92af 100644
--- a/src/pulsecore/sioman.h
+++ b/src/pulsecore/sioman.h
@@ -8,7 +8,7 @@
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 of the License,
+ 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
diff --git a/src/pulsecore/socket-server.c b/src/pulsecore/socket-server.c
index 19c2fd09..6a4405e3 100644
--- a/src/pulsecore/socket-server.c
+++ b/src/pulsecore/socket-server.c
@@ -6,7 +6,7 @@
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 of the License,
+ 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
diff --git a/src/pulsecore/socket-server.h b/src/pulsecore/socket-server.h
index b9a2c40e..72b6eda4 100644
--- a/src/pulsecore/socket-server.h
+++ b/src/pulsecore/socket-server.h
@@ -9,7 +9,7 @@
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 of the License,
+ 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
diff --git a/src/pulsecore/socket-util.c b/src/pulsecore/socket-util.c
index e44f6460..5fd5dd67 100644
--- a/src/pulsecore/socket-util.c
+++ b/src/pulsecore/socket-util.c
@@ -7,7 +7,7 @@
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 of the License,
+ 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
diff --git a/src/pulsecore/socket-util.h b/src/pulsecore/socket-util.h
index 7a40285a..f6d16376 100644
--- a/src/pulsecore/socket-util.h
+++ b/src/pulsecore/socket-util.h
@@ -9,7 +9,7 @@
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 of the License,
+ 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
diff --git a/src/pulsecore/sound-file-stream.c b/src/pulsecore/sound-file-stream.c
index c3de3067..3453637f 100644
--- a/src/pulsecore/sound-file-stream.c
+++ b/src/pulsecore/sound-file-stream.c
@@ -5,7 +5,7 @@
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 of the License,
+ 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
diff --git a/src/pulsecore/sound-file-stream.h b/src/pulsecore/sound-file-stream.h
index 4cc69146..a788c342 100644
--- a/src/pulsecore/sound-file-stream.h
+++ b/src/pulsecore/sound-file-stream.h
@@ -8,7 +8,7 @@
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 of the License,
+ 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
diff --git a/src/pulsecore/sound-file.c b/src/pulsecore/sound-file.c
index 380cef16..db75ae08 100644
--- a/src/pulsecore/sound-file.c
+++ b/src/pulsecore/sound-file.c
@@ -5,7 +5,7 @@
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 of the License,
+ 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
diff --git a/src/pulsecore/sound-file.h b/src/pulsecore/sound-file.h
index e4d703d3..34e02616 100644
--- a/src/pulsecore/sound-file.h
+++ b/src/pulsecore/sound-file.h
@@ -8,7 +8,7 @@
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 of the License,
+ 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
diff --git a/src/pulsecore/source-output.c b/src/pulsecore/source-output.c
index d99f79c5..373d5637 100644
--- a/src/pulsecore/source-output.c
+++ b/src/pulsecore/source-output.c
@@ -5,7 +5,7 @@
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 of the License,
+ 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
diff --git a/src/pulsecore/source-output.h b/src/pulsecore/source-output.h
index 9369568c..018ec886 100644
--- a/src/pulsecore/source-output.h
+++ b/src/pulsecore/source-output.h
@@ -8,7 +8,7 @@
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 of the License,
+ 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
diff --git a/src/pulsecore/source.c b/src/pulsecore/source.c
index 4ce5cbfe..cc6dfc40 100644
--- a/src/pulsecore/source.c
+++ b/src/pulsecore/source.c
@@ -6,7 +6,7 @@
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 of the License,
+ 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
@@ -424,6 +424,9 @@ int pa_source_suspend(pa_source *s, pa_bool_t suspend) {
pa_source_assert_ref(s);
pa_assert(PA_SOURCE_IS_LINKED(s->state));
+ if (s->monitor_of)
+ return -PA_ERR_NOTSUPPORTED;
+
if (suspend)
return source_set_state(s, PA_SOURCE_SUSPENDED);
else
@@ -431,6 +434,24 @@ int pa_source_suspend(pa_source *s, pa_bool_t suspend) {
}
/* Called from main context */
+int pa_source_sync_suspend(pa_source *s) {
+ pa_sink_state_t state;
+
+ pa_source_assert_ref(s);
+ pa_assert(PA_SOURCE_IS_LINKED(s->state));
+ pa_assert(s->monitor_of);
+
+ state = pa_sink_get_state(s->monitor_of);
+
+ if (state == PA_SINK_SUSPENDED)
+ return source_set_state(s, PA_SOURCE_SUSPENDED);
+
+ pa_assert(PA_SINK_IS_OPENED(state));
+
+ return source_set_state(s, pa_source_used_by(s) ? PA_SOURCE_RUNNING : PA_SOURCE_IDLE);
+}
+
+/* Called from main context */
pa_queue *pa_source_move_all_start(pa_source *s) {
pa_queue *q;
pa_source_output *o, *n;
@@ -934,8 +955,15 @@ int pa_source_suspend_all(pa_core *c, pa_bool_t suspend) {
pa_core_assert_ref(c);
- for (source = PA_SOURCE(pa_idxset_first(c->sources, &idx)); source; source = PA_SOURCE(pa_idxset_next(c->sources, &idx)))
- ret -= pa_source_suspend(source, suspend) < 0;
+ for (source = PA_SOURCE(pa_idxset_first(c->sources, &idx)); source; source = PA_SOURCE(pa_idxset_next(c->sources, &idx))) {
+ int r;
+
+ if (source->monitor_of)
+ continue;
+
+ if ((r = pa_source_suspend(source, suspend)) < 0)
+ ret = r;
+ }
return ret;
}
diff --git a/src/pulsecore/source.h b/src/pulsecore/source.h
index 8a91016a..26471de0 100644
--- a/src/pulsecore/source.h
+++ b/src/pulsecore/source.h
@@ -9,7 +9,7 @@
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 of the License,
+ 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
@@ -212,6 +212,8 @@ void pa_source_attach(pa_source *s);
void pa_source_set_soft_volume(pa_source *s, const pa_cvolume *volume);
+int pa_source_sync_suspend(pa_source *s);
+
/*** May be called by everyone, from main context */
/* The returned value is supposed to be in the time domain of the sound card! */
diff --git a/src/pulsecore/strbuf.c b/src/pulsecore/strbuf.c
index 8b952788..9f5a84b4 100644
--- a/src/pulsecore/strbuf.c
+++ b/src/pulsecore/strbuf.c
@@ -5,7 +5,7 @@
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 of the License,
+ 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
diff --git a/src/pulsecore/strbuf.h b/src/pulsecore/strbuf.h
index 1d2a588f..05e69e03 100644
--- a/src/pulsecore/strbuf.h
+++ b/src/pulsecore/strbuf.h
@@ -8,7 +8,7 @@
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 of the License,
+ 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
diff --git a/src/pulsecore/strlist.c b/src/pulsecore/strlist.c
index f587a2f8..cbafbba6 100644
--- a/src/pulsecore/strlist.c
+++ b/src/pulsecore/strlist.c
@@ -5,7 +5,7 @@
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 of the License,
+ 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
diff --git a/src/pulsecore/strlist.h b/src/pulsecore/strlist.h
index 1cb7537a..2584e86c 100644
--- a/src/pulsecore/strlist.h
+++ b/src/pulsecore/strlist.h
@@ -8,7 +8,7 @@
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 of the License,
+ 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
diff --git a/src/pulsecore/thread-posix.c b/src/pulsecore/thread-posix.c
index ade398f9..fdab270f 100644
--- a/src/pulsecore/thread-posix.c
+++ b/src/pulsecore/thread-posix.c
@@ -6,7 +6,7 @@
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 of the License,
+ 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
diff --git a/src/pulsecore/thread-win32.c b/src/pulsecore/thread-win32.c
index c40d3342..0a1baa54 100644
--- a/src/pulsecore/thread-win32.c
+++ b/src/pulsecore/thread-win32.c
@@ -5,7 +5,7 @@
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 of the License,
+ 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
diff --git a/src/pulsecore/thread.h b/src/pulsecore/thread.h
index eabe9ba4..25eace63 100644
--- a/src/pulsecore/thread.h
+++ b/src/pulsecore/thread.h
@@ -9,7 +9,7 @@
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 of the
+ 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
diff --git a/src/pulsecore/tokenizer.c b/src/pulsecore/tokenizer.c
index 07a9f3ac..1eb466dd 100644
--- a/src/pulsecore/tokenizer.c
+++ b/src/pulsecore/tokenizer.c
@@ -5,7 +5,7 @@
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 of the License,
+ 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
diff --git a/src/pulsecore/tokenizer.h b/src/pulsecore/tokenizer.h
index d51cd73e..a47c07e7 100644
--- a/src/pulsecore/tokenizer.h
+++ b/src/pulsecore/tokenizer.h
@@ -8,7 +8,7 @@
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 of the License,
+ 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
diff --git a/src/pulsecore/vector.h b/src/pulsecore/vector.h
index 076bd6c0..924e3cb8 100644
--- a/src/pulsecore/vector.h
+++ b/src/pulsecore/vector.h
@@ -6,7 +6,7 @@
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 of the License,
+ 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
diff --git a/src/pulsecore/x11prop.c b/src/pulsecore/x11prop.c
index 7f91ba3c..873a76e7 100644
--- a/src/pulsecore/x11prop.c
+++ b/src/pulsecore/x11prop.c
@@ -5,7 +5,7 @@
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 of the License,
+ 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
diff --git a/src/pulsecore/x11prop.h b/src/pulsecore/x11prop.h
index c5998d3e..dc675263 100644
--- a/src/pulsecore/x11prop.h
+++ b/src/pulsecore/x11prop.h
@@ -8,7 +8,7 @@
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 of the License,
+ 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
diff --git a/src/pulsecore/x11wrap.c b/src/pulsecore/x11wrap.c
index 332ebb2e..1960a12f 100644
--- a/src/pulsecore/x11wrap.c
+++ b/src/pulsecore/x11wrap.c
@@ -5,7 +5,7 @@
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 of the License,
+ 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
diff --git a/src/pulsecore/x11wrap.h b/src/pulsecore/x11wrap.h
index badc3a1f..b57541f2 100644
--- a/src/pulsecore/x11wrap.h
+++ b/src/pulsecore/x11wrap.h
@@ -8,7 +8,7 @@
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 of the License,
+ 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
diff --git a/src/tests/asyncmsgq-test.c b/src/tests/asyncmsgq-test.c
index 08ad3dd4..40c74f76 100644
--- a/src/tests/asyncmsgq-test.c
+++ b/src/tests/asyncmsgq-test.c
@@ -3,7 +3,7 @@
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 of the License,
+ 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
diff --git a/src/tests/asyncq-test.c b/src/tests/asyncq-test.c
index 4e8a1207..a617e1a0 100644
--- a/src/tests/asyncq-test.c
+++ b/src/tests/asyncq-test.c
@@ -3,7 +3,7 @@
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 of the License,
+ 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
diff --git a/src/tests/cpulimit-test.c b/src/tests/cpulimit-test.c
index fdc0162e..9d0f4eef 100644
--- a/src/tests/cpulimit-test.c
+++ b/src/tests/cpulimit-test.c
@@ -3,7 +3,7 @@
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 of the
+ 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
diff --git a/src/tests/envelope-test.c b/src/tests/envelope-test.c
index 11a80a14..3af3044e 100644
--- a/src/tests/envelope-test.c
+++ b/src/tests/envelope-test.c
@@ -3,7 +3,7 @@
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 of the License,
+ 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
diff --git a/src/tests/flist-test.c b/src/tests/flist-test.c
index b2c648da..64c0add2 100644
--- a/src/tests/flist-test.c
+++ b/src/tests/flist-test.c
@@ -3,7 +3,7 @@
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 of the License,
+ 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
diff --git a/src/tests/get-binary-name-test.c b/src/tests/get-binary-name-test.c
index 7c7a8996..a34e38fd 100644
--- a/src/tests/get-binary-name-test.c
+++ b/src/tests/get-binary-name-test.c
@@ -3,7 +3,7 @@
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 of the License,
+ 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
diff --git a/src/tests/gtk-test.c b/src/tests/gtk-test.c
index 092ba25c..f82aca58 100644
--- a/src/tests/gtk-test.c
+++ b/src/tests/gtk-test.c
@@ -3,7 +3,7 @@
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 of the License,
+ 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
diff --git a/src/tests/interpol-test.c b/src/tests/interpol-test.c
index d7da660c..5f7ebb76 100644
--- a/src/tests/interpol-test.c
+++ b/src/tests/interpol-test.c
@@ -3,7 +3,7 @@
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 of the License,
+ 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
diff --git a/src/tests/lock-autospawn-test.c b/src/tests/lock-autospawn-test.c
index 80cfda6a..c754e230 100644
--- a/src/tests/lock-autospawn-test.c
+++ b/src/tests/lock-autospawn-test.c
@@ -5,7 +5,7 @@
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 of the License,
+ 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
diff --git a/src/tests/mainloop-test.c b/src/tests/mainloop-test.c
index 2580fa72..d8926233 100644
--- a/src/tests/mainloop-test.c
+++ b/src/tests/mainloop-test.c
@@ -3,7 +3,7 @@
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 of the License,
+ 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
diff --git a/src/tests/memblock-test.c b/src/tests/memblock-test.c
index 37b5b403..9cf6c78b 100644
--- a/src/tests/memblock-test.c
+++ b/src/tests/memblock-test.c
@@ -3,7 +3,7 @@
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 of the License,
+ 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
diff --git a/src/tests/memblockq-test.c b/src/tests/memblockq-test.c
index b01a4fd5..127fb197 100644
--- a/src/tests/memblockq-test.c
+++ b/src/tests/memblockq-test.c
@@ -3,7 +3,7 @@
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 of the License,
+ 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
diff --git a/src/tests/mix-test.c b/src/tests/mix-test.c
index db8ac6e3..ac4b57b5 100644
--- a/src/tests/mix-test.c
+++ b/src/tests/mix-test.c
@@ -3,7 +3,7 @@
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 of the License,
+ 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
diff --git a/src/tests/pacat-simple.c b/src/tests/pacat-simple.c
index ffe3176a..d4224e11 100644
--- a/src/tests/pacat-simple.c
+++ b/src/tests/pacat-simple.c
@@ -3,7 +3,7 @@
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 of the License,
+ 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
diff --git a/src/tests/parec-simple.c b/src/tests/parec-simple.c
index c9d3bef5..9f19ff47 100644
--- a/src/tests/parec-simple.c
+++ b/src/tests/parec-simple.c
@@ -3,7 +3,7 @@
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 of the License,
+ 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
diff --git a/src/tests/proplist-test.c b/src/tests/proplist-test.c
index 5526bb7e..3e723561 100644
--- a/src/tests/proplist-test.c
+++ b/src/tests/proplist-test.c
@@ -3,7 +3,7 @@
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 of the License,
+ 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
diff --git a/src/tests/queue-test.c b/src/tests/queue-test.c
index ceae4e47..7ee2693d 100644
--- a/src/tests/queue-test.c
+++ b/src/tests/queue-test.c
@@ -3,7 +3,7 @@
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 of the License,
+ 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
diff --git a/src/tests/remix-test.c b/src/tests/remix-test.c
index 3da4ee33..9d110d6b 100644
--- a/src/tests/remix-test.c
+++ b/src/tests/remix-test.c
@@ -3,7 +3,7 @@
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 of the License,
+ 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
diff --git a/src/tests/resampler-test.c b/src/tests/resampler-test.c
index da8d3756..6b4a64ca 100644
--- a/src/tests/resampler-test.c
+++ b/src/tests/resampler-test.c
@@ -3,7 +3,7 @@
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 of the License,
+ 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
diff --git a/src/tests/rtpoll-test.c b/src/tests/rtpoll-test.c
index 953fd61d..4ac96446 100644
--- a/src/tests/rtpoll-test.c
+++ b/src/tests/rtpoll-test.c
@@ -3,7 +3,7 @@
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 of the License,
+ 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
diff --git a/src/tests/rtstutter.c b/src/tests/rtstutter.c
index d8aff342..f04d43af 100644
--- a/src/tests/rtstutter.c
+++ b/src/tests/rtstutter.c
@@ -5,7 +5,7 @@
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 of the
+ 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
diff --git a/src/tests/sig2str-test.c b/src/tests/sig2str-test.c
index d64a8902..0cd929ca 100644
--- a/src/tests/sig2str-test.c
+++ b/src/tests/sig2str-test.c
@@ -3,7 +3,7 @@
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 of the License,
+ 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
diff --git a/src/tests/smoother-test.c b/src/tests/smoother-test.c
index 15700ec2..798dfed5 100644
--- a/src/tests/smoother-test.c
+++ b/src/tests/smoother-test.c
@@ -3,7 +3,7 @@
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 of the License,
+ 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
diff --git a/src/tests/stripnul.c b/src/tests/stripnul.c
index 2b8aa083..1d8c4938 100644
--- a/src/tests/stripnul.c
+++ b/src/tests/stripnul.c
@@ -3,7 +3,7 @@
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 of the License,
+ 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
diff --git a/src/tests/sync-playback.c b/src/tests/sync-playback.c
index f2a15601..bb64a91f 100644
--- a/src/tests/sync-playback.c
+++ b/src/tests/sync-playback.c
@@ -3,7 +3,7 @@
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 of the License,
+ 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
diff --git a/src/tests/thread-mainloop-test.c b/src/tests/thread-mainloop-test.c
index 3bcf4f16..ad89414f 100644
--- a/src/tests/thread-mainloop-test.c
+++ b/src/tests/thread-mainloop-test.c
@@ -3,7 +3,7 @@
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 of the License,
+ 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
diff --git a/src/tests/thread-test.c b/src/tests/thread-test.c
index f29b5e71..2c07b1cc 100644
--- a/src/tests/thread-test.c
+++ b/src/tests/thread-test.c
@@ -3,7 +3,7 @@
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 of the License,
+ 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
diff --git a/src/tests/vector-test.c b/src/tests/vector-test.c
index f7344172..7494348c 100644
--- a/src/tests/vector-test.c
+++ b/src/tests/vector-test.c
@@ -5,7 +5,7 @@
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 of the
+ 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
diff --git a/src/utils/pabrowse.c b/src/utils/pabrowse.c
index f2ed9553..288d44a9 100644
--- a/src/utils/pabrowse.c
+++ b/src/utils/pabrowse.c
@@ -5,7 +5,7 @@
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 of the License,
+ 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
diff --git a/src/utils/pacat.c b/src/utils/pacat.c
index 2224da9a..e886c15c 100644
--- a/src/utils/pacat.c
+++ b/src/utils/pacat.c
@@ -6,7 +6,7 @@
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 of the License,
+ 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
diff --git a/src/utils/pacmd.c b/src/utils/pacmd.c
index 507e229f..d94f2665 100644
--- a/src/utils/pacmd.c
+++ b/src/utils/pacmd.c
@@ -5,7 +5,7 @@
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 of the License,
+ 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
diff --git a/src/utils/pactl.c b/src/utils/pactl.c
index 6524bf90..de1c6d3d 100644
--- a/src/utils/pactl.c
+++ b/src/utils/pactl.c
@@ -5,7 +5,7 @@
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 of the License,
+ 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
@@ -427,7 +427,7 @@ static void get_card_info_callback(pa_context *c, const pa_card_info *i, int is_
printf(_("\tProfiles:\n"));
for (p = i->profiles; p->name; p++)
- printf("\t\t%s: %s\n", p->name, p->description);
+ printf("\t\t%s: %s (sinks: %u, sources: %u, priority. %u)\n", p->name, p->description, p->n_sinks, p->n_sources, p->priority);
}
if (i->active_profile)
diff --git a/src/utils/padsp.c b/src/utils/padsp.c
index 76e86c8d..dfa5aac2 100644
--- a/src/utils/padsp.c
+++ b/src/utils/padsp.c
@@ -6,7 +6,7 @@
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 of the License,
+ 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
diff --git a/src/utils/paplay.c b/src/utils/paplay.c
index dec80e5c..f6ba6f6d 100644
--- a/src/utils/paplay.c
+++ b/src/utils/paplay.c
@@ -6,7 +6,7 @@
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 of the License,
+ 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
diff --git a/src/utils/pasuspender.c b/src/utils/pasuspender.c
index 8a59d5e4..b4bccd56 100644
--- a/src/utils/pasuspender.c
+++ b/src/utils/pasuspender.c
@@ -5,7 +5,7 @@
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 of the License,
+ 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
diff --git a/src/utils/pax11publish.c b/src/utils/pax11publish.c
index 50d621d4..a9eb329f 100644
--- a/src/utils/pax11publish.c
+++ b/src/utils/pax11publish.c
@@ -5,7 +5,7 @@
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 of the License,
+ 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