Audio playback over S/PDIF on the Wandboard or EDM1-FAIRY

Difficulty Levels: Intermediate
Date added: June 26, 2018
Affected Products: EDM1-CF-IMX6 , EDM1-FAIRY , WBDUAL , WBQUAD , WBSOLO

Summary

This guide explains how to play an audio file using the S/PDIF optical connector.

Instructions

Some of TechNexion products contain an S/PDIF optical audio jack. To play a .WAV file do the following:

1. Check the sound card number for SPDIF output.

% cat /proc/asound/cards

and the output is like


0 [imx6wandboardsg]: imx6-wandboard- - imx6-wandboard-sgtl5000
imx6-wandboard-sgtl5000
1 [imxspdif ]: imx-spdif - imx-spdif
imx-spdif
2 [imxhdmisoc ]: imx-hdmi-soc - imx-hdmi-soc
imx-hdmi-soc

2. Find the S/PDIF device in the output above, in this example it is device number 1.

Play the WAV file with:
aplay -D hw:1,0 file.wav

Stay up to date with all the latest TechNexion news...

Sign-up for our Newsletter