SWRU580 April 2021 CC2564C , CC2564MODA , CC2564MODN
Description
The following function is responsible for initializing AUD if necessary, and initializing the A3DP subsystem.
Parameters
It is not necessary to include parameters when using this command. A parameter will have no effect on the outcome of OpenSink.
Possible Return Values
(0) A3DP Endpoint opened successfully
(-2) BTPS_ERROR_INVALID_BLUETOOTH_STACK_ID
(-4) FUNCTION_ERROR
(-8) INVALID_STACK_ID_ERROR
(-2001) BTAUD_ERROR_NOT_INITIALIZED
(-2002) BTAUD_ERROR_INVALID_BLUETOOTH_STACK_ID
(-2005) BTAUD_ERROR_ALREADY_CONNECTED
(-2008) BTAUD_ERROR_STREAM_NOT_INITIALIZED
(-2010) BTAUD_ERROR_STREAM_ALREADY_CONNECTED
(-2013) BTAUD_ERROR_STREAM_IS_ACTIVE
(-2032) BTAUD_ERROR_STREAM_CONNECTED
API Call
AUD_Initialize(BluetoothStackID, NULL, &InitializationInfoSNK, AUD_Event_Callback, 0)
API Prototype
int BTPSAPI AUD_Initialize(unsigned int BluetoothStackID, AUD_Initialization_Info_t *SRCInitializationInfo, AUD_Initialization_Info_t *SNKInitializationInfo, AUD_Event_Callback_t EventCallback, unsigned long CallbackParameter)
Description of API
The following function is responsible for Registering an Audio Manager. Note that only one Audio Manager can be Registered for each Bluetooth stack. This function accepts the Bluetooth stack ID of the Bluetooth stack which this Server is to be associated with. The second parameter to this function is the Audio Manager Configuration Specification. The final two parameters specify the Audio Manager Event Callback function and Callback parameter, respectively, of the Audio Manager Event Callback that is to process any further events associated with this Audio Manager. This function returns zero if successful, or a negative return error code if an error occurred (see BTERRORS.H).
CloseSinkDescription
The following function is responsible for cleaning up AUD and the A3DP stream, if the stream is opened and/or playing. Parameters
It is not necessary to include parameters when using this command. A parameter will have no effect on the outcome of the query.
Possible Return Values
(0) A3DP Endpoint opened successfully
(-2) BTPS_ERROR_INVALID_BLUETOOTH_STACK_ID
(-4) FUNCTION_ERROR
(-8) INVALID_STACK_ID_ERROR
(-2001) BTAUD_ERROR_NOT_INITIALIZED
(-2002) BTAUD_ERROR_INVALID_BLUETOOTH_STACK_ID
(-2011) BTAUD_ERROR_STREAM_NOT_CONNECTED (-2014) BTAUD_ERROR_STREAM_IS_NOT_ACTIVE
API Call
AUD_Un_Initialize(BluetoothStackID);
API Prototype
int BTPSAPI AUD_Un_Initialize(unsigned int BluetoothStackID)
Description of API
The following function is responsible for Unregistering an Audio Manager (which was Registered by a successful call to either the AUD_Initialize() function. This function accepts as input the Bluetooth stack ID of the Bluetooth protocol stack that the Audio Manager was registered for. This function returns zero if successful, or a negative return error code if an error occurred see BTERRORS.H).
RemotePlayDescription
This function is responsible for handling an AVRCP Play command issued by the user.
Parameters
It is not necessary to include parameters when using this command. A parameter will have no effect on the outcome of the query.
Possible Return Values
(0) A3DP Endpoint opened successfully
(-2) BTPS_ERROR_INVALID_BLUETOOTH_STACK_ID
(-4) FUNCTION_ERROR
(-8) INVALID_STACK_ID_ERROR
(-2001) BTAUD_ERROR_NOT_INITIALIZED
(-2002) BTAUD_ERROR_INVALID_BLUETOOTH_STACK_ID
(-2007) BTAUD_ERROR_UNABLE_TO_INITIALIZE_AVCTP
(-2008) BTAUD_ERROR_STREAM_NOT_INITIALIZED
(-2009) BTAUD_ERROR_UNABLE_TO_CONNECT_REMOTE_STREAM (-2011) BTAUD_ERROR_STREAM_NOT_CONNECTED
(-2014) BTAUD_ERROR_STREAM_IS_NOT_ACTIVE
(-2015) BTAUD_ERROR_STREAM_STATE_ALREADY_CURRENT
(-2016) BTAUD_ERROR_UNABLE_TO_CHANGE_STREAM_STATE
(-2017) BTAUD_ERROR_STREAM_STATE_CHANGE_IN_PROGRESS
(-2018) BTAUD_ERROR_STREAM_FORMAT_CHANGE_IN_PROGRESS
(-2019) BTAUD_ERROR_UNSUPPORTED_FORMAT
(-2020) BTAUD_ERROR_UNABLE_TO_CHANGE_STREAM_FORMAT
(-2021) BTAUD_ERROR_SAME_FORMAT
(-2022) BT_AUD_ERROR_RETRIEVING_SUPPORTED_FORMATS
(-2023) BTAUD_ERROR_UNABLE_TO_SEND_STREAM_DATA
(-2024) BTAUD_ERROR_UNABLE_TO_SEND_REMOTE_CONTROL_COMMAND
(-2026) BTAUD_ERROR_REMOTE_DEVICE_NOT_CONNECTED
(-2027) BTAUD_ERROR_REMOTE_CONTROL_NOT_CONNECTED
(-2028) BTAUD_ERROR_INVALID_REMOTE_CONTROL_DATA
(-2029) BTAUD_ERROR_REMOTE_CONTROL_ALREADY_CONNECTED
(-2030) BTAUD_ERROR_REMOTE_CONTROL_CONNECTION_IN_PROGRESS
(-2031) BTAUD_ERROR_REMOTE_CONTROL_NOT_INITIALIZED
API Call
SendRemoteControlCommand(rcPlay);
API Prototype
int SendRemoteControlCommand(RemoteControlCommand_t Command)
Description of API
The following function is used to send the specified remote control to the currently connected remote control device.
remote PauseDescription
This function is responsible for handling an AVRCP Pause command issued by the user.
Parameters
It is not necessary to include parameters when using this command. A parameter will have no effect on the outcome of the query.
Possible Return Values
(0) A3DP Endpoint opened successfully
(-2) BTPS_ERROR_INVALID_BLUETOOTH_STACK_ID
(-4) FUNCTION_ERROR
(-8) INVALID_STACK_ID_ERROR
(-2001) BTAUD_ERROR_NOT_INITIALIZED
(-2002) BTAUD_ERROR_INVALID_BLUETOOTH_STACK_ID
(-2007) BTAUD_ERROR_UNABLE_TO_INITIALIZE_AVCTP
(-2008) BTAUD_ERROR_STREAM_NOT_INITIALIZED
(-2009) BTAUD_ERROR_UNABLE_TO_CONNECT_REMOTE_STREAM
(-2011) BTAUD_ERROR_STREAM_NOT_CONNECTED
(-2014) BTAUD_ERROR_STREAM_IS_NOT_ACTIVE
(-2015) BTAUD_ERROR_STREAM_STATE_ALREADY_CURRENT
(-2016) BTAUD_ERROR_UNABLE_TO_CHANGE_STREAM_STATE
(-2017) BTAUD_ERROR_STREAM_STATE_CHANGE_IN_PROGRESS
(-2018) BTAUD_ERROR_STREAM_FORMAT_CHANGE_IN_PROGRESS
(-2019) BTAUD_ERROR_UNSUPPORTED_FORMAT
(-2020) BTAUD_ERROR_UNABLE_TO_CHANGE_STREAM_FORMAT
(-2021) BTAUD_ERROR_SAME_FORMAT
(-2022) BT_AUD_ERROR_RETRIEVING_SUPPORTED_FORMATS
(-2023) BTAUD_ERROR_UNABLE_TO_SEND_STREAM_DATA
(-2024) BTAUD_ERROR_UNABLE_TO_SEND_REMOTE_CONTROL_COMMAND
(-2026) BTAUD_ERROR_REMOTE_DEVICE_NOT_CONNECTED
(-2027) BTAUD_ERROR_REMOTE_CONTROL_NOT_CONNECTED
(-2028) BTAUD_ERROR_INVALID_REMOTE_CONTROL_DATA
(-2029) BTAUD_ERROR_REMOTE_CONTROL_ALREADY_CONNECTED
(-2030) BTAUD_ERROR_REMOTE_CONTROL_CONNECTION_IN_PROGRESS
(-2031) BTAUD_ERROR_REMOTE_CONTROL_NOT_INITIALIZED
API Call
SendRemoteControlCommand(rcPause);
API Prototype
int SendRemoteControlCommand(RemoteControlCommand_t Command)
Description of API
The following function is used to send the specified remote control to the currently connected remote control device.
RemoteNextDescription
This function is responsible for handling an AVRCP Next command issued by the user.
Parameters
It is not necessary to include parameters when using this command. A parameter will have no effect on the outcome of the query.
Possible Return Values
(0) A3DP Endpoint opened successfully
(-2) BTPS_ERROR_INVALID_BLUETOOTH_STACK_ID
(-4) FUNCTION_ERROR
(-8) INVALID_STACK_ID_ERROR
(-2001) BTAUD_ERROR_NOT_INITIALIZED
(-2002) BTAUD_ERROR_INVALID_BLUETOOTH_STACK_ID
(-2007) BTAUD_ERROR_UNABLE_TO_INITIALIZE_AVCTP
(-2008) BTAUD_ERROR_STREAM_NOT_INITIALIZED
(-2009) BTAUD_ERROR_UNABLE_TO_CONNECT_REMOTE_STREAM
(-2011) BTAUD_ERROR_STREAM_NOT_CONNECTED
(-2014) BTAUD_ERROR_STREAM_IS_NOT_ACTIVE
(-2015) BTAUD_ERROR_STREAM_STATE_ALREADY_CURRENT
(-2016) BTAUD_ERROR_UNABLE_TO_CHANGE_STREAM_STATE
(-2017) BTAUD_ERROR_STREAM_STATE_CHANGE_IN_PROGRESS
(-2018) BTAUD_ERROR_STREAM_FORMAT_CHANGE_IN_PROGRESS
(-2019) BTAUD_ERROR_UNSUPPORTED_FORMAT
(-2020) BTAUD_ERROR_UNABLE_TO_CHANGE_STREAM_FORMAT
(-2021) BTAUD_ERROR_SAME_FORMAT
(-2022) BT_AUD_ERROR_RETRIEVING_SUPPORTED_FORMATS
(-2023) BTAUD_ERROR_UNABLE_TO_SEND_STREAM_DATA
(-2024) BTAUD_ERROR_UNABLE_TO_SEND_REMOTE_CONTROL_COMMAND
(-2026) BTAUD_ERROR_REMOTE_DEVICE_NOT_CONNECTED
(-2027) BTAUD_ERROR_REMOTE_CONTROL_NOT_CONNECTED
(-2028) BTAUD_ERROR_INVALID_REMOTE_CONTROL_DATA
(-2029) BTAUD_ERROR_REMOTE_CONTROL_ALREADY_CONNECTED
(-2030) BTAUD_ERROR_REMOTE_CONTROL_CONNECTION_IN_PROGRESS
(-2031) BTAUD_ERROR_REMOTE_CONTROL_NOT_INITIALIZED
API Call
SendRemoteControlCommand(rcNext);
API Prototype
int SendRemoteControlCommand(RemoteControlCommand_t Command)
Description of API
The following function is used to send the specified remote control to the currently connected remote control device.
RemotePrevDescription
This function is responsible for handling an AVRCP Back command issued by the user.
Parameters
It is not necessary to include parameters when using this command. A parameter will have no effect on the outcome of the query.
Possible Return Values
(0) A3DP Endpoint opened successfully
(-2) BTPS_ERROR_INVALID_BLUETOOTH_STACK_ID
(-4) FUNCTION_ERROR
(-8) INVALID_STACK_ID_ERROR
(-2001) BTAUD_ERROR_NOT_INITIALIZED
(-2002) BTAUD_ERROR_INVALID_BLUETOOTH_STACK_ID
(-2007) BTAUD_ERROR_UNABLE_TO_INITIALIZE_AVCTP
(-2008) BTAUD_ERROR_STREAM_NOT_INITIALIZED
(-2009) BTAUD_ERROR_UNABLE_TO_CONNECT_REMOTE_STREAM
(-2011) BTAUD_ERROR_STREAM_NOT_CONNECTED
(-2014) BTAUD_ERROR_STREAM_IS_NOT_ACTIVE
(-2015) BTAUD_ERROR_STREAM_STATE_ALREADY_CURRENT
(-2016) BTAUD_ERROR_UNABLE_TO_CHANGE_STREAM_STATE
(-2017) BTAUD_ERROR_STREAM_STATE_CHANGE_IN_PROGRESS
(-2018) BTAUD_ERROR_STREAM_FORMAT_CHANGE_IN_PROGRESS
(-2019) BTAUD_ERROR_UNSUPPORTED_FORMAT
(-2020) BTAUD_ERROR_UNABLE_TO_CHANGE_STREAM_FORMAT
(-2021) BTAUD_ERROR_SAME_FORMAT
(-2022) BT_AUD_ERROR_RETRIEVING_SUPPORTED_FORMATS
(-2023) BTAUD_ERROR_UNABLE_TO_SEND_STREAM_DATA
(-2024) BTAUD_ERROR_UNABLE_TO_SEND_REMOTE_CONTROL_COMMAND
(-2026) BTAUD_ERROR_REMOTE_DEVICE_NOT_CONNECTED
(-2027) BTAUD_ERROR_REMOTE_CONTROL_NOT_CONNECTED
(-2028) BTAUD_ERROR_INVALID_REMOTE_CONTROL_DATA
(-2029) BTAUD_ERROR_REMOTE_CONTROL_ALREADY_CONNECTED
(-2030) BTAUD_ERROR_REMOTE_CONTROL_CONNECTION_IN_PROGRESS
(-2031) BTAUD_ERROR_REMOTE_CONTROL_NOT_INITIALIZED
API Call
SendRemoteControlCommand(rcBack);
API Prototype
int SendRemoteControlCommand(RemoteControlCommand_t Command)
Description of API
The following function is used to send the specified remote control to the currently connected remote control device.