6.3.2 ALSA Testing Procedure

  1. Connect one end of a TOSLINK optical cable to the SAMA7G54-EK SPDIF RX and the other end to the SPDIF-Out on the USB audio extender.
  2. To check the SPDIF RX audio device card number and device number, use the following command:

    $ arecord -l | grep spdifrx

    In the capture below, the card number is 0 and the device is 8.

  3. Receive audio through the SPDIF RX interface using the following command:

    $ arecord -Dplughw:0,8 -r 48000 -c 2 -f S16_LE spdifrx.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.