关于imx6上的wm8962断电5分钟以上再重启系统,出现Speaker声音失真的问题

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

关于imx6上的wm8962断电5分钟以上再重启系统,出现Speaker声音失真的问题

1,448 Views
hertzzhang
Contributor I
硬件:
      cpu: imx6-dl
      codec: wm8962
系统:
uboot:2016.03
kernel:4.1.15
rootfs:Android6.0.1
现象:
imx6上的wm8962断电5分钟以上再重启系统,出现Speaker声音失真;若是断电后在较短时间(2min)内重新开机,Speaker声音基本没有出现过失真状况。确定MCLK/XTI时钟是24MHz,但是当声音失真时用示波器表笔点击该时钟输入线几次,声音就会恢复正常。请问技术大神们,这大概是什么问题导致的?有什么排查解决的思路?看上去有点像硬件的问题。
或者您可以将音频相关的设备树配置给我参考一下,下面是我的设备树配置:
$ vi kernel_imx\arch\arm\boot\dts\imx6qdl-sabresd.dtsi
&i2c1 {
clock-frequency = <100000>;
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_i2c1>;
status = "okay";
codec: wm8962@1a {
compatible = "wlf,wm8962";
reg = <0x1a>;
clocks = <&clks IMX6QDL_CLK_CKO>;
DCVDD-supply = <&reg_audio>;
DBVDD-supply = <&reg_audio>;
AVDD-supply = <&reg_audio>;
CPVDD-supply = <&reg_audio>;
MICVDD-supply = <&reg_audio>;
PLLVDD-supply = <&reg_audio>;
SPKVDD1-supply = <&reg_audio>;
SPKVDD2-supply = <&reg_audio>;
spk-mono;
amic-mono;
gpio-cfg = <
0x0000 /* 0:Default */
0x0000 /* 1:Default */
0x0013 /* 2:FN_DMICCLK */
0x0000 /* 3:Default */
0x8014 /* 4:FN_DMICCDAT */
0x0000 /* 5:Default */
>;
};
};
regulators {
compatible = "simple-bus";
#address-cells = <1>;
#size-cells = <0>;
reg_audio: regulator@2 {
compatible = "regulator-fixed";
reg = <2>;
regulator-name = "wm8962-supply";
gpio = <&gpio4 10 0>;
enable-active-high;
};
sound {
compatible = "fsl,imx6q-sabresd-wm8962",
"fsl,imx-audio-wm8962";
model = "wm8962-audio";
cpu-dai = <&ssi2>;
audio-codec = <&codec>;
asrc-controller = <&asrc>;
audio-routing =
"Headphone Jack", "HPOUTL",
"Headphone Jack", "HPOUTR",
"Ext Spk", "SPKOUTL",
"Ext Spk", "SPKOUTR",
"AMIC", "MICBIAS",
"IN3R", "AMIC",
"DMIC", "MICBIAS",
"DMICDAT", "DMIC",
"CPU-Playback", "ASRC-Playback",
"Playback", "CPU-Playback",
"ASRC-Capture", "CPU-Capture",
"CPU-Capture", "Capture";
mux-int-port = <2>;
mux-ext-port = <3>;
codec-master;
hp-det-gpios = <&gpio7 8 1>;
mic-det-gpios = <&gpio1 9 1>;
};
$ vi kernel_imx\include\dt-bindings\clock\imx6qdl-clock.h
#define IMX6QDL_CLK_CKO 201
$ vi kernel_imx\arch\arm\boot\dts\imx6qdl.dtsi
clks: ccm@020c4000 {
compatible = "fsl,imx6q-ccm";
reg = <0x020c4000 0x4000>;
interrupts = <0 87 IRQ_TYPE_LEVEL_HIGH>,
<0 88 IRQ_TYPE_LEVEL_HIGH>;
#clock-cells = <1>;
};
谢谢!
Labels (3)
0 Kudos
5 Replies

1,057 Views
xuyuanzhi
Contributor I

请问这个问题是否已解决?我有块板子也遇到相同问题。

0 Kudos

1,057 Views
zhengmero
Contributor I

这个问题解决了吗,我也碰到了同样的问题。

0 Kudos

1,057 Views
jimmychan
NXP TechSupport
NXP TechSupport

how many boards have this issue?

please check the signal integrity of MCLK.

is there a cap. connected in between clock and ground? what is the value?

if possible, could you send me the schematic of wm8962 part of your board?

0 Kudos

1,057 Views
hertzzhang
Contributor I

几乎每块板子都会有这个问题。

MCLK用示波器看了是24MHz,波形还算好,但是没有眼图测试仪器。

部分原理图如下:pastedImage_1.png

0 Kudos

1,057 Views
weidong_sun
NXP TechSupport
NXP TechSupport

Hello Hertz,

    2 suggestions for your debugging the part.

(1) clock source code

In "linux/drivers/clk/imx/clk-imx6q.c "

/* * Let's initially set up CLKO with OSC24M, since
this configuration * is widely used by imx6q board designs to clock audio
codec. */

...
imx_clk_set_parent(clk[IMX6QDL_CLK_CKO2_SEL], clk[IMX6QDL_CLK_OSC]);

imx_clk_set_parent(clk[IMX6QDL_CLK_CKO], clk[IMX6QDL_CLK_CKO2]);
clk_set_rate(clk[IMX6QDL_CLK_CKO], 24000000); // add this line, please!

...

Then power on board, test audio.

(2) Remove R266 & Populate "Y3/R268/C279/C280" (断开 U23,把24MHz晶体焊上去)

Then power on board, test audio.

【Note】

      I feel there are some issues with U23, so do above test, please!

Have a nice day.

0 Kudos