Bluetooth: Audio: Make PACS location optional

Make the PACS location characteristic optional, and
also optionally writable.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
This commit is contained in:
Emil Gydesen 2022-04-13 21:10:18 +02:00 committed by Carles Cufí
commit a796927961
7 changed files with 163 additions and 82 deletions

View file

@ -209,7 +209,7 @@ static void set_location(void)
{
int err;
if (IS_ENABLED(CONFIG_BT_PAC_SNK)) {
if (IS_ENABLED(CONFIG_BT_PAC_SNK_LOC)) {
err = bt_audio_capability_set_location(BT_AUDIO_SINK,
BT_AUDIO_LOCATION_FRONT_CENTER);
if (err != 0) {
@ -218,7 +218,7 @@ static void set_location(void)
}
}
if (IS_ENABLED(CONFIG_BT_PAC_SRC)) {
if (IS_ENABLED(CONFIG_BT_PAC_SRC_LOC)) {
err = bt_audio_capability_set_location(BT_AUDIO_SINK,
(BT_AUDIO_LOCATION_FRONT_LEFT |
BT_AUDIO_LOCATION_FRONT_RIGHT));