[lvc-project] [PATCH BlueZ 2/2] a2dp: enable input MTU auto-tuning for the server
Luiz Augusto von Dentz
luiz.dentz at gmail.com
Wed Jan 29 00:53:58 MSK 2025
Hi Fedor,
On Tue, Jan 28, 2025 at 4:04 PM Fedor Pchelkin <pchelkin at ispras.ru> wrote:
>
> L2CAP frames are lost while utilizing some exotic A2DP transports
> usually coming up with weird custom MTU sizes so take advantage of
> auto-tuning it for such cases.
>
> Found by Linux Verification Center (linuxtesting.org).
>
> Fixes: https://github.com/bluez/bluez/issues/1080
> ---
> profiles/audio/a2dp.c | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/profiles/audio/a2dp.c b/profiles/audio/a2dp.c
> index c97bd6e89..05a2e2e80 100644
> --- a/profiles/audio/a2dp.c
> +++ b/profiles/audio/a2dp.c
> @@ -2592,6 +2592,8 @@ static bool a2dp_server_listen(struct a2dp_server *server)
> BT_IO_OPT_MODE, mode,
> BT_IO_OPT_SEC_LEVEL, BT_IO_SEC_MEDIUM,
> BT_IO_OPT_CENTRAL, true,
> + /* Set Input MTU to 0 to auto-tune */
> + BT_IO_OPT_IMTU, 0,
> BT_IO_OPT_INVALID);
> if (server->io)
> return true;
> --
> 2.39.5
Another thing we might have to do is to fallback if BT_IO_OPT_IMTU = 0
doesn't work so perhaps we should incorporate some special handling if
auto fails at btio level.
--
Luiz Augusto von Dentz
More information about the lvc-project
mailing list