[pulseaudio-commits] [SCM] PulseAudio Sound Server branch, master, updated. v0.9.16-test4-25-ge834034

Lennart Poettering gitmailer-noreply at 0pointer.de
Tue Aug 11 15:55:58 PDT 2009


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 master branch has been updated
      from  ebe35968d7a64d711d0fc53a5ea7fe1b2b1a0aa7 (commit)

- Log -----------------------------------------------------------------
e834034 alsa: enable ext. amplifier by default
462cdf4 alsa: adjust priority bonus of mappings that match the configured default channel map
d27e26d volume-restore: forward module load return value of stream-restore back to caller
c117feb hal: replace subdevs= parameter by subdevices= parameter
c1039c9 udev: drop definition of LIBUDEV_I_KNOW_THE_API_IS_SUBJECT_TO_CHANGE
c904f97 hal: add stub module that loads module-udev-detect instead of module-hal-detect
-----------------------------------------------------------------------

Summary of changes:
 configure.ac                                       |   28 +++++++++++++++-
 src/Makefile.am                                    |   13 +++++++-
 src/modules/alsa/alsa-mixer.c                      |    4 +-
 .../alsa/mixer/paths/analog-output.conf.common     |    4 +-
 ...volume-restore.c => module-hal-detect-compat.c} |   34 ++++++++++---------
 src/modules/module-hal-detect.c                    |   10 +++---
 src/modules/module-volume-restore.c                |    9 +++--
 7 files changed, 72 insertions(+), 30 deletions(-)
 copy src/modules/{module-volume-restore.c => module-hal-detect-compat.c} (62%)

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

commit c904f97e2d77bac298130de55621fa2498b5aa51
Author: Lennart Poettering <lennart at poettering.net>
Date:   Tue Aug 11 23:04:35 2009 +0200

    hal: add stub module that loads module-udev-detect instead of module-hal-detect
    
    This adds module-hal-detect-compat.c which when enabled will be compiled
    into a module module-hal-detect which simply loads module-udev-detect.
    
    The purpose of this is to allow easy upgrading without breaking
    default.pa. Distributions are recommended to enable this to easy
    upgrades from HAL versions of PA to udev versions.

diff --git a/configure.ac b/configure.ac
index a35bef8..3b91bc0 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1118,6 +1118,28 @@ AM_CONDITIONAL([HAVE_UDEV], [test "x$HAVE_UDEV" = x1])
 
 AC_DEFINE([LIBUDEV_I_KNOW_THE_API_IS_SUBJECT_TO_CHANGE], 1, [I know the API is subject to change.])
 
+#### 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],
@@ -1441,6 +1463,11 @@ if test "x$HAVE_UDEV" = "x1" ; then
    ENABLE_UDEV=yes
 fi
 
+ENABLE_HAL_COMPAT=no
+if test "x$HAVE_HAL_COMPAT" = "x1" ; then
+   ENABLE_HAL_COMPAT=yes
+fi
+
 ENABLE_TCPWRAP=no
 if test "x${LIBWRAP_LIBS}" != x ; then
    ENABLE_TCPWRAP=yes
@@ -1507,6 +1534,7 @@ echo "
     Enable LIRC:                   ${ENABLE_LIRC}
     Enable HAL:                    ${ENABLE_HAL}
     Enable udev:                   ${ENABLE_UDEV}
+    Enable HAL->udev compat:       ${ENABLE_HAL_COMPAT}
     Enable BlueZ:                  ${ENABLE_BLUEZ}
     Enable TCP Wrappers:           ${ENABLE_TCPWRAP}
     Enable libsamplerate:          ${ENABLE_LIBSAMPLERATE}
diff --git a/src/Makefile.am b/src/Makefile.am
index 5d71157..2add80e 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -1120,6 +1120,11 @@ modlibexec_LTLIBRARIES += \
 		module-hal-detect.la
 endif
 
+if HAVE_HAL_COMPAT
+modlibexec_LTLIBRARIES += \
+		module-hal-detect.la
+endif
+
 if HAVE_UDEV
 modlibexec_LTLIBRARIES += \
 		module-udev-detect.la
@@ -1576,10 +1581,16 @@ module_jack_source_la_LDFLAGS = $(MODULE_LDFLAGS)
 module_jack_source_la_LIBADD = $(AM_LIBADD) libpulsecore- at PA_MAJORMINORMICRO@.la $(JACK_LIBS) libpulsecommon- at PA_MAJORMINORMICRO@.la libpulse.la
 module_jack_source_la_CFLAGS = $(AM_CFLAGS) $(JACK_CFLAGS)
 
+if HAVE_HAL_COMPAT
+module_hal_detect_la_SOURCES = modules/module-hal-detect-compat.c
+module_hal_detect_la_LIBADD = $(AM_LIBADD) libpulsecore- at PA_MAJORMINORMICRO@.la libpulsecommon- at PA_MAJORMINORMICRO@.la libpulse.la
+module_hal_detect_la_CFLAGS = $(AM_CFLAGS)
+else
 module_hal_detect_la_SOURCES = modules/module-hal-detect.c
-module_hal_detect_la_LDFLAGS = $(MODULE_LDFLAGS)
 module_hal_detect_la_LIBADD = $(AM_LIBADD) $(HAL_LIBS) libpulsecore- at PA_MAJORMINORMICRO@.la libpulsecommon- at PA_MAJORMINORMICRO@.la libpulse.la
 module_hal_detect_la_CFLAGS = $(AM_CFLAGS) $(HAL_CFLAGS)
+endif
+module_hal_detect_la_LDFLAGS = $(MODULE_LDFLAGS)
 
 module_udev_detect_la_SOURCES = modules/module-udev-detect.c
 module_udev_detect_la_LDFLAGS = $(MODULE_LDFLAGS)
diff --git a/src/modules/module-hal-detect-compat.c b/src/modules/module-hal-detect-compat.c
new file mode 100644
index 0000000..14cf814
--- /dev/null
+++ b/src/modules/module-hal-detect-compat.c
@@ -0,0 +1,84 @@
+/***
+  This file is part of PulseAudio.
+
+  Copyright 2009 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
+  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 <pulse/xmalloc.h>
+
+#include <pulsecore/module.h>
+#include <pulsecore/modargs.h>
+#include <pulsecore/log.h>
+#include <pulsecore/core-util.h>
+
+#include "module-hal-detect-symdef.h"
+
+PA_MODULE_AUTHOR("Lennart Poettering");
+PA_MODULE_DESCRIPTION("Compatibility module");
+PA_MODULE_VERSION(PACKAGE_VERSION);
+PA_MODULE_LOAD_ONCE(TRUE);
+PA_MODULE_DEPRECATED("Please use module-udev-detect instead of module-hal-detect!");
+
+static const char* const valid_modargs[] = {
+    "api",
+    "tsched",
+    "subdevices",
+    NULL,
+};
+
+int pa__init(pa_module*m) {
+    pa_modargs *ma = NULL;
+    pa_bool_t tsched = TRUE;
+    pa_module *n;
+    char *t;
+
+    pa_assert(m);
+
+    if (!(ma = pa_modargs_new(m->argument, valid_modargs))) {
+        pa_log("Failed to parse module arguments");
+        goto fail;
+    }
+
+    if (pa_modargs_get_value_boolean(ma, "tsched", &tsched) < 0) {
+        pa_log("tsched= expects boolean arguments");
+        goto fail;
+    }
+
+    pa_log_warn("We will now load module-udev-detect. Please make sure to remove module-hal-detect from your configuration.");
+
+    t = pa_sprintf_malloc("tsched=%s", pa_yes_no(tsched));
+    n = pa_module_load(m->core, "module-udev-detect", t);
+    pa_xfree(t);
+
+    if (n)
+        pa_module_unload_request(m, TRUE);
+
+    pa_modargs_free(ma);
+
+    return n ? 0 : -1;
+
+fail:
+    if (ma)
+        pa_modargs_free(ma);
+
+    return -1;
+}

commit c1039c94fbae193aad149339124e8e62f0233eaa
Author: Lennart Poettering <lennart at poettering.net>
Date:   Tue Aug 11 23:06:44 2009 +0200

    udev: drop definition of LIBUDEV_I_KNOW_THE_API_IS_SUBJECT_TO_CHANGE
    
    We depend on udev 143 anyway, where this definition is not necessary
    anymore.

diff --git a/configure.ac b/configure.ac
index 3b91bc0..a38d8a1 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1116,8 +1116,6 @@ AC_SUBST(UDEV_LIBS)
 AC_SUBST(HAVE_UDEV)
 AM_CONDITIONAL([HAVE_UDEV], [test "x$HAVE_UDEV" = x1])
 
-AC_DEFINE([LIBUDEV_I_KNOW_THE_API_IS_SUBJECT_TO_CHANGE], 1, [I know the API is subject to change.])
-
 #### HAL compat support (optional) ####
 
 AC_ARG_ENABLE([hal-compat],

commit c117febbe4a92864a7214da2dd8a5c9dae432925
Author: Lennart Poettering <lennart at poettering.net>
Date:   Tue Aug 11 23:18:01 2009 +0200

    hal: replace subdevs= parameter by subdevices= parameter
    
    Abbreviating tsched like this was bad enough, so let's not add another
    option here.

diff --git a/src/modules/module-hal-detect.c b/src/modules/module-hal-detect.c
index b5b2aaf..ec370d6 100644
--- a/src/modules/module-hal-detect.c
+++ b/src/modules/module-hal-detect.c
@@ -58,13 +58,13 @@ PA_MODULE_LOAD_ONCE(TRUE);
 #if defined(HAVE_ALSA) && defined(HAVE_OSS_OUTPUT)
 PA_MODULE_USAGE("api=<alsa or oss> "
                 "tsched=<enable system timer based scheduling mode?>"
-                "subdevs=<init all subdevices>");
+                "subdevices=<init all subdevices>");
 #elif defined(HAVE_ALSA)
 PA_MODULE_USAGE("api=<alsa> "
                 "tsched=<enable system timer based scheduling mode?>");
 #elif defined(HAVE_OSS_OUTPUT)
 PA_MODULE_USAGE("api=<oss>"
-                "subdevs=<init all subdevices>");
+                "subdevices=<init all subdevices>");
 #endif
 PA_MODULE_DEPRECATED("Please use module-udev-detect instead of module-hal-detect!");
 
@@ -98,7 +98,7 @@ static const char* const valid_modargs[] = {
     "tsched",
 #endif
 #ifdef HAVE_OSS_OUTPUT
-    "subdevs",
+    "subdevices",
 #endif
     NULL
 };
@@ -772,8 +772,8 @@ int pa__init(pa_module*m) {
     }
 
 #ifdef HAVE_OSS_OUTPUT
-    if (pa_modargs_get_value_boolean(ma, "subdevs", &u->init_subdevs) < 0) {
-        pa_log("Failed to parse subdevs argument.");
+    if (pa_modargs_get_value_boolean(ma, "subdevices", &u->init_subdevs) < 0) {
+        pa_log("Failed to parse subdevices= argument.");
         goto fail;
     }
 #endif

commit d27e26dca0b492b1906b42b2d0f7decd38ed8ae3
Author: Lennart Poettering <lennart at poettering.net>
Date:   Tue Aug 11 23:19:28 2009 +0200

    volume-restore: forward module load return value of stream-restore back to caller

diff --git a/src/modules/module-volume-restore.c b/src/modules/module-volume-restore.c
index 91da598..6e484ea 100644
--- a/src/modules/module-volume-restore.c
+++ b/src/modules/module-volume-restore.c
@@ -48,6 +48,7 @@ static const char* const valid_modargs[] = {
 int pa__init(pa_module*m) {
     pa_modargs *ma = NULL;
     pa_bool_t restore_device = TRUE, restore_volume = TRUE;
+    pa_module *n;
     char *t;
 
     pa_assert(m);
@@ -66,13 +67,15 @@ int pa__init(pa_module*m) {
     pa_log_warn("We will now load module-stream-restore. Please make sure to remove module-volume-restore from your configuration.");
 
     t = pa_sprintf_malloc("restore_volume=%s restore_device=%s", pa_yes_no(restore_volume), pa_yes_no(restore_device));
-    pa_module_load(m->core, "module-stream-restore", t);
+    n = pa_module_load(m->core, "module-stream-restore", t);
     pa_xfree(t);
 
-    pa_module_unload_request(m, TRUE);
+    if (n)
+        pa_module_unload_request(m, TRUE);
 
     pa_modargs_free(ma);
-    return 0;
+
+    return n ? 0 : -1;
 
 fail:
     if (ma)

commit 462cdf44b7fe36768c836c90761f6b8153290517
Author: Lennart Poettering <lennart at poettering.net>
Date:   Wed Aug 12 00:53:38 2009 +0200

    alsa: adjust priority bonus of mappings that match the configured default channel map
    
    We need to make sure that having both input and output weighs more for
    selecting the default profile than a channel map that matches the
    default channel map has.
    
    https://bugzilla.redhat.com/show_bug.cgi?id=496320

diff --git a/src/modules/alsa/alsa-mixer.c b/src/modules/alsa/alsa-mixer.c
index 6a0b4ab..a4c2ee0 100644
--- a/src/modules/alsa/alsa-mixer.c
+++ b/src/modules/alsa/alsa-mixer.c
@@ -2838,9 +2838,9 @@ static int mapping_verify(pa_alsa_mapping *m, const pa_channel_map *bonus) {
 
     if (bonus) {
         if (pa_channel_map_equal(&m->channel_map, bonus))
-            m->priority += 5000;
+            m->priority += 50;
         else if (m->channel_map.channels == bonus->channels)
-            m->priority += 4000;
+            m->priority += 30;
     }
 
     return 0;

commit e8340345f6a102cd03b6676576bcd3879ead7aad
Author: Lennart Poettering <lennart at poettering.net>
Date:   Wed Aug 12 00:56:10 2009 +0200

    alsa: enable ext. amplifier by default

diff --git a/src/modules/alsa/mixer/paths/analog-output.conf.common b/src/modules/alsa/mixer/paths/analog-output.conf.common
index cc1185f..3c6ce80 100644
--- a/src/modules/alsa/mixer/paths/analog-output.conf.common
+++ b/src/modules/alsa/mixer/paths/analog-output.conf.common
@@ -104,8 +104,8 @@ switch = select
 
 [Option External Amplifier:on]
 name = output-amplifier-on
-priority = 0
+priority = 10
 
 [Option External Amplifier:off]
 name = output-amplifier-off
-priority = 10
+priority = 0

-- 
hooks/post-receive
PulseAudio Sound Server



More information about the pulseaudio-commits mailing list