axi_i2s_adi with axi_dmac: channel swapping


When start recording audio from the i2s adau1761 codec the L/R assignment is random. Afterwards it won't change, but on the next start, the chance is 50% that it is swapped again.

The problem exist only when using the axi_i2s_adi together with axi_dmac. axi_i2s_adi together with the PL330 dma works fine. But I need i2s also together with zynq ultrascale and there is no PL330.

We worked on this problem a year ago and I remember that we have fixed it. See

Unfortunately the fix does not work for the moment and the fix branch has been deletet without any merging to master.

Maybe the problem is fixed somewhere else? We have used the master branch including the deleted fixes without success.

It is very urgent, because we have some devices in the field where channel swapping is a big problem.


  • Hi,

    you can find the branch with the fixes here:

    as for why it does not work, that will need to be investigated further. could you provide more details regarding the problem? what software are you using? the old thread seems to end pretty fuzzy, did the solution work in the end?


  • Hi Sergiu

    We have designed an SDR board very similar to the ZED board, but with a Zynq 7030 or Zynq Ultrascle module from Enclustra. We are running the ADI master linux and root file system on it. The audio codec and connection is very similar to the ZED board. As we are using the ADAU1761 codec for dual mono input, the correct channel assignment ist very important.

    For the zynq7030 I have tested axi_i2s_adi once with PL330 dma (works fine) and once with axi_dmac (swapping occurs).

    For the zynq ultrascale there is no pl330 dma available and I have only tested the axi_i2s_adi together with axi_dmac (swapping occurs).

    We are using the ADI linux/HDL master branches with the following fixes:

    For the test we running Linux arecord with VU meter enabled and supply an input signal only to the left input. For each start of arecord, the input assignment is randomly swapped or not swapped. But once started it won't change.

    arecord command:

    arecord -V stereo -f S16_LE -r48000 -c2 -F0 --period-size=1024 -B0 --buffer-size=4096

    Can you please try reproducing the issue with a ZED board or another board with axi_i2s_adi and axi_dmac cores?

    Thanks a lot!

    Best regards


  • The solution did not work at the end. We have tested it with arecord | aplay loopback and looked on arecords VU meter. This way the swapping does not occur. But if you just start arecord and pipe to /dev/null, the swapping occurs.

    Swapping occurs:

    arecord -f S16_LE -t raw -r 48000 -c2 -F0 --period-size=1024 -B0 --buffer-size=4096 --fatal-errors -V stereo > /dev/null

    Swapping does not occur:

    arecord -f S16_LE -t raw -r 48000 -c2 -F0 --period-size=1024 -B0 --buffer-size=4096 --fatal-errors -V stereo | aplay -f S16_LE -t raw -r 48000 -c 2 --fatal-errors &>/dev/null

  • Dear Sergiu

    Can you please help us? It is urgent, since we already have devices in the field.

    Can you reproduce the issue?



  • from what i understand this issue has something to do with the RX channel (not TX which was the old issue). i am looking into it and will get back to you as soon as i can.