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.

PROCESSOR-SDK-AM62X: Some problems with codec

Part Number: PROCESSOR-SDK-AM62X

In ti-processor-sdk-linux-rt-am62xx-evm-10.01.10.04,I want to use the CJC8990 as the audio codec on the AM62X chip, but the following error occurred when I was using it.


:~#aplay -l
**** List of PLAYBACK Hardware Devices ****
card 0: cjc8990hifi [cjc8990-hifi],device 0: 2b10000.audio-controller-cjc8990-hifi cjc8990-hifi-0 [2b10000.audio-controller-cjc8990-hifi cjc8990-hifi-0]
Subdevices: 1/1
Subdevice #0: subdevice #0
:~##speaker-test -c 2 -t wav

speaker-test 1.2.11

Playback device is default
Stream parameters are 48000Hz, S16_LE, 2 channels WAV file(s)
Rate set to 48000Hz (requested 48000Hz)
Buffer size range from 16 to 131072
Period size range from 8 to 16384
Periods = 4
was set period_size = 12000
was set bufer_size = 48000
0 - Front Left
Write error: -5,Input/output error
xrun_recovery failed: -5,Input/output error
Transfer failed:Input/output error


My dts configuration is as follows:

main_macsp1_pins_default: main-mcasp1-default-pins {
    pinctrl-single,pins = <
        AM62X_IOPAD(0x0124, PIN_OUTPUT, 1)
        AM62X_IOPAD(0x0128, PIN_OUTPUT, 1)
        AM62X_IOPAD(0x0114, PIN_OUTPUT, 1)
        AM62X_IOPAD(0x010c, PIN_INPUT, 1)
    >;
};

cjc8990_mclk: clk-0 {
    #clock-cells = <0>;
    compatible = "fixed-clock";
    clock-frequency = <12288000>;
};

codec-audio: sound {
    compatible = "simple-audio-card";
    simple-audio-card,name = "cjc8990-hifi";
    simple-audio-card,widgets =
    "Headphone", "Headphone Jack",
    "Line", "Line In",
    "Microphone", "Microphone Jack";
    simple-audio-card,routing =
    "Headphone Jack", "LOUT1",
    "Headphone Jack", "ROUT1",
    "LINPUT1", "Line In",
    "LINPUT2", "Line In",
    "Microphone Jack", "Mic Bias";
    simple-audio-card,format = "i2s";
    simple-audio-card,bitclock-master = <&sound_master>;
    simple-audio-card,frame-master = <&sound_master>;
    simple-audio-card,bitclock-inversion;

    simple-audio-card,cpu {
        sound-dai = <&mcasp1>;
    };

    sound_master: simple-audio-card,codec {
        sound-dai = <&cjc8990>;
        clocks = <&cjc8990_mclk>;
    };
};

&main_i2c0 {
    status = "okay";
    clock-frequency = <100000>;
    
    rtc0: rtc-pcf8563@51 {
        compatible = "nxp,pcf8563";
        reg = <0x51>;
        #clock-cells = <0>;
    };

    cjc8990: audio-codec@1b {
        #sound-dai-cells = <0>;
        compatible = "cjc8990";
        reg = <0x1b>;
        clocks = <&cjc8990_mclk>;
        clock-names = "mclk";
        ai3x-micbias-vg = <1>;
        AVDD-supply = <&vcc_3v3_sys>;
        IOVDD-supply = <&vcc_3v3_sys>;
        DRVDD-supply = <&vcc_3v3_sys>;
    };
};

&mcasp1 {
    status = "okay";
    #sound-dai-cells = <0>;
    
    pinctrl-names = "default";
    pinctrl-0 = <&main_mcasp1_pns_default>;
    
    op-mode = <0>;
    tdm-slots = <2>;

    serial-dir = <
        1 0 2 0
        0 0 0 0
        0 0 0 0
        0 0 0 0
    >;
    tx-num-evt = <0>;
    rx-num-evt = <0>;
};


Please tell me how I should deal with this problem so that I can use the cjc8990 codec chip normally.