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.

TLV320AIC3111: TLV320AIC3111 Raspberry Pi Zero W

Part Number: TLV320AIC3111

Hello Forum,

I am trying to test a product with a TLV320AIC3111 Codec with a Raspberry pi Zero W but i cant get it to work.

I've adeed the tlv320aic31xx driver from: https://github.com/torvalds/linux/blob/master/sound/soc/codecs/tlv320aic31xx.c#L197 but I'm not sure about the pinout.

I've connected:

    BCLK     to IIS_SCLK(GPIO18)

    WCLK    to IIS_WS(GPIO19)

    DIN        to IIS_OUT(GPIO21)

    DOUT    to IIS_IN(GPIO20

    MCLK    to IIS_MCLK(GPIO17)

I am seeing the word select switch over the SCLK signal but no data is being sended from the raspberry pi. Does somebody have an idea of what I am doing wrong?

Danny

  • Hi,

    For mapping of signals, you can check if the clock frequencies are correct per your configurations.

    If no clocks are seen in WCLK and BCLK, then the host/raspberry is not sending the clocks to the audio device, check your raspberry/Linux setting.

    If clocks and DIN are present, then you need to check the audio registers to confirm the path is configured correctly.

    Raspberry should have examples adding device tree, you should check with them.

    Regards.

  • Hi pdjuandi,

    I now only have a bitclock and word select clock. they both seem fine but i get: I2S SYNC error

    When i connect the bitclock fro the raspberry pi to the Masterclock pin of the codec there appears data but no sound and the same I2S SYNC error. Do you have an idea of how i can fix it?

    Best Regards,

  • You have to check with Raspberry support, we are not the expert with the Linux software.

    The codec has BCLK, WCLK, DIN, DOUT, so normally BCLK from host is connected to codec BCLK and not MCLK.

    So it's with WCLK.

  • Alright thanks, 

    I'm using level shifters for de data between the Pi and the Codec, because the IOVDD and DVDD is 1v8. maybe these are the problem, the shifters i'm using use to be able to manage the frequencies. but just in case, is it possible to attach the I2S lines directly to the Pi?

  • You should use level shifter if they are not of the same levels and these frequencies are not that high, I'd think the level shifter bandwidth should not be a problem. As mentioned above, you should check the connection from pi to codec.

  • Thanks for your Reply,

    When i Attach all the data lines, the codec generates a Bclk 3Mhz and Wclk ~90kHz but no data is being generated by the Pi, If a only connect the Bclk, the Pi is generating data on the data line. But no sound is played because the Pi has no Wclk to sync. It seems to me that all the connections are working fine but the Pi has problems to sync with the codec.  

    Here a bicture with above the Bclk, in the middel the Wclk, and below the data generated when started without Wclk.

    I hope someone has an idea what is going wrong

  • First, if codec is providing the bclk and wclk, then codec is in master mode and it will need the mclk.

    Is that what you have configured the codec and pi to be? Check the codec registers and ensure that's the case and in pi ensure it's slave mode.

    Second, are these bclk and wclk measured from scope? Are you expecting that clock rates? Check the registers also for your sampling and if you use PLL check the PLL ratio.

    Regards.