Exemplo n.º 1
0
void sinkHfpInit( void )
{
    hfp_init_params hfp_params;
    
    memset(&hfp_params, 0, sizeof(hfp_init_params));
    
    sinkClearQueueudEvent(); 
    
    /* get the extra hfp supported features such as supported sco packet types 
       from pskey user 5 */
    configManagerHFP_SupportedFeatures();

    /* initialise the hfp library with parameters read from config*/    
    configManagerHFP_Init(&hfp_params);  
    
    theSink.hfp_profiles = hfp_params.supported_profile;
    
    /* store the link loss time in the app */
    theSink.linkLossReminderTime = hfp_params.link_loss_interval;

    /* initialise hfp library with pskey read configuration */
    HfpInit(&theSink.task, &hfp_params, NULL);
    
    /* initialise the audio library, uses one malloc slot */
    AudioLibraryInit();
}
Exemplo n.º 2
0
/****************************************************************************
NAME    
    audio_init - Initialise audio part of code
*/
void audio_init(void)
{
    /* initialise audio library */
    AudioLibraryInit();
    
    /* set the input source to either analogue, USB or SPDIF */
    theSource->audio_data.audio_a2dp_connect_params.input_device_type = theSource->ps_config->features.input_source;
    
    if(theSource->ps_config->features.input_source == A2dpEncoderInputDeviceSPDIF)
    {
        if((PIO_SPDIF_INPUT != PIN_WIRED_ALWAYSON) && (PIO_SPDIF_INPUT != PIN_WIRED_DISABLED))
        {
            PioSetFunction(PIO_SPDIF_INPUT, SPDIF_RX);
        }
    }
    
    theSource->audio_data.audio_plugin = NULL;
    theSource->audio_data.audio_routed = AUDIO_ROUTED_NONE;
}