Raspberry PI: Volume control

Set the volume of sound output jack or USB sound card on Raspberry PI with Raspbian distro.

This action will be perfomed with amixer utility.

First list all audio capable devices:

$ amixer

Sample output:

Simple mixer control 'Speaker',0
 Capabilities: pvolume pswitch pswitch-joined penum
 Playback channels: Front Left - Front Right
 Limits: Playback 0 - 151
 Mono:
 Front Left: Playback 151 [100%] [0.06dB] [on]
 Front Right: Playback 151 [100%] [0.06dB] [on]
Simple mixer control 'Mic',0
 Capabilities: pvolume pvolume-joined cvolume cvolume-joined pswitch pswitch-joined cswitch cswitch-joined penum
 Playback channels: Mono
 Capture channels: Mono
 Limits: Playback 0 - 127 Capture 0 - 16
 Mono: Playback 0 [0%] [0.00dB] [off] Capture 0 [0%] [0.00dB] [on]
Simple mixer control 'Auto Gain Control',0
 Capabilities: pswitch pswitch-joined penum
 Playback channels: Mono
 Mono: Playback [on]

In my case I have three diferent control options. Try to find the right one. I am using external USB dongle with stereo output, so I will use “Speaker,0” device to control.

Execute command to set volume of selected control to 100% (or use prefered value):

$ amixer sset Speaker,0 100%

So simple is that. 🙂

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s