首先我用tlv320aic3109 播放音乐 是没问题的。
录音是没有声音的,但是录制的文件大小都正常
但是我用audacity 点一下录音再点一下播放之后。
再单独录音 ,录音就有声音了 ,怀疑是寄存器没有配置?
通过audacity控制时 把寄存器打开了?
谁有配置这个tlv320aic3109 录制打开的 寄存器正确配置么?
Amy Luo:
您好,
查看下
page0, register37,bit 7 是0吗–> powering down the DAC
page0,register107,bit 3 是1吗—>enable the digital filter path way for the ADC
user5342824:
回复 Amy Luo:
额。linux 下 这个寄存器如何查看呢?
这种可以么?
nvidia@tegra-ubuntu:~$ sudo i2cdump -f -y 6 0x18
[sudo] password for nvidia:
No size specified (using byte-data access)0123456789abcdef0123456789abcdef
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 00 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 00 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…………….
Amy Luo:
回复 user5342824:
37换成16进制数是25,应该看20: 00 00 00 00 00 00 00 00 00 00 00 80 80 00 00 00 ………..??…这一行的5列,即第6列
107换成16进制数是6B,应该看60: 00 00 00 00 00 00 02 00 00 00 00 00 00 00 00 00 ……?………这一行的第B列。
把对应的寄存器配置一下,再试试看是否可以。
user5342824:
回复 Amy Luo:
还是没有声音
37本来就是00
107 我改成了04 ,0000 0100如下nvidia@tegra-ubuntu:~$ sudo i2cset -f -y 6 0x18 0x6B 0x04
[sudo] password for nvidia:
Sorry, try again.
[sudo] password for nvidia:
nvidia@tegra-ubuntu:~$ sudo i2cdump -f -y 6 0x18
No size specified (using byte-data access)0123456789abcdef0123456789abcdef
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 00 02 00 00 00 00 04 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 00 02 00 00 00 00 04 00 00 00 00……?….?….
f0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00…………….配置完后 录音还是没声音
Kailyn Chen:
回复 user5342824:
您好,寄存器Register 15 是PGA Gain,增大PGA gain试试能否听到声音?
另外,Register 25, MICbias 设置为2.5V。
user5342824:
回复 Kailyn Chen:
Register 15 是0F 00: 00 00 00 10 04 00 00 00 00 00 00 01 00 00 00 80 这个目前是0x80 Register 25 是19 10: 80 ff ff 78 78 78 78 78 78 06 00 fe 00 00 fe 00 这个目前是0x06 上面两个参数 会随我开启录制时发生变化,变成15变成00,增益为0db,25的06变成86 我觉得可能不是增益问题,听起来像录制静音了一样,不是声音小。 我只要打开 audacity,再关掉audacity ,录音就正常有声音了,所以怀疑是不是有初始化的参数我没有配置,通过打开audacity 将配置重新配置了一遍,然后就可以录音了。
那么初始化都需要配置哪些寄存器?
Kailyn Chen:
回复 user5342824:
您好,不知您的问题解决了没,AIC3109的初始化顺序在下面这个帖子中有给出详细步骤:
e2e.ti.com/…/7106521. Configure register coefficients for Clocks/PLL, Enable PLL if used, program digital audio format etc… power up DAC/ADC but keep muted.
2. same as 1. but tag on AGC configuration, then enable AGC,
3. Same as 2 but don't enable AGC, you can program AGC coefficients or not.
4. same as 2 but don't enable the MIC input.
—————————
general guidance for input/output setup
after clocks/PLL/digital audio format are all configured, configure input/outputs。
另外,这个帖子中给出了AIC3104的配置, 不同的是AIC3104 有两个ADC和DAC的相关配置, 可以去除,其他配置和AIC3109 差不多相同,可以参考下。希望您的问题能得以解决。