/**************************************************************************** NAME sinkTransferToggle DESCRIPTION If the audio is at the device end transfer it back to the AG and vice versa. RETURNS void */ void sinkTransferToggle( uint16 eventId ) { /* Get the link to toggle audio on */ hfp_link_priority priority = audioGetLinkPriority(FALSE); sync_pkt_type packet_type; hfp_audio_params* audio_params; audio_params = audioGetSettings(priority, &packet_type); AUD_DEBUG(("AUD: Audio Transfer\n")) ; /* Perform audio transfer */ HfpAudioTransferRequest(priority, hfp_audio_transfer, packet_type, audio_params ); }
/**************************************************************************** NAME sinkTransferToggle DESCRIPTION If the audio is at the device end transfer it back to the AG and vice versa. RETURNS void */ void sinkTransferToggle( uint16 eventId ) { /* Get the link to toggle audio on */ hfp_link_priority priority = audioGetLinkPriority(FALSE); sync_pkt_type packet_type; hfp_audio_params* audio_params; audio_params = audioGetSettings(priority, &packet_type); /* Mask out all but SCO packet types if feature enabled */ if(theSink.features.audio_sco) packet_type = (packet_type & sync_all_sco) | sync_all_edr_esco; AUD_DEBUG(("AUD: Audio Transfer\n")) ; /* Perform audio transfer */ HfpAudioTransferRequest(priority, hfp_audio_transfer, packet_type, audio_params ); }
/**************************************************************************** NAME audioHandleSyncConnectInd DESCRIPTION Handle HFP_AUDIO_CONNECT_IND. This indicates that an incoming sychronous connection is being requested RETURNS */ void audioHandleSyncConnectInd ( const HFP_AUDIO_CONNECT_IND_T *pInd ) { sync_pkt_type packet_types; hfp_audio_params* audio_params; bool disable_wbs_override = FALSE; AUD_DEBUG(("AUD: Synchronous Connect Ind [%d] from [%x]:\n" , pInd->codec, PROFILE_INDEX(pInd->priority))) ; audio_params = audioGetSettings(pInd->priority, &packet_types); AUD_DEBUG(("AUD : [%lx][%x][%x][%x]\n" , audio_params->bandwidth ,audio_params->max_latency , audio_params->voice_settings ,audio_params->retx_effort)) ; /* WBS test case - use bad WBS params */ if(theSink.FailAudioNegotiation) { packet_types = sync_all_sco; disable_wbs_override = TRUE; } HfpAudioConnectResponse(pInd->priority, TRUE, packet_types, audio_params, disable_wbs_override); }