Custom Audio cape with TLV320AIC3107 codec.

Hi,

I have made custom Audio cape using TLV320AIC3107. Here is a circuit diagram :

I make it same ( Pin configurations and all ) as what is available at CircuitCO using TLC320AIC3104 codec. I follow All steps like Disable HDMI and Load Device Tree BB-BONE-AUDI-02-00A0.dts and I it works fine.

But my problem is when I run speaker-test system hangs (freezes) and I have to Hard Reset BeagleBone.

Here is what i did and what I get in dmesg.

root@beaglebone:~# speaker-test

speaker-test 1.0.25

Playback device is default
Stream parameters are 48000Hz, S16_LE, 1 channels
Using 16 octaves of pink noise
Rate set to 48000Hz (requested 48000Hz)
Buffer size range from 128 to 32768
Period size range from 8 to 2048
Using max buffer size 32768
Periods = 4

And in Dmesg :

[ 205.540653] omap_i2c 4819c000.i2c: Arbitration lost
[ 206.572921] omap_i2c 4819c000.i2c: controller timed out
[ 206.580024] omap_i2c 4819c000.i2c: Arbitration lost
[ 207.611983] omap_i2c 4819c000.i2c: controller timed out
[ 207.618668] omap_i2c 4819c000.i2c: Arbitration lost
[ 212.626062] omap_i2c 4819c000.i2c: Arbitration lost
[ 213.658853] omap_i2c 4819c000.i2c: controller timed out
[ 213.666881] omap_i2c 4819c000.i2c: Arbitration lost
[ 214.699867] omap_i2c 4819c000.i2c: controller timed out
[ 214.707912] omap_i2c 4819c000.i2c: Arbitration lost
[ 215.740887] omap_i2c 4819c000.i2c: controller timed out
[ 215.748952] omap_i2c 4819c000.i2c: Arbitration lost

I also cross check device tree file and I found that it also works for TLV320AIC3107 codec So I think it is not issue.

An one have Idea what is wrong Please Help ME !!!

Thanks & Regards

Prakash P.

I’m very interested in how you would solve this issue. We are having a similar problem with a “basic” AIC3104 codec and no idea how to debug the situation.

Definitely it’s a problem with the i2c lines, cross check your connections with i2c lines or as suggested above to check the pullups. Issue the following command to see if the chip is detected on the i2c bus or not -

i2cdetect -y -r <i2c_bus_no>

Hi ,
Thanks for Reply.

I checked it and chip is detected.

0 1 2 3 4 5 6 7 8 9 a b c d e f
00: – -- – -- – -- – -- – -- – -- – -- – --
10: – -- – -- – -- – -- UU – -- – -- – -- –
20: – -- – -- – -- – -- – -- – -- – -- – --
30: – -- – -- – -- – -- – -- – -- – -- – --
40: – -- – -- – -- – -- – -- – -- – -- – --
50: – -- – -- UU UU UU UU – -- – -- – -- – --
60: – -- – -- – -- – -- – -- – -- – -- – --
70: – -- – -- – -- – -- – -- – -- – -- – --

Here 0x18 is chip i2c address.

root@beaglebone:~# cat /sys/bus/i2c/devices/1-0018/name
tlv320aic3x

I don’t what is wrong.

Any Idea ??
Thanks & Regards,
Prakash P.

HI,
Thanks For reply.

Can you please tell me how I can Do that ?

Thanks & Regards,
Prakash P.

frequency of i2c bus as specified in dts is 100 kHz.

Hi,
I think in Device tree, i2c pin is pulled up. here is part of Tree.

i2c2_pins: pinmux_i2c2_pins {
pinctrl-single,pins = <
0x150 0x72 /spi0_scl.i2c2_sda,SLEWCTRL_SLOW | INPUT_PULLUP |MODE2/
0x154 0x72 /spi0_d0.i2c2_scl,SLEWCTRL_SLOW | INPUT_PULLUP | MODE2/

;
};

  1. change 10k pull-up resistors to 5.6k as for other capes

  2. check if SYS_RESET is actually deasserted and high

  3. check if DIN/DOUT are correctly connected and not flipped, because DIN data must go into CODEC, while DOUT must go out and vise versa

use this command to test (not speaker-test). Copy/paste it or be sure to use two “v” with the dash
aplay -vv file.wav

what is exactly not clear for you?

how to change resistors or how to copy/paste commands in a shell?

Hi,

How I can check this two things ?

  1. check if SYS_RESET is actually deasserted and high

  2. check if DIN/DOUT are correctly connected and not flipped, because DIN data must go into CODEC, while DOUT must go out and vise versa

I’m not clear about this. Actually I have two Boards one with 10K resistors and one with 4.6K .

Thanks & Regards,
Prakash P.

What happens when you try the CircuitCO audio cape?
Does it work fine?

Hi,

Here CircuitCo cape is not available So we decided to make our own.

Hi Maxim ,

I try with your suggestion of “aplay -vv test.wav” But still same things. Please find attachment of dmesg log.

Hope listen from you soon. :slight_smile:

Thanks & Regards,
Prakash P.

dmesg.txt (36.9 KB)

OK, and what is different between your board and CircuitCo schematic wise?

Hi,

Schematic wise both are same.

Have the schematic posted somewhere?
Versus this one: http://elinux.org/images/1/11/Audio_Cape_B1_Schematic.pdf

Hi,

PFA of my cape schematic,

audio.png

audio cape.png

Hope listen from Experts soon.

Thanks & Regards,
Prakash P.

audio cape.png

Your device tree and schematic are not the same as the CircuitCo one so I would start with that.

http://elinux.org/images/1/10/BB-BONE-AUDI-02-00A0.zip

http://elinux.org/images/1/11/Audio_Cape_B1_Schematic.pdf

audio cape.png