Zephyr Project API 4.4.99
A Scalable Open Source RTOS
Loading...
Searching...
No Matches
a2dp.h
Go to the documentation of this file.
1
4
5/*
6 * Copyright (c) 2015-2016 Intel Corporation
7 * Copyright 2024 NXP
8 *
9 * SPDX-License-Identifier: Apache-2.0
10 */
11#ifndef ZEPHYR_INCLUDE_BLUETOOTH_CLASSIC_A2DP_H_
12#define ZEPHYR_INCLUDE_BLUETOOTH_CLASSIC_A2DP_H_
13
21
22#include <stdint.h>
23
27
28#ifdef __cplusplus
29extern "C" {
30#endif
31
33#define BT_A2DP_SBC_IE_LENGTH (4U)
35#define BT_A2DP_MPEG_1_2_IE_LENGTH (4U)
37#define BT_A2DP_MPEG_2_4_IE_LENGTH (6U)
39#define BT_A2DP_MAX_IE_LENGTH (8U)
40
47#define BT_A2DP_EP_INIT(_role, _codec, _capability, _delay_report) \
48 { \
49 .codec_type = _codec, \
50 .sep = {.sep_info = {.media_type = BT_AVDTP_AUDIO, .tsep = _role}}, \
51 .codec_cap = _capability, .stream = NULL, \
52 .delay_report = _delay_report, \
53 }
54
60#define BT_A2DP_SINK_EP_INIT(_codec, _capability, _delay_report) \
61 BT_A2DP_EP_INIT(BT_AVDTP_SINK, _codec, _capability, _delay_report)
62
68#define BT_A2DP_SOURCE_EP_INIT(_codec, _capability, _delay_report) \
69 BT_A2DP_EP_INIT(BT_AVDTP_SOURCE, _codec, _capability, _delay_report)
70
91#define BT_A2DP_SBC_SINK_EP(_name, _freq, _ch_mode, _blk_len, _subband, _alloc_mthd, _min_bitpool, \
92 _max_bitpool, _delay_report) \
93 static struct bt_a2dp_codec_ie bt_a2dp_ep_cap_ie##_name = { \
94 .len = BT_A2DP_SBC_IE_LENGTH, \
95 .codec_ie = {_freq | _ch_mode, _blk_len | _subband | _alloc_mthd, _min_bitpool, \
96 _max_bitpool}}; \
97 static struct bt_a2dp_ep _name = \
98 BT_A2DP_SINK_EP_INIT(BT_A2DP_SBC, (&bt_a2dp_ep_cap_ie##_name), _delay_report)
99
120#define BT_A2DP_SBC_SOURCE_EP(_name, _freq, _ch_mode, _blk_len, _subband, _alloc_mthd, \
121 _min_bitpool, _max_bitpool, _delay_report) \
122 static struct bt_a2dp_codec_ie bt_a2dp_ep_cap_ie##_name = { \
123 .len = BT_A2DP_SBC_IE_LENGTH, \
124 .codec_ie = {_freq | _ch_mode, _blk_len | _subband | _alloc_mthd, _min_bitpool, \
125 _max_bitpool}}; \
126 static struct bt_a2dp_ep _name = \
127 BT_A2DP_SOURCE_EP_INIT(BT_A2DP_SBC, &bt_a2dp_ep_cap_ie##_name, _delay_report)
128
136#define BT_A2DP_SBC_SINK_EP_DEFAULT(_name) \
137 static struct bt_a2dp_codec_ie bt_a2dp_ep_cap_ie##_name = { \
138 .len = BT_A2DP_SBC_IE_LENGTH, \
139 .codec_ie = {A2DP_SBC_SAMP_FREQ_44100 | A2DP_SBC_SAMP_FREQ_48000 | \
140 A2DP_SBC_CH_MODE_MONO | A2DP_SBC_CH_MODE_STEREO | \
141 A2DP_SBC_CH_MODE_JOINT, \
142 A2DP_SBC_BLK_LEN_16 | A2DP_SBC_SUBBAND_8 | \
143 A2DP_SBC_ALLOC_MTHD_LOUDNESS, \
144 18U, 35U}}; \
145 static struct bt_a2dp_ep _name = \
146 BT_A2DP_SINK_EP_INIT(BT_A2DP_SBC, &bt_a2dp_ep_cap_ie##_name, true)
147
156#define BT_A2DP_SBC_SOURCE_EP_DEFAULT(_name) \
157 static struct bt_a2dp_codec_ie bt_a2dp_ep_cap_ie##_name = { \
158 .len = BT_A2DP_SBC_IE_LENGTH, \
159 .codec_ie = {A2DP_SBC_SAMP_FREQ_44100 | A2DP_SBC_SAMP_FREQ_48000 | \
160 A2DP_SBC_CH_MODE_MONO | A2DP_SBC_CH_MODE_STEREO | \
161 A2DP_SBC_CH_MODE_JOINT, \
162 A2DP_SBC_BLK_LEN_16 | A2DP_SBC_SUBBAND_8 | \
163 A2DP_SBC_ALLOC_MTHD_LOUDNESS, \
164 18U, 35U}, \
165 }; \
166 static struct bt_a2dp_ep _name = \
167 BT_A2DP_SOURCE_EP_INIT(BT_A2DP_SBC, &bt_a2dp_ep_cap_ie##_name, false)
168
185#define BT_A2DP_SBC_EP_CFG(_name, _freq_cfg, _ch_mode_cfg, _blk_len_cfg, _subband_cfg, \
186 _alloc_mthd_cfg, _min_bitpool_cfg, _max_bitpool_cfg) \
187 static struct bt_a2dp_codec_ie bt_a2dp_codec_ie##_name = { \
188 .len = BT_A2DP_SBC_IE_LENGTH, \
189 .codec_ie = {_freq_cfg | _ch_mode_cfg, \
190 _blk_len_cfg | _subband_cfg | _alloc_mthd_cfg, _min_bitpool_cfg, \
191 _max_bitpool_cfg}, \
192 }; \
193 struct bt_a2dp_codec_cfg _name = { \
194 .codec_config = &bt_a2dp_codec_ie##_name, \
195 }
196
202#define BT_A2DP_SBC_EP_CFG_DEFAULT(_name, _freq_cfg) \
203 static struct bt_a2dp_codec_ie bt_a2dp_codec_ie##_name = { \
204 .len = BT_A2DP_SBC_IE_LENGTH, \
205 .codec_ie = {_freq_cfg | A2DP_SBC_CH_MODE_JOINT, \
206 A2DP_SBC_BLK_LEN_16 | A2DP_SBC_SUBBAND_8 | \
207 A2DP_SBC_ALLOC_MTHD_LOUDNESS, \
208 18U, 35U}, \
209 }; \
210 struct bt_a2dp_codec_cfg _name = { \
211 .codec_config = &bt_a2dp_codec_ie##_name, \
212 }
213
298};
299
315
320struct bt_a2dp;
321
322/* Internal to pass build */
323struct bt_a2dp_stream;
324
332
340
351 /* Internally used stream object pointer */
353};
354
365
369enum {
372};
373
399typedef uint8_t (*bt_a2dp_discover_ep_cb)(struct bt_a2dp *a2dp, struct bt_a2dp_ep_info *info,
400 struct bt_a2dp_ep **ep);
401
423
436 void (*connected)(struct bt_a2dp *a2dp, int err);
444 void (*disconnected)(struct bt_a2dp *a2dp);
460 int (*config_req)(struct bt_a2dp *a2dp, struct bt_a2dp_ep *ep,
461 struct bt_a2dp_codec_cfg *codec_cfg, struct bt_a2dp_stream **stream,
462 uint8_t *rsp_err_code);
476 int (*reconfig_req)(struct bt_a2dp_stream *stream, struct bt_a2dp_codec_cfg *codec_cfg,
477 uint8_t *rsp_err_code);
486 void (*config_rsp)(struct bt_a2dp_stream *stream, uint8_t rsp_err_code);
499 int (*establish_req)(struct bt_a2dp_stream *stream, uint8_t *rsp_err_code);
509 void (*establish_rsp)(struct bt_a2dp_stream *stream, uint8_t rsp_err_code);
522 int (*release_req)(struct bt_a2dp_stream *stream, uint8_t *rsp_err_code);
532 void (*release_rsp)(struct bt_a2dp_stream *stream, uint8_t rsp_err_code);
545 int (*start_req)(struct bt_a2dp_stream *stream, uint8_t *rsp_err_code);
554 void (*start_rsp)(struct bt_a2dp_stream *stream, uint8_t rsp_err_code);
567 int (*suspend_req)(struct bt_a2dp_stream *stream, uint8_t *rsp_err_code);
576 void (*suspend_rsp)(struct bt_a2dp_stream *stream, uint8_t rsp_err_code);
589 int (*abort_req)(struct bt_a2dp_stream *stream, uint8_t *rsp_err_code);
598 void (*abort_rsp)(struct bt_a2dp_stream *stream, uint8_t rsp_err_code);
611 int (*get_config_req)(struct bt_a2dp_stream *stream, uint8_t *rsp_err_code);
621 void (*get_config_rsp)(struct bt_a2dp_stream *stream, struct bt_a2dp_codec_cfg *codec_cfg,
622 uint8_t rsp_err_code);
623#ifdef CONFIG_BT_A2DP_SOURCE
636 int (*delay_report_req)(struct bt_a2dp_stream *stream, uint16_t value,
637 uint8_t *rsp_err_code);
638#endif
639#ifdef CONFIG_BT_A2DP_SINK
648 void (*delay_report_rsp)(struct bt_a2dp_stream *stream, uint8_t rsp_err_code);
649#endif
650};
651
666struct bt_a2dp *bt_a2dp_connect(struct bt_conn *conn);
667
677int bt_a2dp_disconnect(struct bt_a2dp *a2dp);
678
687int bt_a2dp_register_ep(struct bt_a2dp_ep *ep, uint8_t media_type, uint8_t sep_type);
688
698
707struct bt_conn *bt_a2dp_get_conn(struct bt_a2dp *a2dp);
708
716int bt_a2dp_discover(struct bt_a2dp *a2dp, struct bt_a2dp_discover_param *param);
717
735
745 void (*configured)(struct bt_a2dp_stream *stream);
753 void (*established)(struct bt_a2dp_stream *stream);
766 void (*released)(struct bt_a2dp_stream *stream);
774 void (*started)(struct bt_a2dp_stream *stream);
782 void (*suspended)(struct bt_a2dp_stream *stream);
783#if defined(CONFIG_BT_A2DP_SINK) || defined(__DOXYGEN__)
791 void (*recv)(struct bt_a2dp_stream *stream, struct net_buf *buf, uint16_t seq_num,
792 uint32_t ts);
793#endif /* CONFIG_BT_A2DP_SINK */
794#if defined(CONFIG_BT_A2DP_SOURCE) || defined(__DOXYGEN__)
807 void (*sent)(struct bt_a2dp_stream *stream);
817 void (*delay_report)(struct bt_a2dp_stream *stream, uint16_t value);
818#endif /* CONFIG_BT_A2DP_SOURCE */
819};
820
830
847 struct bt_a2dp_ep *local_ep, struct bt_a2dp_ep *remote_ep,
848 struct bt_a2dp_codec_cfg *config);
849
859
869
880
890
900
910int bt_a2dp_stream_reconfig(struct bt_a2dp_stream *stream, struct bt_a2dp_codec_cfg *config);
911
922
930
942int bt_a2dp_stream_send(struct bt_a2dp_stream *stream, struct net_buf *buf, uint16_t seq_num,
943 uint32_t ts);
944
959
970
971#ifdef __cplusplus
972}
973#endif
974
978
979#endif /* ZEPHYR_INCLUDE_BLUETOOTH_CLASSIC_A2DP_H_ */
Audio/Video Distribution Transport Protocol header.
Bluetooth subsystem core APIs.
struct bt_conn * bt_a2dp_get_conn(struct bt_a2dp *a2dp)
Obtain the ACL connection corresponding to A2DP.
struct net_buf * bt_a2dp_stream_create_pdu(struct net_buf_pool *pool, k_timeout_t timeout)
Allocate a net_buf for bt_a2dp_stream_send.
int bt_a2dp_stream_release(struct bt_a2dp_stream *stream)
release a2dp streamer.
int bt_a2dp_stream_start(struct bt_a2dp_stream *stream)
start a2dp streamer.
int bt_a2dp_stream_config(struct bt_a2dp *a2dp, struct bt_a2dp_stream *stream, struct bt_a2dp_ep *local_ep, struct bt_a2dp_ep *remote_ep, struct bt_a2dp_codec_cfg *config)
configure endpoint.
bt_a2dp_err_code
A2DP error code.
Definition a2dp.h:217
int bt_a2dp_register_cb(struct bt_a2dp_cb *cb)
register callback.
int bt_a2dp_stream_get_config(struct bt_a2dp_stream *stream)
get config of the stream
int bt_a2dp_stream_reconfig(struct bt_a2dp_stream *stream, struct bt_a2dp_codec_cfg *config)
re-configure a2dp streamer
int bt_a2dp_stream_abort(struct bt_a2dp_stream *stream)
abort a2dp streamer.
#define BT_A2DP_MAX_IE_LENGTH
The max IE (Codec Info Element) length.
Definition a2dp.h:39
int bt_a2dp_discover(struct bt_a2dp *a2dp, struct bt_a2dp_discover_param *param)
Discover remote endpoints.
int bt_a2dp_stream_delay_report(struct bt_a2dp_stream *stream, uint16_t delay)
send delay report
int bt_a2dp_register_ep(struct bt_a2dp_ep *ep, uint8_t media_type, uint8_t sep_type)
Endpoint Registration.
void bt_a2dp_stream_cb_register(struct bt_a2dp_stream *stream, struct bt_a2dp_stream_ops *ops)
Register Audio callbacks for a stream.
int bt_a2dp_disconnect(struct bt_a2dp *a2dp)
disconnect l2cap a2dp
struct bt_a2dp * bt_a2dp_connect(struct bt_conn *conn)
A2DP Connect.
uint8_t(* bt_a2dp_discover_ep_cb)(struct bt_a2dp *a2dp, struct bt_a2dp_ep_info *info, struct bt_a2dp_ep **ep)
Called when a stream endpoint is discovered.
Definition a2dp.h:399
int bt_a2dp_stream_send(struct bt_a2dp_stream *stream, struct net_buf *buf, uint16_t seq_num, uint32_t ts)
send a2dp media data
int bt_a2dp_stream_suspend(struct bt_a2dp_stream *stream)
suspend a2dp streamer.
int bt_a2dp_stream_establish(struct bt_a2dp_stream *stream)
establish a2dp streamer.
uint32_t bt_a2dp_get_mtu(struct bt_a2dp_stream *stream)
get the stream l2cap mtu
bt_a2dp_codec_type
Codec Type.
Definition a2dp.h:301
@ BT_A2DP_INVALID_CP_FORMAT
The format of Content Protection Service Capability/Content Protection Scheme Dependent Data is not c...
Definition a2dp.h:285
@ BT_A2DP_INVALID_CODEC_TYPE
Media Codec Type is not valid.
Definition a2dp.h:219
@ BT_A2DP_INVALID_CHANNELS
Either 1) Channels is not valid or 2) None or multiple values have been selected for Channels.
Definition a2dp.h:269
@ BT_A2DP_NOT_SUPPORTED_DRC
DRC is not supported.
Definition a2dp.h:297
@ BT_A2DP_NOT_SUPPORTED_VERSION
Version is not supported.
Definition a2dp.h:275
@ BT_A2DP_NOT_SUPPORTED_SUBBANDS
Number of Subbands is not supported.
Definition a2dp.h:233
@ BT_A2DP_NOT_SUPPORTED_CHANNELS
Channels is not supported.
Definition a2dp.h:271
@ BT_A2DP_INVALID_OBJECT_TYPE
Either 1) Object type is not valid or 2) None or multiple values have been selected for Object Type.
Definition a2dp.h:263
@ BT_A2DP_NOT_SUPPORTED_CODEC_PARAMETER
The codec parameter is not supported.
Definition a2dp.h:293
@ BT_A2DP_INVALID_VERSION
Version is not valid.
Definition a2dp.h:273
@ BT_A2DP_NOT_SUPPORTED_LAYER
Layer is not supported.
Definition a2dp.h:249
@ BT_A2DP_NOT_SUPPORTED_SAMPLING_FREQUENCY
Sampling Frequency is not supported.
Definition a2dp.h:225
@ BT_A2DP_NOT_SUPPORTED_CRC
CRC is not supported.
Definition a2dp.h:251
@ BT_A2DP_INVALID_CHANNEL_MODE
Channel Mode is not valid or multiple values have been selected.
Definition a2dp.h:227
@ BT_A2DP_INVALID_SAMPLING_FREQUENCY
Sampling Frequency is not valid or multiple values have been selected.
Definition a2dp.h:223
@ BT_A2DP_INVALID_MAXIMUM_BITPOOL_VALUE
Maximum Bitpool Value is not valid.
Definition a2dp.h:243
@ BT_A2DP_NOT_SUPPORTED_OBJECT_TYPE
Object Type is not supported.
Definition a2dp.h:265
@ BT_A2DP_NOT_SUPPORTED_ALLOCATION_METHOD
Allocation Method is not supported.
Definition a2dp.h:237
@ BT_A2DP_INVALID_SUBBANDS
None or multiple values have been selected for Number of Subbands.
Definition a2dp.h:231
@ BT_A2DP_NOT_SUPPORTED_CHANNEL_MODE
Channel Mode is not supported.
Definition a2dp.h:229
@ BT_A2DP_NOT_SUPPORTED_VBR
VBR is not supported.
Definition a2dp.h:255
@ BT_A2DP_NOT_SUPPORTED_MPF
MPF-2 is not supported.
Definition a2dp.h:253
@ BT_A2DP_INVALID_CODEC_PARAMETER
The codec parameter is invalid.
Definition a2dp.h:289
@ BT_A2DP_NOT_SUPPORTED_MAXIMUM_BITPOOL_VALUE
Maximum Bitpool Value is not supported.
Definition a2dp.h:245
@ BT_A2DP_INVALID_CP_TYPE
The requested CP Type is not supported.
Definition a2dp.h:281
@ BT_A2DP_NOT_SUPPORTED_CODEC_TYPE
Media Codec Type is not supported.
Definition a2dp.h:221
@ BT_A2DP_NOT_SUPPORTED_MINIMUM_BITPOOL_VALUE
Minimum Bitpool Value is not supported.
Definition a2dp.h:241
@ BT_A2DP_INVALID_MINIMUM_BITPOOL_VALUE
Minimum Bitpool Value is not valid.
Definition a2dp.h:239
@ BT_A2DP_INVALID_BIT_RATE
None or multiple values have been selected for Bit Rate.
Definition a2dp.h:257
@ BT_A2DP_INVALID_BLOCK_LENGTH
None or multiple values have been selected for Block Length.
Definition a2dp.h:279
@ BT_A2DP_INVALID_ALLOCATION_METHOD
None or multiple values have been selected for Allocation Method.
Definition a2dp.h:235
@ BT_A2DP_INVALID_LAYER
None or multiple values have been selected for Layer.
Definition a2dp.h:247
@ BT_A2DP_NOT_SUPPORTED_BIT_RATE
Bit Rate is not supported.
Definition a2dp.h:259
@ BT_A2DP_INVALID_DRC
Combination of Object Type and DRC is invalid.
Definition a2dp.h:295
@ BT_A2DP_NOT_SUPPORTED_MAXIMUM_SUL
Maximum SUL is not acceptable for the Decoder in the SNK.
Definition a2dp.h:277
@ BT_A2DP_DISCOVER_EP_STOP
Definition a2dp.h:370
@ BT_A2DP_DISCOVER_EP_CONTINUE
Definition a2dp.h:371
@ BT_A2DP_MPEG1
Codec MPEG-1.
Definition a2dp.h:305
@ BT_A2DP_ATRAC
Codec ATRAC.
Definition a2dp.h:311
@ BT_A2DP_SBC
Codec SBC.
Definition a2dp.h:303
@ BT_A2DP_VENDOR
Codec Non-A2DP.
Definition a2dp.h:313
@ BT_A2DP_MPEGD
Codec MPEG-D.
Definition a2dp.h:309
@ BT_A2DP_MPEG2
Codec MPEG-2.
Definition a2dp.h:307
Bluetooth L2CAP handling.
__UINT32_TYPE__ uint32_t
Definition stdint.h:90
__UINT8_TYPE__ uint8_t
Definition stdint.h:88
__UINT16_TYPE__ uint16_t
Definition stdint.h:89
The connecting callback.
Definition a2dp.h:425
int(* start_req)(struct bt_a2dp_stream *stream, uint8_t *rsp_err_code)
Stream start request callback.
Definition a2dp.h:545
int(* get_config_req)(struct bt_a2dp_stream *stream, uint8_t *rsp_err_code)
Stream get config callback.
Definition a2dp.h:611
void(* config_rsp)(struct bt_a2dp_stream *stream, uint8_t rsp_err_code)
Callback function for bt_a2dp_stream_config() and bt_a2dp_stream_reconfig().
Definition a2dp.h:486
void(* start_rsp)(struct bt_a2dp_stream *stream, uint8_t rsp_err_code)
Callback function for bt_a2dp_stream_start().
Definition a2dp.h:554
void(* suspend_rsp)(struct bt_a2dp_stream *stream, uint8_t rsp_err_code)
Callback function for bt_a2dp_stream_suspend().
Definition a2dp.h:576
int(* suspend_req)(struct bt_a2dp_stream *stream, uint8_t *rsp_err_code)
Stream suspend request callback.
Definition a2dp.h:567
void(* disconnected)(struct bt_a2dp *a2dp)
A a2dp connection has been disconnected.
Definition a2dp.h:444
int(* abort_req)(struct bt_a2dp_stream *stream, uint8_t *rsp_err_code)
Stream abort request callback.
Definition a2dp.h:589
int(* release_req)(struct bt_a2dp_stream *stream, uint8_t *rsp_err_code)
Stream release request callback.
Definition a2dp.h:522
int(* config_req)(struct bt_a2dp *a2dp, struct bt_a2dp_ep *ep, struct bt_a2dp_codec_cfg *codec_cfg, struct bt_a2dp_stream **stream, uint8_t *rsp_err_code)
Endpoint config request callback.
Definition a2dp.h:460
void(* connected)(struct bt_a2dp *a2dp, int err)
A a2dp connection has been established.
Definition a2dp.h:436
void(* release_rsp)(struct bt_a2dp_stream *stream, uint8_t rsp_err_code)
Callback function for bt_a2dp_stream_release().
Definition a2dp.h:532
int(* reconfig_req)(struct bt_a2dp_stream *stream, struct bt_a2dp_codec_cfg *codec_cfg, uint8_t *rsp_err_code)
Endpoint config request callback.
Definition a2dp.h:476
int(* establish_req)(struct bt_a2dp_stream *stream, uint8_t *rsp_err_code)
Stream establishment request callback.
Definition a2dp.h:499
void(* get_config_rsp)(struct bt_a2dp_stream *stream, struct bt_a2dp_codec_cfg *codec_cfg, uint8_t rsp_err_code)
Callback function for bt_a2dp_stream_get_config().
Definition a2dp.h:621
void(* abort_rsp)(struct bt_a2dp_stream *stream, uint8_t rsp_err_code)
Callback function for bt_a2dp_stream_abort().
Definition a2dp.h:598
void(* establish_rsp)(struct bt_a2dp_stream *stream, uint8_t rsp_err_code)
Callback function for bt_a2dp_stream_establish().
Definition a2dp.h:509
The endpoint configuration.
Definition a2dp.h:334
struct bt_a2dp_codec_ie * codec_config
The media codec configuration content.
Definition a2dp.h:338
bool delay_report
the delay reporting configured state
Definition a2dp.h:336
codec information elements for the endpoint
Definition a2dp.h:326
uint8_t len
Length of codec_cap.
Definition a2dp.h:328
uint8_t codec_ie[(8U)]
codec information element
Definition a2dp.h:330
Definition a2dp.h:402
struct bt_a2dp_ep_info info
The discovered endpoint info that is callbacked by cb.
Definition a2dp.h:406
uint16_t avdtp_version
The AVDTP version of the peer's A2DP sdp service.
Definition a2dp.h:419
uint8_t sep_count
The max count of seps (stream endpoint) that can be got in this call route.
Definition a2dp.h:421
bt_a2dp_discover_ep_cb cb
discover callback
Definition a2dp.h:404
struct bt_avdtp_sep_info * seps_info
The max count of remote endpoints that can be got, it save endpoint info internally.
Definition a2dp.h:410
Definition a2dp.h:355
bool delay_report
Whether the endpoint has delay reporting service.
Definition a2dp.h:359
struct bt_avdtp_sep_info * sep_info
Stream End Point Information.
Definition a2dp.h:363
struct bt_a2dp_codec_ie codec_cap
Codec capabilities, if SBC, use function of a2dp_codec_sbc.h to parse it.
Definition a2dp.h:361
uint8_t codec_type
Code Type bt_a2dp_codec_type.
Definition a2dp.h:357
Stream End Point.
Definition a2dp.h:342
struct bt_avdtp_sep sep
AVDTP Stream End Point Identifier.
Definition a2dp.h:350
struct bt_a2dp_stream * stream
Definition a2dp.h:352
uint8_t codec_type
Code Type bt_a2dp_codec_type.
Definition a2dp.h:344
bool delay_report
Whether the endpoint has delay reporting service.
Definition a2dp.h:346
struct bt_a2dp_codec_ie * codec_cap
Capabilities.
Definition a2dp.h:348
The stream endpoint related operations.
Definition a2dp.h:737
void(* configured)(struct bt_a2dp_stream *stream)
Stream configured callback.
Definition a2dp.h:745
void(* started)(struct bt_a2dp_stream *stream)
Stream start callback.
Definition a2dp.h:774
void(* established)(struct bt_a2dp_stream *stream)
Stream establishment callback.
Definition a2dp.h:753
void(* delay_report)(struct bt_a2dp_stream *stream, uint16_t value)
The delay report value is received.
Definition a2dp.h:817
void(* recv)(struct bt_a2dp_stream *stream, struct net_buf *buf, uint16_t seq_num, uint32_t ts)
the media streaming data, only for sink
Definition a2dp.h:791
void(* released)(struct bt_a2dp_stream *stream)
Stream release callback.
Definition a2dp.h:766
void(* sent)(struct bt_a2dp_stream *stream)
Stream audio HCI sent callback.
Definition a2dp.h:807
void(* suspended)(struct bt_a2dp_stream *stream)
Stream suspend callback.
Definition a2dp.h:782
A2DP Stream.
Definition a2dp.h:719
uint8_t remote_ep_id
remote endpoint's Stream End Point ID
Definition a2dp.h:725
struct bt_a2dp_ep * remote_ep
remote endpoint
Definition a2dp.h:723
struct bt_a2dp_ep * local_ep
local endpoint
Definition a2dp.h:721
struct bt_a2dp_stream_ops * ops
Audio stream operations.
Definition a2dp.h:729
struct bt_a2dp * a2dp
the a2dp connection
Definition a2dp.h:731
bool delay_report
whether the delay report is configured on the stream
Definition a2dp.h:727
struct bt_a2dp_codec_ie codec_config
the stream current configuration
Definition a2dp.h:733
A2DP structure.
AVDTP stream endpoint information.
Definition avdtp.h:92
AVDTP Stream End Point.
Definition avdtp.h:170
Opaque type representing a connection to a remote device.
Kernel timeout type.
Definition clock.h:65
Network buffer pool representation.
Definition net_buf.h:1151
Network buffer representation.
Definition net_buf.h:1015