bluez5: limit CVSD block size

Don't try to write data in too large blocks.

This controls the maximum amount of data to send at once. sco-io will
buffer and fragment packets to the right size.

Previously in sco-sink, SO_SNDBUF was not set, so there could be a
longer queue in the socket.
This commit is contained in:
Pauli Virtanen 2025-06-14 16:21:06 +03:00
parent 2f74789a92
commit f9b0bf3f95

View file

@ -88,7 +88,7 @@ static void *codec_init(const struct media_codec *codec, uint32_t flags,
if (!this) if (!this)
return NULL; return NULL;
this->block_size = 2 * (mtu/2); this->block_size = SPA_MIN(2 * (mtu/2), 144u); /* cap to 9 ms */
return this; return this;
} }