Zephyr API Documentation  3.6.99
A Scalable Open Source RTOS
Loading...
Searching...
No Matches
a2dp.h File Reference

Advanced Audio Distribution Profile header. More...

Go to the source code of this file.

Data Structures

struct  bt_a2dp_stream
 Stream Structure. More...
 
struct  bt_a2dp_preset
 Preset for the endpoint. More...
 
struct  bt_a2dp_endpoint
 Stream End Point. More...
 

Enumerations

enum  bt_a2dp_codec_id {
  BT_A2DP_SBC = 0x00 , BT_A2DP_MPEG1 = 0x01 , BT_A2DP_MPEG2 = 0x02 , BT_A2DP_ATRAC = 0x04 ,
  BT_A2DP_VENDOR = 0xff
}
 Codec ID. More...
 
enum  MEDIA_TYPE { BT_A2DP_AUDIO = 0x00 , BT_A2DP_VIDEO = 0x01 , BT_A2DP_MULTIMEDIA = 0x02 }
 Stream End Point Media Type. More...
 
enum  ROLE_TYPE { BT_A2DP_SOURCE = 0 , BT_A2DP_SINK = 1 }
 Stream End Point Role. More...
 

Functions

struct bt_a2dp * bt_a2dp_connect (struct bt_conn *conn)
 A2DP Connect.
 
int bt_a2dp_register_endpoint (struct bt_a2dp_endpoint *endpoint, uint8_t media_type, uint8_t role)
 Endpoint Registration.
 

Detailed Description

Advanced Audio Distribution Profile header.

Enumeration Type Documentation

◆ bt_a2dp_codec_id

Codec ID.

Enumerator
BT_A2DP_SBC 

Codec SBC.

BT_A2DP_MPEG1 

Codec MPEG-1.

BT_A2DP_MPEG2 

Codec MPEG-2.

BT_A2DP_ATRAC 

Codec ATRAC.

BT_A2DP_VENDOR 

Codec Non-A2DP.

◆ MEDIA_TYPE

enum MEDIA_TYPE

Stream End Point Media Type.

Enumerator
BT_A2DP_AUDIO 

Audio Media Type.

BT_A2DP_VIDEO 

Video Media Type.

BT_A2DP_MULTIMEDIA 

Multimedia Media Type.

◆ ROLE_TYPE

enum ROLE_TYPE

Stream End Point Role.

Enumerator
BT_A2DP_SOURCE 

Source Role.

BT_A2DP_SINK 

Sink Role.

Function Documentation

◆ bt_a2dp_connect()

struct bt_a2dp * bt_a2dp_connect ( struct bt_conn *  conn)

A2DP Connect.

This function is to be called after the conn parameter is obtained by performing a GAP procedure. The API is to be used to establish A2DP connection between devices.

Parameters
connPointer to bt_conn structure.
Returns
pointer to struct bt_a2dp in case of success or NULL in case of error.

◆ bt_a2dp_register_endpoint()

int bt_a2dp_register_endpoint ( struct bt_a2dp_endpoint endpoint,
uint8_t  media_type,
uint8_t  role 
)

Endpoint Registration.

This function is used for registering the stream end points. The user has to take care of allocating the memory, the preset pointer and then pass the required arguments. Also, only one sep can be registered at a time.

Parameters
endpointPointer to bt_a2dp_endpoint structure.
media_typeMedia type that the Endpoint is.
roleRole of Endpoint.
Returns
0 in case of success and error code in case of error.