6.4 Test 4: Loopback Testing of Microphone, SPDIF Transmitter and Receiver

  1. To check the PDM microphones, SPDIF output (TX) and input (RX) without a USB audio extender, perform a loopback test.
  2. To find the card number and device ID of the PMD microphones, SPDIF transmitter and SPDIF receiver, refer to the QUAD PMD Microphones, SPDIF Transmitter and SPDIF Receiver sections.
  3. To perform the loopback test, use the following command:

    $ arecord -Dplughw:0,4 -r 48000 -c 2 -f S16_LE | aplay -Dplughw:0,6 | arecord -Dplughw:0,8 -c 2 -r 48000 -f S16_LE test_loop_back.wav

    To stop recording, press Ctrl + C.

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

  4. 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.