diff options
author | Lennart Poettering <lennart@poettering.net> | 2009-04-10 01:31:25 +0200 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2009-04-10 01:31:30 +0200 |
commit | ee6657aa9a654d334a5a900ea359c726550383e0 (patch) | |
tree | 6b2f3c78480482b3a95c9e141b0a7501e3657f25 | |
parent | d77b28cb4bd088ab0f723cbdd65e3947b35b3b25 (diff) |
bluetooth: when starting up HSP stream, send 2 packets first, only afterwards enter one-read-one-write logic
-rw-r--r-- | src/modules/bluetooth/module-bluetooth-device.c | 6 |
1 files changed, 6 insertions, 0 deletions
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; |