[pulseaudio-discuss] [RFC v0 5/5] bluetooth: Dynamically change outgoing MTU
Mikel Astiz
mikel.astiz.oss at gmail.com
Wed Apr 11 00:00:30 PDT 2012
From: Mikel Astiz <mikel.astiz at bmw-carit.de>
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
More information about the pulseaudio-discuss
mailing list