Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

This is very odd, i have one default microphone and i have another second microphone. When i use this command it always shows not muted but the microphone volume is 0%. How or what is a way i can find those value accurately.

$ pactl list | sed -n '/^Source/,/^$/p' | grep Mute
    Mute: no
    Mute: no
    Mute: no
share|improve this question

2 Answers 2

up vote 2 down vote accepted

By using the Pulseaudio Command Line Interface we will obtain a lot of information on available sources

pacmd list-sources

will display a rather lengthy list. The current active input is marked with an asterisk. We could combine this with grep but will then lose information for which source the outputs are valid

pacmd list-sources | grep volume

To set an output to a defined value we need to know it's index which is also given by list-sources to issue

pacmd set-source-volume <index> <value> # value: 0 = mute 65536 = 100%

We may also need to unmute the sink source with

pacmd set-source-mute <index> 0
share|improve this answer

You access this information with amixer. To list all sound controls you can issue the command

$ amixer controls
...
numid=18,iface=MIXER,name='Capture Source'
numid=19,iface=MIXER,name='Capture Switch'
numid=20,iface=MIXER,name='Capture Volume'
...

and then read the values of the controls with

$$ amixer cget numid=20
numid=20,iface=MIXER,name='Capture Volume'
  ; type=INTEGER,access=rw---R--,values=2,min=0,max=15,step=0
  : values=0,0
  | dBscale-min=0.00dB,step=1.50dB,mute=0

Check out the man pages of amixer. Interesting is also alsamixer, which gives you a more intuitive command line interface.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.