-
Notifications
You must be signed in to change notification settings - Fork 7.4k
Bluetooth: Audio: BASS server shall set BIS_Sync_State to be 0x0 afte… #89890
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -170,11 +170,18 @@ static void update_recv_state_big_cleared(const struct bt_bap_broadcast_sink *si | |
reason == BT_HCI_ERR_TERM_DUE_TO_MIC_FAIL) { | ||
/* Sync failed due to bad broadcast code */ | ||
mod_src_param.encrypt_state = BT_BAP_BIG_ENC_STATE_BAD_CODE; | ||
} else if (reason == BT_HCI_ERR_CONN_TIMEOUT || | ||
reason == BT_HCI_ERR_LOCALHOST_TERM_CONN || | ||
reason == BT_HCI_ERR_REMOTE_USER_TERM_CONN) { | ||
/* BIS is not synced anymore */ | ||
mod_src_param.encrypt_state = BT_BAP_BIG_ENC_STATE_NO_ENC; | ||
} else { | ||
mod_src_param.encrypt_state = recv_state->encrypt_state; | ||
} | ||
|
||
if (reason != BT_HCI_ERR_LOCALHOST_TERM_CONN) { | ||
if (reason != BT_HCI_ERR_CONN_TIMEOUT && | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Can I'm wondering if the logic should be: There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. as I understand, BT_HCI_ERR_CONN_TIMEOUT(e.g link loss) can happen at any time, I am not so sure if the logic you mentioned can cause some potential issue :-) There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. My concern is that it's not particular explicit in the core spec what termination reason is sent when. The point of my comment was to achieve the same solution but in a way that won't be affected by controllers that may have different behavior For example, if the BIG Sync fails, then some controller may perhaps send BT_HCI_ERR_CONN_TIMEOUT as the reason, in which case BT_BAP_BIS_SYNC_FAILED should be set |
||
reason != BT_HCI_ERR_LOCALHOST_TERM_CONN && | ||
reason != BT_HCI_ERR_REMOTE_USER_TERM_CONN) { | ||
for (uint8_t i = 0U; i < recv_state->num_subgroups; i++) { | ||
mod_src_param.subgroups[i].bis_sync = BT_BAP_BIS_SYNC_FAILED; | ||
} | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shouldn't the else here just be
mod_src_param.encrypt_state = BT_BAP_BIG_ENC_STATE_NO_ENC;
?If
update_recv_state_big_cleared
is called and it isn't failing due toBT_HCI_ERR_TERM_DUE_TO_MIC_FAIL
when we are attempting to decrypt, I guess the encrypt state should just always be set toBT_BAP_BIG_ENC_STATE_NO_ENC