Some Bluetooth controllers do not handle well entering sniff mode requests while SCO channel is active, which may result in instability in firmware. This patch disallows entering sniff mode while SCO channel is open, and restores link policy settings back to its default value when SCO is closed. The real problem is in firmware but this workaround helps to avoid related to it problems. --- audio/headset.c | 4 ++++ 1 files changed, 4 insertions(+), 0 deletions(-) diff --git a/audio/headset.c b/audio/headset.c index 819e0f8..2e5193d 100644 --- a/audio/headset.c +++ b/audio/headset.c @@ -581,6 +581,8 @@ static void sco_connect_cb(GIOChannel *chan, GError *err, gpointer user_data) DBG("SCO socket opened for headset %s", dev->path); + manager_allow_sniff(dev, FALSE); + sk = g_io_channel_unix_get_fd(chan); DBG("SCO fd=%d", sk); @@ -1243,6 +1245,8 @@ static void close_sco(struct audio_device *device) g_io_channel_shutdown(hs->sco, TRUE, NULL); g_io_channel_unref(hs->sco); hs->sco = NULL; + + manager_allow_sniff(device, TRUE); } if (hs->sco_id) { -- 1.7.5.4 -- To unsubscribe from this list: send the line "unsubscribe linux-bluetooth" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html