3.5.1.8 Audio Codec
Herodotus supports the SGTL5000 audio devices. This section explains how to test
SGTL5000 audio codecs.
Please following the pin definition to connect audio signal.
⚫
To list the available audio interfaces, please execute the below command.
sh-5.1#
aplay -l
⚫
The registered audio interfaces will be displayed on terminal as shown below,
**** List of PLAYBACK Hardware Devices ****
card 0: sgtl5000audio [sgtl5000-audio], device 0: HiFi sgtl5000-0 [HiFi sgtl5000-0]
Subdevices: 1/1
Subdevice #0: subdevice #0
card 0: sgtl5000audio [sgtl5000-audio], device 1: HiFi-ASRC-FE (*) []
Subdevices: 1/1
Subdevice #0: subdevice #0
Herodotus BSP supports the Gstreamer framework. This part explains how to play a
multimedia file using Gstreamer framework.
⚫
To list the available plug-ins, please execute the below command.
sh-5.1#
gst-inspect-1.0
⚫
To play a video file using gst-play utility, please execute the below command.
sh-5.1#
gst-play-1.0 /<path to file>/<file_name>
⚫
To play an audio file using a particular audio device, please execute the below
command.
sh-5.1#
gst-launch-1.0 filesrc location=<audio file> ! decodebin ! audioconvert ! alsasink
device=plughw:<card>,<subdevice>
⚫
To record an audio file using a particular audio device, please execute the below
command.
sh-5.1#
gst-launch-1.0 -v alsasrc device= plughw:<card>,<subdevice> ! 'audio/x-raw,
rate=48000, channels=2' ! lamemp3enc ! filesink location=<file_name.mp3>
Herodotus BSP User Guide
SCM186 NXP i.MX 8M Plus ARM-based Evaluation Kit
33
Need help?
Do you have a question about the SCM186 and is the answer not in the manual?
Questions and answers