diff mbox series

[BlueZ,05/10] shared/bap: Append bcast sink pacs to Sink PAC char

Message ID 20240716142207.4298-6-iulia.tanasescu@nxp.com (mailing list archive)
State Accepted
Commit 2c98c478863ee9e213a4129f0f4fee2b16b678da
Headers show
Series Initial implementation of BAP Broadcast Assistant | expand

Checks

Context Check Description
tedd_an/pre-ci_am success Success
tedd_an/CheckPatch success CheckPatch PASS
tedd_an/GitLint success Gitlint PASS
tedd_an/IncrementalBuild success Incremental Build PASS

Commit Message

Iulia Tanasescu July 16, 2024, 2:22 p.m. UTC
It is mandatory for a BAP Broadcast Sink to support the PACS Server role.
The Sink PAC characteristic should contain PAC records that expose
supported audio capabilities for receiving both unicast and broadcast
streams.

A BAP Broadcast Assistant acting as a GATT Client needs to discover the
Sink PAC characteristic on the BAP Scan Delegator peer (BAP Broadcast
Sink), in order to discover supported capabilities for receiving streams.

This commit updates the callback for handling read requests for the Sink
PAC characteristic, to also append Broadcast Sink pac structures to the
read response.
---
 src/shared/bap.c | 1 +
 1 file changed, 1 insertion(+)
diff mbox series

Patch

diff --git a/src/shared/bap.c b/src/shared/bap.c
index 44fb06169..0aa89c278 100644
--- a/src/shared/bap.c
+++ b/src/shared/bap.c
@@ -441,6 +441,7 @@  static void pacs_sink_read(struct gatt_db_attribute *attrib,
 	iov.iov_len = 0;
 
 	queue_foreach(bdb->sinks, pac_foreach, &iov);
+	queue_foreach(bdb->broadcast_sinks, pac_foreach, &iov);
 
 	gatt_db_attribute_read_result(attrib, id, 0, iov.iov_base,
 							iov.iov_len);