This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

  • Resolved

CCS/TMS320C5505: Automatic gain control

Part Number: TMS320C5505

Tool/software: Code Composer Studio

Hi,

I am using TMS320c5505.

I am processing the speech/music signal using this chip.

I would like to implement "automatic gain control" using TMS320c5505.

Is it possible to implement "automatic gain control" using software based approach. if there is any hardware based approach please also suggest.

  • Hi,

    I've notified the sw team to elaborate here.

    Best Regards,
    Yordan

     


     Please make sure you read the forum guidelines first.

  • Satyajit,

    There is a AGC module as part of the C55x AER package software-dl.ti.com/.../index_FDS.html
    C:\ti\aer_c55l_cpuv3.3_obj_17_0_0_0\packages\ti\mas\aer\agc.h

    Please take a look at the documentation as well on this especially the AER_Developer_Guide.pdf located at C:\ti\aer_c55l_cpuv3.3_obj_17_0_0_0\packages\ti\mas\aer\docs

    Hope this helps.

    Lali
  • In reply to Lalindra Jayatilleke:

    Dear Lali,

    Thanks for your suggestion. As you suggested I installed AER for C55x

    I can now see the agc.h file in C:\ti\aer_c55l_obj_17_0_0_0\packages\ti\mas\aer

    Could you please suggest how to proceed further. Do I need to add this file in main.c of my code.

    Also, after adding agc.h, do I need to add any instructions or set some registers in main.c or aic3204_init.c

    My main.c looks like this:

    #include "stdio.h"
    #include "usbstk5505.h"
    #include "usbstk5505_led.h"
    #include "aic3204.h"
    #include "PLL.h"
    #include "Dsplib.h"
    #include "stereo.h"


    Int16 left_input;
    Int16 right_input;
    Int16 left_output;
    Int16 right_output;
    Int16 mono_input;

    #define SAMPLES_PER_SECOND 192000

    unsigned long int i = 0;
    unsigned int Step = 0;
    unsigned int LastStep = 99;
    unsigned int key = 0;

    void main( void )
    {


        /* Initialize BSL */
        USBSTK5505_init( );

        /* Initialize PLL */
        pll_frequency_setup(100);

        /* Initialise hardware interface and I2C for code */
        aic3204_hardware_init();
        
        /* Initialise the AIC3204 codec */
        aic3204_init();

        asm(" bclr XF");

        for ( i = 0  ; i < SAMPLES_PER_SECOND * 6000  ;i++  )
        {
                      aic3204_codec_read(&left_input, &right_input); // Configured for one interrupt per two channels.

                      left_output = left_input;

                               aic3204_codec_write(left_output, right_output);

                 }

        /* Disable I2S and put codec into reset */
        aic3204_disable();

        SW_BREAKPOINT;

    }


    /* ------------------------------------------------------------------------ *
     *                                                                          *
     *  End of main.c                                                           *
     *                                                                          *
     * ------------------------------------------------------------------------ */

    What I want is to apply automatic gain control on left_input so that when input magnitude is small the signal observed on left_output is large.

    Could you please suggest how may I proceed after installing agc.h

    Thanks for your help. I am using TMS320c5505 EVM board.

    Regards,

    Satyajit

  • In reply to Satyajit Chincholkar:

    Hi Satyajit
    Lali is out of office till 20th Dec.
    Please expect delay in response.

    Regards
    Mukul
  • In reply to Mukul Bhatnagar:

    Hi Lali,

    Hope you are back from leave.

    Please suggest regarding my last query.

    Thanks and regards,

    Satyajit

  • In reply to Satyajit Chincholkar:

    Satyajit,

    Would need to consult with some colleagues who are currently out of office on your questions, and get back to you.
    Will have to be sometime next week.

    Lali
  • In reply to Lalindra Jayatilleke:

    Satyajit,

    I checked with a colleague and they suggested that you do gain control on the aic3204. There are registers on the codec that can do this.
    Unfortunately, we don't have an implementation example of AGC on the DSP.

    Lali
  • In reply to Lalindra Jayatilleke:

    The automatic gain control on the codec aic3204:

    AIC3204_rset( 0x56, 0xB0 ); //Enable AGC, set Target gain
    AIC3204_rset( 0x57, 0x40 ); // set hysteresis and Noise threshold disabled
    AIC3204_rset( 0x58, 0x50 ); // set Maximum gain
    AIC3204_rset( 0x59, 0xCA ); //attack time
    AIC3204_rset( 0x5A, 0xFA ); // Decay time
    AIC3204_rset( 0x5B, 0x00 ); // Noise debounce time
    AIC3204_rset( 0x5C, 0x06 ); // signal debounce time

This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.