![]() |
nRF Connect SDK API 3.4.99
|
| int bt_le_audio_tx_send | ( | struct bt_le_audio_tx_ctx * | ctx, |
| struct net_buf const *const | audio_frame, | ||
| struct le_audio_tx_info * | tx, | ||
| uint8_t | num_tx ) |
#include <applications/nrf_audio/src/bluetooth/bt_stream/bt_le_audio_tx/bt_le_audio_tx.h>
Sends N channels of synchronized audio data to the controller.
This function is the main LE Audio TX scheduling point. One call corresponds to one frame interval for the configured streams. All streams which shall be sent together (synchronized) are sent at the same time. This implies calling once for every subgroup when doing broadcast and once for each CIG in unicast. If 0 is returned, it publishes a reference message on sdu_ref_chan. This ZBUS message contains the current time, and when the SDU(s) are expected on air. Calling too late/slow will cause empty data on air, whilst calling too early/fast will trigger this module to flush reduce latency and avoid buffer overruns.
Summary:
| [in] | ctx | Pointer to an initialized TX context pr CIG for unicast and pr subgroup for broadcast. |
| [in] | audio_frame | Pointer to encoded audio data and metadata. |
| [in] | tx | Pointer to an array of le_audio_tx_info elements. |
| [in] | num_tx | Number of elements in tx. |
| 0 | Success (including controlled pacing cases where no SDU is sent, but finalize/publish succeeds). |
| -EINVAL | Invalid arguments, invalid stream index tuple, invalid frame metadata, or inconsistent stream/audio configuration. |
| -EIO | No stream was sent successfully. |