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.

TLV320DAC3203: linux tlv320dac3203 not output

Part Number: TLV320DAC3203

Tool/software:

Hi, teams,

I test MCLK clk 12.288Mhz, BCLK clk 3Mhz, WCLK clk 48khz,the DIN input has signal, but  tlv320dac3203 not sound output,  the HPR/L has not signal, the driver used linux sound/soc/codecs/tlv320aic32x4.c,i2c dump as below, hwo to setting for this codec in the tlv320aic32x4.c driver? thanks

~# cat /proc/asound/cards

0 [titlv320aic32x4]: ti_tlv320aic32x - ti,tlv320aic32x4

                      ti,tlv320aic32x4

  • Hi,

    From your register dump, I notice a few issues - first, PLL is powered down but the input clock to the device is the output of the PLL, and second is that the DAC and headphone outputs are powered down. What are you doing to configure your device with the driver? Are you using alsa, do you have a dts file? You could fix this with register writes as well.

    Here is my commented register dump with the relevant lines:

    04 03 #pll clk is codec_clkin, mclk is input to pll
    05 11 #pll powered down, r=1. if PLL is powered up, the next few lines are fine. change to 0x91
    06 08 #j=8
    0b 08 #ndac=8
    0c 02 #mdac=2
    0e 80 #dosr=128
    14 80 #aosr=128
    1a 01 #clkout powered down
    1b 00 #i2s, 16 bit, bcflk and wclk input to device
    1d 01 #bdiv_clkin=dac_mod_clk
    1e 04 #bclk n div powered down
    25 00 #L+r dac powered down, l+r hp powered down
    35 12 #bus keeper enabled, mfp2 is pasi dout (default)
    36 03 #din is pasi input, or dig mic, or gp clock in
    3c 01 #dac prb_p1 (default)
    3d 01 #adc prb_r1 (default)
    3f 14 #L+R DAC POWERED DOWN! set to 0xd4 instead
    40 0c #L+R DAC MUTED! set to 0x00 instead
    41 d8 #l dac digital volume control set to 1101 1000 -> -20dB
    42 d8 #r dac digital volume control set to 1101 1000 -> -20dB
    44 6f #l+r drc enabled, default threshold and hysteresis
    45 38 #default drc hold time
    50 00 #l+r adc powered down

    Best,
    Mir

  • Hi Jeffres,

        In my understanding,there configure will to do by the driver(same as DAC/hp power on), what modify that let driver do it? I used the alsa driver.

    [ 5.906674] ALSA device list:
    [ 5.906679] #0: ti,tlv320aic32x4

    / {

        i2s0_sound: i2s0-sound {
            status = "okay";
            compatible = "simple-audio-card";
            simple-audio-card,format = "i2s";
            simple-audio-card,mclk-fs = <256>;
            simple-audio-card,name = "ti,tlv320aic32x4";
            simple-audio-card,dai-link@0 {
                format = "i2s";
                cpu {
                    sound-dai = <&i2s0_8ch>;
                };
                codec {
                    sound-dai = <&tlv320aic32x4>;
                };
            };
        };
    };
    &i2c1 {
        status = "okay";
        pinctrl-names = "default";
        pinctrl-0 = <&i2c1m2_xfer>;

        tlv320aic32x4: audio-codec@18 {
            status = "okay";
            compatible = "ti,tlv320aic32x4";
            reg = <0x18>;
            #sound-dai-cells = <0>;
            clocks = <&mclkout_i2s0>;
            clock-names = "mclk";
            assigned-clocks = <&mclkout_i2s0>;
            assigned-clock-rates = <12288000>;
            pinctrl-names = "default";
            pinctrl-0 = <&i2s0_mclk>;

            ldoin-supply = <&reg_audio_3v3>;
            iov-supply = <&reg_audio_1v8>;
            dv-supply = <&reg_audio_1v8>;
            av-supply = <&reg_audio_1v8>;

            reset-gpios = <&gpio2 RK_PC5 GPIO_ACTIVE_LOW>;
        };
    };

        

  • Hi,

    You may want to use alsamixer, it is a GUI that will show all the parameters that you can change with ALSA. This is how I would recommend you begin to route the outputs from the DAC to the headphone out. Then, you can add the dapm_route properties to your DTS file. If the PLL is still not turning on automatically can you check if the PLL on is a setting in alsamixer as well?

    Best,
    Mir

  • Hi Jeffres,

    How to add the dapm_route properties to the DTS file? How to setup the PLL turn on automaticaly in the driver, not in alsamixer?

  • Hi,

    You can set dapm_route according to the driver, please check other forum posts for examples. It looks like the PLL turns on when the bias level is set in the driver. It may turn on when you start recording/playback, did you do this reg dump not during record/playback?

    -Mir

  • Hi Jeffres,

      as a examples, if I want set "HP DAC Playback" default on, how to setup in the driver?

      thanks

  • Hi,

    You would set it in the DTS file with "widgets" and "routing", I would suggest you look at other forum posts where people put their DTS configuration. I cannot help too much with the config itself, just if you have problems with the device or specific errors I can look deeper. Here's a forum post where they put their dts: https://e2e.ti.com/support/audio-group/audio/f/audio-forum/682188/linux-tlv320aic3254-tlv320aic3254-linux-driver

    This is where in the driver code you will find the routing options that you can put in your dts.

    Best,
    Mir