From ee6657aa9a654d334a5a900ea359c726550383e0 Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Fri, 10 Apr 2009 01:31:25 +0200 Subject: bluetooth: when starting up HSP stream, send 2 packets first, only afterwards enter one-read-one-write logic --- src/modules/bluetooth/module-bluetooth-device.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/modules') diff --git a/src/modules/bluetooth/module-bluetooth-device.c b/src/modules/bluetooth/module-bluetooth-device.c index 2812bc24..90f64861 100644 --- a/src/modules/bluetooth/module-bluetooth-device.c +++ b/src/modules/bluetooth/module-bluetooth-device.c @@ -1268,6 +1268,12 @@ static void thread_func(void *userdata) { if (u->source && PA_SOURCE_IS_LINKED(u->source->thread_info.state)) { + /* We should send two blocks to the device before we expect + * a response. */ + + if (u->write_index == 0 && u->read_index <= 0) + do_write = 2; + if (pollfd && (pollfd->revents & POLLIN)) { int n_read; -- cgit