• 5GHz_pa.jpg
  • class_a_pa.jpg
  • dds_header.jpg
  • diamond_6m_header.jpg
  • filter_header.jpg
  • iss_ham_radio.jpg
  • mapping_header.jpg
  • resistor_header.jpg
  • rg213_header.jpg
  • rigol_header.jpg
  • shure_header.jpg
Sunday, 29 July 2018 18:55

Raspberry Pi Low Volume

Written by
Rate this item
(0 votes)

While trying to add audio output to my Portsdown DATV transmitter I found the output level from the 3.5mm jack on the Raspberry Pi was very low.

Feeling sure a web search would help I used my favourite search engine and located the solution in a post on the Raspberry Pi forum. Thanks to forum user spitecho I used a script he had posted up.

Here is the process.

Open the terminal and type the following at the prompt:

sudo nano ~/.bashrc

Now copy the following lines and paste at the end of the .bashrc file:

# Increase volume by 5%
alias volu='sudo amixer set PCM -- $[$(amixer get PCM|grep -o [0-9]*%|sed 's/%//')+5]%'
# Decrease volume by 5%
alias vold='sudo amixer set PCM -- $[$(amixer get PCM|grep -o [0-9]*%|sed 's/%//')-5]%'

Adding aliases to the bashrc file allows you to adjust the volume up or down when you login to the Pi. Having saved the editted file you should log out and back in again. At the prompt type volu to increase volume or vold to decrease.

Note: If you use this script with the BATC Portsdown it should be placed just before the following line.

source /home/pi/rpidatv/scripts/startup.sh

If you're not familiar with the nano editor used to add the two lines of code; please read up on it first.

Read 59 times Last modified on Saturday, 22 December 2018 10:23

Leave a comment

Make sure you enter all the required information, indicated by an asterisk (*). HTML code is not allowed.