adau1761, axi_i2s_adi, axi_dmac, zynqmp: channel swapping

Hi

I have a board with adau1761 i2s audio codec, zynq ultrascle xczu4ev with adi_dmac and axi_i2s_adi hdl cores. As starting point I have used this vivado block design. Kernel: 2019_r2 from adi.

When I start arecord I get a 50% chance that the channels are swapped L/R. Once started it will not change.

When I do loopback, start arecord and pipe it to aplay then I have no swapping.

Here in this log you see the output when starting arecord and terminate it with CTRL+C multiple times. I have connected only an analog source to the left input.

Do you have the same on adrv9009zu11eg? How can I fix it?

Best regards

Andreas

root@analog:~# arecord -f S32_LE -t raw -r 48000 -c2 -F0 --period-size=1024 -B0 --buffer-size=4096 --fatal-errors -V stereo > /dev/null
Recording raw data 'stdin' : Signed 32 bit Little Endian, Rate 48000 Hz, Stereo
              +################### 58%|00%+                                   ^CAborted by signal Interrupt...
              +################### 58%|00%+                                   root@analog:~#
root@analog:~#
root@analog:~# arecord -f S32_LE -t raw -r 48000 -c2 -F0 --period-size=1024 -B0 --buffer-size=4096 --fatal-errors -V stereo > /dev/null
Recording raw data 'stdin' : Signed 32 bit Little Endian, Rate 48000 Hz, Stereo
                                  +02%|58%####################+               ^CAborted by signal Interrupt...
                                  +02%|58%####################+               root@analog:~#
root@analog:~#
root@analog:~#
root@analog:~# arecord -f S16_LE -t raw -r 48000 -c2 -F0 --period-size=1024 -B0 --buffer-size=4096 --fatal-errors -V stereo > /dev/null
Recording raw data 'stdin' : Signed 16 bit Little Endian, Rate 48000 Hz, Stereo
                                  +01%|58%####################+               ^CAborted by signal Interrupt...
arecord: pcm_read:2031: read error: Interrupted system call
root@analog:~#
root@analog:~#
root@analog:~# arecord -f S16_LE -t raw -r 48000 -c2 -F0 --period-size=1024 -B0 --buffer-size=4096 --fatal-errors -V stereo > /dev/null
Recording raw data 'stdin' : Signed 16 bit Little Endian, Rate 48000 Hz, Stereo
                                  +00%|58%####################+               ^CAborted by signal Interrupt...
arecord: pcm_read:2031: read error: Interrupted system call
root@analog:~# arecord -f S16_LE -t raw -r 48000 -c2 -F0 --period-size=1024 -B0 --buffer-size=4096 --fatal-errors -V stereo > /dev/null
Recording raw data 'stdin' : Signed 16 bit Little Endian, Rate 48000 Hz, Stereo
              +################### 58%|00%+                                   ^CAborted by signal Interrupt...
arecord: pcm_read:2031: read error: Interrupted system call
root@analog:~#
root@analog:~# arecord -f S16_LE -t raw -r 48000 -c2 -V stereo > /dev/null                                           Recording raw data 'stdin' : Signed 16 bit Little Endian, Rate 48000 Hz, Stereo
              +################### 58%|00%+                                   ^CAborted by signal Interrupt...
arecord: pcm_read:2031: read error: Interrupted system call
root@analog:~#
root@analog:~#
root@analog:~# arecord -f S16_LE -t raw -r 48000 -c2 -V stereo > /dev/null
Recording raw data 'stdin' : Signed 16 bit Little Endian, Rate 48000 Hz, Stereo
                                  +00%|58%####################+               ^CAborted by signal Interrupt...
arecord: pcm_read:2031: read error: Interrupted system call
root@analog:~#
root@analog:~#
root@analog:~# arecord -f S16_LE -t raw -r 48000 -c2 --period-size=16384 -B0 --buffer-size=16384 -V stereo > /dev/null
Recording raw data 'stdin' : Signed 16 bit Little Endian, Rate 48000 Hz, Stereo
              +################### 58%|03% +                                  ^CAborted by signal Interrupt...
arecord: pcm_read:2031: read error: Interrupted system call
root@analog:~#
root@analog:~#
root@analog:~# arecord -f S16_LE -t raw -r 48000 -c2 --period-size=16384 -B0 --buffer-size=16384 -V stereo > /dev/null
Recording raw data 'stdin' : Signed 16 bit Little Endian, Rate 48000 Hz, Stereo
                                  +01%|58%####################+               ^CAborted by signal Interrupt...
arecord: pcm_read:2031: read error: Interrupted system call
root@analog:~#



Do you have the same on adrv9009zu11eg? How can I fix it?
[edited by: azutter at 3:19 PM (GMT -5) on 30 Nov 2021]