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://git.freescale.com/imx/linux-2.6-imx.git --- branch : imx_3.10.31_1.1.0_alpha
-> git://git.freescale.com/imx/linux-2.6-imx.git --- branch : imx_3.10.31_1.1.0_beta2
And now I am trying to use the main kernel stable git :
-> git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.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,esai-synchronous;
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",
"fsl,imx-audio-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:
#
# CONFIG_SND_SOC_FSL_ASRC is not set
CONFIG_SND_SOC_FSL_SAI=y
CONFIG_SND_SOC_FSL_SSI=y
CONFIG_SND_SOC_FSL_SPDIF=y
CONFIG_SND_SOC_FSL_ESAI=y
CONFIG_SND_SOC_FSL_UTILS=y
CONFIG_SND_SOC_IMX_PCM_DMA=y
CONFIG_SND_SOC_IMX_AUDMUX=y
CONFIG_SND_IMX_SOC=y
CONFIG_SND_SOC_IMX_PCM_FIQ=y
I simply make a module that connect to a dummy codec the dai interface ESAI to use it in a generic way : http://pastebin.com/CupYva7Z
thank you for your return
Aurelien BOUIN