[pulseaudio-commits] [SCM] PulseAudio Sound Server branch, master, updated. v0.9.13-506-g0933f1a

Lennart Poettering gitmailer-noreply at 0pointer.de
Wed Feb 4 09:43:00 PST 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  d802a76963e32bd821edfa89d6fe39764f1942f6 (commit)

- Log -----------------------------------------------------------------
0933f1a... Merge commit 'flameeyes/flameeyes'
d4618c8... Merge commit 'vudentz/master'
9a93157... Merge commit 'coling/master'
004b38f... Prevent changing volume on wrong device.
871389a... A couple of dependancy ordering fixes.
d1957b8... Trivial typo in a comment
e28903e... Clean up volume/mute settings a bit. As the APEX device only has one channel of volume (e.g. it's always matched) we emulate any variation in channel volumes in software. Remove the unnecessary callback defininitions.
e9ca8b1... Disable portability warnings from automake.
-----------------------------------------------------------------------

Summary of changes:
 configure.ac                                    |    2 +-
 src/Makefile.am                                 |   16 +++---
 src/modules/bluetooth/module-bluetooth-device.c |    3 +
 src/modules/module-raop-sink.c                  |   65 ++++++++++-------------
 4 files changed, 40 insertions(+), 46 deletions(-)

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

commit e9ca8b1c5447d9fa177e33a12e40fbf624701625
Author: Diego Elio 'Flameeyes' Pettenò <flameeyes at gmail.com>
Date:   Sat Jan 31 19:26:14 2009 +0100

    Disable portability warnings from automake.
    
    The portability warning class warns during automake calls about non-POSIX
    variable names and GNU make extensions. Since both happens with the current
    Makefile.am files and it's reasonable to expect that they wouldn't be
    rewritten (GNU make is a reasonable requirement), just avoid the warnings.

diff --git a/configure.ac b/configure.ac
index c02b20e..3d9cfcd 100644
--- a/configure.ac
+++ b/configure.ac
@@ -30,7 +30,7 @@ AC_INIT([pulseaudio],[pa_major.pa_minor.pa_micro],[mzchyfrnhqvb (at) 0pointer (d
 AC_CONFIG_SRCDIR([src/daemon/main.c])
 AC_CONFIG_MACRO_DIR([m4])
 AC_CONFIG_HEADERS([config.h])
-AM_INIT_AUTOMAKE([foreign 1.10 -Wall])
+AM_INIT_AUTOMAKE([foreign 1.10 -Wall -Wno-portability])
 
 AC_SUBST(PA_MAJOR, pa_major)
 AC_SUBST(PA_MINOR, pa_minor)

commit e28903e9e024702625f164a5e069fb2f4c275def
Author: Colin Guthrie <pulse at colin.guthr.ie>
Date:   Wed Jan 28 22:39:29 2009 +0000

    Clean up volume/mute settings a bit.
    As the APEX device only has one channel of volume (e.g. it's always matched) we emulate any variation in channel volumes in software.
    Remove the unnecessary callback defininitions.

diff --git a/src/modules/module-raop-sink.c b/src/modules/module-raop-sink.c
index 74ee612..cfdda8d 100644
--- a/src/modules/module-raop-sink.c
+++ b/src/modules/module-raop-sink.c
@@ -100,9 +100,6 @@ struct userdata {
 
     pa_usec_t latency;
 
-    pa_volume_t volume;
-    pa_bool_t muted;
-
     /*esd_format_t format;*/
     int32_t rate;
 
@@ -133,6 +130,9 @@ enum {
     SINK_MESSAGE_RIP_SOCKET
 };
 
+/* Forward declaration */
+static void sink_set_volume_cb(pa_sink *);
+
 static void on_connection(PA_GCC_UNUSED int fd, void*userdata) {
     struct userdata *u = userdata;
     pa_assert(u);
@@ -141,7 +141,7 @@ static void on_connection(PA_GCC_UNUSED int fd, void*userdata) {
     u->fd = fd;
 
     /* Set the initial volume */
-    pa_raop_client_set_volume(u->raop, u->volume);
+    sink_set_volume_cb(u->sink);
 
     pa_log_debug("Connection authenticated, handing fd to IO thread...");
 
@@ -255,43 +255,36 @@ static int sink_process_msg(pa_msgobject *o, int code, void *data, int64_t offse
     return pa_sink_process_msg(o, code, data, offset, chunk);
 }
 
-static void sink_get_volume_cb(pa_sink *s) {
-    struct userdata *u = s->userdata;
-    int i;
-
-    pa_assert(u);
-
-    for (i = 0; i < s->sample_spec.channels; i++)
-        s->virtual_volume.values[i] = u->volume;
-}
-
 static void sink_set_volume_cb(pa_sink *s) {
     struct userdata *u = s->userdata;
-    int rv;
+    pa_cvolume hw;
+    pa_volume_t v;
+    char t[PA_CVOLUME_SNPRINT_MAX];
 
     pa_assert(u);
 
-    /* If we're muted, we fake it */
-    if (u->muted)
+    /* If we're muted we don't need to do anything */
+    if (s->muted)
         return;
 
-    pa_assert(s->sample_spec.channels > 0);
+    /* Calculate the max volume of all channels.
+       We'll use this as our (single) volume on the APEX device and emulate
+       any variation in channel volumes in software */
+    v = pa_cvolume_max(&s->virtual_volume);
 
-    /* Avoid pointless volume sets */
-    if (u->volume == s->virtual_volume.values[0])
-        return;
+    /* Create a pa_cvolume version of our single value */
+    pa_cvolume_set(&hw, s->sample_spec.channels, v);
 
-    rv = pa_raop_client_set_volume(u->raop, s->virtual_volume.values[0]);
-    if (0 == rv)
-        u->volume = s->virtual_volume.values[0];
-}
+    /* Perfome any software manipulation of the volume needed */
+    pa_sw_cvolume_divide(&s->soft_volume, &s->virtual_volume, &hw);
 
-static void sink_get_mute_cb(pa_sink *s) {
-    struct userdata *u = s->userdata;
+    pa_log_debug("Requested volume: %s", pa_cvolume_snprint(t, sizeof(t), &s->virtual_volume));
+    pa_log_debug("Got hardware volume: %s", pa_cvolume_snprint(t, sizeof(t), &hw));
+    pa_log_debug("Calculated software volume: %s", pa_cvolume_snprint(t, sizeof(t), &s->soft_volume));
 
-    pa_assert(u);
-
-    s->muted = u->muted;
+    /* Any necessary software volume manipulateion is done so set
+       our hw volume (or v as a single value) on the device */
+    pa_raop_client_set_volume(u->raop, v);
 }
 
 static void sink_set_mute_cb(pa_sink *s) {
@@ -299,8 +292,11 @@ static void sink_set_mute_cb(pa_sink *s) {
 
     pa_assert(u);
 
-    pa_raop_client_set_volume(u->raop, (s->muted ? PA_VOLUME_MUTED : u->volume));
-    u->muted = s->muted;
+    if (s->muted) {
+        pa_raop_client_set_volume(u->raop, PA_VOLUME_MUTED);
+    } else {
+        sink_set_volume_cb(s);
+    }
 }
 
 static void thread_func(void *userdata) {
@@ -541,9 +537,6 @@ int pa__init(pa_module*m) {
     u->next_encoding_overhead = 0;
     u->encoding_ratio = 1.0;
 
-    u->volume = roundf(0.7 * PA_VOLUME_NORM);
-    u->muted = FALSE;
-
     u->rtpoll = pa_rtpoll_new();
     pa_thread_mq_init(&u->thread_mq, m->core->mainloop, u->rtpoll);
     u->rtpoll_item = NULL;
@@ -583,9 +576,7 @@ int pa__init(pa_module*m) {
 
     u->sink->parent.process_msg = sink_process_msg;
     u->sink->userdata = u;
-    u->sink->get_volume = sink_get_volume_cb;
     u->sink->set_volume = sink_set_volume_cb;
-    u->sink->get_mute = sink_get_mute_cb;
     u->sink->set_mute = sink_set_mute_cb;
     u->sink->flags = PA_SINK_LATENCY|PA_SINK_NETWORK|PA_SINK_HW_VOLUME_CTRL;
 

commit d1957b8325dc66ac6f691b13c8408e820685248a
Author: Colin Guthrie <pulse at colin.guthr.ie>
Date:   Tue Feb 3 23:46:03 2009 +0000

    Trivial typo in a comment

diff --git a/src/modules/module-raop-sink.c b/src/modules/module-raop-sink.c
index cfdda8d..1784b2c 100644
--- a/src/modules/module-raop-sink.c
+++ b/src/modules/module-raop-sink.c
@@ -275,7 +275,7 @@ static void sink_set_volume_cb(pa_sink *s) {
     /* Create a pa_cvolume version of our single value */
     pa_cvolume_set(&hw, s->sample_spec.channels, v);
 
-    /* Perfome any software manipulation of the volume needed */
+    /* Perform any software manipulation of the volume needed */
     pa_sw_cvolume_divide(&s->soft_volume, &s->virtual_volume, &hw);
 
     pa_log_debug("Requested volume: %s", pa_cvolume_snprint(t, sizeof(t), &s->virtual_volume));

commit 871389ac5d89d7979819ca677efaaad8e80bf6d1
Author: Colin Guthrie <pulse at colin.guthr.ie>
Date:   Tue Feb 3 23:49:43 2009 +0000

    A couple of dependancy ordering fixes.
    
    Make sure libdbus-util.so is installed/relinked prior to libalsa-util.so
    Make sure libbluetooth-util.so is installed/relinked prior to module-bluetooth-discover.so

diff --git a/src/Makefile.am b/src/Makefile.am
index d2917a0..1910a82 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -862,6 +862,13 @@ libavahi_wrap_la_LIBADD = $(AM_LIBADD) $(AVAHI_CFLAGS) libpulsecore- at PA_MAJORMIN
 #        Plug-in libraries        #
 ###################################
 
+if HAVE_DBUS
+# Serveral module (e.g. libalsa-util.la)
+modlibexec_LTLIBRARIES += \
+		libdbus-util.la \
+		module-console-kit.la
+endif
+
 modlibexec_LTLIBRARIES += \
 		module-cli.la \
 		module-cli-protocol-tcp.la \
@@ -989,21 +996,14 @@ endif
 
 if HAVE_HAL
 modlibexec_LTLIBRARIES += \
-		libdbus-util.la \
 		module-hal-detect.la
 endif
 
-if HAVE_DBUS
-modlibexec_LTLIBRARIES += \
-		libdbus-util.la \
-		module-console-kit.la
-endif
-
 if HAVE_BLUEZ
 modlibexec_LTLIBRARIES += \
+		libbluetooth-util.la \
 		module-bluetooth-proximity.la \
 		module-bluetooth-discover.la \
-		libbluetooth-util.la \
 		libbluetooth-ipc.la \
 		libbluetooth-sbc.la \
 		module-bluetooth-device.la

commit 004b38f0f812b7f92d21267deb6d5990eac982ad
Author: Luiz Augusto von Dentz <luiz.dentz at openbossa.org>
Date:   Mon Feb 2 18:18:34 2009 -0300

    Prevent changing volume on wrong device.

diff --git a/src/modules/bluetooth/module-bluetooth-device.c b/src/modules/bluetooth/module-bluetooth-device.c
index de6bded..d909d70 100644
--- a/src/modules/bluetooth/module-bluetooth-device.c
+++ b/src/modules/bluetooth/module-bluetooth-device.c
@@ -1068,6 +1068,9 @@ finish:
 
 /*     dbus_error_init(&err); */
 
+/*    if (!dbus_message_has_path(msg, u->path)) */
+/*        goto done; */
+
 /*     if (dbus_message_is_signal(msg, "org.bluez.Headset", "PropertyChanged") || */
 /*         dbus_message_is_signal(msg, "org.bluez.AudioSink", "PropertyChanged")) { */
 

commit 9a93157f5dc22467be952e7ff2f10c7ef00a0c76
Merge: d802a76... 871389a...
Author: Lennart Poettering <lennart at poettering.net>
Date:   Wed Feb 4 18:41:44 2009 +0100

    Merge commit 'coling/master'


commit d4618c8c84187dfddbb715aa285262a5780ac3ad
Merge: 9a93157... 004b38f...
Author: Lennart Poettering <lennart at poettering.net>
Date:   Wed Feb 4 18:42:13 2009 +0100

    Merge commit 'vudentz/master'


commit 0933f1a2a401a418a90dc948824e184b5dcc9c93
Merge: d4618c8... e9ca8b1...
Author: Lennart Poettering <lennart at poettering.net>
Date:   Wed Feb 4 18:42:43 2009 +0100

    Merge commit 'flameeyes/flameeyes'


-- 
hooks/post-receive
PulseAudio Sound Server



More information about the pulseaudio-commits mailing list