ADAU1761 on Raspberry Pi3

bought an EVAL-ADAU1761Z and I want to connect it with a raspberry.

I connected all wires to i2c and i2s and downloaded drivers.

I compiled a module with adau1761_i2c, adau1761.c, adau 17x1.c, adau_utils.c, sigma_dsp.c and sigmadsp_regmap with a Makefile. After that I created a device tree overlay and added the line dtoverlay=adau1761_codec in /boot/config.txt. Finally I copied adau1761.bin generate by utility in /lib/firmware.

In dmesg I can see:

[ 5.448853] adau1761_codec: loading out-of-tree module taints kernel.
[ 5.483891] asoc-simple-card soc:sound: adau-hifi <-> 3f203000.i2s mapping ok

 

If I delete the bin file I get an error because firmware is not found.

aplay -r and arecord -l show me the sound card:

pi@MelRPI:~/ADAU1761/driver $ aplay -l
**** List of PLAYBACK Hardware Devices ****
card 0: adau1761 [adau1761], device 0: bcm2835-i2s-adau-hifi adau-hifi-0 []
Subdevices: 1/1
Subdevice #0: subdevice #0

pi@MelRPI:~/ADAU1761/driver $ arecord -l
**** List of CAPTURE Hardware Devices ****
card 1: adau1761 [adau1761], device 0: bcm2835-i2s-adau-hifi adau-hifi-0 []
Subdevices: 1/1
Subdevice #0: subdevice #0

but when I try to record

arecord -c 2 -t wav -f S16_LE -r 48000 test1.wav

I get only noise.

BCLK and LRCLK are present and ADC out too.

If I use USBi with Windows I can hear on the headphone the input elaborated from dsp.

I don't have much experience with device trees and drivers. Can someone help me?

Attached my whole project.

After a lot of test, these are the results:

- If I load manually (with a c program that write directly to i2c) all register and firmware (from the generate .h file or taken from sigmastudio windows) the IC run perfectly. After that I load driver with dtoverlay function and I can record and play correctly.

- If I load module on startup or after the boot the IC doesn't work. After that I unload module and read all registers but they have almost all value 0x00.

Have the driver a problem loading firmware?

4555.adau1761.zip



Test of 23/05/2019
[edited by: mel80 at 9:01 AM (GMT 0) on 23 May 2019]
Parents Reply Children