|
本帖最后由 CONAN 于 2018-4-3 11:40 编辑
参照EK200开发板设计的底板,使用linux3.14.52+qt5的系统,音频使用wm8960。
1、内核编译选择了wm8960,去掉了wm8962;
2、 wm8960 在设备树里添加设备信息参考如下:
在 myimx6ek200.dtsi 中找到
codec: wm8962@1a {
compatible = "wlf,wm8962";
reg = <0x1a>;
clocks = <&clks 201>;
DCVDD-supply = <®_audio>;
DBVDD-supply = <®_audio>;
AVDD-supply = <®_audio>;
CPVDD-supply = <®_audio>;
MICVDD-supply = <®_audio>;
PLLVDD-supply = <®_audio>;
SPKVDD1-supply = <®_audio>;
SPKVDD2-supply = <®_audio>;
amic-mono;
gpio-cfg = <
0x0000 /* 0efault */
0x0000 /* 1efault */
0x0013 /* 2:FN_DMICCLK */
0x0000 /* 3efault */
0x8014 /* 4:FN_DMICCDAT */
0x0000 /* 5efault */
>;
};
修改为:
[color=inherit !important] codec: wm8960@1a {
compatible = "wlf,wm8960";
reg = <0x1a>;
clocks = <&clks 201>;
clock-names = "mclk";
wlf,shared-lrclk;
};
找到
sound {
compatible = "myzr,myimx6-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",
"MICBIAS", "AMIC",
"IN3R", "MICBIAS",
"DMIC", "MICBIAS",
"DMICDAT", "DMIC",
"CPU-Playback", "ASRC-Playback",
"layback", "CPU-Playback",
"ASRC-Capture", "CPU-Capture",
"CPU-Capture", "Capture";
mux-int-port = <2>;
mux-ext-port = <3>;
hp-det-gpios = <&gpio3 20 GPIO_ACTIVE_LOW>;
mic-det-gpios = <&gpio1 20 GPIO_ACTIVE_LOW>;
};
并修改为
sound {
compatible = "fsl,imx-audio-wm8960";
model = "wm8960-audio";
cpu-dai = <&ssi2>;
audio-codec = <&codec>;
asrc-controller = <&asrc>;
codec-master;
gpr = <&gpr>;
/*
* hp-det = <hp-det-pin hp-det-polarity>;
* hp-det-pin: JD1 JD2 or JD3
* hp-det-polarity = 0: hp detect high for headphone
* hp-det-polarity = 1: hp detect high for speaker
*/
hp-det = <3 0>;
hp-det-gpios = <&gpio3 20 0>;
audio-routing =
"Headset Jack", "HP_L",
"Headset Jack", "HP_R",
"Ext Spk", "SPK_LP",
"Ext Spk", "SPK_LN",
"Ext Spk", "SPK_RP",
"Ext Spk", "SPK_RN",
"LINPUT2", "Hp MIC",
"LINPUT3", "Hp MIC",
"RINPUT1", "Main MIC",
"RINPUT2", "Main MIC",
"Hp MIC", "MICB",
"Main MIC", "MICB",
"CPU-Playback", "ASRC-Playback",
"layback", "CPU-Playback",
"ASRC-Capture", "CPU-Capture",
"CPU-Capture", "Capture";
};
编译后,使用aplay、arecord命令,打印ASoC: HiFi startup failed: -16。
网上查看了相关的问题,都没有解决,请问有没有遇到相同情况的呀?
|
|