REVISION
Definition in file CODEC_radioHdl.c.
#include "../SYSTEM/sys_hardware.h"
#include "codec.h"
#include "codec_assert.h"
#include "../AUDIO/audio.h"
#include "../TUNER/tuner.h"
#include "../FMXMIT/xmit_inc.h"
Include dependency graph for CODEC_radioHdl.c:

Go to the source code of this file.
Functions | |
| void | CODEC_tunerPcmPut (int *pcmBuf, int len) |
| Function serves as the FM radio PCM data put handle. | |
| void | CODEC_tunerPcmGet (int *pcmBuf, int len) |
| Function serves as the FM radio PCM data get handle. | |
|
||||||||||||
|
Function serves as the FM radio PCM data get handle.
Definition at line 112 of file CODEC_radioHdl.c. Referenced by AUDIO_start(). 00113 {
00114 leftChannel = pcmBuf;
00115 rightChannel = pcmBuf + len/2;
00116 }
|
|
||||||||||||
|
Function serves as the FM radio PCM data put handle.
Definition at line 46 of file CODEC_radioHdl.c. References st_PCM::codecMode, COP_FM_RECORD, ENCODER_getInputBuf(), ENCODER_putInputBuf(), and st_AUDIOENERGY::pFrame. Referenced by AUDIO_start(). 00047 {
00048 unsigned int i;
00049 int dataLen = len/2;
00050 int * pSrcLeft;
00051 int * pSrcRight;
00052 int * pDstLeft;
00053 int * pDstRight;
00054 int * pEncDstLeft;
00055 int * pEncDstRight;
00056
00057 pSrcLeft = leftChannel;
00058 pSrcRight = rightChannel;
00059 pDstLeft = pcmBuf;
00060 pDstRight = pcmBuf + dataLen;
00061
00062 if(COP_FM_RECORD&Pcm.codecMode)
00063 {
00064 if(FALSE == ENCODER_getInputBuf(&pEncDstLeft, &pEncDstRight))
00065 {
00066 // Encoder can not catch up.
00067 asm(" nop");
00068 }
00069 }
00070 else pEncDstLeft = NULL;
00071
00072 for (i = 0; i < dataLen; i++)
00073 {
00074 FIRDeemphasisLeftTaps[0] = *pSrcLeft++;
00075 FIRDeemphasisRightTaps[0] = *pSrcRight++;
00076 // apply demphasis filter
00077 *pDstLeft = TUNER_deemphasisFIR(&FIRDeemphasisLeft);
00078 *pDstRight = TUNER_deemphasisFIR(&FIRDeemphasisRight);
00079
00080 if(pEncDstLeft)
00081 {
00082 *pEncDstLeft++ = *pDstLeft;
00083 *pEncDstRight++ = *pDstRight;
00084 LeftInputEnergy.pFrame = pDstRight;
00085 RightInputEnergy.pFrame = pDstLeft;
00086 AUDIO_energy(&LeftInputEnergy);
00087 AUDIO_energy(&RightInputEnergy);
00088 }
00089
00090 pDstLeft++;
00091 pDstRight++;
00092 }
00093
00094 if(pEncDstLeft) ENCODER_putInputBuf();
00095 else
00096 {
00097 EQ_apply(&LeftEQ, pcmBuf, pcmBuf);
00098 pcmBuf += dataLen;
00099 EQ_apply(&RightEQ, pcmBuf, pcmBuf);
00100 }
00101 }
|
Here is the call graph for this function:

1.3.9.1