mirror of
https://github.com/bluekitchen/btstack.git
synced 2025-04-10 06:44:32 +00:00
gatt-service: store bis_sync and bis_sync_state separately
This commit is contained in:
parent
09e5376792
commit
c0a12d378e
@ -201,7 +201,7 @@ void bass_util_get_pa_info_and_subgroups_from_buffer(uint8_t *buffer, uint16_t b
|
||||
uint8_t i;
|
||||
for (i = 0; i < source_data->subgroups_num; i++){
|
||||
// bis_sync
|
||||
source_data->subgroups[i].bis_sync_state = little_endian_read_32(buffer, pos);
|
||||
source_data->subgroups[i].bis_sync = little_endian_read_32(buffer, pos);
|
||||
pos += 4;
|
||||
|
||||
uint8_t metadata_bytes_read = le_audio_metadata_parse_tlv(&buffer[pos], buffer_size - pos, &source_data->subgroups[i].metadata);
|
||||
|
@ -73,6 +73,14 @@ typedef enum {
|
||||
} bass_role_t;
|
||||
|
||||
typedef struct {
|
||||
// BIS_Sync parameter
|
||||
// 4-octet bitfield. Shall not exist if Num_Subgroups = 0
|
||||
// Bit 0-30 = BIS_index[1-31] 0x00000000:
|
||||
// - 0b0 = Do not synchronize to BIS_index[x] 0xxxxxxxxx:
|
||||
// - 0b1 = Synchronize to BIS_index[x]
|
||||
// 0xFFFFFFFF: No preference
|
||||
uint32_t bis_sync;
|
||||
|
||||
// 4-octet bitfield. Shall not exist if num_subgroups = 0
|
||||
// Bit 0-30 = BIS_index[1-31]
|
||||
// 0x00000000: 0 = Not synchronized to BIS_index[x]
|
||||
|
@ -157,7 +157,7 @@ static void handle_periodic_advertisement(const uint8_t * packet, uint16_t size)
|
||||
for (i=0;i<num_subgroups;i++){
|
||||
|
||||
// Cache in new source struct
|
||||
bass_source_new.subgroups[i].bis_sync_state = 0;
|
||||
bass_source_new.subgroups[i].bis_sync = 0;
|
||||
|
||||
// Level 2: Subgroup Level
|
||||
num_bis = base_data[offset++];
|
||||
|
Loading…
x
Reference in New Issue
Block a user