Speaker Tests!

OK you can use whatever software you like to play audio but if you'd like to test the speaker output, here's some quick commands that will let you verify your amp and speaker are working as they should!

Simple white noise speaker test

Run speaker-test -c2 to generate white noise out of the speaker, alternating left and right.

If you have a mono output amplifier, the I2S amp merges left and right channels, so you'll hear continuous white noise

Simple WAV speaker test

Once you've got something coming out, try to play an audio file with speaker-test (for WAV files, not MP3)

speaker-test -c2 --test=wav -w /usr/share/sounds/alsa/Front_Center.wav

You'll hear audio coming from left and right alternating speakers

Simple MP3 speaker test

If you want to play a stream of music, you can try

sudo apt-get install -y mpg123
mpg123 http://ice1.somafm.com/u80s-128-mp3

If you want to play MP3's on command, check out this tutorial which covers how to set that up

At this time, Jessie Raspbery Pi kernel does not support mono audio out of the I2S interface, you can only play stereo, so any mono audio files may need conversion to stereo!

omxplayer does not seem use the I2S interface for audio - only HDMI - so you won't be able to use it

Volume adjustment

Many programs like PyGame and Sonic Pi have volume control within the application. For other programs you can set the volume using the command line tool called alsamixer. Just type alsamixer in and then use the up/down arrows to set the volume. Press Escape once its set

In Raspbian PIXEL you can set the volume using the menu item control. If it has an X through it, try restarting the Pi (you have to restart twice after install to get PIXEL to recognize the volume control

This guide was first published on Dec 07, 2016. It was last updated on Mar 08, 2024.

This page (Raspberry Pi Test) was last updated on Mar 08, 2024.

Text editor powered by tinymce.