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.

TMS320C5535: Audio Pre-Processing: ERROR: Unable to initialize AIC3204

Part Number: TMS320C5535


Hi,

I am running the Pre-processing demo with configuration for 2 Mics, using Circular Mic Array. First time it worked well without any CMB interfaced. But later on it doesnt work at all, even with CMB interfaced.

I have used this #define NUM_OF_MICS 2 to use only 2 Mics.

status = AIC3254_init(16000, 16000, PLL_MHZ);  has error. It returns negative instead of 0.

When i check inside the init function, the error is generated at below line:

result = AIC3254_Write( 4, 0x07, hi2c ); // PLL setting: PLLCLK <- BCLK and CODEC_CLKIN <-PLL CLK
//result = AIC3254_Write( 4, 0x03, hi2c ); // PLL setting: PLLCLK <- BCLK and CODEC_CLKIN <-PLL CLK
result = AIC3254_Write( 4, 0x07, hi2c ); // PLL setting: PLLCLK <- BCLK and CODEC_CLKIN <-PLL CLK  // error generated
if (result != CSL_SOK)
{
return result;
}

The AIC3204 is not getting initialised, and the result variable returns below values depending on wires connected to expansion slot of C5535 (Using a breakout board to make connections):

-1 if no CMB wires are connected.

-194 if all CMB wires are connected without 3V3 wire (ie, CMB is powered off).

-200 if all CMB wires are connected and powered on. 

Below is the error log from console:

Audio Pre-processing Demo for C5517 EVM with CMB
This Demo Will Continuously Get Audio Input from CMB, Process the Audio Using BF+ASNR+MSS, then
Send the Processed Audio to the Left Channel of the On-Board Codec (AIC3204-2)
Bypass Audio Input from Mic2 of CMB to the Right Channel of the On-Board Codec

Please Connect the Headphone to the Audio Output (Headphone) Jack (P9)

I2S2 Module Instance opened successfully
I2S2 Module Configured successfully
ERROR: Unable to initialize AIC3204

Please help.

  • Hi Abhinandan,

    I've forwarded this to the c55x software team. Their feedback should be posted here.

    BR
    Tsvetolin Shulev
  • Abhinandan,

    This seems to be a problem with the onboard codec AIC3204 that plays audio through the headphones.
    If you look at codec_aic3254.c there is a #ifdef C5535_EZDSP macro in this file. Are you setting this macro in your project?
    The voice processing demo was designed for the C5517, so there might be HW nuances compared to the C5535ezdsp . So, settings during init might differ (check the I2C addresses).

    Please try this val to see if it changes things. You will notice that this is commented out in codec_aic3254.c. Not sure what the history is on this source.
    result = AIC3254_Write( 4, 0x03, hi2c ); // PLL setting: PLLCLK <- BCLK and CODEC_CLKIN <-PLL CLK

    Lali
  • Hi Lali,
    Tried with C5535_EZDSP macro. Still the same behavior. Any other suggestions? In particular what should I look for to solve the issue?
  • Lali,

    Loading of Page 0 was commented. I have removed comments it and works fine without errors.

    // PLL and Clocks config and Power Up

    result = AIC3254_Write( 0, 0x00, hi2c ); // Select page 0

    if (result != CSL_SOK)

    {

    return result;

    }

    Below is the log:

    Audio Pre-processing Demo for C5517 EVM with CMB

    This Demo Will Continuously Get Audio Input from CMB, Process the Audio Using BF+ASNR+MSS, then

    Send the Processed Audio to the Left Channel of the On-Board Codec (AIC3204-2)

    Bypass Audio Input from Mic2 of CMB to the Right Channel of the On-Board Codec

    Please Connect the Headphone to the Audio Output (Headphone) Jack (P9)

    I2S2 Module Instance opened successfully

    I2S2 Module Configured successfully

    bf required buffers:

    Buffer Size(twords) Alignment Volatile address

    0 82 1 no 0x0

    1 46 0 no 0x0

    2 48 0 no 0x0

    3 184 1 yes 0x0

    4 320 1 yes 0x0

    Buffers allocated by SIU for bf:

    Buffer Size(twords) Alignment Volatile address

    0 82 1 no 0x1

    1 46 0 no 0x1

    2 48 0 no 0x1

    3 184 1 yes 0x1

    4 320 1 yes 0x1

    bf required buffers:

    Buffer Size(twords) Alignment Volatile address

    0 82 1 no 0x0

    1 46 0 no 0x0

    2 48 0 no 0x0

    3 184 1 yes 0x0

    4 320 1 yes 0x0

    Buffers allocated by SIU for bf:

    Buffer Size(twords) Alignment Volatile address

    0 82 1 no 0x1

    1 46 0 no 0x1

    2 48 0 no 0x1

    3 184 1 yes 0x1

    4 320 1 yes 0x1

    Buffers requested by NR:

    Buffer Size(twords) Alignment Volatile

    0 44 1 no

    1 774 1 yes

    2 516 1 yes

    3 387 1 yes

    4 192 1 no

    5 516 1 no

    6 14 1 no

    Buffers allocated for NR:

    Buffer Size(twords) Alignment Volatile address

    0 88 3 no 0x1

    1 1552 3 yes 0x1

    2 1032 3 yes 0x1

    3 776 3 yes 0x1

    4 384 2 no 0x1

    5 1032 2 no 0x1

    6 32 3 no 0x1

    Buffers requested by NR:

    Buffer Size(twords) Alignment Volatile

    0 44 1 no

    1 774 1 yes

    2 516 1 yes

    3 387 1 yes

    4 192 1 no

    5 516 1 no

    6 14 1 no

    Buffers allocated for NR:

    Buffer Size(twords) Alignment Volatile address

    0 88 3 no 0x1

    1 1552 3 yes 0x1

    2 1032 3 yes 0x1

    3 776 3 yes 0x1

    4 384 2 no 0x1

    5 1032 2 no 0x1

    6 32 3 no 0x1

    MSS required buffers:

    Buffer Size(twords) Alignment Volatile address

    0 66 1 no 0x0

    Buffers allocated by SIU for MSS:

    Buffer Size(twords) Alignment Volatile address

    0 140 1 no 0x1

    ...Initializing DRC

    Buffers allocated by SIU for drc:

    Buffer Size(twords) Alignment Volatile address

    0 74 1 no 0x1

    1 640 1 yes 0x1

    2 32 0 no 0x1

    3 150 0 no 0x1

    4 10 1 no 0x1

    Done with DRC

    Pumping PC lineout to the HP Output Started!!

    But I dont hear any audio output from stereo out jack. Do i need to make any changes?