imx8mm RT5640 无声音输出

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

imx8mm RT5640 无声音输出

3,457 Views
liangyan
Contributor III

hi nxp

软件环境:

         imx8mm yocto sumo linux-4.14.98的内核,

问题:

       我使用ACL 5640 CODEC音频,安装imx-wm8960.c的方式,写了一份imx-rt5640.c的文件,使用aplay命令播放wav文件时,speaker无声音输出,请帮我查看一下问题。

imx-rt5640.c中的配置为CODEC做为slave, CPU做为master;

设置树节点配置为:

sound-rt5640 {
compatible = "fsl,imx-audio-rt5640";
model = "rt5640-audio";
audio-cpu = <&sai3>;
audio-codec = <&rt5640>;
audio-routing =
"Headphone Jack", "HPOL",
"Headphone Jack", "HPOR",
"Ext Spk", "SPORP",
"Ext Spk", "SPORN",
"Headset Jack", "MONOP",
"Headset Jack", "MONON",
"IN1P", "Mic Jack",
"IN1N", "Mic Jack",
"Headset Jack", "MICBIAS1",
"Headphone Jack", "MICBIAS1";
/*codec-master;*/
};
 
&sai3 {
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_sai3>;
assigned-clocks = <&clk IMX8MM_CLK_SAI3_SRC>,
<&clk IMX8MM_CLK_SAI3_DIV>;
assigned-clock-parents = <&clk IMX8MM_AUDIO_PLL2_OUT>;
assigned-clock-rates = <0>, <22579200>; //sample_rate = 41KHz
status = "okay";
};
 
&i2c3 {
clock-frequency = <100000>;
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_i2c3>;
status = "okay";

rt5640: rt5640@1c {
compatible = "realtek,rt5640";
#sound-dai-cells = <0>;
reg = <0x1c>;
clocks = <&clk IMX8MM_CLK_SAI3_ROOT>;
clock-names = "mclk";
realtek,in1-differential = "true";
realtek,in2-differential = "false";
realtek,in3-differential = "true";
status = "okay";
};
};
 
0 Kudos
Reply
3 Replies

3,448 Views
jimmychan
NXP TechSupport
NXP TechSupport

Attached is the user's guide for your reference.

Please refer to the chapter 7.4 to check the sound card is in the list or not.

Also, you may use alsamixer command to adjust the volume and turn on some switches (depends your audio codec driver).

0 Kudos
Reply

3,437 Views
liangyan
Contributor III

hi:

我验证了,如果我用amixer将音频路径打开是可以播放的,但是驱动默认都是不打开的,我需要在应用层的asound.conf文件中配置什么吗?

0 Kudos
Reply

3,430 Views
jimmychan
NXP TechSupport
NXP TechSupport

Yes, you can modify the codec driver to fix it. Or you can run the amixer commands in the boot up script when boot up.

0 Kudos
Reply