1、XML配置
1.1 主MIC的XML路径配置以及对应的原理图
<path name="speaker-mic">
<path name="adc1" /> //<ctl name="DEC1 MUX" value="ADC1" />
<ctl name="IIR1 INP1 MUX" value="DEC1" />
</path>
1.2 耳机MIC的XML路径配置
<path name="headset-mic">
<path name="adc2" /> //<ctl name="DEC1 MUX" value="ADC2" /> <ctl name="MICBIAS CAPLESS Switch" value="1" />
<ctl name="ADC2 MUX" value="INP2" />
<ctl name="IIR1 INP1 MUX" value="DEC1" />
</path>
2、对应1中XML配置的tinymix调试命令
2.1 主MIC的XML路径配置对应的tinymix调试命令
tinymix "DEC1 MUX" "ADC1"
tinymix "IIR1 INP1 MUX" "DEC1"
2.2 耳机MIC的XML路径配置对应的tinymix调试命令
tinymix "DEC1 MUX" "ADC2"
tinymix "MICBIAS CAPLESS Switch" "1" //需要在代码里添加控件 "MICBIAS CAPLESS Switch"
tinymix "ADC2 MUX" "INP2"
tinymix "IIR1 INP1 MUX" "DEC1"
3、双MIC路径的XML配置以及tinymix调试命令
3.1 双MIC路径的XML配置
<path name="speaker-dmic-endfire">
<path name="adc1" />
<ctl name="DEC2 MUX" value="ADC2" />
<ctl name="MI2S_TX Channels" value="Two" />
<ctl name="ADC2 MUX" value="INP3" />
</path>
3.2 双MIC路径的XML配置对应的tinymix调试命令
# Enable DSP AFE for Audio Recording over I2S
tinymix "MultiMedia1 Mixer TERT_MI2S_TX" "1"
# Enable Codec TX Path
tinymix "MI2S_TX Channels" "Two"
tinymix "DEC1 MUX" "ADC1"
tinymix "DEC2 MUX" "ADC2"
tinymix "ADC2 MUX" "INP3"
# Start the audio recording
tinycap /data/adc12.wav –C 2 –R 44100 –T 20
# pull出adc12.wav文件,并使用cool edit软件分析,查看是否具备双通道波形即可