[pulseaudio-commits] [SCM] PulseAudio Sound Server branch, master, updated. v0.9.15-3-g099b328

Lennart Poettering gitmailer-noreply at 0pointer.de
Fri Apr 17 13:42:23 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  d775cf6fd4e68d765333adc61bd9af2b18355a8e (commit)

- Log -----------------------------------------------------------------
099b328 bluetoth-device: be less strict on CONNECTED state to switch profile
344eea4 pulse/context: when NOFAIL, don't try_next_connection() if c->client
-----------------------------------------------------------------------

Summary of changes:
 src/modules/bluetooth/module-bluetooth-device.c |    9 +++++++--
 src/pulse/context.c                             |    3 ++-
 2 files changed, 9 insertions(+), 3 deletions(-)

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

commit 344eea4f586fe2fd7d774b5cc38e8ea2bf582d60
Author: Marc-André Lureau <marc-andre.lureau at nokia.com>
Date:   Fri Apr 17 15:47:27 2009 +0300

    pulse/context: when NOFAIL, don't try_next_connection() if c->client

diff --git a/src/pulse/context.c b/src/pulse/context.c
index 4aad737..bfff0e1 100644
--- a/src/pulse/context.c
+++ b/src/pulse/context.c
@@ -902,7 +902,8 @@ static DBusHandlerResult filter_cb(DBusConnection *bus, DBusMessage *message, vo
         /* The system wide instance via PF_LOCAL */
         c->server_list = pa_strlist_prepend(c->server_list, PA_SYSTEM_RUNTIME_PATH PA_PATH_SEP PA_NATIVE_DEFAULT_UNIX_SOCKET);
 
-    try_next_connection(c);
+    if (!c->client)
+        try_next_connection(c);
 
 finish:
     return DBUS_HANDLER_RESULT_NOT_YET_HANDLED;

commit 099b3284ec7e78da25baa70d42a2ecdc1092b935
Author: Marc-André Lureau <marc-andre.lureau at nokia.com>
Date:   Sat Apr 4 17:56:36 2009 +0300

    bluetoth-device: be less strict on CONNECTED state to switch profile

diff --git a/src/modules/bluetooth/module-bluetooth-device.c b/src/modules/bluetooth/module-bluetooth-device.c
index 90f6486..ecb5e83 100644
--- a/src/modules/bluetooth/module-bluetooth-device.c
+++ b/src/modules/bluetooth/module-bluetooth-device.c
@@ -1877,11 +1877,16 @@ static int card_set_profile(pa_card *c, pa_card_profile *new_profile) {
         return -1;
     }
 
-    if (device->headset_state != PA_BT_AUDIO_STATE_CONNECTED && *d == PROFILE_HSP) {
+    /* The state signal is sent by bluez, so it is racy to check
+       strictly for CONNECTED, we should also accept STREAMING state
+       as being good enough. However, if the profile is used
+       concurrently (which is unlikely), ipc will fail later on, and
+       module will be unloaded. */
+    if (device->headset_state < PA_BT_AUDIO_STATE_CONNECTED && *d == PROFILE_HSP) {
         pa_log_warn("HSP is not connected, refused to switch profile");
         return -1;
     }
-    else if (device->audio_sink_state != PA_BT_AUDIO_STATE_CONNECTED && *d == PROFILE_A2DP) {
+    else if (device->audio_sink_state < PA_BT_AUDIO_STATE_CONNECTED && *d == PROFILE_A2DP) {
         pa_log_warn("A2DP is not connected, refused to switch profile");
         return -1;
     }

-- 
hooks/post-receive
PulseAudio Sound Server



More information about the pulseaudio-commits mailing list