Main menu:

Sponsoring

Please consider a small donation:

 

 

Or you can donate bitcoin:

 

Thanks to TekLinks in Birmingham, AL, for providing colocation and bandwidth.

Page Rank

Fame

FOSS Force Best Blog--2013 Award

Recent posts

Recent comments

About this blog

I am Eric Hameleers, and this is where I think out loud.
More about me.

Search

My Favourites

Slackware

Calendar

December 2014
M T W T F S S
« Nov    
1234567
891011121314
15161718192021
22232425262728
293031  

RSS Alien's Slackware packages

RSS Alien's unofficial KDE Slackware packages

RSS Alien's multilib packages

Meta

Adding an ALSA software pre-amp to fix low sound levels

Low sound volume in Linux?

Apparently a lot of laptop users are confronted with the issue of very low sound levels – not just in Slackware. Note that this is different from the “sound can not be un-muted” issue I experienced and which I wrote about in a previous article.

If you are among the affected users for whom the sound levels remain too low even when cranking the volume all the way up, there is away around this.

It works by enhancing the ALSA sound system with a sound pre-amplifier and adding that to the available controls. ALSA uses dmix to create the new software volume control. You can then play around with varying percentages of sound amplification. You will have to find an optimum between acceptible sound levels and the possible sound distortion which will be introduced by this pre-amp.

To add the software pre-amp system-wide you need to open the ALSA configuration file “/etc/asound.conf” in an editor (Slackware does not create that file by default, so you may have to edit a new file) and add the following definition to it (note that if you have multiple sound cards and the default is not “card 0” you may have to alter the definition a bit):

pcm.!default {
        type hw
        card 0
}
ctl.!default {
        type hw
        card 0
}
pcm.!default {
        type plug
        slave.pcm “softvol”
}
pcm.softvol {
        type softvol
        slave {
                pcm “dmix”
        }
        control {
                name “Pre-Amp”
                card 0
        }
        min_dB -5.0
        max_dB 20.0
        resolution 6
}

Then, save the file and reboot your computer (you could also try running “/etc/rc.d/rc.alsa restart” but I can not guarantee that that will re-initialize ALSA correctly).

After reboot, you will find an additional control in your mixer (alsamixer or kmix) called “Pre-Amp”. Note that KDE’s mixer does not show all controls by default and you may have to add “Pre-Amp” to the visible controls.

Eric

Addendum:

Note that initially I suggested the use of the block of code you find below. But when I installed Slackware 14 on my new desktop I experiences the same volume level issue. After adding a “pre-amp” I found that ALSA had lost its default device, which caused warning messages every time I logged into KDE and gives programs like aplay and mpg123 the fits. A comment by “d” further down in the article with the above solution worked much better for my desktop machine, so I decided to re-write this article even though I don’t usually do such a thing. I will keep the originally suggested code block below for reference – try it only if the code above does not work for you:

pcm.!default {
      type plug
      slave.pcm "softvol"
  }

  pcm.softvol {
      type softvol
      slave {
          pcm "dmix"
      }
      control {
          name "Pre-Amp"
          card 0
      }
      min_dB -5.0
      max_dB 20.0
      resolution 6
  }

If the Pre-amp control does not appear in your mixer window, you may have to replace the line that says:

type plug

with this line:

type hw

This information was taken from the unofficial ALSA Wiki: http://alsa.opensrc.org/index.php/How_to_use_softvol_to_control_the_master_volume and it was also offered as a solution in this LinuxQuestions.org post on the Slackware forum.

I received a report that the default block of code does not always work. Changing “plug” to “hw” may be necessary with some laptops.

http://www.alsa-project.org/alsalogo.gif

Comments

Pingback from Low sound in Laptop – Page 2
Posted: August 5, 2010 at 10:41

[…] I think this problem is annoying enough for a lot of users, so I added some more detail here: http://alien.slackbook.org/blog/addi…-sound-levels/ […]

Pingback from Tweets that mention Alien Pastures » Adding an ALSA software pre-amp to fix low sound levels — Topsy.com
Posted: August 5, 2010 at 12:10

[…] This post was mentioned on Twitter by O. Morata, Eric Hameleers. Eric Hameleers said: Adding an ALSA software pre-amp to fix low sound levels: Low sound volume in Linux? Apparently a lot of laptop use… http://bit.ly/cpMzeO […]

Comment from fogie
Posted: August 5, 2010 at 16:11

Eric,

Thank you *SO* very much for this. I have googled this for years! I can’t wait to give it a shot later on today.

I tried OSS 4 from SBo as a trial for the netbook, and although it did make the acer AOA150 louder, I lost the sound for webcam, and resume from hibernate/suspend yielded no sound. I got lazy and gave up. I know this little netbook should go louder, as in Win XP the sound will practically knock you over, heh.

This looks really promising, thanks for posting. :)

Comment from escaflown
Posted: August 7, 2010 at 01:44

Thanks for the tip, Eric! Doing this with KDE 4.5 rc3, the pre-amp doesn’t show up in kmixer. I was able to get through alsamixer in console.

Comment from Desiderius
Posted: August 8, 2010 at 15:17

I tried this tip on my laptop but it does not work !

I have created the /etc/asound.conf with the line
type hw

but when I open alsamixer or kmix I do not see the Pre-amp control !

Comment from dolphin77
Posted: August 8, 2010 at 20:33

Reboot. Try alsaconf. In my case i had to return to plug. It worked for me.

Comment from gregor
Posted: August 10, 2010 at 06:01

Thanks a lot – this was an issue for quite some time.
To show up on the mixer, the “speaker-test -D” from the wiki did the trick even without restarting alsa or reboot.

Pingback from Sound on New Laptop
Posted: August 13, 2010 at 11:26

[…] a look at Alien's blog here. Apparently a lot of laptops are having problems with low sound – not only Slackware Regards […]

Comment from fogie
Posted: August 15, 2010 at 02:41

Hello Eric,

No luck here for the acer aspire one AOA-150 netbook using slack –current. I tried on huge-smp and generic-smp but no luck :(

Thanks again for posting. At least it appears to have helped some people out.

Pingback from So you want to be a Slacker! What do I do next? – Page 11
Posted: September 25, 2010 at 15:13

[…] Hi, Do you have a low sound issue on the laptop? You can try using a remedy by Alien_Bob: Adding an ALSA software pre-amp to fix low sound levels […]

Comment from fogie
Posted: April 7, 2011 at 05:16

Eric !

Great news! I decided to try this again since there has been quite a few changes in –current and I’m *HAPPY* to report this now works for me. :)

It did not work at first. So I deleted my /var/lib/alsa/asound.state and than ran alsaconf. I figured “what the heck”.

Suprisingly, alsaconf doesn’t see my sound card, I don’t know why exactly, but sound has always worked. It then prompts me for isapnp scanning and I just cancel that, reboot, and voila works everytime, though only once is needed :)

Thanks again Eric!

Pingback from asoundrc works for HDMI/analog, but need help boosting volume
Posted: June 18, 2011 at 14:32

[…] is higher at the same level. I've read http://www.linuxquestions.org/questi…laptop-808663/ and http://alien.slackbook.org/blog/addi…-sound-levels/, which both suggest the following bit of code: […]

Comment from Marcus Wanner
Posted: September 9, 2011 at 02:17

Hey, just wanted to let you know that this really helped me. I’d also like to point out that as is usually the case in linux, you don’t have to reboot. In fact, you don’t even have to do the /etc/init.d/alsa restart (all this does is save and then restore your mixer levels). You just close anything that’s playing sound as well as you mixer and then reopen it, and the new configuration is picked up when they go to play sound. Thanks again!

Pingback from No sound with Firefox when logged in as user
Posted: October 23, 2011 at 16:53

[…] […]

Comment from Orakio “O Gagá” Rob
Posted: December 8, 2011 at 21:26

Thanks thanks thanks! It worked on my Slackware 13.37! ^_^

Comment from Xerop
Posted: December 18, 2011 at 08:28

It doesn’t work for me yet. Thanks again for posting.

Comment from claudio_o
Posted: January 16, 2012 at 12:16

Thank you, I can finally hear something! :) Debian Squeeze

Comment from Gary
Posted: January 26, 2012 at 04:18

Thanks Eric! It seems every Dell Laptop I have purchased to date needs the pre-amp applied.

Pingback from Mic on Slackware64-current w/ snd_hda_intel kernel driver & external headset is quiet
Posted: March 5, 2012 at 23:56

[…] U: Uniq= H: Handlers=event6 B: PROP=0 B: EV=21 B: SW=4 Alien_Bob has a preamp for low volume. Maybe you could kludge one for the mic with this example. All you would need is […]

Comment from Avi Marcus
Posted: March 27, 2012 at 08:25

Low volume has been bugging me for months. This worked after one reboot. Thanks!!!

Pingback from Skype 4 problems – not using webcam mic by default and low volume during a call
Posted: August 18, 2012 at 22:11

[…] on the System. Nothing has changed. I did make an asound.conf per AlienBob's write-up|how to here… lspci: […]

Comment from d
Posted: September 9, 2012 at 20:02

I’ve got a new thinkpad that has Intel PantherPoint chipset for audio and neither ‘hw’ nor ‘plug’ works. I will keep searching for a solution and post back here if I find one. Thanks!

Comment from d
Posted: September 23, 2012 at 03:17

I found a solution that works with my new Thinkpad T530 with the PantherPoint chipset:

pcm.!default {
type hw
card 0
}
ctl.!default {
type hw
card 0
}
pcm.!default {
type plug
slave.pcm “softvol”
}
pcm.softvol {
type softvol
slave {
pcm “dmix”
}
control {
name “Pre-Amp”
card 0
}
min_dB -5.0
max_dB 20.0
resolution 6
}

A little different than what has been mentioned before, but it works!

Comment from alienbob
Posted: September 23, 2012 at 11:03

Hi “d”,

Thanks for reporting back about your solution. I am certain that other people will profit from this.

Cheers, Eric

Comment from fgcl2k
Posted: September 24, 2012 at 21:06

Hi,
d’s solution worked for me too! The Pre-amp appears only in alsamixer and not in KDE but it works. For the first time in years I have decent volume on my laptop (Dell Latitude E6500) with Intel Corporation 82801I (ICH9 Family) HD Audio Controller.
Thank you very much to you both.

Pingback from Ljudinställingar | Mitt Slackware
Posted: January 24, 2013 at 21:49

[…] Ett problem jag hade var att volymen på ljudet var väldigt lågt, trots att volymen var 100%. Det verkar vara ett ganska vanligt problem på bärbara datorer. AlienBob har skrivit ett blogginlägg om det som du kan läsa här. […]

Comment from alienbob
Posted: January 24, 2013 at 22:46

FYI – I have updated the main article, replacing my original ALSA pre-amp configuration with the lines as suggested by “d” in his comment on September 23, 2012.
His configuration works much better than my initial suggestion and I hope that this opinion is shared by others who read this article – it is one of the most popular pages in the blog.

Eric

Comment from Lunix Usar
Posted: May 1, 2013 at 01:13

I have this exact problems however none of the above code seems to get the Pre Amp to show up in alsamixer for me. This is pretty much the only advice that seems to even exist of the subject so im wondering if anyone knows anything else I can try?

Pingback from Make the sound louder in Lubuntu | Ubuntu InfoUbuntu Info
Posted: May 29, 2013 at 03:02

[…] This is exactly the type of solution I’m looking for. However, it doesn’t work for me. What I did: […]

Pingback from Make the sound louder in Lubuntu – Tech Forum Network
Posted: August 5, 2013 at 01:02

[…] This is exactly the type of solution I’m looking for. However, it doesn’t work for me. What I did: […]

Pingback from Difficulties getting alsa pre-amp working to raise the volume on my laptop
Posted: August 21, 2013 at 23:25

[…] been trying to get them louder with the alsa pre-amp method Alien Bob suggests in his blog here: http://alien.slackbook.org/blog/addi…-sound-levels/ I have tried every variation of the code presented in the blog, including replacing […]

Write a comment