From f48a72a504fc339199d0d950d6886578b018bc8f Mon Sep 17 00:00:00 2001 From: Pauli Virtanen Date: Sat, 12 Jul 2025 13:52:50 +0300 Subject: [PATCH] bluez5: smaller max latency for BAP client capture 4 packets should be enough jitter buffer. This matters only for BAP client, server is controlled by presentation delay. --- spa/plugins/bluez5/media-source.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spa/plugins/bluez5/media-source.c b/spa/plugins/bluez5/media-source.c index 7d78e186f..a5746317f 100644 --- a/spa/plugins/bluez5/media-source.c +++ b/spa/plugins/bluez5/media-source.c @@ -903,7 +903,7 @@ static int transport_start(struct impl *this) spa_bt_decode_buffer_set_target_latency(&port->buffer, (int32_t) this->decode_buffer_target); - if (this->codec->kind == MEDIA_CODEC_HFP) { + if (this->codec->kind == MEDIA_CODEC_HFP || this->codec->kind == MEDIA_CODEC_BAP) { /* 40 ms max buffer (on top of duration) */ spa_bt_decode_buffer_set_max_extra_latency(&port->buffer, port->current_format.info.raw.rate * 40 / 1000);