You have configured your HiFiBerry card and want to test it? The first choice for many users is the tool “aplay”. However, this is not a good tool for tests. The reasons for this are the following:

  • aplay just outputs the file with the original sample rate – even if the sound card does not support it
  • aplay does not support many file formats
  • error messages are not always clear to beginners

Instead of aplay we recommend the following tools:

mplayer

Developed as a video player, it is also a very good command line tool for music playback. It not only works with WAV and MP3 files, but also FLAC and many exotic formats.

Install it on Raspbian and similar distributions with the command
sudo apt-get install mplayer
You can then play back music files with
mplayer filename

sox

Sox is a set of tools to create/modify/convert sound files. We often use it as a simple sine-wave generator.

Install it on Raspbian and similar distributions with the command
sudo apt-get install sox
Then play an 1kHz sine test tone using the command
play -n synth sine 1000