Skip to content

bluetooth: Limit effective SBC bitpool of incoming bluetooth connection

Turned out that SelectConfiguration is only used for outgoing connections, and incoming connection from bluetooth headset using SBC codec ends up with a bitpool as large as declared by headset.

When resulting bitpool is so large that SBC frame size plus RTP header size exceeds write MTU size, number of frames per packet becomes zero causing crash dividing by zero in update_sink_buffer_size()

Fix this by limiting available bitpool value exposed for SBC endpoints.

Fixes: 89082cbf ("bluetooth: a2dp dual channel SBC XQ codec configurations")

Closes #1354 (closed)

Edited by Igor Kovalenko

Merge request reports