AUDIO INTRODUCTION FOR DEMO BOARD
1. Display Demo Board Introduction¶
The audio resources that can be used in the display demo board mainly include Dmic
, Amic
, and Speaker
.
Figure1-1
2. SpeakerOut¶
Figure1-2
Figure1-3
Audio_EN is determined by user`s layout, which need to set the corresponding enabled power amplifier. Our DEMO board is GPIO12, and the configuration is as follow.
It can be seen from the demo board schematic diagram that the speaker power amplifier needs to be controlled by Gpio12, and active in low.
Openarch/arm/boot/dts/infinity2m.dtsi
to confirm the amp-gpio in sound is set to \< PAD_GPIO121>. Otherwise, the power amplifier will disable.
Figure1-4
3. MICIN¶
No need to modify dts in Amic but contrast in Dmic.
display demo board Dmic
use mode2, the pins are PAD_HDMITX_SCL
, PAD_HDMITX_SDA
and PAD_HDMITX_HPD
.
-
Confirm the
digmic-padmux
in sound ofarch/arm/boot/dts/infinity2m.dtsi
is set to mode2, that is digmic-padmux = <2>. -
Confrim the functions of the pins above were added in
arch/arm/boot/dts/infinity2m-ssc011a-s01a-padmux.dtsi
.<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 >,
4. Sample Running Command¶
Test demo:audio_all_test_case(This program is in the release package is sdk\verify\mi_demo\geonosis\audio_all_test_case)
prog_audio_all_test_case introduction:
-t: The running time of the program(seconds), keep running without specific command.
-I: Enable AI
-o: AI recording output path
-d: AI device ID(Amic[0] Dmic[1] I2S RX[2] Linein[3])
-c: AI channel number
-v: AI volume parameter(Amic 0~21, Dmic 0~4, Linein 0~7)
-s: AI sampling rate, 8000/16000/32000/48000
-q: Wether to use AI queue mode
-h: Enable AI Hpf
-g: Enable AI Agc
-e: Enable AI Eq
-n: Enable AI NR
-r: AI re-sampling rate, 8000/16000/32000/48000
-a: AI coding type, g711a/g711u/g726_16/g726_24/g726_32/g726_40
-A: Enable AED
-b: Enable AEC
-O: Enable AO
-i: Input file path for AO playback
-D: AO device ID(Lineout[0] I2S TX[1] HDMI[2])
-V: AO volume parameter(-60~30)
-h: Enable AO Hpf
-g: Enable AO Agc
-e: Enable AO Eq
-n: Enable AO NR
-r: AO re-sampling rate; 8000/16000/32000/48000
Example:
./prog_audio_all_test_case –t 30 –I –o /tmp –d 0 –c 1 –v 15 –s 8000
Amic; Single channel; Sampling rate: 8K; 30 seconds recording; Save path: /tmp; Volume parameter: 15
./prog_audio_all_test_case –t 30 –O –I xxx.wav –D 0 –V 0
Lineout plays the xxx.wav file for 30 seconds with a gain of 0dB.