[pulseaudio-commits] 9 commits - src/daemon src/Makefile.am src/modules src/pulse src/pulsecore src/tests src/utils
Colin Guthrie
colin at kemper.freedesktop.org
Thu Aug 11 06:32:54 PDT 2011
src/Makefile.am | 4 -
src/daemon/caps.c | 3 -
src/daemon/cmdline.c | 2
src/daemon/daemon-conf.c | 2
src/daemon/dumpmodules.c | 4 -
src/daemon/ltdl-bind-now.c | 3 -
src/daemon/main.c | 2
src/modules/alsa/alsa-mixer.c | 6 +-
src/modules/alsa/alsa-sink.c | 8 ++-
src/modules/alsa/alsa-source.c | 8 ++-
src/modules/alsa/alsa-util.c | 2
src/modules/alsa/module-alsa-card.c | 2
src/modules/bluetooth/module-bluetooth-device.c | 2
src/modules/echo-cancel/module-echo-cancel.c | 2
src/modules/module-always-sink.c | 4 -
src/modules/module-equalizer-sink.c | 2
src/modules/module-filter-apply.c | 6 +-
src/modules/module-ladspa-sink.c | 2
src/modules/module-null-sink.c | 2
src/modules/module-rygel-media-server.c | 2
src/modules/module-virtual-sink.c | 2
src/modules/module-virtual-source.c | 2
src/modules/reserve-wrap.c | 2
src/pulse/channelmap.c | 2
src/pulse/client-conf-x11.c | 2
src/pulse/client-conf.c | 2
src/pulse/context.c | 2
src/pulse/error.c | 3 -
src/pulse/ext-device-restore.h | 1
src/pulse/format.c | 2
src/pulse/i18n.c | 38 --------------
src/pulse/i18n.h | 62 ------------------------
src/pulse/mainloop-api.c | 2
src/pulse/mainloop-signal.c | 2
src/pulse/mainloop.c | 2
src/pulse/sample.c | 2
src/pulse/thread-mainloop.c | 2
src/pulse/volume.c | 3 -
src/pulsecore/cpu-orc.c | 4 +
src/pulsecore/cpu-orc.h | 4 -
src/pulsecore/i18n.c | 38 ++++++++++++++
src/pulsecore/i18n.h | 61 +++++++++++++++++++++++
src/pulsecore/lock-autospawn.c | 2
src/pulsecore/mime-type.h | 4 -
src/pulsecore/sample-util.c | 2
src/pulsecore/sink.c | 3 -
src/pulsecore/sink.h | 1
src/pulsecore/source.c | 1
src/pulsecore/source.h | 1
src/tests/resampler-test.c | 2
src/utils/pacat.c | 5 -
src/utils/pacmd.c | 2
src/utils/pactl.c | 2
src/utils/pasuspender.c | 3 -
src/utils/pax11publish.c | 2
55 files changed, 174 insertions(+), 164 deletions(-)
New commits:
commit be3879e04e890553abcd9dd27307126bf86aac41
Author: Wang Xingchao <xingchao.wang at intel.com>
Date: Fri Aug 5 10:33:17 2011 -0400
alsa: resets POLLOUT event
revents marked as POLLOUT|POLLERR|POLLWRNORM in "underrun" case that will
trigger unexpected log "ALSA woke us up to write new data to the device, but
there was acturally nothing to write...".
This patch avoids this log message.
diff --git a/src/modules/alsa/alsa-sink.c b/src/modules/alsa/alsa-sink.c
index 395432a..c4aa75b 100644
--- a/src/modules/alsa/alsa-sink.c
+++ b/src/modules/alsa/alsa-sink.c
@@ -1670,6 +1670,7 @@ static void thread_func(void *userdata) {
u->first = TRUE;
u->since_start = 0;
+ revents = 0;
} else if (revents && u->use_tsched && pa_log_ratelimit(PA_LOG_DEBUG))
pa_log_debug("Wakeup from ALSA!");
diff --git a/src/modules/alsa/alsa-source.c b/src/modules/alsa/alsa-source.c
index bdd4493..1dd63f0 100644
--- a/src/modules/alsa/alsa-source.c
+++ b/src/modules/alsa/alsa-source.c
@@ -1445,6 +1445,7 @@ static void thread_func(void *userdata) {
goto fail;
u->first = TRUE;
+ revents = 0;
} else if (revents && u->use_tsched && pa_log_ratelimit(PA_LOG_DEBUG))
pa_log_debug("Wakeup from ALSA!");
commit e564129b8ff6525eaecdd997a907cd6065cb587e
Author: Wang Xingchao <xingchao.wang at intel.com>
Date: Tue Aug 9 10:14:40 2011 -0400
alsa: Update process_usec before going to sleep
During check_left_to_play/record(), the watermark may increase/decrease. So before
sleeping, update the actural sleep time based on latest watermark.
diff --git a/src/modules/alsa/alsa-sink.c b/src/modules/alsa/alsa-sink.c
index 7b9b8d8..395432a 100644
--- a/src/modules/alsa/alsa-sink.c
+++ b/src/modules/alsa/alsa-sink.c
@@ -644,6 +644,7 @@ static int mmap_write(struct userdata *u, pa_usec_t *sleep_usec, pa_bool_t polle
if (u->use_tsched) {
*sleep_usec = pa_bytes_to_usec(left_to_play, &u->sink->sample_spec);
+ process_usec = pa_bytes_to_usec(u->tsched_watermark, &u->sink->sample_spec);
if (*sleep_usec > process_usec)
*sleep_usec -= process_usec;
@@ -784,6 +785,7 @@ static int unix_write(struct userdata *u, pa_usec_t *sleep_usec, pa_bool_t polle
if (u->use_tsched) {
*sleep_usec = pa_bytes_to_usec(left_to_play, &u->sink->sample_spec);
+ process_usec = pa_bytes_to_usec(u->tsched_watermark, &u->sink->sample_spec);
if (*sleep_usec > process_usec)
*sleep_usec -= process_usec;
diff --git a/src/modules/alsa/alsa-source.c b/src/modules/alsa/alsa-source.c
index cbf1dc2..bdd4493 100644
--- a/src/modules/alsa/alsa-source.c
+++ b/src/modules/alsa/alsa-source.c
@@ -608,6 +608,7 @@ static int mmap_read(struct userdata *u, pa_usec_t *sleep_usec, pa_bool_t polled
if (u->use_tsched) {
*sleep_usec = pa_bytes_to_usec(left_to_record, &u->source->sample_spec);
+ process_usec = pa_bytes_to_usec(u->tsched_watermark, &u->source->sample_spec);
if (*sleep_usec > process_usec)
*sleep_usec -= process_usec;
@@ -737,6 +738,7 @@ static int unix_read(struct userdata *u, pa_usec_t *sleep_usec, pa_bool_t polled
if (u->use_tsched) {
*sleep_usec = pa_bytes_to_usec(left_to_record, &u->source->sample_spec);
+ process_usec = pa_bytes_to_usec(u->tsched_watermark, &u->source->sample_spec);
if (*sleep_usec > process_usec)
*sleep_usec -= process_usec;
commit b4e938e1944ef49de2466aae06f824ce4db1c81e
Author: Maarten Bosmans <mkbosmans at gmail.com>
Date: Wed Aug 10 10:30:15 2011 +0200
Move i18n.[ch] to src/pulsecore
The header is used in files troughout the tree and is not included in the public api,
so it belongs in pulsecore, not in pulse.
diff --git a/src/Makefile.am b/src/Makefile.am
index ebf5ebc..6b775e5 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -523,7 +523,6 @@ lib_LTLIBRARIES = \
libpulsecommon_ at PA_MAJORMINOR@_la_SOURCES = \
pulse/client-conf.c pulse/client-conf.h \
- pulse/i18n.c pulse/i18n.h \
pulse/fork-detect.c pulse/fork-detect.h \
pulse/xmalloc.c pulse/xmalloc.h \
pulse/proplist.c pulse/proplist.h \
@@ -545,11 +544,12 @@ libpulsecommon_ at PA_MAJORMINOR@_la_SOURCES = \
pulsecore/endianmacros.h \
pulsecore/flist.c pulsecore/flist.h \
pulsecore/hashmap.c pulsecore/hashmap.h \
+ pulsecore/i18n.c pulsecore/i18n.h \
pulsecore/idxset.c pulsecore/idxset.h \
pulsecore/arpa-inet.c pulsecore/arpa-inet.h \
pulsecore/iochannel.c pulsecore/iochannel.h \
pulsecore/ioline.c pulsecore/ioline.h \
- pulsecore/ipacl.h pulsecore/ipacl.c \
+ pulsecore/ipacl.c pulsecore/ipacl.h \
pulsecore/llist.h \
pulsecore/lock-autospawn.c pulsecore/lock-autospawn.h \
pulsecore/log.c pulsecore/log.h \
diff --git a/src/daemon/caps.c b/src/daemon/caps.c
index 74ccb1c..3759388 100644
--- a/src/daemon/caps.c
+++ b/src/daemon/caps.c
@@ -28,8 +28,7 @@
#include <errno.h>
#include <sys/types.h>
-#include <pulse/i18n.h>
-
+#include <pulsecore/i18n.h>
#include <pulsecore/macro.h>
#include <pulsecore/log.h>
diff --git a/src/daemon/cmdline.c b/src/daemon/cmdline.c
index ec37d46..d42f90d 100644
--- a/src/daemon/cmdline.c
+++ b/src/daemon/cmdline.c
@@ -28,10 +28,10 @@
#include <getopt.h>
#include <pulse/xmalloc.h>
-#include <pulse/i18n.h>
#include <pulse/util.h>
#include <pulsecore/core-util.h>
+#include <pulsecore/i18n.h>
#include <pulsecore/strbuf.h>
#include <pulsecore/macro.h>
diff --git a/src/daemon/daemon-conf.c b/src/daemon/daemon-conf.c
index bb92909..1f70b09 100644
--- a/src/daemon/daemon-conf.c
+++ b/src/daemon/daemon-conf.c
@@ -37,11 +37,11 @@
#include <pulse/xmalloc.h>
#include <pulse/timeval.h>
-#include <pulse/i18n.h>
#include <pulse/version.h>
#include <pulsecore/core-error.h>
#include <pulsecore/core-util.h>
+#include <pulsecore/i18n.h>
#include <pulsecore/strbuf.h>
#include <pulsecore/conf-parser.h>
#include <pulsecore/resampler.h>
diff --git a/src/daemon/dumpmodules.c b/src/daemon/dumpmodules.c
index 68ab5bb..009fbe5 100644
--- a/src/daemon/dumpmodules.c
+++ b/src/daemon/dumpmodules.c
@@ -29,11 +29,11 @@
#include <ltdl.h>
#include <pulse/util.h>
-#include <pulse/i18n.h>
-#include <pulsecore/modinfo.h>
#include <pulsecore/core-util.h>
+#include <pulsecore/i18n.h>
#include <pulsecore/macro.h>
+#include <pulsecore/modinfo.h>
#include "dumpmodules.h"
diff --git a/src/daemon/ltdl-bind-now.c b/src/daemon/ltdl-bind-now.c
index 2ba73ce..605a3e2 100644
--- a/src/daemon/ltdl-bind-now.c
+++ b/src/daemon/ltdl-bind-now.c
@@ -36,8 +36,7 @@
#include <ltdl.h>
-#include <pulse/i18n.h>
-
+#include <pulsecore/i18n.h>
#include <pulsecore/macro.h>
#include <pulsecore/log.h>
diff --git a/src/daemon/main.c b/src/daemon/main.c
index 94c87d1..55726fd 100644
--- a/src/daemon/main.c
+++ b/src/daemon/main.c
@@ -66,8 +66,8 @@
#include <pulse/mainloop-signal.h>
#include <pulse/timeval.h>
#include <pulse/xmalloc.h>
-#include <pulse/i18n.h>
+#include <pulsecore/i18n.h>
#include <pulsecore/lock-autospawn.h>
#include <pulsecore/socket.h>
#include <pulsecore/core-error.h>
diff --git a/src/modules/alsa/alsa-mixer.c b/src/modules/alsa/alsa-mixer.c
index 3a2ed6a..8e34456 100644
--- a/src/modules/alsa/alsa-mixer.c
+++ b/src/modules/alsa/alsa-mixer.c
@@ -38,9 +38,9 @@
#include <pulse/util.h>
#include <pulse/volume.h>
#include <pulse/xmalloc.h>
-#include <pulse/i18n.h>
#include <pulse/utf8.h>
+#include <pulsecore/i18n.h>
#include <pulsecore/log.h>
#include <pulsecore/macro.h>
#include <pulsecore/core-util.h>
diff --git a/src/modules/alsa/alsa-sink.c b/src/modules/alsa/alsa-sink.c
index 00eb33a..7b9b8d8 100644
--- a/src/modules/alsa/alsa-sink.c
+++ b/src/modules/alsa/alsa-sink.c
@@ -32,13 +32,13 @@
#include <valgrind/memcheck.h>
#endif
-#include <pulse/i18n.h>
#include <pulse/rtclock.h>
#include <pulse/timeval.h>
#include <pulse/volume.h>
#include <pulse/xmalloc.h>
#include <pulsecore/core.h>
+#include <pulsecore/i18n.h>
#include <pulsecore/module.h>
#include <pulsecore/memchunk.h>
#include <pulsecore/sink.h>
diff --git a/src/modules/alsa/alsa-source.c b/src/modules/alsa/alsa-source.c
index 6438c33..cbf1dc2 100644
--- a/src/modules/alsa/alsa-source.c
+++ b/src/modules/alsa/alsa-source.c
@@ -28,13 +28,13 @@
#include <asoundlib.h>
-#include <pulse/i18n.h>
#include <pulse/rtclock.h>
#include <pulse/timeval.h>
#include <pulse/volume.h>
#include <pulse/xmalloc.h>
#include <pulsecore/core.h>
+#include <pulsecore/i18n.h>
#include <pulsecore/module.h>
#include <pulsecore/memchunk.h>
#include <pulsecore/sink.h>
diff --git a/src/modules/alsa/alsa-util.c b/src/modules/alsa/alsa-util.c
index 883c26f..602e9a3 100644
--- a/src/modules/alsa/alsa-util.c
+++ b/src/modules/alsa/alsa-util.c
@@ -31,9 +31,9 @@
#include <pulse/xmalloc.h>
#include <pulse/timeval.h>
#include <pulse/util.h>
-#include <pulse/i18n.h>
#include <pulse/utf8.h>
+#include <pulsecore/i18n.h>
#include <pulsecore/log.h>
#include <pulsecore/macro.h>
#include <pulsecore/core-util.h>
diff --git a/src/modules/alsa/module-alsa-card.c b/src/modules/alsa/module-alsa-card.c
index e60aa5e..8b19d42 100644
--- a/src/modules/alsa/module-alsa-card.c
+++ b/src/modules/alsa/module-alsa-card.c
@@ -24,9 +24,9 @@
#endif
#include <pulse/xmalloc.h>
-#include <pulse/i18n.h>
#include <pulsecore/core-util.h>
+#include <pulsecore/i18n.h>
#include <pulsecore/modargs.h>
#include <pulsecore/queue.h>
diff --git a/src/modules/bluetooth/module-bluetooth-device.c b/src/modules/bluetooth/module-bluetooth-device.c
index 9f81336..efbc144 100644
--- a/src/modules/bluetooth/module-bluetooth-device.c
+++ b/src/modules/bluetooth/module-bluetooth-device.c
@@ -28,12 +28,12 @@
#include <linux/sockios.h>
#include <arpa/inet.h>
-#include <pulse/i18n.h>
#include <pulse/rtclock.h>
#include <pulse/sample.h>
#include <pulse/timeval.h>
#include <pulse/xmalloc.h>
+#include <pulsecore/i18n.h>
#include <pulsecore/module.h>
#include <pulsecore/modargs.h>
#include <pulsecore/core-rtclock.h>
diff --git a/src/modules/echo-cancel/module-echo-cancel.c b/src/modules/echo-cancel/module-echo-cancel.c
index 961f289..704228e 100644
--- a/src/modules/echo-cancel/module-echo-cancel.c
+++ b/src/modules/echo-cancel/module-echo-cancel.c
@@ -35,10 +35,10 @@
#include "echo-cancel.h"
#include <pulse/xmalloc.h>
-#include <pulse/i18n.h>
#include <pulse/timeval.h>
#include <pulse/rtclock.h>
+#include <pulsecore/i18n.h>
#include <pulsecore/atomic.h>
#include <pulsecore/macro.h>
#include <pulsecore/namereg.h>
diff --git a/src/modules/module-always-sink.c b/src/modules/module-always-sink.c
index 4c871da..5d9ee63 100644
--- a/src/modules/module-always-sink.c
+++ b/src/modules/module-always-sink.c
@@ -24,13 +24,13 @@
#endif
#include <pulse/xmalloc.h>
-#include <pulse/i18n.h>
#include <pulsecore/core.h>
+#include <pulsecore/core-util.h>
+#include <pulsecore/i18n.h>
#include <pulsecore/sink.h>
#include <pulsecore/modargs.h>
#include <pulsecore/log.h>
-#include <pulsecore/core-util.h>
#include "module-always-sink-symdef.h"
diff --git a/src/modules/module-equalizer-sink.c b/src/modules/module-equalizer-sink.c
index ee9b678..7161c05 100644
--- a/src/modules/module-equalizer-sink.c
+++ b/src/modules/module-equalizer-sink.c
@@ -46,10 +46,10 @@
#include <fftw3.h>
#include <pulse/xmalloc.h>
-#include <pulse/i18n.h>
#include <pulse/timeval.h>
#include <pulsecore/core-rtclock.h>
+#include <pulsecore/i18n.h>
#include <pulsecore/aupdate.h>
#include <pulsecore/namereg.h>
#include <pulsecore/sink.h>
diff --git a/src/modules/module-filter-apply.c b/src/modules/module-filter-apply.c
index c742373..bf5d0c5 100644
--- a/src/modules/module-filter-apply.c
+++ b/src/modules/module-filter-apply.c
@@ -25,14 +25,14 @@
#include <pulse/timeval.h>
#include <pulse/rtclock.h>
-#include <pulse/i18n.h>
#include <pulse/xmalloc.h>
+#include <pulsecore/core.h>
+#include <pulsecore/core-util.h>
+#include <pulsecore/i18n.h>
#include <pulsecore/macro.h>
#include <pulsecore/hashmap.h>
#include <pulsecore/hook-list.h>
-#include <pulsecore/core.h>
-#include <pulsecore/core-util.h>
#include <pulsecore/sink-input.h>
#include <pulsecore/modargs.h>
diff --git a/src/modules/module-ladspa-sink.c b/src/modules/module-ladspa-sink.c
index 9b4903a..7a60403 100644
--- a/src/modules/module-ladspa-sink.c
+++ b/src/modules/module-ladspa-sink.c
@@ -29,8 +29,8 @@
#include <math.h>
#include <pulse/xmalloc.h>
-#include <pulse/i18n.h>
+#include <pulsecore/i18n.h>
#include <pulsecore/namereg.h>
#include <pulsecore/sink.h>
#include <pulsecore/module.h>
diff --git a/src/modules/module-null-sink.c b/src/modules/module-null-sink.c
index 09e6ab7..10868f5 100644
--- a/src/modules/module-null-sink.c
+++ b/src/modules/module-null-sink.c
@@ -31,8 +31,8 @@
#include <pulse/rtclock.h>
#include <pulse/timeval.h>
#include <pulse/xmalloc.h>
-#include <pulse/i18n.h>
+#include <pulsecore/i18n.h>
#include <pulsecore/macro.h>
#include <pulsecore/sink.h>
#include <pulsecore/module.h>
diff --git a/src/modules/module-rygel-media-server.c b/src/modules/module-rygel-media-server.c
index 1856835..9af0ceb 100644
--- a/src/modules/module-rygel-media-server.c
+++ b/src/modules/module-rygel-media-server.c
@@ -30,9 +30,9 @@
#include <pulse/gccmacro.h>
#include <pulse/xmalloc.h>
-#include <pulse/i18n.h>
#include <pulse/utf8.h>
+#include <pulsecore/i18n.h>
#include <pulsecore/sink.h>
#include <pulsecore/source.h>
#include <pulsecore/core-util.h>
diff --git a/src/modules/module-virtual-sink.c b/src/modules/module-virtual-sink.c
index 0a410e4..34c4ae8 100644
--- a/src/modules/module-virtual-sink.c
+++ b/src/modules/module-virtual-sink.c
@@ -29,8 +29,8 @@
#include <pulse/gccmacro.h>
#include <pulse/xmalloc.h>
-#include <pulse/i18n.h>
+#include <pulsecore/i18n.h>
#include <pulsecore/namereg.h>
#include <pulsecore/sink.h>
#include <pulsecore/module.h>
diff --git a/src/modules/module-virtual-source.c b/src/modules/module-virtual-source.c
index b7f6982..70e327b 100644
--- a/src/modules/module-virtual-source.c
+++ b/src/modules/module-virtual-source.c
@@ -27,8 +27,8 @@
#include <stdio.h>
#include <pulse/xmalloc.h>
-#include <pulse/i18n.h>
+#include <pulsecore/i18n.h>
#include <pulsecore/macro.h>
#include <pulsecore/namereg.h>
#include <pulsecore/sink.h>
diff --git a/src/modules/reserve-wrap.c b/src/modules/reserve-wrap.c
index 515cb22..1411d27 100644
--- a/src/modules/reserve-wrap.c
+++ b/src/modules/reserve-wrap.c
@@ -26,10 +26,10 @@
#include <errno.h>
#include <pulse/xmalloc.h>
-#include <pulse/i18n.h>
#include <pulsecore/core-error.h>
#include <pulsecore/core-util.h>
+#include <pulsecore/i18n.h>
#include <pulsecore/shared.h>
#ifdef HAVE_DBUS
diff --git a/src/pulse/channelmap.c b/src/pulse/channelmap.c
index 83fdb43..0d199f3 100644
--- a/src/pulse/channelmap.c
+++ b/src/pulse/channelmap.c
@@ -29,8 +29,8 @@
#include <string.h>
#include <pulse/xmalloc.h>
-#include <pulse/i18n.h>
+#include <pulsecore/i18n.h>
#include <pulsecore/core-util.h>
#include <pulsecore/macro.h>
#include <pulsecore/bitset.h>
diff --git a/src/pulse/client-conf-x11.c b/src/pulse/client-conf-x11.c
index 76b1b7b..76b9f6f 100644
--- a/src/pulse/client-conf-x11.c
+++ b/src/pulse/client-conf-x11.c
@@ -28,8 +28,8 @@
#include <xcb/xcb.h>
#include <pulse/xmalloc.h>
-#include <pulse/i18n.h>
+#include <pulsecore/i18n.h>
#include <pulsecore/x11prop.h>
#include <pulsecore/log.h>
#include <pulsecore/core-util.h>
diff --git a/src/pulse/client-conf.c b/src/pulse/client-conf.c
index e899af1..e2c2aae 100644
--- a/src/pulse/client-conf.c
+++ b/src/pulse/client-conf.c
@@ -29,8 +29,8 @@
#include <errno.h>
#include <pulse/xmalloc.h>
-#include <pulse/i18n.h>
+#include <pulsecore/i18n.h>
#include <pulsecore/macro.h>
#include <pulsecore/core-error.h>
#include <pulsecore/log.h>
diff --git a/src/pulse/context.c b/src/pulse/context.c
index dbb5d42..25d04a1 100644
--- a/src/pulse/context.c
+++ b/src/pulse/context.c
@@ -44,7 +44,6 @@
#include <pulse/version.h>
#include <pulse/xmalloc.h>
#include <pulse/util.h>
-#include <pulse/i18n.h>
#include <pulse/mainloop.h>
#include <pulse/timeval.h>
#include <pulse/fork-detect.h>
@@ -54,6 +53,7 @@
#endif
#include <pulsecore/core-error.h>
+#include <pulsecore/i18n.h>
#include <pulsecore/native-common.h>
#include <pulsecore/pdispatch.h>
#include <pulsecore/pstream.h>
diff --git a/src/pulse/error.c b/src/pulse/error.c
index 19a759c..eb5082a 100644
--- a/src/pulse/error.c
+++ b/src/pulse/error.c
@@ -29,7 +29,8 @@
#include <stdlib.h>
#include <pulse/def.h>
-#include <pulse/i18n.h>
+
+#include <pulsecore/i18n.h>
#include "error.h"
diff --git a/src/pulse/format.c b/src/pulse/format.c
index b256d72..81c329f 100644
--- a/src/pulse/format.c
+++ b/src/pulse/format.c
@@ -29,9 +29,9 @@
#include <pulse/internal.h>
#include <pulse/xmalloc.h>
-#include <pulse/i18n.h>
#include <pulsecore/core-util.h>
+#include <pulsecore/i18n.h>
#include <pulsecore/macro.h>
#include "format.h"
diff --git a/src/pulse/i18n.c b/src/pulse/i18n.c
deleted file mode 100644
index 7f25b20..0000000
--- a/src/pulse/i18n.c
+++ /dev/null
@@ -1,38 +0,0 @@
-/***
- This file is part of PulseAudio.
-
- Copyright 2008 Lennart Poettering
-
- PulseAudio is free software; you can redistribute it and/or modify
- it under the terms of the GNU Lesser General Public License as
- published by the Free Software Foundation; either version 2.1 of the
- License, or (at your option) any later version.
-
- PulseAudio is distributed in the hope that it will be useful, but
- WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with PulseAudio; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
- USA.
-***/
-
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-#include <pulsecore/once.h>
-
-#include "i18n.h"
-
-void pa_init_i18n(void) {
-
- PA_ONCE_BEGIN {
-
- bindtextdomain(GETTEXT_PACKAGE, PULSE_LOCALEDIR);
- bind_textdomain_codeset(GETTEXT_PACKAGE, "UTF-8");
-
- } PA_ONCE_END;
-}
diff --git a/src/pulse/i18n.h b/src/pulse/i18n.h
deleted file mode 100644
index fac3c7b..0000000
--- a/src/pulse/i18n.h
+++ /dev/null
@@ -1,62 +0,0 @@
-#ifndef foopulsei18nhfoo
-#define foopulsei18nhfoo
-
-/***
- This file is part of PulseAudio.
-
- Copyright 2008 Lennart Poettering
-
- PulseAudio is free software; you can redistribute it and/or modify
- it under the terms of the GNU Lesser General Public License as
- published by the Free Software Foundation; either version 2.1 of the
- License, or (at your option) any later version.
-
- PulseAudio is distributed in the hope that it will be useful, but
- WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with PulseAudio; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
- USA.
-***/
-
-#include <pulse/cdecl.h>
-#include <pulse/version.h>
-
-PA_C_DECL_BEGIN
-
-#if !defined(GETTEXT_PACKAGE)
-#error "Something is very wrong here, config.h needs to be included first"
-#endif
-
-#ifdef ENABLE_NLS
-
-#include <libintl.h>
-
-#define _(String) dgettext(GETTEXT_PACKAGE, String)
-#ifdef gettext_noop
-#define N_(String) gettext_noop(String)
-#else
-#define N_(String) (String)
-#endif
-
-#else /* NLS is disabled */
-
-#define _(String) (String)
-#define N_(String) (String)
-#define textdomain(String) (String)
-#define gettext(String) (String)
-#define dgettext(Domain,String) (String)
-#define dcgettext(Domain,String,Type) (String)
-#define bindtextdomain(Domain,Directory) (Domain)
-#define bind_textdomain_codeset(Domain,Codeset) (Codeset)
-
-#endif /* ENABLE_NLS */
-
-void pa_init_i18n(void);
-
-PA_C_DECL_END
-
-#endif
diff --git a/src/pulse/mainloop-api.c b/src/pulse/mainloop-api.c
index c1f7604..45539cc 100644
--- a/src/pulse/mainloop-api.c
+++ b/src/pulse/mainloop-api.c
@@ -26,8 +26,8 @@
#include <stdlib.h>
#include <pulse/xmalloc.h>
-#include <pulse/i18n.h>
+#include <pulsecore/i18n.h>
#include <pulsecore/macro.h>
#include "mainloop-api.h"
diff --git a/src/pulse/mainloop-signal.c b/src/pulse/mainloop-signal.c
index 393d1f7..9482fe3 100644
--- a/src/pulse/mainloop-signal.c
+++ b/src/pulse/mainloop-signal.c
@@ -36,10 +36,10 @@
#endif
#include <pulse/xmalloc.h>
-#include <pulse/i18n.h>
#include <pulsecore/core-error.h>
#include <pulsecore/core-util.h>
+#include <pulsecore/i18n.h>
#include <pulsecore/log.h>
#include <pulsecore/macro.h>
diff --git a/src/pulse/mainloop.c b/src/pulse/mainloop.c
index 3ef387b..8e956c9 100644
--- a/src/pulse/mainloop.c
+++ b/src/pulse/mainloop.c
@@ -34,7 +34,6 @@
#include <pulsecore/pipe.h>
#endif
-#include <pulse/i18n.h>
#include <pulse/rtclock.h>
#include <pulse/timeval.h>
#include <pulse/xmalloc.h>
@@ -42,6 +41,7 @@
#include <pulsecore/poll.h>
#include <pulsecore/core-rtclock.h>
#include <pulsecore/core-util.h>
+#include <pulsecore/i18n.h>
#include <pulsecore/llist.h>
#include <pulsecore/log.h>
#include <pulsecore/core-error.h>
diff --git a/src/pulse/sample.c b/src/pulse/sample.c
index 8365e93..b613612 100644
--- a/src/pulse/sample.c
+++ b/src/pulse/sample.c
@@ -28,9 +28,9 @@
#include <string.h>
#include <pulse/timeval.h>
-#include <pulse/i18n.h>
#include <pulsecore/core-util.h>
+#include <pulsecore/i18n.h>
#include <pulsecore/macro.h>
#include "sample.h"
diff --git a/src/pulse/thread-mainloop.c b/src/pulse/thread-mainloop.c
index b07ad78..aa56a92 100644
--- a/src/pulse/thread-mainloop.c
+++ b/src/pulse/thread-mainloop.c
@@ -33,8 +33,8 @@
#include <pulse/xmalloc.h>
#include <pulse/mainloop.h>
-#include <pulse/i18n.h>
+#include <pulsecore/i18n.h>
#include <pulsecore/log.h>
#include <pulsecore/thread.h>
#include <pulsecore/mutex.h>
diff --git a/src/pulse/volume.c b/src/pulse/volume.c
index 82e5757..cf0a226 100644
--- a/src/pulse/volume.c
+++ b/src/pulse/volume.c
@@ -27,9 +27,8 @@
#include <string.h>
#include <math.h>
-#include <pulse/i18n.h>
-
#include <pulsecore/core-util.h>
+#include <pulsecore/i18n.h>
#include <pulsecore/macro.h>
#include <pulsecore/sample-util.h>
diff --git a/src/pulsecore/i18n.c b/src/pulsecore/i18n.c
new file mode 100644
index 0000000..7f25b20
--- /dev/null
+++ b/src/pulsecore/i18n.c
@@ -0,0 +1,38 @@
+/***
+ This file is part of PulseAudio.
+
+ Copyright 2008 Lennart Poettering
+
+ PulseAudio is free software; you can redistribute it and/or modify
+ it under the terms of the GNU Lesser General Public License as
+ published by the Free Software Foundation; either version 2.1 of the
+ License, or (at your option) any later version.
+
+ PulseAudio is distributed in the hope that it will be useful, but
+ WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with PulseAudio; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
+ USA.
+***/
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include <pulsecore/once.h>
+
+#include "i18n.h"
+
+void pa_init_i18n(void) {
+
+ PA_ONCE_BEGIN {
+
+ bindtextdomain(GETTEXT_PACKAGE, PULSE_LOCALEDIR);
+ bind_textdomain_codeset(GETTEXT_PACKAGE, "UTF-8");
+
+ } PA_ONCE_END;
+}
diff --git a/src/pulsecore/i18n.h b/src/pulsecore/i18n.h
new file mode 100644
index 0000000..d828bec
--- /dev/null
+++ b/src/pulsecore/i18n.h
@@ -0,0 +1,61 @@
+#ifndef foopulsei18nhfoo
+#define foopulsei18nhfoo
+
+/***
+ This file is part of PulseAudio.
+
+ Copyright 2008 Lennart Poettering
+
+ PulseAudio is free software; you can redistribute it and/or modify
+ it under the terms of the GNU Lesser General Public License as
+ published by the Free Software Foundation; either version 2.1 of the
+ License, or (at your option) any later version.
+
+ PulseAudio is distributed in the hope that it will be useful, but
+ WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with PulseAudio; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
+ USA.
+***/
+
+#include <pulse/cdecl.h>
+
+PA_C_DECL_BEGIN
+
+#if !defined(GETTEXT_PACKAGE)
+#error "Something is very wrong here, config.h needs to be included first"
+#endif
+
+#ifdef ENABLE_NLS
+
+#include <libintl.h>
+
+#define _(String) dgettext(GETTEXT_PACKAGE, String)
+#ifdef gettext_noop
+#define N_(String) gettext_noop(String)
+#else
+#define N_(String) (String)
+#endif
+
+#else /* NLS is disabled */
+
+#define _(String) (String)
+#define N_(String) (String)
+#define textdomain(String) (String)
+#define gettext(String) (String)
+#define dgettext(Domain,String) (String)
+#define dcgettext(Domain,String,Type) (String)
+#define bindtextdomain(Domain,Directory) (Domain)
+#define bind_textdomain_codeset(Domain,Codeset) (Codeset)
+
+#endif /* ENABLE_NLS */
+
+void pa_init_i18n(void);
+
+PA_C_DECL_END
+
+#endif
diff --git a/src/pulsecore/lock-autospawn.c b/src/pulsecore/lock-autospawn.c
index 40aa5e9..b1d414b 100644
--- a/src/pulsecore/lock-autospawn.c
+++ b/src/pulsecore/lock-autospawn.c
@@ -32,9 +32,9 @@
#endif
#include <pulse/gccmacro.h>
-#include <pulse/i18n.h>
#include <pulse/xmalloc.h>
+#include <pulsecore/i18n.h>
#include <pulsecore/poll.h>
#include <pulsecore/mutex.h>
#include <pulsecore/thread.h>
diff --git a/src/pulsecore/sink.c b/src/pulsecore/sink.c
index 714b3d2..42a8eb3 100644
--- a/src/pulsecore/sink.c
+++ b/src/pulsecore/sink.c
@@ -34,10 +34,10 @@
#include <pulse/xmalloc.h>
#include <pulse/timeval.h>
#include <pulse/util.h>
-#include <pulse/i18n.h>
#include <pulse/rtclock.h>
#include <pulse/internal.h>
+#include <pulsecore/i18n.h>
#include <pulsecore/sink-input.h>
#include <pulsecore/namereg.h>
#include <pulsecore/core-util.h>
diff --git a/src/tests/resampler-test.c b/src/tests/resampler-test.c
index 78461da..545c0e0 100644
--- a/src/tests/resampler-test.c
+++ b/src/tests/resampler-test.c
@@ -25,13 +25,13 @@
#include <getopt.h>
#include <locale.h>
-#include <pulse/i18n.h>
#include <pulse/pulseaudio.h>
#include <pulse/rtclock.h>
#include <pulse/sample.h>
#include <pulse/volume.h>
+#include <pulsecore/i18n.h>
#include <pulsecore/resampler.h>
#include <pulsecore/macro.h>
#include <pulsecore/endianmacros.h>
diff --git a/src/utils/pacat.c b/src/utils/pacat.c
index 323f071..f687402 100644
--- a/src/utils/pacat.c
+++ b/src/utils/pacat.c
@@ -37,15 +37,14 @@
#include <sndfile.h>
-#include <pulse/i18n.h>
#include <pulse/pulseaudio.h>
#include <pulse/rtclock.h>
-#include <pulsecore/macro.h>
#include <pulsecore/core-util.h>
+#include <pulsecore/i18n.h>
#include <pulsecore/log.h>
+#include <pulsecore/macro.h>
#include <pulsecore/sndfile-util.h>
-#include <pulsecore/core-util.h>
#define TIME_EVENT_USEC 50000
diff --git a/src/utils/pacmd.c b/src/utils/pacmd.c
index f077980..4166964 100644
--- a/src/utils/pacmd.c
+++ b/src/utils/pacmd.c
@@ -34,8 +34,8 @@
#include <pulse/util.h>
#include <pulse/xmalloc.h>
-#include <pulse/i18n.h>
+#include <pulsecore/i18n.h>
#include <pulsecore/poll.h>
#include <pulsecore/macro.h>
#include <pulsecore/core-util.h>
diff --git a/src/utils/pactl.c b/src/utils/pactl.c
index c95a38c..2c5be93 100644
--- a/src/utils/pactl.c
+++ b/src/utils/pactl.c
@@ -35,9 +35,9 @@
#include <sndfile.h>
-#include <pulse/i18n.h>
#include <pulse/pulseaudio.h>
+#include <pulsecore/i18n.h>
#include <pulsecore/macro.h>
#include <pulsecore/core-util.h>
#include <pulsecore/log.h>
diff --git a/src/utils/pasuspender.c b/src/utils/pasuspender.c
index e1ee251..90881b2 100644
--- a/src/utils/pasuspender.c
+++ b/src/utils/pasuspender.c
@@ -40,8 +40,9 @@
#include <sys/prctl.h>
#endif
-#include <pulse/i18n.h>
#include <pulse/pulseaudio.h>
+
+#include <pulsecore/i18n.h>
#include <pulsecore/macro.h>
static pa_context *context = NULL;
diff --git a/src/utils/pax11publish.c b/src/utils/pax11publish.c
index 41361a1..ddfb724 100644
--- a/src/utils/pax11publish.c
+++ b/src/utils/pax11publish.c
@@ -31,10 +31,10 @@
#include <xcb/xcb.h>
#include <pulse/util.h>
-#include <pulse/i18n.h>
#include <pulse/client-conf.h>
#include <pulsecore/core-util.h>
+#include <pulsecore/i18n.h>
#include <pulsecore/log.h>
#include <pulsecore/authkey.h>
#include <pulsecore/native-common.h>
commit 464ddcdfeacc3ac8c98d13128e35030aae096110
Author: Maarten Bosmans <mkbosmans at gmail.com>
Date: Wed Aug 10 10:30:14 2011 +0200
Add some missing format.h includes
diff --git a/src/pulse/ext-device-restore.h b/src/pulse/ext-device-restore.h
index 829beba..65dab43 100644
--- a/src/pulse/ext-device-restore.h
+++ b/src/pulse/ext-device-restore.h
@@ -24,8 +24,8 @@
***/
#include <pulse/context.h>
-#include <pulse/version.h>
#include <pulse/format.h>
+#include <pulse/version.h>
/** \file
*
diff --git a/src/pulsecore/sink.c b/src/pulsecore/sink.c
index 77c665f..714b3d2 100644
--- a/src/pulsecore/sink.c
+++ b/src/pulsecore/sink.c
@@ -29,6 +29,7 @@
#include <string.h>
#include <pulse/introspect.h>
+#include <pulse/format.h>
#include <pulse/utf8.h>
#include <pulse/xmalloc.h>
#include <pulse/timeval.h>
diff --git a/src/pulsecore/sink.h b/src/pulsecore/sink.h
index 239936b..8aa04b8 100644
--- a/src/pulsecore/sink.h
+++ b/src/pulsecore/sink.h
@@ -30,6 +30,7 @@ typedef struct pa_sink_volume_change pa_sink_volume_change;
#include <inttypes.h>
#include <pulse/def.h>
+#include <pulse/format.h>
#include <pulse/sample.h>
#include <pulse/channelmap.h>
#include <pulse/volume.h>
diff --git a/src/pulsecore/source.c b/src/pulsecore/source.c
index 9764a88..31ce39d 100644
--- a/src/pulsecore/source.c
+++ b/src/pulsecore/source.c
@@ -27,6 +27,7 @@
#include <stdio.h>
#include <stdlib.h>
+#include <pulse/format.h>
#include <pulse/utf8.h>
#include <pulse/xmalloc.h>
#include <pulse/timeval.h>
diff --git a/src/pulsecore/source.h b/src/pulsecore/source.h
index 13d279d..50cec77 100644
--- a/src/pulsecore/source.h
+++ b/src/pulsecore/source.h
@@ -29,6 +29,7 @@ typedef struct pa_source_volume_change pa_source_volume_change;
#include <inttypes.h>
#include <pulse/def.h>
+#include <pulse/format.h>
#include <pulse/sample.h>
#include <pulse/channelmap.h>
#include <pulse/volume.h>
commit f10da7683d4b147cc1fa8ce94608bc3e3e17f1f4
Author: Maarten Bosmans <mkbosmans at gmail.com>
Date: Wed Aug 10 10:30:13 2011 +0200
Include config.h consistently in source files and not in headers
diff --git a/src/pulsecore/cpu-orc.c b/src/pulsecore/cpu-orc.c
index d4a1535..21d49ed 100644
--- a/src/pulsecore/cpu-orc.c
+++ b/src/pulsecore/cpu-orc.c
@@ -19,6 +19,10 @@
USA.
***/
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
#include "cpu-orc.h"
void pa_cpu_init_orc(pa_cpu_info cpu_info)
diff --git a/src/pulsecore/cpu-orc.h b/src/pulsecore/cpu-orc.h
index 9924d27..d236f7a 100644
--- a/src/pulsecore/cpu-orc.h
+++ b/src/pulsecore/cpu-orc.h
@@ -22,10 +22,6 @@
USA.
***/
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
#include <pulsecore/cpu.h>
/* Orc-optimised bits */
diff --git a/src/pulsecore/mime-type.h b/src/pulsecore/mime-type.h
index db77379..0a1d892 100644
--- a/src/pulsecore/mime-type.h
+++ b/src/pulsecore/mime-type.h
@@ -21,10 +21,6 @@
USA.
***/
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
#include <pulsecore/macro.h>
#include <pulse/sample.h>
#include <pulse/channelmap.h>
commit 625380d809c6c9c57f669917f86cb002e36df664
Author: Lu Guanqun <guanqun.lu at intel.com>
Date: Wed Aug 10 23:12:12 2011 +0800
sample-util: use built-in function
use built-in function pa_frame_aligned().
Signed-off-by: Lu Guanqun <guanqun.lu at intel.com>
diff --git a/src/pulsecore/sample-util.c b/src/pulsecore/sample-util.c
index 8a13495..16ec4ad 100644
--- a/src/pulsecore/sample-util.c
+++ b/src/pulsecore/sample-util.c
@@ -734,7 +734,7 @@ void pa_volume_memchunk(
pa_assert(c);
pa_assert(spec);
- pa_assert(c->length % pa_frame_size(spec) == 0);
+ pa_assert(pa_frame_aligned(c->length, spec));
pa_assert(volume);
if (pa_memblock_is_silence(c->memblock))
commit 1824fc6d73bf0e73bd8e3d9be197222851d7adee
Author: Colin Guthrie <colin at mageia.org>
Date: Wed Aug 10 13:16:28 2011 +0200
ext-device-restore: Include format.h
diff --git a/src/pulse/ext-device-restore.h b/src/pulse/ext-device-restore.h
index f43946b..829beba 100644
--- a/src/pulse/ext-device-restore.h
+++ b/src/pulse/ext-device-restore.h
@@ -25,6 +25,7 @@
#include <pulse/context.h>
#include <pulse/version.h>
+#include <pulse/format.h>
/** \file
*
commit 6b1d9b8d6ae3634caa31c20397ce8510a028dd55
Author: Colin Guthrie <colin at mageia.org>
Date: Wed Aug 10 10:39:57 2011 +0200
alsa: Ensure that volumes are written to the h/w at startup.
If the device support SYNC_VOLUMES then we need to do an additional push
to get the actual change on to the h/w.
diff --git a/src/modules/alsa/alsa-sink.c b/src/modules/alsa/alsa-sink.c
index c1655d4..00eb33a 100644
--- a/src/modules/alsa/alsa-sink.c
+++ b/src/modules/alsa/alsa-sink.c
@@ -2176,6 +2176,9 @@ pa_sink *pa_alsa_sink_new(pa_module *m, pa_modargs *ma, const char*driver, pa_ca
u->sink->get_mute(u->sink);
}
+ if ((data.volume_is_set || data.muted_is_set) && u->sink->write_volume)
+ u->sink->write_volume(u->sink);
+
pa_sink_put(u->sink);
if (profile_set)
diff --git a/src/modules/alsa/alsa-source.c b/src/modules/alsa/alsa-source.c
index 6b6f513..6438c33 100644
--- a/src/modules/alsa/alsa-source.c
+++ b/src/modules/alsa/alsa-source.c
@@ -1935,6 +1935,9 @@ pa_source *pa_alsa_source_new(pa_module *m, pa_modargs *ma, const char*driver, p
u->source->get_mute(u->source);
}
+ if ((data.volume_is_set || data.muted_is_set) && u->source->write_volume)
+ u->source->write_volume(u->source);
+
pa_source_put(u->source);
if (profile_set)
commit 0b5a181e1bebdbe6221ae324f98b22ab5a136590
Author: Colin Guthrie <colin at mageia.org>
Date: Mon Jul 18 10:48:25 2011 +0100
alsa-mixer: Fix rounding direction on mixer initialisation
diff --git a/src/modules/alsa/alsa-mixer.c b/src/modules/alsa/alsa-mixer.c
index 4542ac3..3a2ed6a 100644
--- a/src/modules/alsa/alsa-mixer.c
+++ b/src/modules/alsa/alsa-mixer.c
@@ -1175,7 +1175,7 @@ static int element_set_constant_volume(pa_alsa_element *e, snd_mixer_t *m) {
if (e->db_fix) {
long dB = 0;
- volume = decibel_fix_get_step(e->db_fix, &dB, +1);
+ volume = decibel_fix_get_step(e->db_fix, &dB, (e->direction == PA_ALSA_DIRECTION_OUTPUT ? +1 : -1));
volume_set = TRUE;
}
break;
@@ -1201,7 +1201,7 @@ static int element_set_constant_volume(pa_alsa_element *e, snd_mixer_t *m) {
if (e->direction == PA_ALSA_DIRECTION_OUTPUT)
r = snd_mixer_selem_set_playback_dB_all(me, 0, +1);
else
- r = snd_mixer_selem_set_capture_dB_all(me, 0, +1);
+ r = snd_mixer_selem_set_capture_dB_all(me, 0, -1);
}
if (r < 0)
More information about the pulseaudio-commits
mailing list