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)
38
45#define BT_A2DP_EP_INIT(_role, _codec, _capability, _delay_report) \
46 { \
47 .codec_type = _codec, \
48 .sep = {.sep_info = {.media_type = BT_AVDTP_AUDIO, .tsep = _role}}, \
49 .codec_cap = _capability, .stream = NULL, \
50 .delay_report = _delay_report, \
51 }
52
58#define BT_A2DP_SINK_EP_INIT(_codec, _capability, _delay_report) \
59 BT_A2DP_EP_INIT(BT_AVDTP_SINK, _codec, _capability, _delay_report)
60
66#define BT_A2DP_SOURCE_EP_INIT(_codec, _capability, _delay_report) \
67 BT_A2DP_EP_INIT(BT_AVDTP_SOURCE, _codec, _capability, _delay_report)
68
89#define BT_A2DP_SBC_SINK_EP(_name, _freq, _ch_mode, _blk_len, _subband, _alloc_mthd, _min_bitpool, \
90 _max_bitpool, _delay_report) \
91 static struct bt_a2dp_codec_ie bt_a2dp_ep_cap_ie##_name = { \
92 .len = BT_A2DP_SBC_IE_LENGTH, \
93 .codec_ie = {_freq | _ch_mode, _blk_len | _subband | _alloc_mthd, _min_bitpool, \
94 _max_bitpool}}; \
95 static struct bt_a2dp_ep _name = \
96 BT_A2DP_SINK_EP_INIT(BT_A2DP_SBC, (&bt_a2dp_ep_cap_ie##_name), _delay_report)
97
118#define BT_A2DP_SBC_SOURCE_EP(_name, _freq, _ch_mode, _blk_len, _subband, _alloc_mthd, \
119 _min_bitpool, _max_bitpool, _delay_report) \
120 static struct bt_a2dp_codec_ie bt_a2dp_ep_cap_ie##_name = { \
121 .len = BT_A2DP_SBC_IE_LENGTH, \
122 .codec_ie = {_freq | _ch_mode, _blk_len | _subband | _alloc_mthd, _min_bitpool, \
123 _max_bitpool}}; \
124 static struct bt_a2dp_ep _name = \
125 BT_A2DP_SOURCE_EP_INIT(BT_A2DP_SBC, &bt_a2dp_ep_cap_ie##_name, _delay_report)
126
134#define BT_A2DP_SBC_SINK_EP_DEFAULT(_name) \
135 static struct bt_a2dp_codec_ie bt_a2dp_ep_cap_ie##_name = { \
136 .len = BT_A2DP_SBC_IE_LENGTH, \
137 .codec_ie = {A2DP_SBC_SAMP_FREQ_44100 | A2DP_SBC_SAMP_FREQ_48000 | \
138 A2DP_SBC_CH_MODE_MONO | A2DP_SBC_CH_MODE_STEREO | \
139 A2DP_SBC_CH_MODE_JOINT, \
140 A2DP_SBC_BLK_LEN_16 | A2DP_SBC_SUBBAND_8 | \
141 A2DP_SBC_ALLOC_MTHD_LOUDNESS, \
142 18U, 35U}}; \
143 static struct bt_a2dp_ep _name = \
144 BT_A2DP_SINK_EP_INIT(BT_A2DP_SBC, &bt_a2dp_ep_cap_ie##_name, true)
145
154#define BT_A2DP_SBC_SOURCE_EP_DEFAULT(_name) \
155 static struct bt_a2dp_codec_ie bt_a2dp_ep_cap_ie##_name = { \
156 .len = BT_A2DP_SBC_IE_LENGTH, \
157 .codec_ie = {A2DP_SBC_SAMP_FREQ_44100 | A2DP_SBC_SAMP_FREQ_48000 | \
158 A2DP_SBC_CH_MODE_MONO | A2DP_SBC_CH_MODE_STEREO | \
159 A2DP_SBC_CH_MODE_JOINT, \
160 A2DP_SBC_BLK_LEN_16 | A2DP_SBC_SUBBAND_8 | \
161 A2DP_SBC_ALLOC_MTHD_LOUDNESS, \
162 18U, 35U}, \
163 }; \
164 static struct bt_a2dp_ep _name = \
165 BT_A2DP_SOURCE_EP_INIT(BT_A2DP_SBC, &bt_a2dp_ep_cap_ie##_name, false)
166
183#define BT_A2DP_SBC_EP_CFG(_name, _freq_cfg, _ch_mode_cfg, _blk_len_cfg, _subband_cfg, \
184 _alloc_mthd_cfg, _min_bitpool_cfg, _max_bitpool_cfg) \
185 static struct bt_a2dp_codec_ie bt_a2dp_codec_ie##_name = { \
186 .len = BT_A2DP_SBC_IE_LENGTH, \
187 .codec_ie = {_freq_cfg | _ch_mode_cfg, \
188 _blk_len_cfg | _subband_cfg | _alloc_mthd_cfg, _min_bitpool_cfg, \
189 _max_bitpool_cfg}, \
190 }; \
191 struct bt_a2dp_codec_cfg _name = { \
192 .codec_config = &bt_a2dp_codec_ie##_name, \
193 }
194
200#define BT_A2DP_SBC_EP_CFG_DEFAULT(_name, _freq_cfg) \
201 static struct bt_a2dp_codec_ie bt_a2dp_codec_ie##_name = { \
202 .len = BT_A2DP_SBC_IE_LENGTH, \
203 .codec_ie = {_freq_cfg | A2DP_SBC_CH_MODE_JOINT, \
204 A2DP_SBC_BLK_LEN_16 | A2DP_SBC_SUBBAND_8 | \
205 A2DP_SBC_ALLOC_MTHD_LOUDNESS, \
206 18U, 35U}, \
207 }; \
208 struct bt_a2dp_codec_cfg _name = { \
209 .codec_config = &bt_a2dp_codec_ie##_name, \
210 }
211
296};
297
313
318struct bt_a2dp;
319
320/* Internal to pass build */
321struct bt_a2dp_stream;
322
328 uint8_t codec_ie[CONFIG_BT_A2DP_CODEC_MAX_IE_LEN];
329};
330
338
349 /* Internally used stream object pointer */
351};
352
363
367enum {
370};
371
397typedef uint8_t (*bt_a2dp_discover_ep_cb)(struct bt_a2dp *a2dp, struct bt_a2dp_ep_info *info,
398 struct bt_a2dp_ep **ep);
399
421
434 void (*connected)(struct bt_a2dp *a2dp, int err);
442 void (*disconnected)(struct bt_a2dp *a2dp);
458 int (*config_req)(struct bt_a2dp *a2dp, struct bt_a2dp_ep *ep,
459 struct bt_a2dp_codec_cfg *codec_cfg, struct bt_a2dp_stream **stream,
460 uint8_t *rsp_err_code);
474 int (*reconfig_req)(struct bt_a2dp_stream *stream, struct bt_a2dp_codec_cfg *codec_cfg,
475 uint8_t *rsp_err_code);
484 void (*config_rsp)(struct bt_a2dp_stream *stream, uint8_t rsp_err_code);
497 int (*establish_req)(struct bt_a2dp_stream *stream, uint8_t *rsp_err_code);
507 void (*establish_rsp)(struct bt_a2dp_stream *stream, uint8_t rsp_err_code);
520 int (*release_req)(struct bt_a2dp_stream *stream, uint8_t *rsp_err_code);
530 void (*release_rsp)(struct bt_a2dp_stream *stream, uint8_t rsp_err_code);
543 int (*start_req)(struct bt_a2dp_stream *stream, uint8_t *rsp_err_code);
552 void (*start_rsp)(struct bt_a2dp_stream *stream, uint8_t rsp_err_code);
565 int (*suspend_req)(struct bt_a2dp_stream *stream, uint8_t *rsp_err_code);
574 void (*suspend_rsp)(struct bt_a2dp_stream *stream, uint8_t rsp_err_code);
587 int (*abort_req)(struct bt_a2dp_stream *stream, uint8_t *rsp_err_code);
596 void (*abort_rsp)(struct bt_a2dp_stream *stream, uint8_t rsp_err_code);
609 int (*get_config_req)(struct bt_a2dp_stream *stream, uint8_t *rsp_err_code);
619 void (*get_config_rsp)(struct bt_a2dp_stream *stream, struct bt_a2dp_codec_cfg *codec_cfg,
620 uint8_t rsp_err_code);
621#ifdef CONFIG_BT_A2DP_SOURCE
634 int (*delay_report_req)(struct bt_a2dp_stream *stream, uint16_t value,
635 uint8_t *rsp_err_code);
636#endif
637#ifdef CONFIG_BT_A2DP_SINK
646 void (*delay_report_rsp)(struct bt_a2dp_stream *stream, uint8_t rsp_err_code);
647#endif
648};
649
664struct bt_a2dp *bt_a2dp_connect(struct bt_conn *conn);
665
675int bt_a2dp_disconnect(struct bt_a2dp *a2dp);
676
685int bt_a2dp_register_ep(struct bt_a2dp_ep *ep, uint8_t media_type, uint8_t sep_type);
686
696
705struct bt_conn *bt_a2dp_get_conn(struct bt_a2dp *a2dp);
706
714int bt_a2dp_discover(struct bt_a2dp *a2dp, struct bt_a2dp_discover_param *param);
715
733
743 void (*configured)(struct bt_a2dp_stream *stream);
751 void (*established)(struct bt_a2dp_stream *stream);
764 void (*released)(struct bt_a2dp_stream *stream);
772 void (*started)(struct bt_a2dp_stream *stream);
780 void (*suspended)(struct bt_a2dp_stream *stream);
781#if defined(CONFIG_BT_A2DP_SINK) || defined(__DOXYGEN__)
789 void (*recv)(struct bt_a2dp_stream *stream, struct net_buf *buf, uint16_t seq_num,
790 uint32_t ts);
791#endif /* CONFIG_BT_A2DP_SINK */
792#if defined(CONFIG_BT_A2DP_SOURCE) || defined(__DOXYGEN__)
805 void (*sent)(struct bt_a2dp_stream *stream);
815 void (*delay_report)(struct bt_a2dp_stream *stream, uint16_t value);
816#endif /* CONFIG_BT_A2DP_SOURCE */
817};
818
828
845 struct bt_a2dp_ep *local_ep, struct bt_a2dp_ep *remote_ep,
846 struct bt_a2dp_codec_cfg *config);
847
857
867
878
888
898
908int bt_a2dp_stream_reconfig(struct bt_a2dp_stream *stream, struct bt_a2dp_codec_cfg *config);
909
920
928
940int bt_a2dp_stream_send(struct bt_a2dp_stream *stream, struct net_buf *buf, uint16_t seq_num,
941 uint32_t ts);
942
957
968
969#ifdef __cplusplus
970}
971#endif
972
976
977#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:215
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.
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:397
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:299
@ BT_A2DP_INVALID_CP_FORMAT
The format of Content Protection Service Capability/Content Protection Scheme Dependent Data is not c...
Definition a2dp.h:283
@ BT_A2DP_INVALID_CODEC_TYPE
Media Codec Type is not valid.
Definition a2dp.h:217
@ BT_A2DP_INVALID_CHANNELS
Either 1) Channels is not valid or 2) None or multiple values have been selected for Channels.
Definition a2dp.h:267
@ BT_A2DP_NOT_SUPPORTED_DRC
DRC is not supported.
Definition a2dp.h:295
@ BT_A2DP_NOT_SUPPORTED_VERSION
Version is not supported.
Definition a2dp.h:273
@ BT_A2DP_NOT_SUPPORTED_SUBBANDS
Number of Subbands is not supported.
Definition a2dp.h:231
@ BT_A2DP_NOT_SUPPORTED_CHANNELS
Channels is not supported.
Definition a2dp.h:269
@ 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:261
@ BT_A2DP_NOT_SUPPORTED_CODEC_PARAMETER
The codec parameter is not supported.
Definition a2dp.h:291
@ BT_A2DP_INVALID_VERSION
Version is not valid.
Definition a2dp.h:271
@ BT_A2DP_NOT_SUPPORTED_LAYER
Layer is not supported.
Definition a2dp.h:247
@ BT_A2DP_NOT_SUPPORTED_SAMPLING_FREQUENCY
Sampling Frequency is not supported.
Definition a2dp.h:223
@ BT_A2DP_NOT_SUPPORTED_CRC
CRC is not supported.
Definition a2dp.h:249
@ BT_A2DP_INVALID_CHANNEL_MODE
Channel Mode is not valid or multiple values have been selected.
Definition a2dp.h:225
@ BT_A2DP_INVALID_SAMPLING_FREQUENCY
Sampling Frequency is not valid or multiple values have been selected.
Definition a2dp.h:221
@ BT_A2DP_INVALID_MAXIMUM_BITPOOL_VALUE
Maximum Bitpool Value is not valid.
Definition a2dp.h:241
@ BT_A2DP_NOT_SUPPORTED_OBJECT_TYPE
Object Type is not supported.
Definition a2dp.h:263
@ BT_A2DP_NOT_SUPPORTED_ALLOCATION_METHOD
Allocation Method is not supported.
Definition a2dp.h:235
@ BT_A2DP_INVALID_SUBBANDS
None or multiple values have been selected for Number of Subbands.
Definition a2dp.h:229
@ BT_A2DP_NOT_SUPPORTED_CHANNEL_MODE
Channel Mode is not supported.
Definition a2dp.h:227
@ BT_A2DP_NOT_SUPPORTED_VBR
VBR is not supported.
Definition a2dp.h:253
@ BT_A2DP_NOT_SUPPORTED_MPF
MPF-2 is not supported.
Definition a2dp.h:251
@ BT_A2DP_INVALID_CODEC_PARAMETER
The codec parameter is invalid.
Definition a2dp.h:287
@ BT_A2DP_NOT_SUPPORTED_MAXIMUM_BITPOOL_VALUE
Maximum Bitpool Value is not supported.
Definition a2dp.h:243
@ BT_A2DP_INVALID_CP_TYPE
The requested CP Type is not supported.
Definition a2dp.h:279
@ BT_A2DP_NOT_SUPPORTED_CODEC_TYPE
Media Codec Type is not supported.
Definition a2dp.h:219
@ BT_A2DP_NOT_SUPPORTED_MINIMUM_BITPOOL_VALUE
Minimum Bitpool Value is not supported.
Definition a2dp.h:239
@ BT_A2DP_INVALID_MINIMUM_BITPOOL_VALUE
Minimum Bitpool Value is not valid.
Definition a2dp.h:237
@ BT_A2DP_INVALID_BIT_RATE
None or multiple values have been selected for Bit Rate.
Definition a2dp.h:255
@ BT_A2DP_INVALID_BLOCK_LENGTH
None or multiple values have been selected for Block Length.
Definition a2dp.h:277
@ BT_A2DP_INVALID_ALLOCATION_METHOD
None or multiple values have been selected for Allocation Method.
Definition a2dp.h:233
@ BT_A2DP_INVALID_LAYER
None or multiple values have been selected for Layer.
Definition a2dp.h:245
@ BT_A2DP_NOT_SUPPORTED_BIT_RATE
Bit Rate is not supported.
Definition a2dp.h:257
@ BT_A2DP_INVALID_DRC
Combination of Object Type and DRC is invalid.
Definition a2dp.h:293
@ BT_A2DP_NOT_SUPPORTED_MAXIMUM_SUL
Maximum SUL is not acceptable for the Decoder in the SNK.
Definition a2dp.h:275
@ BT_A2DP_DISCOVER_EP_STOP
Definition a2dp.h:368
@ BT_A2DP_DISCOVER_EP_CONTINUE
Definition a2dp.h:369
@ BT_A2DP_MPEG1
Codec MPEG-1.
Definition a2dp.h:303
@ BT_A2DP_ATRAC
Codec ATRAC.
Definition a2dp.h:309
@ BT_A2DP_SBC
Codec SBC.
Definition a2dp.h:301
@ BT_A2DP_VENDOR
Codec Non-A2DP.
Definition a2dp.h:311
@ BT_A2DP_MPEGD
Codec MPEG-D.
Definition a2dp.h:307
@ BT_A2DP_MPEG2
Codec MPEG-2.
Definition a2dp.h:305
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:423
int(* start_req)(struct bt_a2dp_stream *stream, uint8_t *rsp_err_code)
Stream start request callback.
Definition a2dp.h:543
int(* get_config_req)(struct bt_a2dp_stream *stream, uint8_t *rsp_err_code)
Stream get config callback.
Definition a2dp.h:609
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:484
void(* start_rsp)(struct bt_a2dp_stream *stream, uint8_t rsp_err_code)
Callback function for bt_a2dp_stream_start().
Definition a2dp.h:552
void(* suspend_rsp)(struct bt_a2dp_stream *stream, uint8_t rsp_err_code)
Callback function for bt_a2dp_stream_suspend().
Definition a2dp.h:574
int(* suspend_req)(struct bt_a2dp_stream *stream, uint8_t *rsp_err_code)
Stream suspend request callback.
Definition a2dp.h:565
void(* disconnected)(struct bt_a2dp *a2dp)
A a2dp connection has been disconnected.
Definition a2dp.h:442
int(* abort_req)(struct bt_a2dp_stream *stream, uint8_t *rsp_err_code)
Stream abort request callback.
Definition a2dp.h:587
int(* release_req)(struct bt_a2dp_stream *stream, uint8_t *rsp_err_code)
Stream release request callback.
Definition a2dp.h:520
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:458
void(* connected)(struct bt_a2dp *a2dp, int err)
A a2dp connection has been established.
Definition a2dp.h:434
void(* release_rsp)(struct bt_a2dp_stream *stream, uint8_t rsp_err_code)
Callback function for bt_a2dp_stream_release().
Definition a2dp.h:530
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:474
int(* establish_req)(struct bt_a2dp_stream *stream, uint8_t *rsp_err_code)
Stream establishment request callback.
Definition a2dp.h:497
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:619
void(* abort_rsp)(struct bt_a2dp_stream *stream, uint8_t rsp_err_code)
Callback function for bt_a2dp_stream_abort().
Definition a2dp.h:596
void(* establish_rsp)(struct bt_a2dp_stream *stream, uint8_t rsp_err_code)
Callback function for bt_a2dp_stream_establish().
Definition a2dp.h:507
The endpoint configuration.
Definition a2dp.h:332
struct bt_a2dp_codec_ie * codec_config
The media codec configuration content.
Definition a2dp.h:336
bool delay_report
the delay reporting configured state
Definition a2dp.h:334
codec information elements for the endpoint
Definition a2dp.h:324
uint8_t len
Length of codec_cap.
Definition a2dp.h:326
uint8_t codec_ie[CONFIG_BT_A2DP_CODEC_MAX_IE_LEN]
codec information element
Definition a2dp.h:328
Definition a2dp.h:400
struct bt_a2dp_ep_info info
The discovered endpoint info that is callbacked by cb.
Definition a2dp.h:404
uint16_t avdtp_version
The AVDTP version of the peer's A2DP sdp service.
Definition a2dp.h:417
uint8_t sep_count
The max count of seps (stream endpoint) that can be got in this call route.
Definition a2dp.h:419
bt_a2dp_discover_ep_cb cb
discover callback
Definition a2dp.h:402
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:408
Definition a2dp.h:353
bool delay_report
Whether the endpoint has delay reporting service.
Definition a2dp.h:357
struct bt_avdtp_sep_info * sep_info
Stream End Point Information.
Definition a2dp.h:361
struct bt_a2dp_codec_ie codec_cap
Codec capabilities, if SBC, use function of a2dp_codec_sbc.h to parse it.
Definition a2dp.h:359
uint8_t codec_type
Code Type bt_a2dp_codec_type.
Definition a2dp.h:355
Stream End Point.
Definition a2dp.h:340
struct bt_avdtp_sep sep
AVDTP Stream End Point Identifier.
Definition a2dp.h:348
struct bt_a2dp_stream * stream
Definition a2dp.h:350
uint8_t codec_type
Code Type bt_a2dp_codec_type.
Definition a2dp.h:342
bool delay_report
Whether the endpoint has delay reporting service.
Definition a2dp.h:344
struct bt_a2dp_codec_ie * codec_cap
Capabilities.
Definition a2dp.h:346
The stream endpoint related operations.
Definition a2dp.h:735
void(* configured)(struct bt_a2dp_stream *stream)
Stream configured callback.
Definition a2dp.h:743
void(* started)(struct bt_a2dp_stream *stream)
Stream start callback.
Definition a2dp.h:772
void(* established)(struct bt_a2dp_stream *stream)
Stream establishment callback.
Definition a2dp.h:751
void(* delay_report)(struct bt_a2dp_stream *stream, uint16_t value)
The delay report value is received.
Definition a2dp.h:815
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:789
void(* released)(struct bt_a2dp_stream *stream)
Stream release callback.
Definition a2dp.h:764
void(* sent)(struct bt_a2dp_stream *stream)
Stream audio HCI sent callback.
Definition a2dp.h:805
void(* suspended)(struct bt_a2dp_stream *stream)
Stream suspend callback.
Definition a2dp.h:780
A2DP Stream.
Definition a2dp.h:717
uint8_t remote_ep_id
remote endpoint's Stream End Point ID
Definition a2dp.h:723
struct bt_a2dp_ep * remote_ep
remote endpoint
Definition a2dp.h:721
struct bt_a2dp_ep * local_ep
local endpoint
Definition a2dp.h:719
struct bt_a2dp_stream_ops * ops
Audio stream operations.
Definition a2dp.h:727
struct bt_a2dp * a2dp
the a2dp connection
Definition a2dp.h:729
bool delay_report
whether the delay report is configured on the stream
Definition a2dp.h:725
struct bt_a2dp_codec_ie codec_config
the stream current configuration
Definition a2dp.h:731
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:1184
Network buffer representation.
Definition net_buf.h:1048