Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 14 additions & 1 deletion doc/connectivity/bluetooth/shell/classic/a2dp.rst
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ Here is a example connecting two devices:
* Source or Sink establish the stream. using :code:`a2dp establish`.
* Source or Sink start the media. using :code:`a2dp start`.
* Source test the media sending. using :code:`a2dp send_media` to send one test packet data.
* Source or Sink suspend the media. using :code:`a2dp suspend`.
* Source or Sink release the media. using :code:`a2dp release`.

.. tabs::

Expand Down Expand Up @@ -58,6 +60,12 @@ Here is a example connecting two devices:
uart:~$ a2dp send_media
frames num: 1, data length: 160
data: 1, 2, 3, 4, 5, 6 ......
uart:~$ a2dp suspend
success to suspend
stream suspended
uart:~$ a2dp release
success to release
stream released

.. group-tab:: Device B (Audio Sink Side)

Expand All @@ -74,7 +82,6 @@ Here is a example connecting two devices:
a2dp connected
<after a2dp configure of source side>
receive requesting config and accept
SBC configure success
sample rate 44100Hz
stream configured
<after a2dp establish of source side>
Expand All @@ -86,4 +93,10 @@ Here is a example connecting two devices:
<after a2dp send_media of source side>
received, num of frames: 1, data length: 160
data: 1, 2, 3, 4, 5, 6 ......
<after a2dp suspend of source side>
receive requesting suspend and accept
stream suspended
<after a2dp release of source side>
receive requesting release and accept
stream released
...
223 changes: 135 additions & 88 deletions include/zephyr/bluetooth/classic/a2dp.h

Large diffs are not rendered by default.

11 changes: 6 additions & 5 deletions include/zephyr/bluetooth/classic/avdtp.h
Original file line number Diff line number Diff line change
Expand Up @@ -87,11 +87,11 @@ enum bt_avdtp_media_type {
*/
struct bt_avdtp_sep_info {
/** End Point usage status */
uint8_t inuse:1;
uint8_t inuse: 1;
/** Stream End Point ID that is the identifier of the stream endpoint */
uint8_t id:6;
uint8_t id: 6;
/** Reserved */
uint8_t reserved:1;
uint8_t reserved: 1;
/** Stream End-point Type that indicates if the stream end-point is SNK or SRC */
enum bt_avdtp_sep_type tsep;
/** Media-type of the End Point
Expand Down Expand Up @@ -127,8 +127,9 @@ struct bt_avdtp_sep {
/** Media Transport Channel*/
struct bt_l2cap_br_chan chan;
/** the endpoint media data */
void (*media_data_cb)(struct bt_avdtp_sep *sep,
struct net_buf *buf);
void (*media_data_cb)(struct bt_avdtp_sep *sep, struct net_buf *buf);
/* semaphore for lock/unlock */
struct k_sem sem_lock;
/** avdtp session */
struct bt_avdtp *session;
/** SEP state */
Expand Down
Loading
Loading