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/audio: Add Audio Broadcast Sink initial implementation #1677

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

MariuszSkamra
Copy link
Contributor

@MariuszSkamra MariuszSkamra commented Jan 22, 2024

Depends on: #1691

@MariuszSkamra MariuszSkamra force-pushed the broadcast_sink branch 6 times, most recently from 40bc8f0 to 5746199 Compare January 26, 2024 15:24
@MariuszSkamra MariuszSkamra changed the title [WIP] nimble/audio: Add Audio Broadcast Sink initial implementation nimble/audio: Add Audio Broadcast Sink initial implementation Jan 26, 2024
nimble/host/src/ble_iso.c Fixed Show fixed Hide fixed
static ble_hs_hci_evt_le_fn ble_hs_hci_evt_le_create_big_complete;
static ble_hs_hci_evt_le_fn ble_hs_hci_evt_le_terminate_big_complete;
#endif
#if MYNEWT_VAL(BLE_ISO_BROADCAST_SINK)
static ble_hs_hci_evt_le_fn ble_hs_hci_evt_le_big_sync_extablished;
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
static ble_hs_hci_evt_le_fn ble_hs_hci_evt_le_big_sync_extablished;
static ble_hs_hci_evt_le_fn ble_hs_hci_evt_le_big_sync_established;

typo :)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done

enum ble_audio_bsnk_sync_state state;

/** BIS Synchronization */
uint32_t bis_sync;
Copy link
Contributor

Choose a reason for hiding this comment

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

I think this should be an array - probably pointer with count of entries (subgroups)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done

@MariuszSkamra MariuszSkamra force-pushed the broadcast_sink branch 3 times, most recently from 0b4efd2 to e5fec9e Compare April 21, 2024 22:49
@@ -536,17 +536,8 @@ struct ble_audio_broadcast_name {
/** BLE Audio event: BASS - Remote Scan Started */
#define BLE_AUDIO_EVENT_BASS_REMOTE_SCAN_STARTED 4

/** BLE Audio event: BASS - Add Source */
Copy link
Contributor

Choose a reason for hiding this comment

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

What's the reason to remove these events? I guess the upper layer knows that some actions were performed because the action callback will be called, but this callback is not mandatory. So if the operation was accepted autonomously, there will be no feedback for upper layer/app. For example, we could never enter here:
e5a346b#diff-b8c009ce2010b2473424d883cd93e8fe365b1c1af565ad8ba875280fd069133cR324

Copy link
Contributor Author

Choose a reason for hiding this comment

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

not applicable

@MariuszSkamra MariuszSkamra force-pushed the broadcast_sink branch 2 times, most recently from 3c15b4e to dcbc798 Compare April 30, 2024 07:02
@MariuszSkamra MariuszSkamra marked this pull request as ready for review April 30, 2024 13:48
uint32_t presentation_delay;

/** Pointer to Maximum Subevents value to initialize. */
uint8_t *out_mse;
Copy link
Contributor

Choose a reason for hiding this comment

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

We should add NSE and BN here so application has any means to choose out_MSE.

Also we should set default to 0x00 which means controller can choose up to NSE

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done

uint8_t *out_mse;

/** Pointer to Sync Timeout value to initialize. */
uint16_t *out_sync_timeout;
Copy link
Contributor

Choose a reason for hiding this comment

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

Lets add comment about minimum and also set default here:

BIG_Sync_Timeout set by the Host is less than 6 × ISO_Interval, the
Controller shall set the timeout to 6 × ISO_Interval

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done

@MariuszSkamra MariuszSkamra force-pushed the broadcast_sink branch 2 times, most recently from ea5fd34 to d65b611 Compare May 17, 2024 06:42
This adds initial implementation of audio broadcast sink.
this extends the btshell application with Audio Broadcast Sink
functionality.
This enables PACS when Broadcast Sink role is enabled. By default the
16_2 and 24_2 mandatory settings are supported as per spec.
@MariuszSkamra
Copy link
Contributor Author

MariuszSkamra commented May 24, 2024

Fixed missing ble_audio_scan_delegator_receive_state_set call in bass_pa_state_update

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants