AnsweredAssumed Answered

iMX6 ESAI TDM with underrun and overrun support

Question asked by AURELIEN BOUIN on Dec 17, 2014
Latest reply on Jul 21, 2016 by AURELIEN BOUIN

I am trying to use the ESAI of the iMX6...

I need to use 2x 32 slots of 8 bits at 8Khz, and I am in slave mode since i am listenning Frame Synchro and Tx Clock

I am testing the interface simply sending a word of 0xAA on slot 0 and slot 15, the others are 0x00

I am probably facing the underrun and overrun chip errata (ERR008000) on ESAI since my channels are switching randomly ...

I already tested the kernel from :

-> git:// --- branch : imx_3.10.31_1.1.0_alpha

-> git:// --- branch : imx_3.10.31_1.1.0_beta2

And now I am trying to use the main kernel stable git :

-> git:// --- branch master


But I have some trouble actually with the mailine kernel :

[  745.648380] fsl-esai-dai 2024000.esai: Missing dma channel for stream: 0

[  745.655198] fsl-esai-dai 2024000.esai: ASoC: pcm constructor failed: -22



I figured out that the imx6qdl.dtsi was not giving enough information to use the ESAI so I add to my own dts :


pinctrl_esai_gip2: esaigrp-gip2 {

                fsl,pins = <

                        MX6QDL_PAD_GPIO_2__ESAI_TX_FS           0x1b030

                        MX6QDL_PAD_GPIO_3__XTALOSC_REF_CLK_24M 0x1b030

                        MX6QDL_PAD_GPIO_1__ESAI_RX_CLK       0x1b030

                        MX6QDL_PAD_GPIO_6__ESAI_TX_CLK         0x1b030

                        MX6QDL_PAD_GPIO_17__ESAI_TX0            0x1b030

                        MX6QDL_PAD_GPIO_8__ESAI_TX5_RX0       0x1b030

                        MX6QDL_PAD_GPIO_9__ESAI_RX_FS           0x1b030

                        MX6QDL_PAD_GPIO_18__ESAI_TX1 0x1b030

                        MX6QDL_PAD_GPIO_7__ESAI_TX4_RX1 0x1b030



&esai {

    dma-names = "rx", "tx";

    clocks = <&clks 228>, <&clks 229>, <&clks 118>, <&clks 228>, <&clks 156>;

    clock-names = "core", "mem", "extal", "fsys", "dma";

    compatible = "fsl,imx35-esai";

    fsl,esai-dma-events = <24 23>;

    pinctrl-names = "default";

    pinctrl-0 = <&pinctrl_esai_gip2>;


    fsl,fifo-depth = <64>; /* Transmit FIFO watermark => the Transmit FIFO Empty flag will set => 32 slots * 2 bus of TX the same for RX */

    status = "okay";



sound {

  compatible = "fsl,imx6q-gipc-generic-esai",


  model = "generic-esai-audio";

  esai-controller = <&esai>;



I do have in my .config :


# SoC Audio for Freescale CPUs





# Common SoC Audio options for Freescale CPUs:













I simply make a module that connect to a dummy codec the dai interface ESAI to use it in a generic way :

thank you for your return


Aurelien BOUIN