shared/bass: Set correct BIG enc state after sync

A Scan Delegator might set the BIG encryption state of a Broadcast
Receive State characteristic to "Broadcast Code Required", to notify
Broadcast Assistants that the value is needed to decrypt the streams.

If the Broadcast Code was received and BIG sync was established, the
BIG encryption state must be transitioned to "Decrypting" state, to
inform Assistants that BIG sync was successfully established with the
correct Code.
This commit is contained in:
Iulia Tanasescu 2024-10-08 11:01:24 +03:00 committed by Luiz Augusto von Dentz
parent 29cb1b0b10
commit c5616c255b

View File

@ -1793,6 +1793,9 @@ int bt_bass_set_bis_sync(struct bt_bcast_src *bcast_src, uint8_t bis)
if (sgrp->pending_bis_sync & bitmask) {
sgrp->bis_sync |= bitmask;
if (bcast_src->enc == BT_BASS_BIG_ENC_STATE_BCODE_REQ)
bcast_src->enc = BT_BASS_BIG_ENC_STATE_DEC;
iov = bass_parse_bcast_src(bcast_src);
if (!iov)
return -ENOMEM;