Open ShellAlbert opened 4 years ago
i2s_conf.sh
amixer -c tegrasndt186ref sset "ADMAIF2 Mux" "I2S2" amixer -c tegrasndt186ref sset "I2S1 Mux" "MVC1" amixer -c tegrasndt186ref sset "MVC1 Mux" "ADMAIF1" amixer -c tegrasndt186ref cset name="MVC1 Vol" 9000
amixer -c tegrasndt186ref cset name='I2S1 codec frame mode' 'i2s' amixer -c tegrasndt186ref cset name='I2S2 codec frame mode' 'i2s'
amixer -c tegrasndt186ref cset name='I2S1 codec master mode' 'cbs-cfs' amixer -c tegrasndt186ref cset name='I2S2 codec master mode' 'cbm-cfm'
amixer -c tegrasndt186ref cset name='I2S1 codec bit format' '32' amixer -c tegrasndt186ref cset name='I2S2 codec bit format' '32'
amixer -c tegrasndt186ref cset name='I2S1 input bit format' '32' amixer -c tegrasndt186ref cset name='I2S2 input bit format' '32'
pipeline.sh
sudo cat /sys/kernel/debug/tegra_pinctrl_reg | grep dap 当使用sudo busybox devmem addr 32 val 修改din/fs/sclk为0x458时,使能输入 然后使用arecord录制时,发现din/fs/sclk的值又被修改到0x400了,使能禁止了。奇怪?
后来找到一个方法,就是上面截图中的修改tegra186-quill-p3310-1000-c03-00-base.dtb文件。 修改i2s2_dap_active中的 i2s2_dap2_din_pc3, i2s2_dap2_dout_pc2, i2s2_dap2_sclk_pc1, i2s2_dap2_fs_pc4 其中的nvidia,tristate对应数据手册中的passthrought和tristate设置; 其中的nvidia,enable-input是否开启输入,对于fs/sclk要开启; 其中的nvidia,pull对应是否使能上拉。 这些与数据手册中的pinmux中的dap2-xxx管脚寄存器相对应起来。
pipeline_usb.sh arecord -D plughw:CARD=USBSA,DEV=0 -r 32000 -f S32_LE -c 2 -t raw | aplay -D hw:tegrasndt186ref,0 -r 32000 -f S32_LE -c 2 -t raw 这样播放没有杂音 usb capture -> i2s0 playback
pipe_line.sh arecord -D hw:tegrasndt186ref,1 -r 32000 -f S32_LE -c 2 -t raw | aplay -D hw:tegrasndt186ref,0 -r 32000 -f S32_LE -c 2 -t raw 这样播放就有杂音 i2s1 capture -> i2s0 playback