rpms/bluez/devel bluez-fix-audio-service-disconnect.patch, NONE, 1.1 bluez.spec, 1.56, 1.57

Bastien Nocera hadess at fedoraproject.org
Fri Apr 3 17:41:33 UTC 2009


Author: hadess

Update of /cvs/pkgs/rpms/bluez/devel
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv19906

Modified Files:
	bluez.spec 
Added Files:
	bluez-fix-audio-service-disconnect.patch 
Log Message:
* Fri Apr 03 2009 - Bastien Nocera <bnocera at redhat.com> - 4.34-3
- Avoid disconnecting audio devices straight after they're connected


bluez-fix-audio-service-disconnect.patch:

--- NEW FILE bluez-fix-audio-service-disconnect.patch ---
diff --git a/audio/device.c b/audio/device.c
index f66cd61..84659d3 100644
--- a/audio/device.c
+++ b/audio/device.c
@@ -257,7 +257,7 @@ static gboolean headset_connect_timeout(gpointer user_data)
 	dev->priv->headset_timer = 0;
 
 	if (dev->headset)
-		headset_config_stream(dev, NULL, NULL);
+		headset_config_stream(dev, FALSE, NULL, NULL);
 
 	return FALSE;
 }
@@ -437,7 +437,7 @@ static DBusMessage *dev_connect(DBusConnection *conn, DBusMessage *msg,
 	dev->auto_connect = TRUE;
 
 	if (dev->headset)
-		headset_config_stream(dev, NULL, NULL);
+		headset_config_stream(dev, FALSE, NULL, NULL);
 	else if (dev->sink) {
 		struct avdtp *session = avdtp_get(&dev->src, &dev->dst);
 
diff --git a/audio/headset.c b/audio/headset.c
index 4d70b4a..e1d1cb5 100644
--- a/audio/headset.c
+++ b/audio/headset.c
@@ -2259,6 +2259,7 @@ unsigned int headset_request_stream(struct audio_device *dev,
 }
 
 unsigned int headset_config_stream(struct audio_device *dev,
+					gboolean auto_dc,
 					headset_stream_cb_t cb,
 					void *user_data)
 {
@@ -2280,7 +2281,7 @@ unsigned int headset_config_stream(struct audio_device *dev,
 	if (rfcomm_connect(dev, cb, user_data, &id) < 0)
 		return 0;
 
-	hs->auto_dc = TRUE;
+	hs->auto_dc = auto_dc;
 	hs->pending->target_state = HEADSET_STATE_CONNECTED;
 
 	return id;
diff --git a/audio/headset.h b/audio/headset.h
index dbe1923..73c8a25 100644
--- a/audio/headset.h
+++ b/audio/headset.h
@@ -65,6 +65,7 @@ void headset_update(struct audio_device *dev, uint16_t svc,
 			const char *uuidstr);
 
 unsigned int headset_config_stream(struct audio_device *dev,
+					gboolean auto_dc,
 					headset_stream_cb_t cb,
 					void *user_data);
 unsigned int headset_request_stream(struct audio_device *dev,
diff --git a/audio/sink.c b/audio/sink.c
index 7f8286d..afdfde6 100644
--- a/audio/sink.c
+++ b/audio/sink.c
@@ -507,6 +507,8 @@ gboolean sink_setup_stream(struct sink *sink, struct avdtp *session)
 	if (!sink->session)
 		return FALSE;
 
+	avdtp_set_auto_disconnect(sink->session, FALSE);
+
 	if (avdtp_discover(sink->session, discovery_complete, sink) < 0)
 		return FALSE;
 
@@ -538,8 +540,6 @@ static DBusMessage *sink_connect(DBusConnection *conn,
 						".AlreadyConnected",
 						"Device Already Connected");
 
-	avdtp_set_auto_disconnect(sink->session, FALSE);
-
 	if (!sink_setup_stream(sink, NULL))
 		return g_dbus_create_error(msg, ERROR_INTERFACE ".Failed",
 						"Failed to create a stream");
diff --git a/audio/unix.c b/audio/unix.c
index 0cebcec..7aca7ef 100644
--- a/audio/unix.c
+++ b/audio/unix.c
@@ -904,7 +904,7 @@ static void start_config(struct audio_device *dev, struct unix_client *client)
 			goto failed;
 		}
 
-		id = headset_config_stream(dev, headset_setup_complete,
+		id = headset_config_stream(dev, TRUE, headset_setup_complete,
 						client);
 		client->cancel = headset_cancel_stream;
 		break;


Index: bluez.spec
===================================================================
RCS file: /cvs/pkgs/rpms/bluez/devel/bluez.spec,v
retrieving revision 1.56
retrieving revision 1.57
diff -u -r1.56 -r1.57
--- bluez.spec	3 Apr 2009 17:36:45 -0000	1.56
+++ bluez.spec	3 Apr 2009 17:41:03 -0000	1.57
@@ -1,7 +1,7 @@
 Summary: Bluetooth utilities
 Name: bluez
 Version: 4.34
-Release: 2%{?dist}
+Release: 3%{?dist}
 License: GPLv2+
 Group: Applications/System
 Source: http://www.kernel.org/pub/linux/bluetooth/%{name}-%{version}.tar.gz
@@ -16,6 +16,8 @@
 Patch3: bluez-activate-wacom-mode2.patch
 # http://git.kernel.org/?p=bluetooth/bluez.git;a=commit;h=457056310229911e820357470ee8fb30c82516da
 Patch4: bluez-fix-audio-service-crasher.patch
+# http://git.kernel.org/?p=bluetooth/bluez.git;a=commit;h=1200c9362b09dcc0cd362c046b93c560a7a47256
+Patch5: bluez-fix-audio-service-disconnect.patch
 
 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
 URL: http://www.bluez.org/
@@ -105,6 +107,7 @@
 %patch2 -p1 -b .non-utf8-name
 %patch3 -p1 -b .wacom
 %patch4 -p1 -b .audio-service-crasher
+%patch5 -p1 -b .audio-service-disconnect
 
 %build
 %configure --enable-cups --enable-hid2hci --enable-dfutool --enable-tools --enable-bccmd --enable-gstreamer --enable-hidd --enable-pand --enable-dund
@@ -197,6 +200,9 @@
 %{_libdir}/alsa-lib/*.so
 
 %changelog
+* Fri Apr 03 2009 - Bastien Nocera <bnocera at redhat.com> - 4.34-3
+- Avoid disconnecting audio devices straight after they're connected
+
 * Fri Apr 03 2009 - Bastien Nocera <bnocera at redhat.com> - 4.34-2
 - Don't crash when audio devices are registered and the adapter
   is removed




More information about the fedora-extras-commits mailing list