This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

TLV320AIC3104: about DMA control

Part Number: TLV320AIC3104

Now I use TLV320AIC3104 in imx8mm,because imx8mm's DMA isn't opend,when i use aplay commond ,the log is down

root@imx8qxpmek:~# aplay --device default:CARD=imx8mmevkcodec Front_Right.wav
Playing WAVE 'Front_Right.wav' : [ 7169.215073] tlv320aic3x-codec 1-001b: Unable to sync registers 0x3-0x3. -6
Signed 16 bit Little Endian, Rate 48000 Hz, Mono
[ 7169.278333] imx-sdma 302c0000.dma-controller: sdma firmware not ready!
aplay: pcm_write:2061: write error: Cannot allocate memory

So I want to ask must the TLV320AIC3104 need the DMA control?

  • Hi Zhang,

    It's not clear what the issue is, the TLV320AIC3104 itself has nothing to do with DMA controller. It appears this is something related to a driver, do you have information about what driver is used, is it a TI driver?

    Brian

  • Hi Brian

    I have solved this problem,I opened the DMA controller.The kernel version is 4.14.98 was used in NXP imx8mm board,

    Now I have a new problem ,

    it seems that it has something wrong with the sync clock,When I use aplay to dispaly the vocie .the mclk output is normal ,but it has nothing output with the sync clock(BCLK),the message  is :

    root@imx8mmevk:~# aplay Front_Right.wav
    Playing WAVE 'Front_Right.wav' : [ 501.493379] tlv320aic3xx[1067] params_rate(params)= 48000
    Signed 16 bit Little Endian, Rate[ 501.500959] tlv320aic3xx[1069] fsref= 48000
    48000 Hz, Mono
    [ 501.508073] tlv320aic3xx[1072] aic3x->sysclk=24576000
    [ 501.514668] tlv320aic3xx[1079] pll_q=4
    [ 501.518531] tlv320aic3xx[1080] bypass_pll=1
    [ 501.523535] tlv320aic3x-codec 1-001b: Unable to sync registers 0x3-0x3. -6

    Could you please tell me how to solve this problem?

    The sound nod in device tree is 

    sound-tlv320aic3x {
            compatible = "simple-audio-card";
            simple-audio-card,name = "imx8mm-evk-codec";
            simple-audio-card,format = "i2s";
            simple-audio-card,bitclock-master = <&dailink0_master>;
            simple-audio-card,frame-master = <&dailink0_master>;
            // simple-audio-card,widgets =
            //  "Speaker", "External Speaker";
            // simple-audio-card,routing =
            //  "MIC_IN", "Microphone Jack",
            //  "External Speaker", "LINE_OUT";
            simple-audio-card,cpu {
                sound-dai = <&sai3>;            
            };
            dailink0_master: simple-audio-card,codec {
                sound-dai = <&tlv320aic3x>;
                //clocks = <12000000>;
                //clocks = <&tlv320aic3104_clock>;
                clocks = <&clk IMX8MM_CLK_SAI3>;
            };
        };
    &sai3 {
        pinctrl-names = "default";
        #sound-dai-cells = <0>;
        pinctrl-0 = <&pinctrl_sai3>;
        assigned-clocks = <&clk IMX8MM_CLK_SAI3>;
        assigned-clock-parents = <&clk IMX8MM_AUDIO_PLL1_OUT>;
        assigned-clock-rates = <24576000>;
        status = "okay";
    };
    &i2c2 {
        clock-frequency = <100000>;
        pinctrl-names = "default";
        pinctrl-0 = <&pinctrl_i2c2>;
        status = "okay";

        tlv320aic3xtlv320aic3x@1b {
            compatible = "ti,tlv320aic3104";
            #sound-dai-cells = <0>;
            reg = <0x1b>;
            reset-gpios = <&gpio4 28 GPIO_ACTIVE_HIGH>;
            status = "okay";
        };
    };
  • At the moment we are not able to support driver related queries