==for bypass to work, set alsa== Left Line Mixer PGAR Bypass [dB gain: 0.00] ==alsa commands== ===installation on ubuntu === apt-get install alsa-utils === command lines === listing all playback devices: aplay -l listing all record devices: arecord -l playback sound from recording: arecord -f cd | aplay alsaloop -t 5000 use mixer to adjust volume: alsamixer ==Advanced control via I2C control registers== To set/read register value to control advance behaviours of 3106 codec. slas509e.pdf datasheet. ===i2c tools installation=== apt-get install i2c-tools Note: need to figure out which i2c bus the tlv320aic3x is on and which address is set: * Page21/102 slas509e.pdf (I2C control mode) * i2c bus, refer to design schematics cat /sys/devices/platform/omap/omap_i2c.1/i2c-1/1-001b/name > tlv320aic3x read values: according to page 48/102 of slas509e.pdf
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 01 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 01 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 ................
=== set volume of L/R channel ===
i2cset -f 1 0x1b 0x2b 0x01
i2cset -f 1 0x1b 0x2c 0x01
=== set mic bias voltage ===
set register 25(0x19)
i2cset -f -y 1 0x1b 0x19 0xc6
==enable digital mems microphone==
i2cdump -f -y 1 0x1b
i2cset -f -y 1 0x1b 0x08 0xc2 #reg 0x08 enable digital mic
i2cset -f -y 1 0x1b 0x19 0x46 #reg 0x19 for VADD bias
i2cset -f -y 1 0x1b 0x62 0xa0 #register 98
i2cset -f -y 1 0x1b 0x63 0x70
i2cdump -f -y 1 0x1b
== 调试 ==
===打开line in 寄存器===
#!/bin/sh
#i2cdump -f -y 1 0x1b
i2cset -f -y 1 0x1b 25 0xc6
i2cset -f -y 1 0x1b 15 0x0f
#line1L open
i2cset -f -y 1 0x1b 19 0xc4
# line1L close
#i2cset -f -y 1 0x1b 19 0xfc
# mic3L/R open
#i2cset -f -y 1 0x1b 17 0x22
# mic3L/R close
i2cset -f -y 1 0x1b 17 0xff
i2cdump -f -y 1 0x1b
===已知问题===
连续只读2次声卡将导致无输入,可通过以下命令重现
luna-audio-test --mode capture
经测试是22号寄存器设置值导致,给这个寄存器发送数据可通过下面的命令实现
i2cset -f -y 1 0x1b 0x16 0x80
设置37号寄存器为0xc0可解决该问题