[pulseaudio-commits] Branch 'next' - 4 commits - configure.ac src/Makefile.am src/modules src/pulsecore

Tanu Kaskinen tanuk at kemper.freedesktop.org
Tue Apr 2 04:20:48 PDT 2013


 configure.ac                       |    2 +-
 src/Makefile.am                    |    4 ++--
 src/modules/module-console-kit.c   |   13 +++----------
 src/modules/module-systemd-login.c |    6 ++----
 src/pulsecore/remap.c              |    3 ++-
 src/pulsecore/remap_mmx.c          |    3 ++-
 src/pulsecore/remap_sse.c          |    3 ++-
 src/pulsecore/sink.c               |    2 +-
 8 files changed, 15 insertions(+), 21 deletions(-)

New commits:
commit ba9cfcc20df7f723a8460cde36b464d696a3f067
Author: poljar (Damir Jelić) <poljarinho at gmail.com>
Date:   Fri Mar 29 12:49:42 2013 +0100

    systemd-login: Remove unused variable session.

diff --git a/src/modules/module-systemd-login.c b/src/modules/module-systemd-login.c
index cc8b462..72de47f 100644
--- a/src/modules/module-systemd-login.c
+++ b/src/modules/module-systemd-login.c
@@ -211,7 +211,6 @@ fail:
 
 void pa__done(pa_module *m) {
     struct userdata *u;
-    struct session *session;
 
     pa_assert(m);
 

commit 1551808038c9bd882ebd9eaaf97c66fda5388923
Author: Martin Pitt <martinpitt at gnome.org>
Date:   Thu Mar 21 14:17:33 2013 +0100

    console-kit, systemd-login: Check for logind, not for systemd
    
    It is possible to build systemd without logind, in which case sd_booted() wo
    succeed. Check for /run/systemd/seats to test for logind instead, as
    recommended by systemd upstream.
    
    For details, see:
    <https://mail.gnome.org/archives/desktop-devel-list/2013-March/msg00092.html
    
    Drop the now unnecessary linking against libsystemd-daemon, and stop linking
    the consolekit module to any systemd library.
    
    https://bugs.freedesktop.org/show_bug.cgi?id=62593

diff --git a/configure.ac b/configure.ac
index ba9111a..b9411e5 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1166,7 +1166,7 @@ AC_ARG_ENABLE([systemd],
     AS_HELP_STRING([--disable-systemd],[Disable optional systemd support]))
 
 AS_IF([test "x$enable_systemd" != "xno"],
-    [PKG_CHECK_MODULES(SYSTEMD, [ libsystemd-login libsystemd-daemon ], HAVE_SYSTEMD=1, HAVE_SYSTEMD=0)],
+    [PKG_CHECK_MODULES(SYSTEMD, [ libsystemd-login ], HAVE_SYSTEMD=1, HAVE_SYSTEMD=0)],
     HAVE_SYSTEMD=0)
 
 AS_IF([test "x$enable_systemd" = "xyes" && test "x$HAVE_SYSTEMD" = "x0"],
diff --git a/src/Makefile.am b/src/Makefile.am
index 559c43e..4b3efa3 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -1971,8 +1971,8 @@ module_udev_detect_la_CFLAGS = $(AM_CFLAGS) $(UDEV_CFLAGS)
 
 module_console_kit_la_SOURCES = modules/module-console-kit.c
 module_console_kit_la_LDFLAGS = $(MODULE_LDFLAGS)
-module_console_kit_la_LIBADD = $(MODULE_LIBADD) $(DBUS_LIBS) $(SYSTEMD_LIBS)
-module_console_kit_la_CFLAGS = $(AM_CFLAGS) $(DBUS_CFLAGS) $(SYSTEMD_CFLAGS)
+module_console_kit_la_LIBADD = $(MODULE_LIBADD) $(DBUS_LIBS)
+module_console_kit_la_CFLAGS = $(AM_CFLAGS) $(DBUS_CFLAGS)
 
 module_systemd_login_la_SOURCES = modules/module-systemd-login.c
 module_systemd_login_la_LDFLAGS = $(MODULE_LDFLAGS)
diff --git a/src/modules/module-console-kit.c b/src/modules/module-console-kit.c
index c9c2f45..af1e02b 100644
--- a/src/modules/module-console-kit.c
+++ b/src/modules/module-console-kit.c
@@ -30,11 +30,6 @@
 #include <stdlib.h>
 #include <sys/types.h>
 
-#ifdef HAVE_SYSTEMD
-#include <systemd/sd-login.h>
-#include <systemd/sd-daemon.h>
-#endif
-
 #include <pulse/xmalloc.h>
 
 #include <pulsecore/module.h>
@@ -285,12 +280,10 @@ int pa__init(pa_module*m) {
 
     dbus_error_init(&error);
 
-#ifdef HAVE_SYSTEMD
-    /* If systemd support is enabled and we boot on systemd we
-       shouldn't watch ConsoleKit but systemd's logind service. */
-    if (sd_booted() > 0)
+    /* If systemd's logind service is running, we shouldn't watch ConsoleKit
+     * but login */
+    if (access("/run/systemd/seats/", F_OK) >= 0)
         return 0;
-#endif
 
     if (!(ma = pa_modargs_new(m->argument, valid_modargs))) {
         pa_log("Failed to parse module arguments");
diff --git a/src/modules/module-systemd-login.c b/src/modules/module-systemd-login.c
index 8ad836e..cc8b462 100644
--- a/src/modules/module-systemd-login.c
+++ b/src/modules/module-systemd-login.c
@@ -31,7 +31,6 @@
 #include <sys/types.h>
 
 #include <systemd/sd-login.h>
-#include <systemd/sd-daemon.h>
 
 #include <pulse/xmalloc.h>
 
@@ -169,8 +168,8 @@ int pa__init(pa_module *m) {
 
     pa_assert(m);
 
-    /* If we are not actually booting with systemd become a NOP */
-    if (sd_booted() <= 0)
+    /* If we are not actually running logind become a NOP */
+    if (access("/run/systemd/seats/", F_OK) < 0)
         return 0;
 
     ma = pa_modargs_new(m->argument, valid_modargs);

commit 29bd97601b0badcbb6fedf5e4a28e70ddb89d394
Author: Peter Meerwald <p.meerwald at bct-electronic.com>
Date:   Thu Mar 28 14:46:49 2013 +0100

    remap: fix check when to apply specialized code path
    
    the specialized code path just duplicate samples, so are only
    applicable if the volume in map_table is == 1.0 (or == 0x10000);
    don't use them for volumes >= 1.0
    
    compare the integer version of the volume stored in map_table;
    comparing floats is ugly (als leads to compiler warnings)
    
    Signed-off-by: Peter Meerwald <p.meerwald at bct-electronic.com>

diff --git a/src/pulsecore/remap.c b/src/pulsecore/remap.c
index b831f78..5d0cd62 100644
--- a/src/pulsecore/remap.c
+++ b/src/pulsecore/remap.c
@@ -27,6 +27,7 @@
 #include <string.h>
 
 #include <pulse/sample.h>
+#include <pulse/volume.h>
 #include <pulsecore/log.h>
 #include <pulsecore/macro.h>
 
@@ -168,7 +169,7 @@ static void init_remap_c(pa_remap_t *m) {
 
     /* find some common channel remappings, fall back to full matrix operation. */
     if (n_ic == 1 && n_oc == 2 &&
-            m->map_table_f[0][0] >= 1.0 && m->map_table_f[1][0] >= 1.0) {
+            m->map_table_i[0][0] == PA_VOLUME_NORM && m->map_table_i[1][0] == PA_VOLUME_NORM) {
         m->do_remap = (pa_do_remap_func_t) remap_mono_to_stereo_c;
         pa_log_info("Using mono to stereo remapping");
     } else {
diff --git a/src/pulsecore/remap_mmx.c b/src/pulsecore/remap_mmx.c
index 9a69ada..5b3f0f9 100644
--- a/src/pulsecore/remap_mmx.c
+++ b/src/pulsecore/remap_mmx.c
@@ -25,6 +25,7 @@
 #endif
 
 #include <pulse/sample.h>
+#include <pulse/volume.h>
 #include <pulsecore/log.h>
 #include <pulsecore/macro.h>
 
@@ -139,7 +140,7 @@ static void init_remap_mmx(pa_remap_t *m) {
 
     /* find some common channel remappings, fall back to full matrix operation. */
     if (n_ic == 1 && n_oc == 2 &&
-            m->map_table_f[0][0] >= 1.0 && m->map_table_f[1][0] >= 1.0) {
+            m->map_table_i[0][0] == PA_VOLUME_NORM && m->map_table_i[1][0] == PA_VOLUME_NORM) {
         m->do_remap = (pa_do_remap_func_t) remap_mono_to_stereo_mmx;
         pa_log_info("Using MMX mono to stereo remapping");
     }
diff --git a/src/pulsecore/remap_sse.c b/src/pulsecore/remap_sse.c
index dd49eb6..8831723 100644
--- a/src/pulsecore/remap_sse.c
+++ b/src/pulsecore/remap_sse.c
@@ -25,6 +25,7 @@
 #endif
 
 #include <pulse/sample.h>
+#include <pulse/volume.h>
 #include <pulsecore/log.h>
 #include <pulsecore/macro.h>
 
@@ -138,7 +139,7 @@ static void init_remap_sse2(pa_remap_t *m) {
 
     /* find some common channel remappings, fall back to full matrix operation. */
     if (n_ic == 1 && n_oc == 2 &&
-            m->map_table_f[0][0] >= 1.0 && m->map_table_f[1][0] >= 1.0) {
+            m->map_table_i[0][0] == PA_VOLUME_NORM && m->map_table_i[1][0] == PA_VOLUME_NORM) {
         m->do_remap = (pa_do_remap_func_t) remap_mono_to_stereo_sse2;
         pa_log_info("Using SSE2 mono to stereo remapping");
     }

commit 0e70030e35adf564b258c5bf0cea80e5171386e1
Author: Tanu Kaskinen <tanuk at iki.fi>
Date:   Thu Mar 28 17:15:00 2013 +0200

    sink: Fix flag name typo

diff --git a/src/pulsecore/sink.c b/src/pulsecore/sink.c
index 718d392..d2d6c97 100644
--- a/src/pulsecore/sink.c
+++ b/src/pulsecore/sink.c
@@ -776,7 +776,7 @@ void pa_sink_update_flags(pa_sink *s, pa_sink_flags_t mask, pa_sink_flags_t valu
                            ((mask & PA_SINK_LATENCY) ? PA_SOURCE_LATENCY : 0) |
                            ((mask & PA_SINK_DYNAMIC_LATENCY) ? PA_SOURCE_DYNAMIC_LATENCY : 0),
                            ((value & PA_SINK_LATENCY) ? PA_SOURCE_LATENCY : 0) |
-                           ((value & PA_SINK_DYNAMIC_LATENCY) ? PA_SINK_DYNAMIC_LATENCY : 0));
+                           ((value & PA_SINK_DYNAMIC_LATENCY) ? PA_SOURCE_DYNAMIC_LATENCY : 0));
 }
 
 /* Called from IO context, or before _put() from main context */



More information about the pulseaudio-commits mailing list