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.

TLV320DAC3100: Trying to play sound, got from codec "Unable to sync registers 0x1b-0x1b. -6"

Part Number: TLV320DAC3100

Hi,

We are using TLV320DAC3100 to play sound, together with imx8mn-ddr4 chip of NXP.

The sound card was detected by ALSA.

However I get these warnings:

# dmesg | grep -i tlv
...
[19647.08h.39m.34s.087] [    4.622645] tlv320aic31xx-codec 3-0018: 3-0018 supply HPVDD not found, using dummy regulator
[19647.08h.39m.34s.130] [    4.631175] tlv320aic31xx-codec 3-0018: 3-0018 supply SPRVDD not found, using dummy regulator
[19647.08h.39m.34s.130] [    4.639783] tlv320aic31xx-codec 3-0018: 3-0018 supply SPLVDD not found, using dummy regulator
[19647.08h.39m.34s.130] [    4.648361] tlv320aic31xx-codec 3-0018: 3-0018 supply AVDD not found, using dummy regulator
[19647.08h.39m.34s.130] [    4.656763] tlv320aic31xx-codec 3-0018: 3-0018 supply IOVDD not found, using dummy regulator
[19647.08h.39m.34s.130] [    4.665260] tlv320aic31xx-codec 3-0018: 3-0018 supply DVDD not found, using dummy regulator
[19647.08h.39m.34s.180] [    5.152043] asoc-simple-card sound-tlv320dac31: tlv320dac31xx-hifi <-> 30030000.sai mapping ok
[19647.08h.39m.34s.180] [    5.160681] asoc-simple-card sound-tlv320dac31: ASoC: no DMI vendor name!
[19647.08h.39m.34s.180] [    5.170311] tlv320aic31xx-codec 3-0018: Unable to sync registers 0x1b-0x1b. -6
[19647.08h.39m.34s.180] [    5.182315] tlv320aic31xx-codec 3-0018: Failed to restore cache: -6

[19647.08h.39m.16s.622] root@imx8mnddr4evk:~# dmesg | grep -i sai
[19647.08h.39m.28s.269] [    5.134587] debugfs: Directory '30030000.sai' with parent 'Audio Output' already present!
[19647.08h.39m.28s.295] [    5.152043] asoc-simple-card sound-tlv320dac31: tlv320dac31xx-hifi <-> 30030000.sai mapping ok


here is the output of aplay -L:

[19647.08h.29m.35s.440] null
[19647.08h.29m.35s.440]     Discard all samples (playback) or generate zero samples (capture)
[19647.08h.29m.35s.440] sysdefault:CARD=Output
[19647.08h.29m.35s.440]     Audio Output,
[19647.08h.29m.35s.440]     Default Audio Device

here is the related sections in dts file:

...
sound-tlv320dac31 {
compatible = "simple-audio-card";
simple-audio-card,name = "Audio Output";
simple-audio-card,format = "i2s";
simple-audio-card,bitclock-master = <&sound_codec>;
simple-audio-card,frame-master = <&sound_codec>;
simple-audio-card,widgets = "Headphone", "Headphone Jack";
simple-audio-card,routing =
"Headphone Jack", "HPL",
"Headphone Jack", "HPR";

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

sound_codec: simple-audio-card,codec {
sound-dai = <&tlv320aic31xx>;
system-clock-frequency = <12000000>; /* this matches sai3 */
};
};
&i2c4 {
clock-frequency = <400000>;
pinctrl-names = "default", "gpio";
pinctrl-0 = <&pinctrl_i2c4>;
pinctrl-1 = <&pinctrl_i2c4_gpio>;
scl-gpios = <&gpio5 20 GPIO_ACTIVE_HIGH>;
sda-gpios = <&gpio5 21 GPIO_ACTIVE_HIGH>;
status = "okay";

tlv320aic31xx: tlv320aic31xx@18 {
#sound-dai-cells = <0>;
compatible = "ti,tlv320dac3100";
reg = <0x18>;

reset-gpios = <&gpio4 29 GPIO_ACTIVE_LOW>;
};
};
pinctrl_i2c4: i2c4grp {
fsl,pins = <
MX8MN_IOMUXC_I2C4_SCL_I2C4_SCL 0x400001c3
MX8MN_IOMUXC_I2C4_SDA_I2C4_SDA 0x400001c3
>;
};
pinctrl_i2c4_gpio: i2c4grp-gpio {
fsl,pins = <
MX8MN_IOMUXC_I2C4_SCL_GPIO5_IO20 0x1c3
MX8MN_IOMUXC_I2C4_SDA_GPIO5_IO21 0x1c3
>;
};
pinctrl_sai3: sai3grp {
fsl,pins = <
MX8MN_IOMUXC_SAI3_TXFS_SAI3_TX_SYNC 0xd6
MX8MN_IOMUXC_SAI3_TXC_SAI3_TX_BCLK 0xd6
MX8MN_IOMUXC_SAI3_MCLK_SAI3_MCLK 0xd6
MX8MN_IOMUXC_SAI3_TXD_SAI3_TX_DATA0 0xd6
>;
};
&sai3 {
#sound-dai-cells = <0>;
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_sai3>;
assigned-clocks = <&clk IMX8MN_CLK_SAI3>;
assigned-clock-parents = <&clk IMX8MN_AUDIO_PLL1_OUT>;
assigned-clock-rates = <12000000>;
clocks = <&clk IMX8MN_CLK_SAI3_IPG>, <&clk IMX8MN_CLK_DUMMY>,
<&clk IMX8MN_CLK_SAI3_ROOT>, <&clk IMX8MN_CLK_DUMMY>,
<&clk IMX8MN_CLK_DUMMY>, <&clk IMX8MN_AUDIO_PLL1_OUT>,
<&clk IMX8MN_AUDIO_PLL2_OUT>;
clock-names = "bus", "mclk0", "mclk1", "mclk2", "mclk3", "pll8k", "pll11k";
fsl,sai-asynchronous;
status = "okay";
};