I've solved the platform error, it was missing configuration for channels 16 and 17 into edma0 definition into dtsi
edma0: dma-controller@591F0000 {
compatible = "fsl,imx8qm-edma";
reg = <0x0 0x59200000 0x0 0x10000>, /* asrc0 */
<0x0 0x59210000 0x0 0x10000>,
<0x0 0x59220000 0x0 0x10000>,
<0x0 0x59230000 0x0 0x10000>,
<0x0 0x59240000 0x0 0x10000>,
<0x0 0x59250000 0x0 0x10000>,
<0x0 0x59260000 0x0 0x10000>, /* esai0 rx */
<0x0 0x59270000 0x0 0x10000>, /* esai0 tx */
<0x0 0x59280000 0x0 0x10000>, /* spdif0 rx */
<0x0 0x59290000 0x0 0x10000>, /* spdif0 tx */
<0x0 0x592c0000 0x0 0x10000>, /* sai0 rx */
<0x0 0x592d0000 0x0 0x10000>, /* sai0 tx */
<0x0 0x592e0000 0x0 0x10000>, /* sai1 rx */
<0x0 0x592f0000 0x0 0x10000>, /* sai1 tx */
<0x0 0x59300000 0x0 0x10000>, /* sai2 rx */
<0x0 0x59310000 0x0 0x10000>, /* sai3 rx */
<0x0 0x59350000 0x0 0x10000>,
<0x0 0x59370000 0x0 0x10000>;
#dma-cells = <3>;
shared-interrupt;
dma-channels = <18>;
interrupts = <GIC_SPI 374 IRQ_TYPE_LEVEL_HIGH>, /* asrc 0 */
<GIC_SPI 375 IRQ_TYPE_LEVEL_HIGH>,
<GIC_SPI 376 IRQ_TYPE_LEVEL_HIGH>,
<GIC_SPI 377 IRQ_TYPE_LEVEL_HIGH>,
<GIC_SPI 378 IRQ_TYPE_LEVEL_HIGH>,
<GIC_SPI 379 IRQ_TYPE_LEVEL_HIGH>,
<GIC_SPI 410 IRQ_TYPE_LEVEL_HIGH>, /* esai0 */
<GIC_SPI 410 IRQ_TYPE_LEVEL_HIGH>,
<GIC_SPI 457 IRQ_TYPE_LEVEL_HIGH>, /* spdif0 */
<GIC_SPI 459 IRQ_TYPE_LEVEL_HIGH>,
<GIC_SPI 315 IRQ_TYPE_LEVEL_HIGH>, /* sai0 */
<GIC_SPI 315 IRQ_TYPE_LEVEL_HIGH>,
<GIC_SPI 317 IRQ_TYPE_LEVEL_HIGH>, /* sai1 */
<GIC_SPI 317 IRQ_TYPE_LEVEL_HIGH>,
<GIC_SPI 319 IRQ_TYPE_LEVEL_HIGH>, /* sai2 */
<GIC_SPI 324 IRQ_TYPE_LEVEL_HIGH>, /* sai3 */
<GIC_SPI 391 IRQ_TYPE_LEVEL_HIGH>,
<GIC_SPI 393 IRQ_TYPE_LEVEL_HIGH>;
interrupt-names = "edma0-chan0-rx", "edma0-chan1-rx", /* asrc0 */
"edma0-chan2-rx", "edma0-chan3-tx",
"edma0-chan4-tx", "edma0-chan5-tx",
"edma0-chan6-rx", "edma0-chan7-tx", /* esai0 */
"edma0-chan8-rx", "edma0-chan9-tx", /* spdif0 */
"edma0-chan12-rx", "edma0-chan13-tx", /* sai0 */
"edma0-chan14-rx", "edma0-chan15-tx", /* sai1 */
"edma0-chan16-rx", /* sai2 */
"edma0-chan17-rx", /* sai3 */
"edma0-chan21-tx", /* gpt5 */
"edma0-chan23-rx"; /* gpt7 */
status = "okay";
};
the parts with sai2 and sai3 configuration are the ones added by me. Now when using arecord on the sound card the dma channel is assigned properly but I'm still working on this issue
arecord -d 3 -f dat -t wav -D hw:2,0 ngtcuaudiobt.wav
[ 2170.416343] ASoC: snd-soc-dummy-dai <-> 59060000.sai info:
[ 2170.421871] ASoC: rate mask 0x1ffe
[ 2170.425327] ASoC: min ch 1 max ch 32
[ 2170.428941] ASoC: min rate 8000 max rate 192000
Recording WAVE 'ngtcuaudiobt.wav' : Signed 16 bit Little Endian, Rate 48000 Hz, Stereo arecord: pcm_read:2143: read error: Input/output error