I.mx8qm ESAI1 configuration (kernel version 5.4.24)

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

I.mx8qm ESAI1 configuration (kernel version 5.4.24)

599 Views
vkonevsky
Contributor I

Hi,

Can you please help with enabling ESAI1 interface for imx8qm

My current configuration:

 sound-xtor {
                compatible = "fsl,imx-audio-xtor";
                model = "my_audio";
                cpu-dai = <&esai1>;
                tx-codec-slave = <1>;
                rx-codec-slave = <1>;
                status = "okay";
        };


&esai1 {
      #sound-dai-cells = <0>;
      pinctrl-names = "default";
      pinctrl-0 = <&pinctrl_esai1>;
      assigned-clocks = <&acm IMX_ADMA_ACM_ESAI1_MCLK_SEL>,
                      <&clk IMX_SC_R_AUDIO_PLL_0 IMX_SC_PM_CLK_PLL>,
                      <&clk IMX_SC_R_AUDIO_PLL_0 IMX_SC_PM_CLK_SLV_BUS>,
                      <&clk IMX_SC_R_AUDIO_PLL_0 IMX_SC_PM_CLK_MST_BUS>,
                      <&esai1_lpcg 0>;
      assigned-clock-parents = <&aud_pll_div0_lpcg 0>;
      assigned-clock-rates = <0>, <786432000>, <49152000>, <12288000>, <49152000>;
      fsl,txm-rxs;
      status = "okay";
};

pinctrl_esai1: esai1grp {
                fsl,pins = <
                        IMX8QM_ESAI1_FSR_AUD_ESAI1_FSR                          0xc6000040
                        IMX8QM_ESAI1_FST_AUD_ESAI1_FST                          0xc6000040
                        IMX8QM_ESAI1_SCKR_AUD_ESAI1_SCKR                        0xc6000040
                        IMX8QM_ESAI1_SCKT_AUD_ESAI1_SCKT                        0xc6000040
                        IMX8QM_ESAI1_TX0_AUD_ESAI1_TX0                          0xc6000040
                        IMX8QM_ESAI1_TX1_AUD_ESAI1_TX1                          0xc6000040
                        IMX8QM_ESAI1_TX2_RX3_AUD_ESAI1_TX2_RX3                  0xc6000040
                        IMX8QM_ESAI1_TX3_RX2_AUD_ESAI1_TX3_RX2                  0xc6000040
                        IMX8QM_ESAI1_TX4_RX1_AUD_ESAI1_TX4_RX1                  0xc6000040
                        IMX8QM_ESAI1_TX5_RX0_AUD_ESAI1_TX5_RX0                  0xc6000040
                >;
        };

 

I see audio card: my_audio:

[ 5.844504] ALSA device list:
[ 5.847481] #0: my_audio
[ 5.850190] #1: imx-audio-hdmi-tx
[ 5.853680] #2: wm8960-audio

After running: tinycap /data/local/tmp/t.wav -D 0 -r 48000

I'm getting the output below:

[ 83.587989] fsl-esai-dai 59810000.esai-port: output freq of HCKR should not be 0Hz
[ 83.600402] imx-xtor sound-xtor: failed to set cpu sysclk: -22 tx = 0, ms_fmt = 16384, sysclk = 3, dir = 1
[ 83.610096] imx-xtor sound-xtor: ASoC: machine hw_params failed: -22

 

I expect to get correct capture t.wav with silence/

Also I tried to change configuration to ESAI0 for sound-xtor - but also got failed to set cpu sysclk: -22  error

Does ESAI work on Imx8qm with kernel 5.4.24 ?

Thanks

0 Kudos
2 Replies

587 Views
igorpadykov
NXP Employee
NXP Employee

Hi Vitaly

 

one can try below dts and follow sect.7.1 Advanced Linux Sound Architecture (ALSA) System on a Chip (ASoC) Sound  i.MX Linux Reference Manual​

https://source.codeaurora.org/external/imx/linux-imx/tree/arch/arm64/boot/dts/freescale/imx8qm-mek.d...

 

Best regards
igor

 

0 Kudos

577 Views
vkonevsky
Contributor I

Hi igor,

I can't use suggested dts because I don't have cs42888 codec.

Anyway, xtor should works with ESAI1 without errors, correct?

Could you confirm that ESAI1 and ESAI0 work on automotive-10.0.0_2.2.0-20200509 tag? Have you been established esai connection on this kernel version?

URL: https://source.codeaurora.org/external/imx/linux-imx/tree/?h=automotive-10.0.0_2.2.0

 

Thanks

0 Kudos