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.

[参考译文] TLV320AIC3110:寄存器复位时出错、16 (器件或资源繁忙)

Guru**** 1740850 points
Other Parts Discussed in Thread: TLV320AIC3110
请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

https://e2e.ti.com/support/audio-group/audio/f/audio-forum/1325276/tlv320aic3110-error-resetting-registers-and-error-16-device-or-resource-busy

器件型号:TLV320AIC3110

您好!

我的 tlv320aic3110编解码器存在问题。 我在嵌入式器件启动时收到以下两个错误:

[   10.079068] tlv320aic31xx-codec 0-0018: Unable to sync registers 0x1d-0x1d. -6
[   10.161668] tlv320aic31xx-codec 0-0018: Failed to restore cache: -6

根据数据表、0x1d 可以是"表7-69。 页0/寄存器29 (0x1D):编解码器接口控制2"或"表7-136。 页1/寄存器1 (0x01)到页1/寄存器29 (0x1D):保留"。

大约一分钟后、也会出现以下错误:

[   66.858820] tlv320aic31xx-codec 0-0018: ASoC: error at snd_soc_component_update_bits on tlv320aic31xx-codec.0-0018: -16
[   66.943057] tlv320aic31xx-codec 0-0018: ASoC: error at snd_soc_component_update_bits on tlv320aic31xx-codec.0-0018: -16
[   67.092200] tlv320aic31xx-codec 0-0018: ASoC: POST_PMU: HPL Driver event failed: -16
[   67.383700] tlv320aic31xx-codec 0-0018: ASoC: error at soc_component_read_no_lock on tlv320aic31xx-codec.0-0018: -16
[   67.482291] tlv320aic31xx-codec 0-0018: ASoC: error at soc_component_read_no_lock on tlv320aic31xx-codec.0-0018: -16
[   67.545386] tlv320aic31xx-codec 0-0018: ASoC: POST_PMU: SPL ClassD event failed: -16
[   67.823211] tlv320aic31xx-codec 0-0018: ASoC: error at soc_component_read_no_lock on tlv320aic31xx-codec.0-0018: -16
[   67.895536] tlv320aic31xx-codec 0-0018: ASoC: error at soc_component_read_no_lock on tlv320aic31xx-codec.0-0018: -16

最后、在暂停/恢复之后、我遇到最后这些错误:

[ 5981.210062] tlv320aic31xx-codec 0-0018: ASoC: POST_PMD: HPL Driver event failed: -16
[ 5981.210103] tlv320aic31xx-codec 0-0018: ASoC: POST_PMD: SPL ClassD event failed: -16
[ 5981.210170] v1v8_ao: Underflow of regulator enable count
[ 5981.210184] Failed to disable DVDD: -EINVAL
[ 5981.223267] tlv320aic31xx-codec 0-0018: Unable to sync registers 0x1d-0x1d. -6
[ 5981.223303] tlv320aic31xx-codec 0-0018: Failed to restore cache: -6
[ 5981.233551] tlv320aic31xx-codec 0-0018: aic31xx_wait_bits: Failed! 0x25 was 0xc1855ddb expected 0x20 (-16, 0x20, 0 us)
[ 5981.233591] tlv320aic31xx-codec 0-0018: ASoC: POST_PMU: HPL Driver event failed: -1
[ 5981.233669] tlv320aic31xx-codec 0-0018: ASoC: POST_PMU: SPL ClassD event failed: -16

以下是我们的器件树的所有相关部分:

/ {
	sound0: sound@0 {
		compatible = "simple-audio-card";
		simple-audio-card,name = "Sound";
		simple-audio-card,widgets =
			"Microphone", "Microphone Jack",
			"Headphone", "Headphone Jack",
			"Speaker", "Speaker";
		simple-audio-card,routing =
			"MIC1LP", "Microphone Jack",
			"MIC1RP", "Microphone Jack",
			"MIC1LP", "MICBIAS",
			"MIC1RP", "MICBIAS",
			"Headphone Jack", "HPL",
			"Headphone Jack", "HPR",
			"Speaker", "SPL",
			"Speaker", "SPR";
		simple-audio-card,format = "i2s";
		simple-audio-card,bitclock-master = <&sound0_master>;
		simple-audio-card,frame-master = <&sound0_master>;
		simple-audio-card,bitclock-inversion;
		simple-audio-card,convert-rate = <48000>;

		sound0_master: simple-audio-card,cpu {
			sound-dai = <&i2s1>;
			system-clock-frequency = <12000000>;
		};

		simple-audio-card,codec {
			sound-dai = <&codec>;
			system-clock-frequency = <12000000>;
		};
	};
};

&pinctrl {
	codec_pins_a: codec_pins_a {
		pins1 {
			pinmux = <STM32_PINMUX('H', 2, GPIO)>; /* AUDIO_PWR_EN1 */
		};

		pins2 {
			pinmux = <STM32_PINMUX('C', 0, AF6)>,	/* CODEC_I2S1_SDO */
					 <STM32_PINMUX('A', 6, AF5)>,	/* CODEC_I2S1_SDI */
					 <STM32_PINMUX('B', 1, AF5)>,	/* CODEC_I2S1_BITCLK / I2S1_CK */
					 <STM32_PINMUX('B', 0, AF5)>,	/* I2S1_MCK */
					 <STM32_PINMUX('A', 4, AF5)>;	/* CODEC_I2S1_WORDCLK / I2S1_WS */
		};
	};

	codec_sleep_pins_a: codec_sleep_pins_a {
		pins {
			pinmux = <STM32_PINMUX('H', 2, ANALOG)>,	/* AUDIO_PWR_EN1 */
					 <STM32_PINMUX('C', 0, ANALOG)>,	/* CODEC_I2S1_SDO */
					 <STM32_PINMUX('A', 6, ANALOG)>,	/* CODEC_I2S1_SDI */
					 <STM32_PINMUX('B', 1, ANALOG)>,	/* CODEC_I2S1_BITCLK / I2S1_CK */
					 <STM32_PINMUX('B', 0, ANALOG)>,	/* I2S1_MCK */
					 <STM32_PINMUX('A', 4, ANALOG)>;	/* CODEC_I2S1_WORDCLK / I2S1_WS */
		};
	};
};

&i2s1 {
	status = "okay";
	pinctrl-names =  "default", "sleep";
	pinctrl-0 = <&codec_pins_a>;
	pinctrl-1 = <&codec_sleep_pins_a>;	/* Sleep pins */

	clock-names = "pclk", "i2sclk", "x8k", "x11k";
	clocks = <&rcc SPI1>,
			 <&rcc SPI1_K>,
			 <&scmi_clk CK_SCMI_PLL3_Q>,
			 <&scmi_clk CK_SCMI_PLL3_R>;
};

&i2c1 {
	pinctrl-names = "default", "sleep";
	pinctrl-0 = <&i2c1_pins_a>;
	pinctrl-1 = <&i2c1_sleep_pins_a>;
	i2c-scl-rising-time-ns = <96>;
	i2c-scl-falling-time-ns = <3>;
	clock-frequency = <100000>;
	status = "okay";
	/* spare dmas for other usage */
	/delete-property/dmas;
	/delete-property/dma-names;

	codec: codec@18 {
		compatible = "ti,tlv320aic3110";
		reg = <0x18>;
		#sound-dai-cells = <0>;
		status = "okay";

		reset-gpios = <&gpiof 6 (GPIO_ACTIVE_LOW | GPIO_OPEN_DRAIN)>;

		ai31xx-micbias-vg = <MICBIAS_2_0V>;

		/* Regulators */
		HPVDD-supply = <&scmi_v3v3_sw>;	/* 3V3_CODEC */
		SPRVDD-supply = <&v5v0_ao>;	/* 5V0_CODEC */
		SPLVDD-supply = <&v5v0_ao>;	/* 5V0_CODEC */
		AVDD-supply = <&scmi_v3v3_sw>;	/* 3V3_CODEC */
		IOVDD-supply = <&scmi_v3v3_sw>;	/* 3V3_CODEC */
		DVDD-supply = <&scmi_v1v8_periph>;	/* 1V8_CODEC */
	};
};

几天来,我一直在努力寻找解决方案,但我一直未能找到任何重要的东西。 我可以做些什么或许能够更接近这些错误的根本原因吗? 有人以前见过这样的东西吗?

如果您需要我提供的任何其他有用信息、请告诉我。

提前感谢!

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

    您好!

    错误-16对应于 设备或资源繁忙、 是否有其他设备占用此 i2c 端口? 此问题似乎仅与 i2c 器件有关。 您可以进行一些尝试、例如向系统添加日志以找出 i2c 异常的原因。

    谢谢