We have pushed the problem aside. But there are some important lessons learnt here to share with other from a dts perspective:
fsl,dataline = <0 0x00 0xff>;
Be careful with this config if you have specified multiple data lines in the pin mappings. With this config combined with:
cpu1: simple-audio-card,cpu {
sound-dai = <&sai5>;
dai-tdm-slot-num = <16>;
dai-tdm-slot-width = <32>;
};
This will create a 32 channel interface as the slot num should reference the number of channels needed per data line not the total number of channels for the SAI interface.
Hence we were seeing dma of 64 bit as this was essentially a 32 channel operation and we only needed 16.
We switched to a 4 X TDM4 config like below:
4 DATA LINES
pinctrl_sai5: sai5grp {
fsl,pins = <
MX8MN_IOMUXC_SAI2_MCLK_SAI5_MCLK 0xd6
MX8MN_IOMUXC_SAI2_RXC_SAI5_TX_BCLK 0xd6
MX8MN_IOMUXC_SAI2_RXFS_SAI5_TX_SYNC 0xd6
MX8MN_IOMUXC_SAI2_RXD0_SAI5_TX_DATA0 0xd6
MX8MN_IOMUXC_SAI2_TXFS_SAI5_TX_DATA1 0xd6
MX8MN_IOMUXC_SAI2_TXC_SAI5_TX_DATA2 0xd6
MX8MN_IOMUXC_SAI2_TXD0_SAI5_TX_DATA3 0xd6
>;
};
SAI5
&sai5 {
#sound-dai-cells = <0>;
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_sai5>;
fsl,dataline = <0 0x00 0xff>;
dmas = <&sdma2 8 24 0>, <&sdma2 9 24 0>;
fsl,txmasterflag = <1>;
/delete-property/ fsl,shared-interrupt;
status = "okay";
};
Card and Codec
output1 {
compatible = "simple-audio-card";
simple-audio-card,name = "SAI51";
simple-audio-card,status="okay";
simple-audio-card,bitclock-master = <&spdif_codec1>;
simple-audio-card,frame-master = <&spdif_codec1>;
simple-audio-card,format = "left_j";
cpu1: simple-audio-card,cpu {
sound-dai = <&sai5>;
dai-tdm-slot-num = <4>;
dai-tdm-slot-width = <32>;
};
spdif_codec1: simple-audio-card,codec {
sound-dai = <&codec_out1>;
};
};
codec_out1: 1output_txcodec {
#sound-dai-cells = <0>;
#address-cells = <0>;
#size-cells = <0>;
compatible = "linux,spdif-dit";
sound-name-prefix = "spdif_codec1";
status = "okay";
};
Note the slo-num of 4. Each dataline now has 4 channels of data. You will need to use ALSA to map these as we have. We use a dmix to create 8 stereos, the mappings were :
C0 C1 C2 C3 C4 C5 C6 C7 C8 C9 C10 C11 C12 C13 C14 C15
0 4 8 12 1 5 9 13 2 6 10 14 3 7 11 15
The channel count is like this because we didn't enable the fls,multi-lane and disabled shared interrupt
Hope this helps someone else.