Hi TI:
目前项目急,等着试产。目前使用的型号是TLV320DAC3203,目前I2C是上拉到3.3V,I2C能正常访问,但是现在问题是耳机声音没有出来,下面我描述一下具体的情况,
请帮忙分析下,感谢!能否给一个TLV320DAC3203的底层驱动代码呢?
平台:RK3399, Android 9.0
内核:Linux 4.4.167
原理图:
软件配置:
DTS:
驱动使用的是tlv320aic32x4.c驱动(TI上的一些回复是说tlv320aic32x4驱动同时也能兼容tlv320dac3203,所以用这个驱动)
播放音频方法: 用下面tinyplay命令播放音频文件,用示波器量HPL和HPR引脚,没有波形出来
console:/data # tinyplay /sdcard/001.wav -D 1
Playing sample: 2 ch, 44100 hz, 16 bit
示波器量时钟:
LRCLK: 44.1KHZ
BCLK:2.82MHZ
MCLK:11.25MHZ
下面是寄存器和声卡信息:
1|console:/data # ./i2cdump -f -y 1 0x18
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 10 00 03 91 07 14 90 00 00 82 88 00 80 02 ..?.?????..??.??
10: 00 08 02 08 80 01 00 04 00 00 01 00 00 01 04 00 .?????.?..?..??.
20: 00 00 00 00 00 22 11 00 00 00 00 00 00 00 00 00 ....."?.........
30: 00 00 00 00 00 12 03 02 02 00 00 00 08 01 00 16 .....????...??.?
40: 0c 00 00 00 6f 38 00 00 00 00 00 ee 10 d8 7e e3 ?...o8.....???~?
50: 00 00 88 00 00 00 00 00 7f 00 00 00 00 00 00 00 ..?.....?.......
60: 7f 00 00 00 00 00 00 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 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
90: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
a0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
b0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
c0: 00 00 00 00 00 00 00 00 00 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 00 00 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 ................
console:/data # ./i2cset -f -y 1 0x18 0x00 0x01
console:/data # ./i2cdump -f -y 1 0x18
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: 01 08 04 00 00 00 00 00 00 30 63 10 08 08 00 00 ???......0c???..
10: 00 00 40 40 29 00 00 00 00 00 00 00 00 00 00 00 ..@@)...........
20: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
30: 00 00 00 00 00 00 00 00 00 00 00 80 80 00 00 c0 ...........??..?
40: 00 00 00 00 00 00 00 00 00 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 00 00 00 00 00 00 00 00 00 00 00 ................
70: 00 00 00 00 00 00 00 00 00 00 00 01 00 00 00 00 ...........?....
80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
90: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
a0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
b0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
c0: 00 00 00 00 00 00 00 00 00 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 00 00 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 ................
console:/data #
console:/data # cat /proc/asound/cards
0 [ROCKCHIPSPDIF ]: ROCKCHIP_SPDIF - ROCKCHIP,SPDIF
ROCKCHIP,SPDIF
1 [realtekdac3203c]: realtek_dac3203 - realtek,dac3203-codec
realtek,dac3203-codec
2 [rockchiphdmi ]: rockchip_hdmi - rockchip,hdmi
rockchip,hdmi
console:/data # tinymix -D 1
Mixer name: 'realtek,dac3203-codec'
Number of controls: 34
ctl type num name value
0 INT 2 PCM Playback Volume 127 127
1 INT 2 HP Driver Gain Volume 6 6
2 INT 2 LO Driver Gain Volume 6 6
3 BOOL 2 HP DAC Playback Switch On On
4 BOOL 2 LO DAC Playback Switch Off Off
5 BOOL 2 Mic PGA Switch Off Off
6 BOOL 1 ADCFGA Left Mute Switch On
7 BOOL 1 ADCFGA Right Mute Switch On
8 INT 2 ADC Level Volume 24 24
9 INT 2 PGA Level Volume 0 0
10 INT 1 Auto-mute Switch 0
11 BOOL 1 AGC Left Switch Off
12 BOOL 1 AGC Right Switch Off
13 INT 2 AGC Target Level 0 0
14 INT 2 AGC Gain Hysteresis 0 0
15 INT 2 AGC Hysteresis 0 0
16 INT 2 AGC Noise Threshold 0 0
17 INT 2 AGC Max PGA 127 127
18 INT 2 AGC Attack Time 0 0
19 INT 2 AGC Decay Time 0 0
20 INT 2 AGC Noise Debounce 0 0
21 INT 2 AGC Signal Debounce 0 0
22 BOOL 1 HPL Output Mixer L_DAC Switch On
23 BOOL 1 HPL Output Mixer IN1_L Switch Off
24 BOOL 1 LOL Output Mixer L_DAC Switch Off
25 BOOL 1 HPR Output Mixer R_DAC Switch On
26 BOOL 1 HPR Output Mixer IN1_R Switch Off
27 BOOL 1 LOR Output Mixer R_DAC Switch Off
28 BOOL 1 Left Input Mixer IN1_L P Switch Off
29 BOOL 1 Left Input Mixer IN2_L P Switch Off
30 BOOL 1 Left Input Mixer IN3_L P Switch Off
31 BOOL 1 Right Input Mixer IN1_R P Switch Off
32 BOOL 1 Right Input Mixer IN2_R P Switch Off
33 BOOL 1 Right Input Mixer IN3_R P Switch OFF