Main menu:

Recent posts

Sponsoring

Please consider a small donation:

 

About this blog

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

Search

My Favourites

Slackware

Categories

RSS Alien's Slackware packages

RSS Alien's unofficial KDE Slackware packages

RSS Alien's multilib packages

Tag cloud

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 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

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

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.

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.

Eric

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.

Write a comment