Infineon Logo AIROC BTSDK v4.9 - Documentation
 
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups
Advanced Audio Distribution Profile (A2DP) Sink

Data Structures

struct  wiced_bt_a2dp_sink_route_config
 Audio data route configuration. More...
 
struct  wiced_bt_a2dp_source_route_config
 Audio data route configuration. More...
 
struct  wiced_bt_a2dp_sink_audio_tuning_params_t
 Audio quality tuning parameters Note. More...
 

Modules

 A2DP Helper Functions
 Advanced Audio Distribution Profile.
 
 A2DP SBC Support
 This section describes A2DP Low complexity subband codec (SBC) API.
 

Typedefs

typedef void(* wiced_audio_play_status_ind_t )(uint8_t play_status)
 Play Status Indication Callback. More...
 

Enumerations

enum  wiced_bt_a2dp_sink_overrun_control_t { WICED_BT_A2DP_SINK_OVERRUN_CONTROL_FLUSH_DATA, WICED_BT_A2DP_SINK_OVERRUN_CONTROL_FLOW_CONTROL_SOURCE }
 overrun flow control flag
 

Functions

wiced_result_t wiced_audio_sink_config_init (wiced_bt_a2dp_sink_audio_tuning_params_t *p_param)
 Wiced audio sink initialization. More...
 
wiced_result_t wiced_audio_sink_configure (uint16_t handle, uint32_t is_master, uint32_t audio_route, uint16_t cp_type, wiced_bt_a2dp_codec_info_t *p_codec_info)
 API to configure the sink to perform SBC decoding and to route the decoded audio data over I2S or UART on starting the streaming. More...
 
wiced_result_t wiced_audio_sink_reset (uint16_t handle)
 API to reset the sink on stopping/suspending the streaming. More...
 
wiced_result_t wiced_audio_sink_mute (wiced_bool_t enable, uint16_t ramp_ms)
 To mute/unmute the audio. More...
 
wiced_bool_t wiced_audio_set_i2s_out_sf (uint32_t out_sf)
 Function wiced_audio_set_i2s_out_sf. More...
 
void wiced_audio_register_play_status_ind_cback (wiced_audio_play_status_ind_t cback)
 Function wiced_audio_register_play_status_ind_cback. More...
 
void wiced_audio_get_jitter_buffer_state (uint16_t *p_current_buf_ms, uint16_t *p_clk_tuning)
 Function wiced_audio_get_jitter_buffer_state. More...
 
void wiced_audio_sink_set_arip_I2SPinOut (uint8_t arip_I2SPinOut)
 Function wiced_audio_sink_set_arip_I2SPinOut. More...
 

Detailed Description

Typedef Documentation

typedef void(* wiced_audio_play_status_ind_t)(uint8_t play_status)

Play Status Indication Callback.

This will be invoked when there is a change in the play status Play status values JITTER_IDLE_STATE 0x1 JITTER_NORMAL_STATE 0x2 JITTER_UNDERRUN_STATE 0x4 JITTER_OVERRUN_STATE 0x8

Function Documentation

void wiced_audio_get_jitter_buffer_state ( uint16_t *  p_current_buf_ms,
uint16_t *  p_clk_tuning 
)

Function wiced_audio_get_jitter_buffer_state.

Debug API to get the jitter buffer state

Parameters
[out]p_current_buf_ms: current jitter buffer size in msec
[out]p_clk_tuning: current clock tuning value
Returns
None
void wiced_audio_register_play_status_ind_cback ( wiced_audio_play_status_ind_t  cback)

Function wiced_audio_register_play_status_ind_cback.

Debug API to register for play status indication

Called by the application before starting the streaming

Parameters
[in]cback: Callback function to be invoked on play status change
Returns
None
wiced_bool_t wiced_audio_set_i2s_out_sf ( uint32_t  out_sf)

Function wiced_audio_set_i2s_out_sf.

API to configure output I2S sampling frequency

Called by the application before starting the streaming

Parameters
out_sfDesired output i2s sampling frequency (ex. 16000/32000/44100/48000)
Returns
wiced_bool_t TRUE in success case otherwise FALSE

NOTE : This API must be called before calling the API wiced_audio_sink_configure

wiced_result_t wiced_audio_sink_config_init ( wiced_bt_a2dp_sink_audio_tuning_params_t p_param)

Wiced audio sink initialization.

Parameters
p_parampointer to the tuning parameters
Returns
wiced_result_t (WICED_BT_XXX)
wiced_result_t wiced_audio_sink_configure ( uint16_t  handle,
uint32_t  is_master,
uint32_t  audio_route,
uint16_t  cp_type,
wiced_bt_a2dp_codec_info_t p_codec_info 
)

API to configure the sink to perform SBC decoding and to route the decoded audio data over I2S or UART on starting the streaming.

Called by the application when the streaming is to be started

Parameters
handleAVDT connection handle
audio_route- Audio route to be used to send the decoded audio data, I2S or UART
cp_typeContent protection type. Refer AVDT_CP_TYPE defined in wiced_bt_avdt.h
p_codec_infoCodec information
Returns
wiced_result_t (WICED_BT_XXX)
wiced_result_t wiced_audio_sink_mute ( wiced_bool_t  enable,
uint16_t  ramp_ms 
)

To mute/unmute the audio.

Called by the application to mute the audio when playing the music. Application shall this function to unmute also to restart playing the music

Parameters
enable1 to mute, 0 to unmute
ramp_msramp up/down time in milli seconds
Returns
wiced_result_t (WICED_BT_XXX)
wiced_result_t wiced_audio_sink_reset ( uint16_t  handle)

API to reset the sink on stopping/suspending the streaming.

Called by the application when the streaming is stopped/suspended

Parameters
handleAVDT connection handle
Returns
wiced_result_t (WICED_BT_XXX)
void wiced_audio_sink_set_arip_I2SPinOut ( uint8_t  arip_I2SPinOut)

Function wiced_audio_sink_set_arip_I2SPinOut.

API to set dedicated I2S PinOut, input value depends on chip design

Parameters
[in]ARIP_I2S_PIN_OUT_AUD1/ARIP_I2S_PIN_OUT_AUD2/ARIP_I2S_PIN_OUT_AUD3
Returns
None