summaryrefslogtreecommitdiff
path: root/debian/patches
diff options
context:
space:
mode:
Diffstat (limited to 'debian/patches')
-rw-r--r--debian/patches/01_lower_sink_ranking.patch13
-rw-r--r--debian/patches/02_disable_hal.patch175
-rw-r--r--debian/patches/enable_cg2900_on_upstream_4.91.patch88
-rw-r--r--debian/patches/series3
4 files changed, 279 insertions, 0 deletions
diff --git a/debian/patches/01_lower_sink_ranking.patch b/debian/patches/01_lower_sink_ranking.patch
new file mode 100644
index 0000000..4792dbf
--- /dev/null
+++ b/debian/patches/01_lower_sink_ranking.patch
@@ -0,0 +1,13 @@
+# http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=571595
+Index: bluez-4.91/audio/gsta2dpsink.c
+===================================================================
+--- bluez-4.91.orig/audio/gsta2dpsink.c 2011-02-14 07:40:34.000000000 +1100
++++ bluez-4.91/audio/gsta2dpsink.c 2011-04-05 10:12:02.731315917 +1000
+@@ -725,6 +725,6 @@
+ gboolean gst_a2dp_sink_plugin_init(GstPlugin *plugin)
+ {
+ return gst_element_register(plugin, "a2dpsink",
+- GST_RANK_MARGINAL, GST_TYPE_A2DP_SINK);
++ GST_RANK_MARGINAL-1, GST_TYPE_A2DP_SINK);
+ }
+
diff --git a/debian/patches/02_disable_hal.patch b/debian/patches/02_disable_hal.patch
new file mode 100644
index 0000000..5abd6c8
--- /dev/null
+++ b/debian/patches/02_disable_hal.patch
@@ -0,0 +1,175 @@
+Description: Disable usage of Hal in the telephony plugins, and disable the hal plugin. They do not do very useful things anyway, and just cause hal to start up, which is expensive.
+Author: Martin Pitt <martin.pitt@ubuntu.com>
+Origin: Ubuntu
+Updated by Michael Biebl <biebl@debian.org>
+Updated by Nobuhiro Iwamatsu <iwamatsu@debian.org>
+Debian BTS: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=599023
+
+Index: bluez-4.91/audio/telephony-maemo5.c
+===================================================================
+--- bluez-4.91.orig/audio/telephony-maemo5.c 2010-12-19 06:12:17.000000000 +1100
++++ bluez-4.91/audio/telephony-maemo5.c 2011-04-05 10:12:06.121315919 +1000
+@@ -1385,6 +1385,7 @@
+ return type == DBUS_TYPE_INVALID ? TRUE : FALSE;
+ }
+
++#if 0 /* Disable hal */
+ static void hal_battery_level_reply(DBusPendingCall *call, void *user_data)
+ {
+ DBusError err;
+@@ -1501,6 +1502,7 @@
+ dbus_message_iter_next(&array);
+ }
+ }
++#endif /* Disable hal */
+
+ static void csd_call_free(struct csd_call *call)
+ {
+@@ -1715,6 +1717,7 @@
+ dbus_message_unref(reply);
+ }
+
++#if 0 /* Disable hal */
+ static void hal_find_device_reply(DBusPendingCall *call, void *user_data)
+ {
+ DBusError err;
+@@ -1768,6 +1771,7 @@
+ done:
+ dbus_message_unref(reply);
+ }
++#endif /* Disable hal */
+
+ static void phonebook_read_reply(DBusPendingCall *call, void *user_data)
+ {
+@@ -2018,9 +2022,11 @@
+ else if (dbus_message_is_signal(msg, NETWORK_INTERFACE,
+ "signal_strength_change"))
+ handle_signal_strength_change(msg);
++#if 0 /* Disable hal */
+ else if (dbus_message_is_signal(msg, "org.freedesktop.Hal.Device",
+ "PropertyModified"))
+ handle_hal_property_modified(msg);
++#endif /* Disable hal */
+ else if (dbus_message_is_signal(msg, SSC_DBUS_IFACE,
+ "modem_state_changed_ind"))
+ handle_modem_state(msg);
+@@ -2077,6 +2083,7 @@
+
+ telephony_ready_ind(features, maemo_indicators, BTRH_NOT_SUPPORTED,
+ chld_str);
++#if 0 /* Disable hal */
+ if (send_method_call("org.freedesktop.Hal",
+ "/org/freedesktop/Hal/Manager",
+ "org.freedesktop.Hal.Manager",
+@@ -2085,7 +2092,7 @@
+ DBUS_TYPE_STRING, &battery_cap,
+ DBUS_TYPE_INVALID) < 0)
+ error("Unable to send HAL method call");
+-
++#endif /* Disable hal */
+ return 0;
+ }
+
+Index: bluez-4.91/audio/telephony-maemo6.c
+===================================================================
+--- bluez-4.91.orig/audio/telephony-maemo6.c 2011-03-29 19:53:53.000000000 +1100
++++ bluez-4.91/audio/telephony-maemo6.c 2011-04-05 10:12:06.121315919 +1000
+@@ -1369,6 +1369,7 @@
+ return type == DBUS_TYPE_INVALID ? TRUE : FALSE;
+ }
+
++#if 0 /* Disable hal */
+ static void hal_battery_level_reply(DBusPendingCall *call, void *user_data)
+ {
+ DBusError err;
+@@ -1484,6 +1485,7 @@
+ dbus_message_iter_next(&array);
+ }
+ }
++#endif /* Disable hal */
+
+ static void csd_call_free(struct csd_call *call)
+ {
+@@ -1834,9 +1836,11 @@
+ else if (dbus_message_is_signal(msg, CSD_CSNET_SIGNAL,
+ "SignalBarsChanged"))
+ handle_signal_bars_changed(msg);
++#if 0 /* Disable hal */
+ else if (dbus_message_is_signal(msg, "org.freedesktop.Hal.Device",
+ "PropertyModified"))
+ handle_hal_property_modified(msg);
++#endif
+ else if (dbus_message_is_signal(msg, SSC_DBUS_IFACE,
+ "modem_state_changed_ind"))
+ handle_modem_state(msg);
+@@ -1855,6 +1859,7 @@
+ watches = g_slist_prepend(watches, GUINT_TO_POINTER(watch));
+ }
+
++#if 0 /* Disable hal */
+ static void hal_find_device_reply(DBusPendingCall *call, void *user_data)
+ {
+ DBusError err;
+@@ -1905,6 +1910,8 @@
+ remove_pending(call);
+ }
+
++#endif /* Disable hal */
++
+ int telephony_init(void)
+ {
+ const char *battery_cap = "battery";
+@@ -1944,6 +1951,7 @@
+
+ telephony_ready_ind(features, maemo_indicators, BTRH_NOT_SUPPORTED,
+ chld_str);
++#if 0 /* Disable hal */
+ if (send_method_call("org.freedesktop.Hal",
+ "/org/freedesktop/Hal/Manager",
+ "org.freedesktop.Hal.Manager",
+@@ -1952,7 +1960,7 @@
+ DBUS_TYPE_STRING, &battery_cap,
+ DBUS_TYPE_INVALID) < 0)
+ error("Unable to send HAL method call");
+-
++#endif
+ return 0;
+ }
+
+Index: bluez-4.91/audio/telephony-ofono.c
+===================================================================
+--- bluez-4.91.orig/audio/telephony-ofono.c 2011-03-29 19:53:53.000000000 +1100
++++ bluez-4.91/audio/telephony-ofono.c 2011-04-05 10:12:06.121315919 +1000
+@@ -1350,6 +1350,7 @@
+ return TRUE;
+ }
+
++#if 0 /* Disable hal */
+ static void hal_battery_level_reply(DBusPendingCall *call, void *user_data)
+ {
+ DBusMessage *reply;
+@@ -1533,6 +1534,7 @@
+ dbus_message_unref(reply);
+ remove_pending(call);
+ }
++#endif /* Disable hal */
+
+ static void handle_service_connect(DBusConnection *conn, void *user_data)
+ {
+@@ -1581,6 +1583,7 @@
+
+ watches = g_slist_prepend(watches, GUINT_TO_POINTER(watch));
+
++#if 0 /* Disable hal */
+ ret = send_method_call("org.freedesktop.Hal",
+ "/org/freedesktop/Hal/Manager",
+ "org.freedesktop.Hal.Manager",
+@@ -1590,7 +1593,7 @@
+ DBUS_TYPE_INVALID);
+ if (ret < 0)
+ return ret;
+-
++#endif
+ DBG("telephony_init() successfully");
+
+ return ret;
diff --git a/debian/patches/enable_cg2900_on_upstream_4.91.patch b/debian/patches/enable_cg2900_on_upstream_4.91.patch
new file mode 100644
index 0000000..02b84c4
--- /dev/null
+++ b/debian/patches/enable_cg2900_on_upstream_4.91.patch
@@ -0,0 +1,88 @@
+diff -Naupr bluez-4.91/tools/hciattach.c bluez-4.91.cg2900/tools/hciattach.c
+--- bluez-4.91/tools/hciattach.c 2010-11-30 15:50:48.000000000 +0100
++++ bluez-4.91.cg2900/tools/hciattach.c 2011-05-20 10:47:45.849685569 +0200
+@@ -1066,6 +1066,11 @@ struct uart_t uart[] = {
+ { "texasalt", 0x0000, 0x0000, HCI_UART_LL, 115200, 115200,
+ FLOW_CTL, DISABLE_PM, NULL, texasalt, NULL },
+
++ /* ST-Ericsson CG2900 GPS FM Bluetooth combo controller */
++ { "cg2900", 0x0000, 0x0000, HCI_UART_STE, 115200, 115200,
++ FLOW_CTL, DISABLE_PM, NULL, NULL },
++
++
+ /* ST Microelectronics minikits based on STLC2410/STLC2415 */
+ { "st", 0x0000, 0x0000, HCI_UART_H4, 57600, 115200,
+ FLOW_CTL, DISABLE_PM, NULL, st },
+@@ -1157,10 +1162,10 @@ static struct uart_t * get_by_type(char
+ }
+
+ /* Initialize UART driver */
+-static int init_uart(char *dev, struct uart_t *u, int send_break, int raw)
++static int init_uart(char *dev, struct uart_t *u, int send_break, int raw, int line_disc)
+ {
+ struct termios ti;
+- int fd, i;
++ int fd;
+ unsigned long flags = 0;
+
+ if (raw)
+@@ -1217,8 +1222,7 @@ static int init_uart(char *dev, struct u
+ }
+
+ /* Set TTY to N_HCI line discipline */
+- i = N_HCI;
+- if (ioctl(fd, TIOCSETD, &i) < 0) {
++ if (ioctl(fd, TIOCSETD, &line_disc) < 0) {
+ perror("Can't set line discipline");
+ return -1;
+ }
+@@ -1243,7 +1247,7 @@ static void usage(void)
+ {
+ printf("hciattach - HCI UART driver initialization utility\n");
+ printf("Usage:\n");
+- printf("\thciattach [-n] [-p] [-b] [-r] [-t timeout] [-s initial_speed] <tty> <type | id> [speed] [flow|noflow] [bdaddr]\n");
++ printf("\thciattach [-n] [-p] [-a line_disc_nr] [-b] [-r] [-t timeout] [-s initial_speed] <tty> <type | id> [speed] [flow|noflow] [bdaddr]\n");
+ printf("\thciattach -l\n");
+ }
+
+@@ -1252,6 +1256,7 @@ int main(int argc, char *argv[])
+ struct uart_t *u = NULL;
+ int detach, printpid, raw, opt, i, n, ld, err;
+ int to = 10;
++ int line_disc = N_HCI;
+ int init_speed = 0;
+ int send_break = 0;
+ pid_t pid;
+@@ -1264,8 +1269,11 @@ int main(int argc, char *argv[])
+ printpid = 0;
+ raw = 0;
+
+- while ((opt=getopt(argc, argv, "bnpt:s:lr")) != EOF) {
++ while ((opt=getopt(argc, argv, "bnpt:s:lra:")) != EOF) {
+ switch(opt) {
++ case 'a':
++ line_disc = atoi(optarg);
++ break;
+ case 'b':
+ send_break = 1;
+ break;
+@@ -1381,7 +1389,7 @@ int main(int argc, char *argv[])
+ alarm(to);
+ bcsp_max_retries = to;
+
+- n = init_uart(dev, u, send_break, raw);
++ n = init_uart(dev, u, send_break, raw, line_disc);
+ if (n < 0) {
+ perror("Can't initialize device");
+ exit(1);
+diff -Naupr bluez-4.91/tools/hciattach.h bluez-4.91.cg2900/tools/hciattach.h
+--- bluez-4.91/tools/hciattach.h 2010-11-30 15:50:48.000000000 +0100
++++ bluez-4.91.cg2900/tools/hciattach.h 2011-05-20 10:47:48.199685573 +0200
+@@ -39,6 +39,7 @@
+ #define HCI_UART_H4DS 3
+ #define HCI_UART_LL 4
+ #define HCI_UART_ATH3K 5
++#define HCI_UART_STE 6
+
+ #define HCI_UART_RAW_DEVICE 0
+
diff --git a/debian/patches/series b/debian/patches/series
new file mode 100644
index 0000000..2126886
--- /dev/null
+++ b/debian/patches/series
@@ -0,0 +1,3 @@
+01_lower_sink_ranking.patch
+02_disable_hal.patch
+enable_cg2900_on_upstream_4.91.patch