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.

TLV320AIC3120EVM-U: ACEV-1B Sounding

Part Number: TLV320AIC3120EVM-U
Other Parts Discussed in Thread: TLV320AIC3120

Hi,TI

Please use the evaluation board (ACEV-1B) and provide sample code that realizes the following functions.
・Output beep and audio data to HP OUT.
・Store the audio input from the MIC IN in memory.

If the above functionality is not possible with the evaluation board alone,
I would be happy if there was sample code in an environment with AM335x connected.

Thank you very much.

  • Sorry, I forgot to describe the development environment.
    Developed with CCSVer.10.

  • Hi,

    You can find the Linux driver here https://www.ti.com/tool/TLV320AIC31XXSW-LINUX which has the core code and you can develop per your application.

    In datasheet section 7.3.12.15, it provides the settings to enable a playback to Headphone and Speaker output which you can follow.

    You can also find application notes on beep generator example in this link https://www.ti.com/lit/an/slaa446/slaa446.pdf?ts=1636475929466&ref_url=https%253A%252F%252Fwww.ti.com%252Fproduct%252FTLV320AIC3120%253FkeyMatch%253DTLV320AIC3120%2526tisearch%253Dsearch-everything%2526usecase%253DGPN

    There are other application notes in the product folder that might be useful to your system.

    https://www.ti.com/product/TLV320AIC3120?keyMatch=TLV320AIC3120&tisearch=search-everything&usecase=GPN

    Regards,

    Peter

  • Hello, pdjuandi

    Thank you for your reply.

    The register settings in the data sheet are checked and used.
    I've also checked the application notes, but I can't play or record audio.

    I want to copy the WAV data stored in the ROM data to EDMA,
    transmit it to the TLV320AIC3120 using AM335x (McASP),
    and check it via dac with headphones.

    The sample code is only loopback, and there is no code to play back rom data.
    Could you provide sample code for the following features?
    ・ Rom data is stored in EDMA.
    ・ EDMA specified address data is transmitted to AM335x (McASP).
    ・ Transmit the data received by AM335x (McASP) to the TLV320AIC3120.

    Thank you very much.

  • Hi Yo-nishi,

    We can help debug from codec IC side, so let's start by providing us the following:

    • MCLK, WCLK, BCLK frequency
    • Codec master or slave mode
    • Send the i2cdump of your settings
    • The audio path you intend to run for example (DAC to HP or LINE)

    There's a McBSP apps. note in the product folder you can refer to but not McASP.

    Regards,

    Peter

  • Hi pdjuandi

    I will answer your question.

    MCLK:12MHz
    WCLK:12kHz
    BCLK:0.76MHz

    Codec is slave mode

    I2C Settinng
     I2C Address:0x30
     I2C Bus:0
     transferMode:I2C_MODE_BLOCKING

    I want to output audio to the speaker.

    If I get data from EDMA with McASP read and output data to the codec with McASP writes,
    will the audio be played back?
    (Using the mcaspSubmitChan function)

    Regards,

  • Hi Yo-nishi,

    Your WCLK and BCLK frequencies are not correct. These frequencies will depend on your audio format and sampling frequency (WCLK).

    You can read more on audio interface in section 7.3.15 and the clock generation in section 7.3.13 of the datasheet.

    To get the audio speaker output working with digital data from your host, you need to ensure the following:

    • What audio format are you configuring? As a start maybe use I2S with 16 bit depth and 44.1KHz sampling
    • Ensure the host is sending the correct WCLK and BCLK since Codec is slave. Using the example above WCLK=44.1KHz and BCLK=1.4112MHz
    • Then you will need to set the DAC_fs or ADC_fs following the clock tree below. You will need to configure the register address for the divider accordingly

    • Then configure your audio output path

    Once you have configured that send me your i2cdump so I can check along with your clocks scope capture.

    I can't comment on the code side as it is host dependent.

    Regards,

    Peter

  • Hi pdjuandi

    Sorry,There was a mistake in the previous answer. WCLK was 48kHz.

    The settings I'm using are:

    Please indicate any mistakes.

    Regards,

  • Hi Yo-nishi,

    If your WCLK or sampling is 48KHz, then your BCLK coming from your host needs to be 32x48KHz=1.536MHz. I'm using 16 bit depth/channel so 32 for both channels. Your BCLK of 0.76MHz is wrong so you need to configure your host to send 1.536MHz and WCLK at 48KHz. These are clocks from host you need to fix since codec is slave.

    Now unto the codec clock side, this will be the setting you need to configure in codec with PLL enabled.

    Regards,

    Peter

  • Hi pdjuandi

    I am sorry for the delay in replying because I was absent from the company due to circumstances.

    Thank you for pointing out.

    I ran it with this setting, but no audio data was played.
    Investigate whether there is a problem on the PLL side and contact you.

    Regards,

  • Hi Yo-nishi,

    Ya you need to make sure the host is providing the right clocks.

    Regards,

    Peter