Skip to content
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

nimble: btshell: Fix multiple issues #1919

Merged
merged 9 commits into from
Nov 25, 2024
Merged

Conversation

MariuszSkamra
Copy link
Contributor

This fixes multiple issues found during tests in btshell and BASS

@github-actions github-actions bot added host size/M Medium PR labels Nov 18, 2024
@@ -637,8 +639,7 @@ ble_svc_audio_bass_remove_source(uint8_t *data, uint16_t data_len, uint16_t conn
os_memblock_put(&ble_audio_svc_bass_metadata_pool, rcv_state->state.subgroups[i].metadata);
}

memset(rcv_state, 0, sizeof(*rcv_state));
Copy link
Contributor Author

@MariuszSkamra MariuszSkamra Nov 18, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This one was invalid actually, as we lost state->chr_val after this operation, fixed now

@MariuszSkamra MariuszSkamra force-pushed the leaudio_fixes branch 2 times, most recently from 1221e95 to 4cbeb67 Compare November 18, 2024 15:32
@@ -4235,7 +4235,7 @@ static const struct shell_cmd_help sync_stats_help = {
#endif
#endif

#if MYNEWT_VAL(BLE_ISO_BROADCAST_SOURCE)
#if MYNEWT_VAL(BLE_AUDIO) && MYNEWT_VAL(BLE_ISO_BROADCAST_SOURCE)
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should have a dedicated syscfg option like BLE_AUDIO_BROADCAST_SOURCE actually IMO

This fixes audio shell functionality not being compiled.
This fixes various compilation issues related to usage of invalid format
specifiers. Tested on native and nrf5340.

repos/apache-mynewt-nimble/apps/btshell/src/cmd_leaudio.c:724:39: error: format '%x' expects argument of type 'unsigned int', but argument 2 has type 'uint32_t' {aka 'long unsigned int'} [-Werror=format=]
  724 |     console_printf("broadcast_id=0x%06x adv_sid=%d adv_addr_type=%s adv_addr=",
      |                                    ~~~^
      |                                       |
      |                                       unsigned int
      |                                    %06lx
  725 |                    source_desc->broadcast_id, source_desc->adv_sid,
      |                    ~~~~~~~~~~~~~~~~~~~~~~~~~
      |                               |
      |                               uint32_t {aka long unsigned int}
cc1: all warnings being treated as errors
This fixes duplicated code by using
ble_svc_audio_bass_receive_state_free function when Receive State
instance is cleared.
This fixes the parameters length check and simplifies the buffer
operations a bit.
This removes unused header include.
This fixes building ISO Broadcast Source enabled target with BLE
Audio functionality disabled.
This adds 'broadcast-sink-set-sync-params' commands to be used to set
the PA Sync parameters to be used.
This fixes btshell application compilation errors with
SHELL_CMD_HELP option disabled.
This adds Broadcast Sink and Scan Delegator to CI syscfg to build all
applications with those options enabled.
@sjanc sjanc merged commit 4752ca3 into apache:master Nov 25, 2024
19 checks passed
@MariuszSkamra MariuszSkamra deleted the leaudio_fixes branch November 25, 2024 17:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants