Sign in

username or email:

password:



Not a member?
Forgot your password?

Search c6x



Search tips

Subscribe to c6x



Ads

Discussion Groups

See Also

Embedded SystemsFPGA

Discussion Groups | TMS320C6x | Problem with AIC23 Codec of TMS320DM642 board

Hello every one. I'm a beginner. I'm using TMS320DM642 board with CCS 3. I want to use AIC23 Codec for some DSP algorithms...

  

Post a new Thread



Is this thread worth a thumbs up?

0

Problem with AIC23 Codec of TMS320DM642 board - liti...@yahoo.com - May 28 21:40:21 2012

Hello every one. I'm a beginner. I'm using TMS320DM642 board with CCS 3. I
want to use AIC23 Codec for some DSP algorithms.
My problem is when I read each block of 100 PCM sapmles then wrote them to codec
data port, I didn't hear anything from my headphone.
If I read one sample and wrote it to codec data port immediately, it worked.
If I read every 2 samples and wrote them to codec data port, it worked but there
was so much noise.

Please give me some advice. Thank you very much.
these are my excerpts of code:
----------------------------------------------------------------
int main()
{
    EVMDM642_AIC23_CodecHandle hCodec1;
    int i;
    Uint32 InpBuffer[100];
    Uint32 OutBuffer[100];

    EVMDM642_init();
    hCodec1 = EVMDM642_AIC23_openCodec(0, &config, EVMDM642_AIC23_INPUT |
EVMDM642_AIC23_OUTPUT );
    EVMDM642_AIC23_setFreq(hCodec1, 8000);

    while (1)
    {    
        for (i = 0; i < 100; i++)
            EVMDM642_AIC23_read32(hCodec1, &InpBuffer[i]);
        for (i = 0; i < 100; i++)
            OutBuffer[i] = InpBuffer[i];
        for (i = 0; i < 100; i++)
           while(!EVMDM642_AIC23_write32(hCodec1, OutBuffer[2]));
    }
}
------------------------------------------------------------------
------------------------------------------------------------------
int main()
{
    EVMDM642_AIC23_CodecHandle hCodec1;
    int i;
    Uint32 Sample;

    EVMDM642_init();
    hCodec1 = EVMDM642_AIC23_openCodec(0, &config, EVMDM642_AIC23_INPUT |
EVMDM642_AIC23_OUTPUT );
    EVMDM642_AIC23_setFreq(hCodec1, 8000 );

    while (1)
    {    
        EVMDM642_AIC23_read32(hCodec1, &Sample);
        while(!EVMDM642_AIC23_write32(hCodec1, Sample));
    }
}
------------------------------------------------------------------
------------------------------------------------------------------
int main()
{
    EVMDM642_AIC23_CodecHandle hCodec1;
    int i;
    Uint32 InpBuffer[2];
    Uint32 OutBuffer[2];

    EVMDM642_init();
    hCodec1 = EVMDM642_AIC23_openCodec(0, &config, EVMDM642_AIC23_INPUT |
EVMDM642_AIC23_OUTPUT );
    EVMDM642_AIC23_setFreq(hCodec1, 8000 );

    while (1)
    {    
        EVMDM642_AIC23_read32(hCodec1, &InpBuffer[0]);
        EVMDM642_AIC23_read32(hCodec1, &InpBuffer[1]);
        while(!EVMDM642_AIC23_write32(hCodec1, InpBuffer[0]));
        while(!EVMDM642_AIC23_write32(hCodec1, InpBuffer[1]));
    }
}
------------------------------------------------------------------
------------------------------------------------------------------

_____________________________________

______________________________
New Code Sharing Section now Live on DSPRelated.com. Learn about the Reward Program for Contributors here.



(You need to be a member of c6x -- send a blank email to c6x-subscribe@yahoogroups.com )