Helper Functions

API Reference


group wicedbt_av_a2d_helper

(Source) Profile supported features.

A2D_SUPF_PLAYER

Player.

A2D_SUPF_MIC

MIC.

A2D_SUPF_TUNER

Tuner.

A2D_SUPF_MIXER

Mixer.

(Sink) Profile supported features.

A2D_SUPF_HEADPHONE

Headphone.

A2D_SUPF_SPEAKER

Speaker.

A2D_SUPF_RECORDER

Recorder.

A2D_SUPF_AMP

Amplifier.

AV Media Types.

A2D_MEDIA_TYPE_AUDIO

audio media type + RFA

A2D_MEDIA_TYPE_VIDEO

video media type + RFA

A2D_MEDIA_TYPE_MULTI

multimedia media type + RFA

AV Media Codec Type (Audio Codec ID).

A2D_MEDIA_CT_SBC

SBC media codec type.

A2D_MEDIA_CT_M12

MPEG-1, 2 Audio media codec type.

A2D_MEDIA_CT_M24

MPEG-2, 4 AAC media codec type.

A2D_MEDIA_CT_ATRAC

ATRAC family media codec type.

A2D_MEDIA_CT_VEND

Vendor specific.

A2D_MEDIA_CT_APTX

APTX media codec type.

A2DP status codes.

typedef uint8_t wiced_bt_a2d_status_t

A2DP status codes.

A2D_SUCCESS

Success.

A2D_FAIL

Failed.

A2D_BUSY

wiced_bt_a2d_find_service is already in progress

A2D_INVALID_PARAMS

bad parameters

A2D_WRONG_CODEC

wrong codec info

A2D_BAD_CODEC_TYPE

Media Codec Type is not valid.

A2D_NS_CODEC_TYPE

Media Codec Type is not supported.

A2D_BAD_SAMP_FREQ

Sampling Frequency is not valid or multiple values have been selected.

A2D_NS_SAMP_FREQ

Sampling Frequency is not supported.

A2D_BAD_CH_MODE

Channel Mode is not valid or multiple values have been selected.

A2D_NS_CH_MODE

Channel Mode is not supported.

A2D_BAD_SUBBANDS

None or multiple values have been selected for Number of Subbands.

A2D_NS_SUBBANDS

Number of Subbands is not supported.

A2D_BAD_ALLOC_MTHD

None or multiple values have been selected for Allocation Method.

A2D_NS_ALLOC_MTHD

Allocation Method is not supported.

A2D_BAD_MIN_BITPOOL

Minimum Bitpool Value is not valid.

A2D_NS_MIN_BITPOOL

Minimum Bitpool Value is not supported.

A2D_BAD_MAX_BITPOOL

Maximum Bitpool Value is not valid.

A2D_NS_MAX_BITPOOL

Maximum Bitpool Value is not supported.

A2D_BAD_LAYER

None or multiple values have been selected for Layer.

A2D_NS_LAYER

Layer is not supported.

A2D_NS_CRC

CRC is not supported.

A2D_NS_MPF

MPF-2 is not supported.

A2D_NS_VBR

VBR is not supported.

A2D_BAD_BIT_RATE

None or multiple values have been selected for Bit Rate.

A2D_NS_BIT_RATE

Bit Rate is not supported.

A2D_BAD_OBJ_TYPE

Either 1) Object type is not valid (b3-b0) or 2) None or multiple values have been selected for Object Type.

A2D_NS_OBJ_TYPE

Object type is not supported.

A2D_BAD_CHANNEL

None or multiple values have been selected for Channels.

A2D_NS_CHANNEL

Channels is not supported.

A2D_BAD_BLOCK_LEN

None or multiple values have been selected for Block Length.

A2D_BAD_CP_TYPE

The requested CP Type is not supported.

A2D_BAD_CP_FORMAT

The format of Content Protection Service Capability/Content Protection Scheme Dependent Data is not correct.

A2D set bits.

note

Return values from wiced_bt_a2d_bits_set()

A2D_SET_ONE_BIT

one and only one bit is set

A2D_SET_ZERO_BIT

all bits clear

A2D_SET_MULTL_BIT

multiple bits are set

Typedefs

void() wiced_bt_a2d_find_cback (wiced_bool_t found, wiced_bt_a2d_service_t *p_service)

A2D Find Service Discovery callback.

Callback for A2D Find Service Discovery Records Registered using wiced_bt_a2d_find_service() The callback function will be executed when service discovery is complete.

note

This is the callback to notify the result of the SDP discovery process

Parameters
  • found – : Record found status

  • p_service – : Contains result of SDP discovery process

Returns

Status of event handling

Functions

uint8_t wiced_bt_a2d_bits_set(uint8_t mask)

Check the number of bits set in a given mask (used to parse stream configuration masks)

Parameters

mask[in] : mask to check

Returns

A2D_SET_BIT

wiced_bt_a2d_status_t wiced_bt_a2d_find_service(uint16_t service_uuid, wiced_bt_device_address_t bd_addr, wiced_bt_a2d_sdp_db_params_t *p_db, wiced_bt_a2d_find_cback *p_cback)

Performs Service Discovery and fetches SRC/SINK SDP Record Info.

Information is returned for the first service record found on the server that matches the service UUID.There can only be one outstanding call to wiced_bt_a2d_find_service() at a time; the application must wait for the callback before it makes another call to the function.

Parameters
  • service_uuid[in] : Indicates SRC or SNK.

  • bd_addr[in] : BD address of the peer device.

  • p_db[in] : Pointer to the information to initialize the discovery database.

  • p_cback[in] : Pointer to the wiced_bt_a2d_find_service() callback function.

Returns

wiced_bt_a2d_status_t

struct wiced_bt_a2d_sdp_db_params_t
#include <>

SDP record information from the server to initialize discovery database.

Public Members

uint32_t db_len

Length, in bytes, of the discovery database.

uint16_t num_attr

The number of attributes in p_attrs.

wiced_bt_sdp_discovery_db_t *p_db

Pointer to the discovery database.

uint16_t *p_attrs

Attributes filter, Set by A2DP API filter if NULL, else input is taken as filter.

struct wiced_bt_a2d_service_t
#include <>

This data type is used in tA2D_FIND_CBACK to report the result of the SDP discovery process.

Public Members

uint16_t service_len

Length, in bytes, of the service name.

uint16_t provider_len

Length, in bytes, of the provider name.

char *p_service_name

Pointer to the service name, service_len parameter to be used to copy the string.

char *p_provider_name

Pointer to the provider name,service_len parameter to be used to copy the string.

uint16_t features

Profile supported features.

uint16_t avdt_version

AVDTP protocol version.