Audio

Q1: How to get the sound collected by AI?

By MI_S32 MI_AI_GetVqeVolume(MI_AUDIO_DEV AiDevId, MI_AI_CHN AiChn, MI_S32*ps32VolumeDb) api。

Q2: How to use the device tree to configure the audio speaker's amplifier enable pin?

A: In arch/arm/boot/dts/infinity2m.dtsi, set the amp-gpio in the sound node to <PAD_GPIO12 1> //PAD_GPIO12 is the actual hardware enable pin

B:In arch/arm/boot/dts/infinity2m-ssc011a-s01a-padmux-display.dtsi, change the u32Puse of the corresponding pin to MDRV_PUSE_AIO_AMP_PWR (*padmux-display.dtsi is modified according to the actual file)

Q3:How to configure i2s pin settings?

  1. Configure the following i2s-padmux into the corresponding mode in infinity2m.dtsi, eg:

    Corresponds to mode 1, padmux fills in 1:

  2. Configure the corresponding i2s mode in the corresponding padmux file, eg:

    <PAD_GPIO0 PINMUX_FOR_I2S_MODE_1 MDRV_PUSE_I2S_WCK >,
    <PAD_GPIO1 PINMUX_FOR_I2S_MODE_1 MDRV_PUSE_I2S_BCK >,
    <PAD_GPIO2 PINMUX_FOR_I2S_MODE_1 MDRV_PUSE_I2S_SDI >,
    <PAD_GPIO3 PINMUX_FOR_I2S_MODE_1 MDRV_PUSE_I2S_SDO >,
    

...