bass: Add API to check BIS required for sync
authorIulia Tanasescu <iulia.tanasescu@nxp.com>
Thu, 29 Aug 2024 12:49:17 +0000 (15:49 +0300)
committerWootak Jung <wootak.jung@samsung.com>
Thu, 20 Feb 2025 07:43:22 +0000 (16:43 +0900)
This adds a wrapper over bt_bass_check_bis, which receives a Broadcaster
device and a BIS index and checks is the Delegator has been instructed
to sync with the specific BIS transmitted by the Source.

Signed-off-by: Anuj Jain <anuj01.jain@samsung.com>
profiles/audio/bass.c
profiles/audio/bass.h

index 44da39e053f6dacba3b24eac2f1c54484b6c46f6..2316f8e24d462aeafef7ede52e450a42c40a1004 100644 (file)
@@ -123,6 +123,20 @@ static bool delegator_match_device(const void *data, const void *match_data)
        return dg->device == device;
 }
 
+bool bass_check_bis(struct btd_device *device, uint8_t bis)
+{
+       struct bass_delegator *dg;
+
+       dg = queue_find(delegators, delegator_match_device, device);
+       if (!dg)
+               return true;
+
+       if (!bt_bass_check_bis(dg->src, bis))
+               return false;
+
+       return true;
+}
+
 static void bap_state_changed(struct bt_bap_stream *stream, uint8_t old_state,
                                uint8_t new_state, void *user_data)
 {
index 7e20385e53d5e95eadc494ac0de1573624176dc0..5e34db90afef07bcb15e83c8b423558bc5b169fd 100644 (file)
@@ -14,3 +14,5 @@ void bass_remove_stream(struct btd_device *device);
 
 bool bass_bcast_probe(struct btd_device *device, struct bt_bap *bap);
 bool bass_bcast_remove(struct btd_device *device);
+
+bool bass_check_bis(struct btd_device *device, uint8_t bis);