bluez5: Add support to select BAP QoS config

The current BAP QoS configuration allows to register a sampling
frequency based on the configuration done using wireplumber configuration.
However, for a scenario were the user need to use a specific SDU framelength
it cannot be done as the select_bap_qos function selects the QOS based on
priority and hence it will use the best possible config rather than the user
configured.

This PR adds option to select the QoS set based on user configured value. If
the remote device doesn't have the user configured capabilities it will always
use the best priority config.

Further, this change also allows the user to set RTN, Latency, Delay QoS config
for certain use case to have controller use optimum bandwidth usage.

Below are the example configuration on setting LC3 capabilities in config file:

bluez5.bap.set_name = "48_2_1"
bluez5.bap.rtn = 5
bluez5.bap.latency = 20
bluez5.bap.delay = 40000
bluez5.framing = false
This commit is contained in:
Vinit Mehta 2025-03-14 19:44:56 +05:30 committed by Wim Taymans
parent d22a4d60b3
commit 55372a41b1
3 changed files with 123 additions and 73 deletions

View file

@ -103,7 +103,7 @@ struct media_codec {
int (*get_qos)(const struct media_codec *codec,
const void *config, size_t config_size,
const struct bap_endpoint_qos *endpoint_qos,
struct bap_codec_qos *qos);
struct bap_codec_qos *qos, const struct spa_dict *settings);
/** qsort comparison sorting caps in order of preference for the codec.
* Used in codec switching to select best remote endpoints.