6.1 Test 1: Testing the PDM Microphones using ALSA

This test is intended to record the user’s audio input using the quad PDM microphones and to save it as a .wav file to the SD card using the ALSA (Advanced Linux Sound Architecture) utility.

Follow these instructions:

  1. To check the PDMC audio device card number and device number, use the command below:

    $ arecord -l | grep pdmc

    In the following figure, the PDMC card number is 0 and the device number is 4.

    This command verifies that the pdmc0 device tree overlay has been applied successfully.

  2. To capture the sound from the PDM microphones, use the command below:

    $ arecord -Dplughw:0,4 -r 48000 -c 2 -f S16_LE pdmc.wav

    To stop recording, press Ctrl + C.

    The .wav file is saved to the SD card in the /root directory.

  3. To play the recorded audio, either use the SPDIF Transmitter on the SAMA7G54-EK or transfer the audio file from the SAMA7G54-EK to the host PC using the Secure Copy Protocol (SCP) and listen to it on the host PC.