MPEG-2,4 AAC Support

group wicedbt_a2dp_mpeg_2_4

This section describes A2DP MPEG-2,4 AAC Audio codec API.

MPEG-2,4 AAC Object

for Codec Specific Information Element

A2D_M24_IE_OBJ_MSK

b7-b4 object type.

b3-b0 is RFA,not used

A2D_M24_IE_OBJ_2LC

b7: MPEG-2 AAC LC

A2D_M24_IE_OBJ_4LC

b6: MPEG-4 AAC LC

A2D_M24_IE_OBJ_4LTP

b5: MPEG-4 AAC LTP

A2D_M24_IE_OBJ_4S

b4: MPEG-4 AAC scalable

MPEG-2,4 AAC Sampling Frequency

A2D_M24_IE_SAMP_FREQ_MSK

sampling frequency

A2D_M24_IE_SAMP_FREQ_8

b7:8 kHz

A2D_M24_IE_SAMP_FREQ_11

b6:11 kHz

A2D_M24_IE_SAMP_FREQ_12

b5:12 kHz

A2D_M24_IE_SAMP_FREQ_16

b4:16 kHz

A2D_M24_IE_SAMP_FREQ_22

b3:22.05kHz

A2D_M24_IE_SAMP_FREQ_24

b2:24 kHz

A2D_M24_IE_SAMP_FREQ_32

b1:32 kHz

A2D_M24_IE_SAMP_FREQ_44

b0:44.1kHz

A2D_M24_IE_SAMP_FREQ_48

b7:48 kHz

A2D_M24_IE_SAMP_FREQ_64

b6:64 kHz

A2D_M24_IE_SAMP_FREQ_88

b5:88 kHz

A2D_M24_IE_SAMP_FREQ_96

b4:96 kHz

MPEG-2,4 AAC Channel

A2D_M24_IE_CHNL_MSK

b3-b2 channels

A2D_M24_IE_CHNL_1

b3: 1 channel

A2D_M24_IE_CHNL_2

b2: 2 channels

MPEG-2,4 AAC Bitrate

A2D_M24_IE_BITRATE3_MSK

octect3

A2D_M24_IE_BITRATE45_MSK

octect4, 5

A2D_M24_IE_BITRATE_MSK

b7-b0 of octect 3, all of octect4, 5

Defines

A2D_M24_INFO_LEN

the LOSC of MPEG_2, 4 AAC media codec capabilitiy

A2D_M24_IE_VBR_MSK

b7: VBR

Functions

wiced_bt_a2d_status_t wiced_bt_a2d_bld_m24info(uint8_t media_type, wiced_bt_a2d_m24_cie_t *p_ie, uint8_t *p_result)

This function is called by an application to build the MPEG-2, 4 AAC Media Codec Capabilities byte sequence beginning from the LOSC octet.

Parameters
  • media_type[in] : Indicates Audio, or Multimedia.

  • p_ie[in] : MPEG-2, 4 AAC Codec Information Element information.

  • p_result[out] : the resulting codec info byte sequence.

Returns

A2D_SUCCESS if function execution succeeded. Error status code , otherwise.

wiced_bt_a2d_status_t wiced_bt_a2d_pars_m24info(wiced_bt_a2d_m24_cie_t *p_ie, uint8_t *p_info, wiced_bool_t for_caps)

This function is called by an application to parse the MPEG-2, 4 AAC Media Codec Capabilities byte sequence beginning from the LOSC octet.

Parameters
  • p_info[in] : the byte sequence to parse.

  • for_caps[in] : TRUE, if the byte sequence is for get capabilities response.

  • p_ie[out] : MPEG-2, 4 AAC Codec Information Element information.

Returns

A2D_SUCCESS if function execution succeeded. Error status code , otherwise.

struct wiced_bt_a2d_m24_cie_t
#include <>

data type for the MPEG-2, 4 AAC Codec Information Element

Public Members

uint8_t obj_type

Object type A2D_M24_OBJ.

uint16_t samp_freq

Sampling frequency A2D_M24_SF.

uint8_t chnl

Channel mode A2D_M24_CH_MD.

uint8_t vbr

Variable Bit Rate.

uint32_t bitrate

Bit rate index A2D_M24_BITRATE.