From: Mikel Astiz <mikel.astiz@xxxxxxxxxxxx> Dynamically change the size of the outgoing SCO packets according to the size of the received ones. --- src/modules/bluetooth/module-bluetooth-device.c | 4 ++++ 1 files changed, 4 insertions(+), 0 deletions(-) diff --git a/src/modules/bluetooth/module-bluetooth-device.c b/src/modules/bluetooth/module-bluetooth-device.c index 6ab2c81..9f6d288 100644 --- a/src/modules/bluetooth/module-bluetooth-device.c +++ b/src/modules/bluetooth/module-bluetooth-device.c @@ -600,6 +600,10 @@ static int hsp_process_push(struct userdata *u) { pa_assert((size_t) l <= pa_memblock_get_length(memchunk.memblock)); + /* Adapt size of outgoing blocks accordign to the size we just got */ + if (u->write_block_size != (size_t) l) + u->write_block_size = (size_t) l; + memchunk.length = (size_t) l; u->read_index += (uint64_t) l; -- 1.7.7.6