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.

66AK2G02: Codec Connection

Part Number: 66AK2G02


I'm currently working with the K2G EVM development board using the 66AK2G02 processor that has its MCASP lines connected to the serial data ports of the codec.  I'm trying to get audio data in from the serial data only and output it through the DAC to the HPOUT channels.  It's not clear to me how you choose the input path to the DAC and control switches "SW-D1" and "SW-D2" shown in section 11.2 "Functional block diagram" in the codec datasheet. I'm currently running example code provided in the PDK for Audio streaming to the codec.  The example code is "MCASP_Audio_evmK2G_c66ExampleProject" created by using the:

" pdkProjectCreate.bat K2G EVMK2G little mcasp dsp" command in my PDK directory.   I have the MCASP input working just fine and I can record data through microphone inputs I've connected but I cannot get them to stream properly out through the codec.   

  • Hi Laura,

    I've forwarded your query to the experts. Their feedback should be posted here.

    BR
    Tsvetolin Shulev
  • Laura,

    Can you please help us understand your setup. Are you only using the MCASP to AIC codec interface or do you also have the daughter card connected on the EVM.

    The part where the input is looped back to output is in the file audioSample_io.c in that project.

    You can locate the memcpy that copies the txFrame to rxFrame . If you are processing the input recorded frame, then it is critical that you format the data in the output buffer the same way as the data obtained in the input buffer. the data formats have been described here:
    processors.wiki.ti.com/.../Processor_SDK_RTOS_MCASP

    There are couple examples in the SDK for K2G that show input from Microphone Array board and output from AIC codec as well as the Audio Processing demo . The Audio preprocessing demo is located under pdk_k2g_1_0_6\packages\ti\addon\cmb and documented
    processors.wiki.ti.com/.../Processor_SDK_RTOS_Audio_Pre-Processing

    Hope this helps.

    Regards,
    Rahul
  • I am using just the EVM with a custom microphone array daughter card that has TDM microphone data coming in from one of the Mcasp serializers (Mcasp2 serializer 5 to be specific). I have the receive working great and I’ve been able to successfully manipulate the data for Audio applications that we’re working on.

    I’m trying now to implement playing Audio out through the Codec. I’m familiar with the audio examples provided in the PDK, in fact it’s what I used to get the Mcasp receive up and running. When trying to implement the mcasp transmit and audio codec output, the examples do not seem to work. My receive and transmit configurations are identical, I can see data on mcasp2 Serializer 2 lines going into the codec, but what I get out is either just a loud static or nothing. I’ve tried decoupling the receive and transmit as well and just transmit known music data and I see the receive working great, but the transmit/codec is again not working at all.

    In order to customize this example to my application, I’m simply changing the mcasp configurations in the mcasp_cfg.c and changing some of the codec settings at the beginning of the aic31.c files. What else should be different?
  • Laura,

    So is the microphone array the clock master or getting the clock from the K2G MCASP? Is the sample rate and the input and output clock dividers on the MCASP transmit clock set correctly? The example you indicated in the original post is using the on board AIC codec so I am assuming that you have changed the pinmux for the Framesync/ XCLK and MCASP serializer . Can you see all these signal on the scope with the correct sampling frequency ? what codec settings have you modified. I am not AIC codec expert but we would like to understand the changes and why they were made. Is the MCASP transmit MCASP_XSTAT indicating any errors??

    Regards,
    Rahul

  • Questions answered in order they were asked.

    1. The microphone is the slave, we’re generating the clocks internally from the K2G.
    2. No actually. When we program the clock dividers on the RX signals for the clock and frame sync they are correct. When we program the clock dividers the same for the TX, we notice that they do not match.
    3. The pinmux is initialized in the audio_evmInit.c file and correctly sets them to the “mcasp muxmode”
    4. We are experimenting changing the slotsize and TDM / DSP/ I2S settings in the aic316.c file to match what we are receiving from the microphones
    5. We have not looked specifically at this register, but we will take a look.

    In the meantime do you have any other observations or suggestions?