Run It

On every boot, the sound module will need to be loaded and set to output to the 3.5mm audio jack:

Download: file
sudo modprobe snd-bcm2835
sudo amixer cset numid=3 1

Next, play a mp3 file:

Download: file
mpg321 <filename>

Leave the file playing and open a new terminal window or SSH connection to start the Python script:

Download: file
sudo ./
Now simply adjust the trim pot and you should hear the audio level change as the mp3 file is playing.
This guide was first published on Jul 29, 2012. It was last updated on Jul 29, 2012. This page (Run It) was last updated on May 04, 2015.