Smart Remote 3 nRF52 v1.2
Functions
Voice over BLE for Android implementation

Functions

ret_code_t m_coms_ble_atvv_audio_send (uint8_t const *p_frame_buf, uint16_t frame_buf_len, uint16_t *p_bytes_transmitted, m_coms_data_process_status_t *p_status)
 Function for sending audio data. More...
 
ret_code_t m_coms_ble_atvv_ctl_pkt_queue_process (void)
 Process control message queue. More...
 
ret_code_t m_coms_ble_atvv_init (void)
 Function for initializing Android TV Voice (ATVV) functionality. More...
 
ret_code_t m_coms_ble_atvv_start_search (uint16_t conn_handle)
 Function for indicating to a peer that a user has pressed the voice search button and that audio transfer should be started. More...
 

Detailed Description

Function Documentation

ret_code_t m_coms_ble_atvv_audio_send ( uint8_t const *  p_frame_buf,
uint16_t  frame_buf_len,
uint16_t *  p_bytes_transmitted,
m_coms_data_process_status_t p_status 
)

Function for sending audio data.

Note
The data pointer must be updated according to how many bytes are transmitted per call to this function.

If audio frame length is longer than the MTU size or ATVV-permitted transmit size, the frame will be sent in multiple chunks. The p_bytes_transmitted is set to the number of bytes of the frame sent. The ATVV frame header is automatically inserted.

Parameters
[in]p_frame_bufPointer to the frame buffer.
[in]frame_buf_lenLength of the frame buffer.
[out]p_bytes_transmittedPointer to memory where number of bytes transmitted will be stored.
[out]p_statusPointer to memory where status information will be stored.
Return values
NRF_SUCCESSNo errors occured.
ret_code_t m_coms_ble_atvv_ctl_pkt_queue_process ( void  )

Process control message queue.

Control messages that are not sent immediately are put into a queue awaiting transmission. Call this function regularly to send control messages in the queue.

Return values
NRF_SUCCESSControl message successfully sent.
NRF_ERROR_NOT_FOUNDNo messages left in the queue.
NRF_ERROR_BUSYCould not send message.
ret_code_t m_coms_ble_atvv_init ( void  )

Function for initializing Android TV Voice (ATVV) functionality.

Return values
NRF_SUCCESSor error code.
ret_code_t m_coms_ble_atvv_start_search ( uint16_t  conn_handle)

Function for indicating to a peer that a user has pressed the voice search button and that audio transfer should be started.

Once the voice search start message has been sent, a separate "open mic" command is expected from the peer. Audio streaming can be started once this message has been received (EVT_ATVV_STATE_MIC_OPEN).

Parameters
[in]conn_handleConnection handle to use for the search message.
Return values
NRF_SUCCESS
NRF_ERROR_BUSYAlready running a voice search.
NRF_ERROR_INVALID_STATEPeer(s) has not enabled the ATVV Service.

Documentation feedback | Developer Zone | Subscribe | Updated