This is the documentation for the latest (main) development branch of HPM SDK. If you are looking for the documentation of previous releases, use the drop-down menu on the left and select the desired version.

1.1. Audio Codec Loopback

1.1.1. Overview

The audio_codec example shows how to use codec component to record and play audio information. In this example, codec component records the sound and sents out encoded data by I2S interface, MCU send back the received data to codec component, then codec component decodes and plays the audio data.

1.1.2. Project Configuration

  • In the file cmakelists.txt, set a matched audio codec type according to the development board schematic,e.g. “set(CONFIG_CODEC “sgtl5000”)”

1.1.3. Board Setting

  1. Connect audio player to the audio input interface on the audio codec chip

  2. Connect headphone to the headphone interface on the audio codec chip

1.1.4. Running the example

When the example runs successfully, the headphone will play the sound and the following message is displayed in the terminal:

> Audio Codec example
> Test Codec playback and record