AnsweredAssumed Answered

Audio codec interfacing issue with NXP's i.mx6ULL EVK SAI3

Question asked by jaya b c on Jun 1, 2018
Latest reply on Jun 5, 2018 by igorpadykov

Dear Technical support team,


I am using NXP i.MX6ULL EVK with NXP's fsl-yocto-L4.9.11_1.0.0.tar yocto BSP's, and trying to interface with TLV320AIC3105 using SAI3 interface, as part of the initial audio codec bringup am unable to get the playback up but able to get MCLK, no BCLK and WCLK and no data, with SAI3 port being configured as I2S port to TLV320AIC3105 with I2C2 as the control interface.


For playback I am getting below errors.


root@imx6ull14x14evk:/# aplay a2002011001-e02-8kHz.wav
aic3x_hw_params(): unable to setup PLL
tlv320aic3x-codec 1-0018: ASoC: can't set tlv320aic3x-hifi hw params: -22
ALSA lib ../../../alsa-lib-1.1.2/src/pcm/pcm_direct.c:1054:(snd1_pcm_direct_initialize_slave) unable to install hw params
ALSA lib ../../../alsa-lib-1.1.2/src/pcm/pcm_dmix.c:1053:(snd_pcm_dmix_open) unable to initialize slave
aplay: main:805: audio open error: Invalid argument


So not sure why I am getting above errors during playback. I have attached my dts and machine driver code.


I am seeing below asrc configuration in dtsi file for SAI2 interface .
So could please guide me, can I use same below configuration for SAI3 interface or is there any change asrc configuration.


Please find below the DTS configurations:


 sound {
        compatible = "fsl,imx-audio-tlv320";
        model = "imx-tlv320";
        cpu-dai = <&sai3>;
        audio-codec = <&tlv320aic3105>;
        asrc-controller = <&asrc>;        
        gpr = <&gpr 4 0x200000 0x200000>;
        audio-routing =


                "Headphone Jack",    "HPLOUT",
                "Headphone Jack",    "HPROUT",
                "LINE1L",        "Mic Jack",
                "LINE2L",        "Mic Jack";


For &asrc is in dtsi is given as  


        asrc: asrc@02034000 {
                                        compatible = "fsl,imx53-asrc";
                                        reg = <0x02034000 0x4000>;
                                        interrupts = <GIC_SPI 50 IRQ_TYPE_LEVEL_HIGH>;
                                        clocks = <&clks IMX6UL_CLK_ASRC_IPG>,
                                                <&clks IMX6UL_CLK_ASRC_MEM>, <&clks 0>,
                                                <&clks 0>, <&clks 0>, <&clks 0>, <&clks 0>,
                                                <&clks 0>, <&clks 0>, <&clks 0>, <&clks 0>,
                                                <&clks 0>, <&clks 0>, <&clks 0>, <&clks 0>,
                                                <&clks IMX6UL_CLK_SPDIF>, <&clks 0>, <&clks 0>,
                                                <&clks IMX6UL_CLK_SPBA>;
                                        clock-names = "mem", "ipg", "asrck_0",
                                                "asrck_1", "asrck_2", "asrck_3", "asrck_4",
                                                "asrck_5", "asrck_6", "asrck_7", "asrck_8",
                                                "asrck_9", "asrck_a", "asrck_b", "asrck_c",
                                                "asrck_d", "asrck_e", "asrck_f", "spba";
                                        dmas = <&sdma 17 23 1>, <&sdma 18 23 1>, <&sdma 19 23 1>,
                                                <&sdma 20 23 1>, <&sdma 21 23 1>, <&sdma 22 23 1>;
                                        dma-names = "rxa", "rxb", "rxc",
                                                    "txa", "txb", "txc";
                                        fsl,asrc-rate  = <48000>;
                                        fsl,asrc-width = <16>;
                                        status = "okay";




Eagerly awaiting for your replies


Many Thanks in advance