bluez5: Configure LC3 codec capabilities

Currently, the PipeWire daemon registers BlueZ LE Media Endpoints
with audio capabilities covering all settings defined in the BAP spec.
However, some scenarios might require the capabilities to be restricted
to specific configurations.

This adds a method to read LC3 codec specific capabilities from the
Wireplumber config file, and provide those settings when registering
Media Endpoint objects with BlueZ. If the values are not present in
the config file, all settings will be used by default.

Below is an example of how to set the LC3 capabilities in the config
file, to support the 16_2 setting from the BAP spec:

bluez5.bap-server-capabilities.rates = [16000]
bluez5.bap-server-capabilities.durations = [10]
bluez5.bap-server-capabilities.channels = [1, 2]
bluez5.bap-server-capabilities.framelen_min = 40
bluez5.bap-server-capabilities.framelen_max = 40
bluez5.bap-server-capabilities.max_frames = 2
This commit is contained in:
Iulia Tanasescu 2024-11-29 16:55:40 +02:00 committed by Wim Taymans
parent b5490954d0
commit 9a5b2d42f9
12 changed files with 204 additions and 22 deletions

View file

@ -71,7 +71,7 @@ done:
}
static int codec_fill_caps(const struct media_codec *codec, uint32_t flags,
uint8_t caps[A2DP_MAX_CAPS_SIZE])
const struct spa_dict *settings, uint8_t caps[A2DP_MAX_CAPS_SIZE])
{
const a2dp_aac_t a2dp_aac = {
.object_type =