rymanluk commented on code in PR #1836:
URL: https://github.com/apache/mynewt-nimble/pull/1836#discussion_r1770847956
##########
nimble/host/audio/services/bass/src/ble_audio_svc_bass.c:
##########
@@ -509,12 +521,30 @@ ble_svc_audio_bass_modify_source(uint8_t *data, uint16_t
data_len, uint16_t conn
}
ev.bass_operation_status.source_id = operation.modify_source.source_id;
+ rcv_state->source_id = operation.modify_source.source_id;
+ rcv_state->state.pa_sync_state = operation_modify_source.pa_sync;
+
+ for (i = 0; i < operation.modify_source.num_subgroups; i++) {
+ metadata_ptr = os_memblock_get(&ble_audio_svc_bass_metadata_pool);
+ if (metadata_ptr == NULL) {
+ rc = BLE_HS_ENOMEM;
+ ev.bass_operation_status.status = BLE_HS_ENOMEM;
+ goto done;
+ }
+
+ rcv_state->state.subgroups[i].metadata_length =
operation.modify_source.subgroups[i].metadata_length;
+
+ memcpy(metadata_ptr, operation.modify_source.subgroups[i].metadata,
+ min(operation.modify_source.subgroups[i].metadata_length,
+ MYNEWT_VAL(BLE_SVC_AUDIO_BASS_METADATA_MAX_SZ)));
+
+ rcv_state->state.subgroups[i].metadata = metadata_ptr;
+ }
done:
if (!rc) {
rc = ble_svc_audio_bass_receive_state_notify(rcv_state);
ev.bass_operation_status.status = rc;
- goto done;
}
ble_audio_event_listener_call(&ev);
Review Comment:
this even here, will request application to sync. Once this is done, state
will be set correctly and expected notification will be sent out
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]