CODEC_data.c File Reference


Detailed Description

This module provides Codec data SWI handle.

REVISION

Definition in file CODEC_data.c.

#include "../SYSTEM/sys_hardware.h"
#include "codec.h"
#include "codec_assert.h"
#include "../AUDIO/audio.h"

Include dependency graph for CODEC_data.c:

Include dependency graph

Go to the source code of this file.

Functions

void CODEC_data (void)
 Function serves as the data task handle to fetch data from codec ADC.


Function Documentation

void CODEC_data void   ) 
 

Function serves as the data task handle to fetch data from codec ADC.

Also function checkes to feed data into pcm pipe.

Definition at line 40 of file CODEC_data.c.

References st_PCM::codecMode, COP_AUTOSCAN, COP_FM_RECORD, COP_FMXMIT, COP_ILINK, COP_LINE_RECORD, COP_MIC_RECORD, COP_MUSIC, COP_TUNER, st_PCM::flag, st_PCM::getFunc, st_PCM::pipe, PIPE_writeNext(), and st_PCM::putFunc.

00041 {
00042     PIPE_Obj *  pPipe = &Pcm.pipe;
00043     int *       pData;
00044 
00045     // Use input to sync.
00046     if ( PIPE_writeFrameNum(pPipe) )
00047     {
00048         // Check output first.
00049         #ifdef MIXER_SUPPORT 
00050         if( Pcm.codecMode & (COP_TUNER|COP_LINE_RECORD|COP_MIC_RECORD|COP_FM_RECORD|COP_AUTOSCAN|COP_ILINK|COP_MUSIC|COP_FMXMIT) )
00051         #else
00052         if( Pcm.codecMode & (COP_TUNER|COP_LINE_RECORD|COP_MIC_RECORD|COP_FM_RECORD|COP_AUTOSCAN|COP_ILINK) )
00053         #endif
00054         {       
00055             /* which part of the buffer is valid??? */
00056             if( Pcm.flag & UPPER_HALF_BUF )
00057             {                       
00058                 /* upper half. */
00059                 pData = &BUF_output[0];
00060             }
00061             else
00062             {
00063                 /* lower half. */
00064                 pData = &BUF_output[BUF_OUTPUTSIZE/2];
00065             }   
00066             _sortChannel(pData);
00067             Pcm.getFunc(ChannelBuf, BUF_OUTPUTSIZE/2);
00068         }   
00069                             
00070         if( Pcm.codecMode &(COP_MUSIC|COP_FMXMIT|COP_TUNER|COP_LINE_RECORD|COP_FM_RECORD|COP_AUTOSCAN|COP_ILINK) )
00071         {
00072             Pcm.putFunc(pPipe->WrFrame.Frame, pPipe->wFrameLen);
00073         }
00074         
00075         /* validate frame. */
00076         PIPE_writeNext(pPipe);                  
00077     }
00078 }

Here is the call graph for this function:


Generated on Wed Jan 19 01:12:49 2005 for neuros-firmware by  doxygen 1.3.9.1