[PATCH BlueZ v2 15/16] bass: Add API to check BIS required for sync

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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.
---
 profiles/audio/bass.c | 14 ++++++++++++++
 profiles/audio/bass.h |  2 ++
 2 files changed, 16 insertions(+)

diff --git a/profiles/audio/bass.c b/profiles/audio/bass.c
index ca20d6e30..7553d1bec 100644
--- a/profiles/audio/bass.c
+++ b/profiles/audio/bass.c
@@ -125,6 +125,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)
 {
diff --git a/profiles/audio/bass.h b/profiles/audio/bass.h
index 7e20385e5..5e34db90a 100644
--- a/profiles/audio/bass.h
+++ b/profiles/audio/bass.h
@@ -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);
-- 
2.39.2





[Index of Archives]     [Bluez Devel]     [Linux Wireless Networking]     [Linux Wireless Personal Area Networking]     [Linux ATH6KL]     [Linux USB Devel]     [Linux Media Drivers]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Big List of Linux Books]

  Powered by Linux