Skip to content

Commit

Permalink
nimble/audio: Add subgroups information for modify operation
Browse files Browse the repository at this point in the history
This commit adds subgroups info for modify source operation.
Now metadata field can be handled in scan delegator during
modify procedure.
  • Loading branch information
szymon-czapracki committed Sep 23, 2024
1 parent 519c14b commit d57b022
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -324,8 +324,9 @@ struct ble_svc_audio_bass_operation {
/** Number of subgroups */
uint16_t num_subgroups;

/** BIS Synchronisation of subgroups */
uint32_t bis_sync[BLE_SVC_AUDIO_BASS_SUB_NUM_MAX];
/** Subgroup entries */
struct ble_svc_audio_bass_subgroup
subgroups[BLE_SVC_AUDIO_BASS_SUB_NUM_MAX];
} modify_source;

/**
Expand Down
5 changes: 3 additions & 2 deletions nimble/host/audio/src/ble_audio_scan_delegator.c
Original file line number Diff line number Diff line change
Expand Up @@ -197,8 +197,9 @@ bass_modify_source_op_handler(struct ble_svc_audio_bass_operation *op, void *arg
BLE_AUDIO_DBG_ASSERT(sync_opt->num_subgroups < ARRAY_SIZE(sync_opt->subgroups));

for (uint8_t i = 0; i < sync_opt->num_subgroups; i++) {
sync_opt->subgroups[i].bis_sync = op->modify_source.bis_sync[i];
/* FIXME: Missing metadata in Modify Source */
sync_opt->subgroups[i].bis_sync = op->modify_source.subgroups[i].bis_sync_state;
sync_opt->subgroups[i].metadata_length = op->modify_source.subgroups[i].metadata_length;
sync_opt->subgroups[i].metadata = op->modify_source.subgroups[i].metadata;
}

action.type = BLE_AUDIO_SCAN_DELEGATOR_ACTION_SOURCE_MODIFY;
Expand Down

0 comments on commit d57b022

Please sign in to comment.