[pulseaudio-discuss] sidetone settings on USB headset

Colin Guthrie gmane at colin.guthr.ie
Wed Jan 12 01:25:04 PST 2011

'Twas brillig, and pl bossart at 11/01/11 21:47 did gyre and gimble:
> Hi,
> I have a nice USB headset that I use for VoIP calls. It does insulate
> a great deal from my noisy colleagues, but as a result I have to tweak
> the sidetone gain to hear my own voice (most headsets provide the
> capability of looping the mic input to the speakers with almost no
> latency).
> I can play with the 'Mic Playback Volume' in alsamixer, but I have to
> do this everytime I plug the headset. alsamixer doesn't remember the
> value, nor does pulseaudio. Pulseaudio only stores the 'Mic Capture
> Volume' and the 'Speaker Playback Volume' (I found the names by
> playing with the values in alsamixer to set the sidetone gain to the
> max and zero the capture gain, see below)
> Any idea on how I can record my preferred setting once and forall? Is
> this best done at the pulseaudio or alsa level?

Good question.

Firstly PA's volume storage is pretty basic. It just stores a
per-channel volume for the device.

PA also manages a mixer pipeline for the volume itself and applies this
basic volume to the whole pipeline, setting it accordingly until the
desired volume is reached.

In this case the Speaker Playback Switch and Speaker Playback Volume
controls are likely just not factoring in the mixer pipeline; and I'm
guessing that this is the desirable situation for actually controlling
the volume itself. The issue is you cannot hear your own voice which is
desirable for a more "natural" experience.

So really we would need to introduce a more complete mixer save/restore
system to make this work, but this would really need to come with more
thought on how to pass through certain mixer elements to a GUI (as
requiring a separate UI tool to adjust it vs the system to save/restore
it is just wrong).

So overall this is a much larger discussion I think.

In the short term a "quick fix" may be to do alsactl store 1

This should store your mixer settings and then restore them on hotplug!
Obviously when you yank the thing out it wont have a chance to be saved,
but if you shut down with the device plugged in, there is a chance this
will happen "organically".

I guess it depends on udev rules as to whether or not alsactl restore is
run on hotplug but I think this is generally the done thing.

Not sure I described that very well... I'm pre-first-cup-of-coffee today!


> $ amixer -c1 contents
> numid=1,iface=MIXER,name='Mic Playback Switch'
>   ; type=BOOLEAN,access=rw------,values=1
>   : values=on
> numid=2,iface=MIXER,name='Mic Playback Volume'
>   ; type=INTEGER,access=rw---R--,values=1,min=0,max=464,step=0
>   : values=464
>   | dBminmax-min=-41.00dB,max=-12.00dB
> numid=5,iface=MIXER,name='Mic Capture Switch'
>   ; type=BOOLEAN,access=rw------,values=1
>   : values=on
> numid=6,iface=MIXER,name='Mic Capture Volume'
>   ; type=INTEGER,access=rw---R--,values=1,min=0,max=13,step=0
>   : values=0
>   | dBminmax-min=16.00dB,max=29.00dB
> numid=3,iface=MIXER,name='Speaker Playback Switch'
>   ; type=BOOLEAN,access=rw------,values=1
>   : values=on
> numid=4,iface=MIXER,name='Speaker Playback Volume'
>   ; type=INTEGER,access=rw---R--,values=2,min=0,max=44,step=0
>   : values=44,44
>   | dBminmax-min=-41.00dB,max=3.00dB


Colin Guthrie

Day Job:
  Tribalogic Limited [http://www.tribalogic.net/]
Open Source:
  Mageia Contributor [http://www.mageia.org/]
  PulseAudio Hacker [http://www.pulseaudio.org/]
  Trac Hacker [http://trac.edgewall.org/]

More information about the pulseaudio-discuss mailing list