平台: am335x tlv320aic3106 购买的开发板
kernel: linux-3.12.10
以前在linux3.2上面是没有问题的, 现在移植到3.12上面无法录音。 edma也已经注册。 不好意思 图传不上来
我只有文字描述了:
CPU <—————–> tlv320aic3106
外部12M 晶振 <———-> MCLK
MCASP0_FSR. MCASP1_FSX <——–> WCLK
MCASP0_ACLKR. MCASP1_ACLKX <——–> BCLK
MCASP0_AXR1, MCASP1_AXR0 <———-> DIN
MCASP0_AHCLKX. MCASP1_AXR1 <——-> DOUT
HPROUT———————–| HEADPHONE
HPLOUT————————|
MICBIAS- LINE2LP———————> MIC
LINE1LP LINE1RP———–> LINE IN
在3.2上面是在line in上面测试录音
arecord -d 10 -f cd -t wav foobar.wav
在3.12上面 line in 和mic 都测试过 录音的时候不报错 用aplay播放 foobar.wav没有声音 同样不报错
mcasp1_pins: mcasp1_pins {
pinctrl-single,pins = <
0x1A4 (PIN_INPUT_PULLDOWN | MUX_MODE3) /* mii1_crs.mcasp1_aclkx */
0x1A0 (PIN_INPUT_PULLDOWN | MUX_MODE3) /* mii1_rxerr.mcasp1_fsx */
0x1A8 (PIN_OUTPUT_PULLDOWN | MUX_MODE3) /* mii1_col.mcasp1_axr2 */
0x1AC (PIN_INPUT_PULLDOWN | MUX_MODE3) /* rmii1_ref_clk.mcasp1_axr3 */
>;
};
mcasp1_sleep_pins: mcasp1_sleep_pins {
pinctrl-single,pins = <
0x1A4 (PIN_INPUT_PULLDOWN | MUX_MODE7)
0x1A0 (PIN_INPUT_PULLDOWN | MUX_MODE7)
0x1A8 (PIN_INPUT_PULLDOWN | MUX_MODE7)
0x1AC (PIN_INPUT_PULLDOWN | MUX_MODE7)
>;
};
i2c1: i2c@4802a000 {
pinctrl-names = "default";
pinctrl-0 = <&i2c1_pins>;
status = "okay";
clock-frequency = <100000>;
tlv320aic3106: tlv320aic3106@1b {
compatible = "ti,tlv320aic3106";
reg = <0x1b>;
status = "okay";
/* Regulators */
AVDD-supply = <&ldo4_reg>;
IOVDD-supply = <&ldo4_reg>;
DRVDD-supply = <&ldo4_reg>;
DVDD-supply = <&ldo3_reg>;
};
};
sound {
compatible = "ti,da830-evm-audio";
ti,model = "AM335x-EVM";
ti,audio-codec = <&tlv320aic3106>;
ti,mcasp-controller = <&mcasp1>;
ti,codec-clock-rate = <12000000>;
ti,audio-routing =
"Headphone Jack", "HPLOUT",
"Headphone Jack", "HPROUT",
"LINE1L", "Line In",
"LINE1R", "Line In";
};
#include "tps65217.dtsi"
&mcasp1 {
pinctrl-names = "default", "sleep";
pinctrl-0 = <&mcasp1_pins>;
pinctrl-1 = <&mcasp1_sleep_pins>;
status = "okay";
op-mode = <0>; /* MCASP_IIS_MODE */
tdm-slots = <2>;
/* 16 serializer */
serial-dir = < /* 0: INACTIVE, 1: TX, 2: RX */
1 2 0 0
>;
tx-num-evt = <32>;
rx-num-evt = <32>;
};
&tps {
regulators {
dcdc1_reg: regulator@0 {
/* +1.5V voltage with ±4% tolerance */
regulator-min-microvolt = <900000>;
regulator-max-microvolt = <1800000>;
regulator-boot-on;
regulator-always-on;
};
dcdc2_reg: regulator@1 {
/* VDD_MPU voltage limits 0.95V – 1.1V with ±4% tolerance */
regulator-name = "vdd_mpu";
regulator-min-microvolt = <900000>;
regulator-max-microvolt = <3300000>;
regulator-boot-on;
regulator-always-on;
};
dcdc3_reg: regulator@2 {
/* VDD_CORE voltage limits 0.95V – 1.1V with ±4% tolerance */
regulator-name = "vdd_core";
regulator-min-microvolt = <900000>;
regulator-max-microvolt = <1500000>;
regulator-boot-on;
regulator-always-on;
};
ldo1_reg: regulator@3 {
/* +1.8V voltage with ±4% tolerance */
regulator-min-microvolt = <1000000>;
regulator-max-microvolt = <3300000>;
regulator-boot-on;
regulator-always-on;
};
ldo2_reg: regulator@4 {
/* +3.3V voltage with ±4% tolerance */
regulator-min-microvolt = <900000>;
regulator-max-microvolt = <3300000>;
regulator-boot-on;
regulator-always-on;
};
ldo3_reg: regulator@5 {
/* +1.8V voltage with ±4% tolerance */
regulator-min-microvolt = <1800000>;
regulator-max-microvolt = <3300000>;
regulator-boot-on;
regulator-always-on;
};
ldo4_reg: regulator@6 {
/* +3.3V voltage with ±4% tolerance */
regulator-min-microvolt = <1800000>;
regulator-max-microvolt = <3300000>;
regulator-boot-on;
regulator-always-on;
};
};
};
i2cdump -f -y 1 0x1b
No size specified (using byte-data access)
0 1 2 3 4 5 6 7 8 9 a b c d e f 0123456789abcdef
00: 00 00 00 10 04 00 00 00 00 00 00 01 00 00 00 80 …??……?…?
10: 80 ff ff 78 78 78 78 78 78 06 00 fe 00 00 fe 00 ?..xxxxxx?.?..?.
20: 00 00 00 00 00 00 00 00 00 00 00 80 80 00 00 00 ………..??…
30: 00 00 00 04 00 00 00 00 00 00 04 00 00 00 00 00 …?……?…..
40: 00 04 00 00 00 00 00 00 04 00 00 00 00 00 00 00 .?……?…….
50: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 …………….
60: 00 00 00 00 00 c0 02 00 00 00 00 00 00 00 00 00 …..??………
70: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 …………….
80: 00 00 00 10 04 00 00 00 00 00 00 01 00 00 00 80 …??……?…?
90: 80 ff ff 78 78 78 78 78 78 06 00 fe 00 00 fe 00 ?..xxxxxx?.?..?.
a0: 00 00 00 00 00 00 00 00 00 00 00 80 80 00 00 00 ………..??…
b0: 00 00 00 04 00 00 00 00 00 00 04 00 00 00 00 00 …?……?…..
c0: 00 04 00 00 00 00 00 00 04 00 00 00 00 00 00 00 .?……?…….
d0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 …………….
e0: 00 00 00 00 00 c0 02 00 00 00 00 00 00 00 00 00 …..??………
f0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 …………….
尝试强制把下面的寄存器powerup起来 似乎也不奏效
/* Line1 Input control registers */
#define LINE1L_2_LADC_CTRL 19
#define LINE1R_2_LADC_CTRL 21
#define LINE1R_2_RADC_CTRL 22
#define LINE1L_2_RADC_CTRL 24
/* Line2 Input control registers */
#define LINE2L_2_LADC_CTRL 20
#define LINE2R_2_RADC_CTRL 23
jd.f:
帖子都沉了 有没有解决方法
Grisham Han:
回复 jd.f:
遇到了同样的问题,请问micbias是怎么解决的?我在dts中增加了
ai3x-micbias-vg = <3>;但是没有效果,强行i2cset 0x19寄存器,一播放或者录音那个寄存器就又清零了