DMIC
First of all, according to the selected GPIO of 87-89, in SSD201HWCheckListV6.xlsx, we can see that the mode value is 2.
Therefore, modify the DTS Sound node and set the value of digmic-padmux to 2 according to the selected pins:
sound {
compatible = "sstar,audio";
// reg = <0x1F000000 0x1000000>;
interrupts=<GIC_SPI INT_IRQ_BACH IRQ_TYPE_LEVEL_HIGH>;
playback-volume-level=<64>; //0~94
capture-volume-level=<64>;
// micin-pregain-level=<1>; //0~3
micin-pregain-level=<0>; //0~3
micin-gain-level=<3>; //0~7
linein-gain-level=<2>; //0~7
amp-gpio = <PAD_FUART_RX 1>;
clocks = <&CLK_upll_384m>;
// playback-dma-buffer=<98304>; //512(ms)*48(kHz)*2(ch)*2(16bits)
// capture-dma-buffer=<122880>; //640(ms)*48(kHz)*2(ch)*2(16bits)
digmic-padmux = <2>;
i2s-padmux = <2>;
keep-i2s-clk = <0>;
status = "ok";
}
At the same time, modify the corresponding Infinity2M-SSC011A-S01A-PADMUX-XXX. DTSI and set the GPIO used to DMIC_MODE:
<PAD_HDMITX_SCL PINMUX_FOR_DMIC_MODE_2 MDRV_PUSE_DMIC_D1 >,
<PAD_HDMITX_SDA PINMUX_FOR_DMIC_MODE_2 MDRV_PUSE_DMIC_D0 >,
<PAD_HDMITX_HPD PINMUX_FOR_DMIC_MODE_2 MDRV_PUSE_DMIC_CLK >,
Of course, the kernel also needs to load the corresponding driver:
# cd kernel
# ARCH=arm make menuconfig
Now that the DMIC interface is configured, let’s test it using audio_all_test_case:
# ./audio_all_test_case -t 20 -I -o /tmp -d 1 -m 0 -c 2 -s 48000
The chn0_dmic_48k_16bit_mono.wav and chn1_dmic_48k_16bit_mono.wav will be generated in the/TMP/directory.If there is a LineOut interface, you can directly play the recording file and judge whether the recording is successful.