Exemple #1
0
void config_interrupts(void)
{
	IRQ_map(IRQ_EVT_EDMAINT, 8);		// CHECK same settings in BIOS!!!
	IRQ_clear(IRQ_EVT_EDMAINT);
	IRQ_enable(IRQ_EVT_EDMAINT);

	SWI_enable();

	IRQ_globalEnable();
}
Exemple #2
0
/* Perform Playback (Tx) audio algorithm processing */
void PbAudioAlgTsk(void)
{
    Int16 status;
    Int16 *pbOutBuf;
    Uint16 tempInBlk;

    while (1)
    {
        SEM_pend(&SEM_PbAudioAlg, SYS_FOREVER);

        /* Select AER output buffer */
        HWI_disable();
        pbOutBuf = ping_pong_i2sTxBuf + (!tx_buf_sel)*i2sTxBuffSz;
        HWI_enable();

        if ((usb_play_mode == TRUE) && (rdy_to_consume_asrc_output == TRUE))
        {
            /* Combine ASRC output */
            SWI_disable();
            tempInBlk = asrcOutputFifoInBlk;
            SWI_enable();
            status = combineAsrcOutput(asrcOutputFifo, 
                asrcOutputFifoBlkNumSamps, 
                tempInBlk, 
                &asrcOutputFifoOutBlk, 
                &asrcOutputFifoOutBlkSampCnt, 
                ASRC_NUM_CH_STEREO, 
                tempPbOutBuf, 
                i2sTxBuffSz>>1);
            if (status == CMBASRC_FIFO_UND)
            {
                asrcOutputFifoOutError++;
                LOG_printf(&trace, "ERROR: ASRC output FIFO UNDERFLOW");
                //LOG_printf(&trace, "%04x %d", (asrcOutputFifoInBlk<<8) | asrcOutputFifoOutBlk, asrcOutputFifoOutBlkSampCnt); // debug
            }
        }
        else if (usb_play_mode == TRUE)