Zephyr Project API
3.2.0
A Scalable Open Source RTOS
|
Audio Broadcast APIs. More...
Functions | |
int | bt_audio_broadcast_source_create (struct bt_audio_stream *streams[], size_t num_stream, struct bt_codec *codec, struct bt_codec_qos *qos, struct bt_audio_broadcast_source **source) |
Create audio broadcast source. More... | |
int | bt_audio_broadcast_source_reconfig (struct bt_audio_broadcast_source *source, struct bt_codec *codec, struct bt_codec_qos *qos) |
Reconfigure audio broadcast source. More... | |
int | bt_audio_broadcast_source_start (struct bt_audio_broadcast_source *source) |
Start audio broadcast source. More... | |
int | bt_audio_broadcast_source_stop (struct bt_audio_broadcast_source *source) |
Stop audio broadcast source. More... | |
int | bt_audio_broadcast_source_delete (struct bt_audio_broadcast_source *source) |
Delete audio broadcast source. More... | |
void | bt_audio_broadcast_sink_register_cb (struct bt_audio_broadcast_sink_cb *cb) |
Register Broadcast sink callbacks *. More... | |
int | bt_audio_broadcast_sink_scan_start (const struct bt_le_scan_param *param) |
Start scan for broadcast sources. More... | |
int | bt_audio_broadcast_sink_scan_stop (void) |
Stop scan for broadcast sources. More... | |
int | bt_audio_broadcast_sink_sync (struct bt_audio_broadcast_sink *sink, uint32_t indexes_bitfield, struct bt_audio_stream *streams[], const uint8_t broadcast_code[16]) |
Sync to a broadcaster's audio. More... | |
int | bt_audio_broadcast_sink_stop (struct bt_audio_broadcast_sink *sink) |
Stop audio broadcast sink. More... | |
int | bt_audio_broadcast_sink_delete (struct bt_audio_broadcast_sink *sink) |
Release a broadcast sink. More... | |
Audio Broadcast APIs.
int bt_audio_broadcast_sink_delete | ( | struct bt_audio_broadcast_sink * | sink | ) |
#include <include/zephyr/bluetooth/audio/audio.h>
Release a broadcast sink.
Once a broadcast sink has been allocated after the pa_synced callback, it can be deleted using this function. If the sink has synchronized to any broadcast audio streams, these must first be stopped using bt_audio_stream_stop.
sink | Pointer to the sink object to delete. |
void bt_audio_broadcast_sink_register_cb | ( | struct bt_audio_broadcast_sink_cb * | cb | ) |
#include <include/zephyr/bluetooth/audio/audio.h>
Register Broadcast sink callbacks *.
cb | Broadcast sink callback structure. |
int bt_audio_broadcast_sink_scan_start | ( | const struct bt_le_scan_param * | param | ) |
#include <include/zephyr/bluetooth/audio/audio.h>
Start scan for broadcast sources.
Starts a scan for broadcast sources. Scan results will be received by the scan_recv callback. Only reports from devices advertising broadcast audio support will be sent. Note that a broadcast source may advertise broadcast audio capabilities, but may not be streaming.
param | Scan parameters. |
int bt_audio_broadcast_sink_scan_stop | ( | void | ) |
#include <include/zephyr/bluetooth/audio/audio.h>
Stop scan for broadcast sources.
Stops ongoing scanning for broadcast sources.
int bt_audio_broadcast_sink_stop | ( | struct bt_audio_broadcast_sink * | sink | ) |
#include <include/zephyr/bluetooth/audio/audio.h>
Stop audio broadcast sink.
Stop an audio broadcast sink. The broadcast sink will stop receiving BIGInfo, and audio data can no longer be streamed.
sink | Pointer to the broadcast sink |
int bt_audio_broadcast_sink_sync | ( | struct bt_audio_broadcast_sink * | sink, |
uint32_t | indexes_bitfield, | ||
struct bt_audio_stream * | streams[], | ||
const uint8_t | broadcast_code[16] | ||
) |
#include <include/zephyr/bluetooth/audio/audio.h>
Sync to a broadcaster's audio.
sink | Pointer to the sink object from the base_recv callback. |
indexes_bitfield | Bitfield of the BIS index to sync to. To sync to e.g. BIS index 1 and 2, this should have the value of BIT(1) | BIT(2). |
streams | Stream object pointers to be used for the receiver. If multiple BIS indexes shall be synchronized, multiple streams shall be provided. |
broadcast_code | The 16-octet broadcast code. Shall be supplied if the broadcast is encrypted (see the syncable callback). |
int bt_audio_broadcast_source_create | ( | struct bt_audio_stream * | streams[], |
size_t | num_stream, | ||
struct bt_codec * | codec, | ||
struct bt_codec_qos * | qos, | ||
struct bt_audio_broadcast_source ** | source | ||
) |
#include <include/zephyr/bluetooth/audio/audio.h>
Create audio broadcast source.
Create a new audio broadcast source with one or more audio streams.
The broadcast source will be visible for scanners once this has been called, and the device will advertise audio announcements.
No audio data can be sent until bt_audio_broadcast_source_start() has been called and no audio information (BIGInfo) will be visible to scanners (see bt_le_per_adv_sync_cb).
[in] | streams | Array of stream object pointers being used for the broadcaster. |
[in] | num_stream | Number of streams in streams . |
[in] | codec | Codec configuration. |
[in] | qos | Quality of Service configuration |
[out] | source | Pointer to the broadcast source created |
int bt_audio_broadcast_source_delete | ( | struct bt_audio_broadcast_source * | source | ) |
#include <include/zephyr/bluetooth/audio/audio.h>
Delete audio broadcast source.
Delete an audio broadcast source. The broadcast source will stop advertising entirely, and the source can no longer be used.
source | Pointer to the broadcast source |
int bt_audio_broadcast_source_reconfig | ( | struct bt_audio_broadcast_source * | source, |
struct bt_codec * | codec, | ||
struct bt_codec_qos * | qos | ||
) |
#include <include/zephyr/bluetooth/audio/audio.h>
Reconfigure audio broadcast source.
Reconfigure an audio broadcast source with a new codec and codec quality of service parameters.
source | Pointer to the broadcast source |
codec | Codec configuration. |
qos | Quality of Service configuration |
int bt_audio_broadcast_source_start | ( | struct bt_audio_broadcast_source * | source | ) |
#include <include/zephyr/bluetooth/audio/audio.h>
Start audio broadcast source.
Start an audio broadcast source with one or more audio streams. The broadcast source will start advertising BIGInfo, and audio data can be streamed.
source | Pointer to the broadcast source |
int bt_audio_broadcast_source_stop | ( | struct bt_audio_broadcast_source * | source | ) |
#include <include/zephyr/bluetooth/audio/audio.h>
Stop audio broadcast source.
Stop an audio broadcast source. The broadcast source will stop advertising BIGInfo, and audio data can no longer be streamed.
source | Pointer to the broadcast source |