[pulseaudio-commits] [SCM] PulseAudio Sound Server branch, stable-queue, updated. v0.9.22-18-geb966f7

Colin Guthrie gitmailer-noreply at 0pointer.de
Tue Jan 11 03:39:46 PST 2011


This is an automated email from the git hooks/post-receive script. It was
generated because of a push to the "PulseAudio Sound Server" repository.

The stable-queue branch has been updated
      from  6f870f501d8f6552b030ac417add865418e9098b (commit)

- Log -----------------------------------------------------------------
eb966f7 build-sys: Make --disable-dbus actually work.
8f8d247 build-sys: Mention dbus support in the summary
b3ff4f4 build-sys: Put in specific warnings when there is no udev or DBUS support
862bbee console-kit: Console Kit support is dependent on DBUS and is thus optional.
7cb1401 padsp: wrap __open_2 and __open64_2
-----------------------------------------------------------------------

Summary of changes:
 configure.ac             |  101 ++++++++++++++++++++++++++++++++--------------
 src/daemon/default.pa.in |    2 +
 src/utils/padsp.c        |   61 +++++++++++++++++++++++----
 3 files changed, 125 insertions(+), 39 deletions(-)

-----------------------------------------------------------------------

commit 7cb1401eae1e5be2e31dfd00528bac291b60a4a4
Author: Michal Schmidt <mschmidt at redhat.com>
Date:   Sat Jan 8 16:25:15 2011 +0100

    padsp: wrap __open_2 and __open64_2
    
    These functions are used in OSS programs where the "flags" parameter for
    open() is not a build-time constant and the build has _FORTIFY_SOURCE
    enabled.

diff --git a/src/utils/padsp.c b/src/utils/padsp.c
index fb756d3..ec0c46d 100644
--- a/src/utils/padsp.c
+++ b/src/utils/padsp.c
@@ -118,6 +118,7 @@ static PA_LLIST_HEAD(fd_info, fd_infos) = NULL;
 static int (*_ioctl)(int, int, void*) = NULL;
 static int (*_close)(int) = NULL;
 static int (*_open)(const char *, int, mode_t) = NULL;
+static int (*___open_2)(const char *, int) = NULL;
 static FILE* (*_fopen)(const char *path, const char *mode) = NULL;
 static int (*_stat)(const char *, struct stat *) = NULL;
 #ifdef _STAT_VER
@@ -125,6 +126,7 @@ static int (*___xstat)(int, const char *, struct stat *) = NULL;
 #endif
 #ifdef HAVE_OPEN64
 static int (*_open64)(const char *, int, mode_t) = NULL;
+static int (*___open64_2)(const char *, int) = NULL;
 static FILE* (*_fopen64)(const char *path, const char *mode) = NULL;
 static int (*_stat64)(const char *, struct stat64 *) = NULL;
 #ifdef _STAT_VER
@@ -157,6 +159,14 @@ do { \
     pthread_mutex_unlock(&func_mutex); \
 } while(0)
 
+#define LOAD___OPEN_2_FUNC() \
+do { \
+    pthread_mutex_lock(&func_mutex); \
+    if (!___open_2) \
+        ___open_2 = (int (*)(const char *, int)) dlsym_fn(RTLD_NEXT, "__open_2"); \
+    pthread_mutex_unlock(&func_mutex); \
+} while(0)
+
 #define LOAD_OPEN64_FUNC() \
 do { \
     pthread_mutex_lock(&func_mutex); \
@@ -165,6 +175,14 @@ do { \
     pthread_mutex_unlock(&func_mutex); \
 } while(0)
 
+#define LOAD___OPEN64_2_FUNC() \
+do { \
+    pthread_mutex_lock(&func_mutex); \
+    if (!___open64_2) \
+        ___open64_2 = (int (*)(const char *, int)) dlsym_fn(RTLD_NEXT, "__open64_2"); \
+    pthread_mutex_unlock(&func_mutex); \
+} while(0)
+
 #define LOAD_CLOSE_FUNC() \
 do { \
     pthread_mutex_lock(&func_mutex); \
@@ -1494,6 +1512,27 @@ int open(const char *filename, int flags, ...) {
     return real_open(filename, flags, mode);
 }
 
+static pa_bool_t is_audio_device_node(const char *path) {
+    return
+        pa_streq(path, "/dev/dsp") ||
+        pa_streq(path, "/dev/adsp") ||
+        pa_streq(path, "/dev/audio") ||
+        pa_streq(path, "/dev/sndstat") ||
+        pa_streq(path, "/dev/mixer");
+}
+
+int __open_2(const char *filename, int flags) {
+    debug(DEBUG_LEVEL_VERBOSE, __FILE__": __open_2(%s)\n", filename?filename:"NULL");
+
+    if ((flags & O_CREAT) ||
+        !filename ||
+        !is_audio_device_node(filename)) {
+        LOAD___OPEN_2_FUNC();
+        return ___open_2(filename, flags);
+    }
+    return real_open(filename, flags, 0);
+}
+
 static int mixer_ioctl(fd_info *i, unsigned long request, void*argp, int *_errno) {
     int ret = -1;
 
@@ -2383,15 +2422,6 @@ int close(int fd) {
     return 0;
 }
 
-static pa_bool_t is_audio_device_node(const char *path) {
-    return
-        pa_streq(path, "/dev/dsp") ||
-        pa_streq(path, "/dev/adsp") ||
-        pa_streq(path, "/dev/audio") ||
-        pa_streq(path, "/dev/sndstat") ||
-        pa_streq(path, "/dev/mixer");
-}
-
 int access(const char *pathname, int mode) {
 
     debug(DEBUG_LEVEL_VERBOSE, __FILE__": access(%s)\n", pathname?pathname:"NULL");
@@ -2527,6 +2557,19 @@ int open64(const char *filename, int flags, ...) {
     return real_open(filename, flags, mode);
 }
 
+int __open64_2(const char *filename, int flags) {
+    debug(DEBUG_LEVEL_VERBOSE, __FILE__": __open64_2(%s)\n", filename?filename:"NULL");
+
+    if ((flags & O_CREAT) ||
+        !filename ||
+        !is_audio_device_node(filename)) {
+        LOAD___OPEN64_2_FUNC();
+        return ___open64_2(filename, flags);
+    }
+
+    return real_open(filename, flags, 0);
+}
+
 #endif
 
 #ifdef _STAT_VER

commit 862bbee30949acf791e470c6c278b2fcb82bc79e
Author: Colin Guthrie <cguthrie at mandriva.org>
Date:   Tue Jan 11 10:09:42 2011 +0000

    console-kit: Console Kit support is dependent on DBUS and is thus optional.
    
    Therefore, we must reflect this in the default.pa. Several users
    have reported an error with consolekit when starting a self-built PA
    due to the default config not working properly. This works around the
    issue but we should include a warning on configure about the lack of
    DBUS and udev support as this is a common mistake.

diff --git a/src/daemon/default.pa.in b/src/daemon/default.pa.in
index 00c000e..15e253f 100755
--- a/src/daemon/default.pa.in
+++ b/src/daemon/default.pa.in
@@ -108,7 +108,9 @@ load-module module-suspend-on-idle
 
 ### If autoexit on idle is enabled we want to make sure we only quit
 ### when no local session needs us anymore.
+.ifexists module-console-kit at PA_SOEXT@
 load-module module-console-kit
+.endif
 
 ### Enable positioned event sounds
 load-module module-position-event-sounds

commit b3ff4f400f7f7149da579e16b9d979b7e2104caf
Author: Colin Guthrie <cguthrie at mandriva.org>
Date:   Tue Jan 11 10:28:02 2011 +0000

    build-sys: Put in specific warnings when there is no udev or DBUS support
    
    Users have often come to me when their build doesn't work and typically
    this is when they do not have dev headers for DBUS and udev installed
    when building. Put in some specific warnings about these optional,
    but critical, elements.
    
    This will likely display this message on platforms where they are not
    available, so patches welcome to hide them in a semi-intelligent way.

diff --git a/configure.ac b/configure.ac
index 7b109d2..5147a56 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1617,3 +1617,27 @@ echo "
     Force preopen:                 ${FORCE_PREOPEN}
     Preopened modules:             ${PREOPEN_MODS}
 "
+
+if test "${ENABLE_DBUS}" = "no" ; then
+   echo "
+===== WARNING WARNING WARNING WARNING WARNING WARNING WARNING =====
+You do not have DBUS support enabled. It is strongly recommended
+that you enable DBUS support if you platform supports it.
+Many parts of PulseAudio use udev, from Console Kit interaction
+to the Device Reservation Protocol to speak to JACK, Bluetooth
+support and even a native control protocol for communicating and
+controling the PulseAudio daemon itself.
+===== WARNING WARNING WARNING WARNING WARNING WARNING WARNING =====
+"
+fi
+
+if test "${ENABLE_UDEV}" = "no" ; then
+   echo "
+===== WARNING WARNING WARNING WARNING WARNING WARNING WARNING =====
+You do not have udev support enabled. It is strongly recommended
+that you enable udev support if you platform supports it as it is
+the primary method used to detect hardware audio devices (on Linux)
+and is thus a critical part of PulseAudio on that platform.
+===== WARNING WARNING WARNING WARNING WARNING WARNING WARNING =====
+"
+fi

commit 8f8d24738645f3a04285c076d96731d9e4ce75de
Author: Colin Guthrie <cguthrie at mandriva.org>
Date:   Thu Feb 25 14:00:08 2010 +0000

    build-sys: Mention dbus support in the summary

diff --git a/configure.ac b/configure.ac
index 5147a56..a34e1f6 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1514,6 +1514,11 @@ if test "x$HAVE_LIRC" = "x1" ; then
    ENABLE_LIRC=yes
 fi
 
+ENABLE_DBUS=no
+if test "x$HAVE_DBUS" = "x1" ; then
+   ENABLE_DBUS=yes
+fi
+
 ENABLE_HAL=no
 if test "x$HAVE_HAL" = "x1" ; then
    ENABLE_HAL=yes
@@ -1598,6 +1603,7 @@ echo "
     Enable Jack:                   ${ENABLE_JACK}
     Enable Async DNS:              ${ENABLE_LIBASYNCNS}
     Enable LIRC:                   ${ENABLE_LIRC}
+    Enable DBUS:                   ${ENABLE_DBUS}
     Enable HAL:                    ${ENABLE_HAL}
     Enable udev:                   ${ENABLE_UDEV}
     Enable HAL->udev compat:       ${ENABLE_HAL_COMPAT}

commit eb966f745511944ba976c17e56d60b384c59d757
Author: Colin Guthrie <cguthrie at mandriva.org>
Date:   Tue Jan 11 11:26:48 2011 +0000

    build-sys: Make --disable-dbus actually work.
    
    Previously this argument passed to configure only worked if --disable-hal and
    --disable-bluez was also passed which wasn't immediately obvious to the
    untrained compiler.
    
    This change simply makes --disable-dbus disable the other two as well
    and errors out of specific, incompatible --enable/--disable flags
    are provided.
    
    The summary table is also adjusted and intended to try and show the
    dependency relationship a little.

diff --git a/configure.ac b/configure.ac
index a34e1f6..299dd49 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1154,28 +1154,6 @@ AC_SUBST(UDEV_LIBS)
 AC_SUBST(HAVE_UDEV)
 AM_CONDITIONAL([HAVE_UDEV], [test "x$HAVE_UDEV" = x1])
 
-#### HAL compat support (optional) ####
-
-AC_ARG_ENABLE([hal-compat],
-    AS_HELP_STRING([--disable-hal-compat],[Disable optional HAL->udev transition compatibility support]),
-        [
-            case "${enableval}" in
-                yes) halcompat=yes ;;
-                no) halcompat=no ;;
-                *) AC_MSG_ERROR(bad value ${enableval} for --disable-hal-compat) ;;
-            esac
-        ],
-        [halcompat=auto])
-if test "x${halcompat}" != xno -a "x$HAVE_HAL" = "x0" -a "x$HAVE_UDEV" = "x1" ; then
-    HAVE_HAL_COMPAT=1
-    AC_DEFINE([HAVE_HAL_COMPAT], 1, [Have HAL compatibility.])
-else
-    HAVE_HAL_COMPAT=0
-fi
-
-AC_SUBST(HAVE_HAL_COMPAT)
-AM_CONDITIONAL([HAVE_HAL_COMPAT], [test "x$HAVE_HAL_COMPAT" = x1])
-
 #### BlueZ support (optional) ####
 
 AC_ARG_ENABLE([bluez],
@@ -1219,11 +1197,7 @@ AC_ARG_ENABLE([dbus],
         ],
         [dbus=auto])
 
-if test "x$HAVE_HAL" = x1 ; then
-   dbus=yes
-fi
-
-if test "x${dbus}" != xno || test "x${bluez}" != xno || test "x${hal}" != xno ; then
+if test "x${dbus}" != xno ; then
 
     PKG_CHECK_MODULES(DBUS, [ dbus-1 >= 1.0.0 ],
         [
@@ -1249,6 +1223,43 @@ AC_SUBST(DBUS_LIBS)
 AC_SUBST(HAVE_DBUS)
 AM_CONDITIONAL([HAVE_DBUS], [test "x$HAVE_DBUS" = x1])
 
+
+# udev and HAL depend on DBUS: So double check if they were explicitly enabled.
+if test "x$HAVE_DBUS" != "x1" ; then
+    HAVE_HAL=0
+    if test "x${hal}" = xyes ; then
+        AC_MSG_ERROR([*** D-Bus support is required by HAL])
+    fi
+
+    HAVE_BLUEZ=0
+    if test "x${bluez}" = xyes ; then
+        AC_MSG_ERROR([*** D-Bus support is required by BLUEZ])
+    fi
+fi
+
+
+#### HAL compat support (optional) ####
+
+AC_ARG_ENABLE([hal-compat],
+    AS_HELP_STRING([--disable-hal-compat],[Disable optional HAL->udev transition compatibility support]),
+        [
+            case "${enableval}" in
+                yes) halcompat=yes ;;
+                no) halcompat=no ;;
+                *) AC_MSG_ERROR(bad value ${enableval} for --disable-hal-compat) ;;
+            esac
+        ],
+        [halcompat=auto])
+if test "x${halcompat}" != xno -a "x$HAVE_HAL" = "x0" -a "x$HAVE_UDEV" = "x1" ; then
+    HAVE_HAL_COMPAT=1
+    AC_DEFINE([HAVE_HAL_COMPAT], 1, [Have HAL compatibility.])
+else
+    HAVE_HAL_COMPAT=0
+fi
+
+AC_SUBST(HAVE_HAL_COMPAT)
+AM_CONDITIONAL([HAVE_HAL_COMPAT], [test "x$HAVE_HAL_COMPAT" = x1])
+
 ### IPv6 connection support (optional) ###
 
 AC_ARG_ENABLE([ipv6],
@@ -1604,10 +1615,10 @@ echo "
     Enable Async DNS:              ${ENABLE_LIBASYNCNS}
     Enable LIRC:                   ${ENABLE_LIRC}
     Enable DBUS:                   ${ENABLE_DBUS}
-    Enable HAL:                    ${ENABLE_HAL}
+      Enable HAL:                  ${ENABLE_HAL}
+      Enable BlueZ:                ${ENABLE_BLUEZ}
     Enable udev:                   ${ENABLE_UDEV}
-    Enable HAL->udev compat:       ${ENABLE_HAL_COMPAT}
-    Enable BlueZ:                  ${ENABLE_BLUEZ}
+      Enable HAL->udev compat:     ${ENABLE_HAL_COMPAT}
     Enable TCP Wrappers:           ${ENABLE_TCPWRAP}
     Enable libsamplerate:          ${ENABLE_LIBSAMPLERATE}
     Enable IPv6:                   ${ENABLE_IPV6}

-- 
hooks/post-receive
PulseAudio Sound Server



More information about the pulseaudio-commits mailing list