Comment 109 for bug 275998

Marcus Granado (mrc-gran) wrote :


In order to make the micboost available to all pulseaudio clients in Ubuntu, like gnome soundrecorder, you can also use the alsa softvol trick that I suggested above in reverse, creating a new alsaboost device on top of which you will run pulseaudio, by modifying the following files (1) and (2) below (make a backup of those files first, just in case something breaks in your Ubuntu).

After restarting alsa/pulseaudio (or rebooting), you should verify that the program "paman" shows alsaboost_sink and alsaboost_source as the default pulseaudio sink and source. From now on, all ubuntu programs that understand pulseaudio should be able to automatically benefit from the micboost when recording. You can test this by changing the new +50dB Mic slider in gnome volumecontrol while recording in gnome soundrecorder. Let us know if other recording programs work fine as well.

caveat 1: skype doesn't like to use pulseaudio, so you should still choose the "alsaboost" device for its SoundIn configuration, but you can use "pulse" for its SoundOut and Ringing. This seems to be a deficiency in skype, and the side-effect is that while skype is in a call, you won't be able to use the mic in a different application like gnome's soundrecorder. Also, if another program is using the mic, skype won't be able to use it.

caveat 2: under this configuration, skype also likes to mess with the value of the +50dB Mic slider if the option "Allow skype to automatically ajudst my mixer levels" is checked in. I would recommend disabling this option, or at least keeping in mind that if the mic stops recording, it's very likely that skype messed with the micboost slider.

This hack worked for me, let me know if that works for you (and anyone else).

1) create/update your /etc/asound.conf:

# creates a new alsaboost device that takes over sound card
pcm.alsaboost {
    type asym
    playback.pcm {
        type hw
        card 0
    #software gain upto 50dB for digital microphone
    capture.pcm {
        type softvol
        slave.pcm "hw:0,0"
        control {
            name "+50dB Mic Capture Volume"
            card 0
        max_dB 50.0
ctl.alsaboost {
  type hw
  card 0

2) modify your /etc/pulse/, in order to add the two uncommented lines below at a
similar place in your (around line 35 in my case), and keeping all the
remaining lines in your (this location is important, do not put them at the bottom
of or otherwise alsaboost will not load properly in pulseaudio because it
will prefer to load, instead, the original sound device via module-hal-detect a few lines down):

### Load audio drivers statically (it's probably better to not load
### these drivers manually, but instead use module-hal-detect --
### see below -- for doing this automatically)
#load-module module-alsa-sink
#load-module module-alsa-source device=hw:1,0

load-module module-alsa-source device=alsaboost source_name=alsaboost_source
load-module module-alsa-sink device=alsaboost sink_name=alsaboost_sink

#load-module module-oss device="/dev/dsp" sink_name=output source_name=input
#load-module module-oss-mmap device="/dev/dsp" sink_name=output source_name=inp$
#load-module module-null-sink
#load-module module-pipe-sink

2b) in case you have several devices, or for some other reason alsaboost doesn't become the default source/sink in pulseaudio, you can force that by adding the following two lines at the bottom of

set-default-sink alsaboost_sink
set-default-source alsaboost_source