You are not logged in.

#1 2012-04-18 17:58:51

Lockheed
Member
Registered: 2010-03-16
Posts: 1,527

ALSA sound too quiet

I have a laptop using built-in speakers and sound is sometimes very low on ALSA, even at maximum settings (especially with flash on youtube). On windows, I can regulate it to much higher value. What's more, even with OSS I can make it much louder. Just ALSA is very quiet.

Is there any way to bump the volume outside of alsa-mixer, which is already maxed?

I cannot use pulseaudio.

Offline

#2 2012-04-18 18:17:02

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: ALSA sound too quiet

1. Some movies are just recorded very quiet.
2. Post the output of 'amixer'.

Offline

#3 2012-04-18 18:20:10

Lockheed
Member
Registered: 2010-03-16
Posts: 1,527

Re: ALSA sound too quiet

$ amixer
Simple mixer control 'Master',0
  Capabilities: pvolume pvolume-joined pswitch pswitch-joined penum
  Playback channels: Mono
  Limits: Playback 0 - 39
  Mono: Playback 39 [100%] [0.00dB] [on]
Simple mixer control 'Headphone',0
  Capabilities: pswitch penum
  Playback channels: Front Left - Front Right
  Mono:
  Front Left: Playback [on]
  Front Right: Playback [on]
Simple mixer control 'Speaker',0
  Capabilities: pswitch penum
  Playback channels: Front Left - Front Right
  Mono:
  Front Left: Playback [on]
  Front Right: Playback [on]
Simple mixer control 'PCM',0
  Capabilities: pvolume penum
  Playback channels: Front Left - Front Right
  Limits: Playback 0 - 39
  Mono:
  Front Left: Playback 39 [100%] [0.00dB]
  Front Right: Playback 39 [100%] [0.00dB]
Simple mixer control 'Mic',0
  Capabilities: pvolume pswitch penum
  Playback channels: Front Left - Front Right
  Limits: Playback 0 - 31
  Mono:
  Front Left: Playback 31 [100%] [12.00dB] [off]
  Front Right: Playback 31 [100%] [12.00dB] [off]
Simple mixer control 'Mic Boost',0
  Capabilities: volume penum
  Playback channels: Front Left - Front Right
  Capture channels: Front Left - Front Right
  Limits: 0 - 3
  Front Left: 2 [67%] [20.00dB]
  Front Right: 2 [67%] [20.00dB]
Simple mixer control 'IEC958',0
  Capabilities: pvolume pswitch pswitch-joined penum
  Playback channels: Front Left - Front Right
  Limits: Playback 0 - 39
  Mono:
  Front Left: Playback 39 [100%] [0.00dB] [on]
  Front Right: Playback 39 [100%] [0.00dB] [on]
Simple mixer control 'IEC958 Default PCM',0
  Capabilities: pswitch pswitch-joined penum
  Playback channels: Mono
  Mono: Playback [on]
Simple mixer control 'IEC958 Playback Source',0
  Capabilities: enum
  Items: 'PCM' 'ADC'
  Item0: 'PCM'
Simple mixer control 'Beep',0
  Capabilities: pvolume pswitch penum
  Playback channels: Front Left - Front Right
  Limits: Playback 0 - 31
  Mono:
  Front Left: Playback 28 [90%] [7.50dB] [on]
  Front Right: Playback 28 [90%] [7.50dB] [on]
Simple mixer control 'Capture',0
  Capabilities: cvolume cswitch penum
  Capture channels: Front Left - Front Right
  Limits: Capture 0 - 54
  Front Left: Capture 25 [46%] [-21.00dB] [on]
  Front Right: Capture 25 [46%] [-21.00dB] [on]
Simple mixer control 'Capture',1
  Capabilities: cvolume cswitch penum
  Capture channels: Front Left - Front Right
  Limits: Capture 0 - 54
  Front Left: Capture 54 [100%] [22.50dB] [off]
  Front Right: Capture 54 [100%] [22.50dB] [off]
Simple mixer control 'Digital',0
  Capabilities: cvolume penum
  Capture channels: Front Left - Front Right
  Limits: Capture 0 - 120
  Front Left: Capture 120 [100%] [30.00dB]
  Front Right: Capture 120 [100%] [30.00dB]
Simple mixer control 'Digital Beep',0
  Capabilities: pvolume pvolume-joined pswitch pswitch-joined penum
  Playback channels: Mono
  Limits: Playback 0 - 15
  Mono: Playback 15 [100%] [0.00dB] [off]
Simple mixer control 'Dock Mic Boost',0
  Capabilities: volume penum
  Playback channels: Front Left - Front Right
  Capture channels: Front Left - Front Right
  Limits: 0 - 3
  Front Left: 3 [100%] [30.00dB]
  Front Right: 3 [100%] [30.00dB]
Simple mixer control 'Docking Mic',0
  Capabilities: pvolume pswitch penum
  Playback channels: Front Left - Front Right
  Limits: Playback 0 - 31
  Mono:
  Front Left: Playback 0 [0%] [-34.50dB] [off]
  Front Right: Playback 0 [0%] [-34.50dB] [off]
Simple mixer control 'Input Source',0
  Capabilities: cenum
  Items: 'Mic' 'Internal Mic' 'Mix' 'Docking-Station'
  Item0: 'Mic'
Simple mixer control 'Input Source',1
  Capabilities: cenum
  Items: 'Mic' 'Internal Mic' 'Mix' 'Docking-Station'
  Item0: 'Mix'
Simple mixer control 'Internal Mic',0
  Capabilities: pvolume pswitch penum
  Playback channels: Front Left - Front Right
  Limits: Playback 0 - 31
  Mono:
  Front Left: Playback 0 [0%] [-34.50dB] [off]
  Front Right: Playback 0 [0%] [-34.50dB] [off]
Simple mixer control 'Internal Mic Boost',0
  Capabilities: volume penum
  Playback channels: Front Left - Front Right
  Capture channels: Front Left - Front Right
  Limits: 0 - 3
  Front Left: 3 [100%] [30.00dB]
  Front Right: 3 [100%] [30.00dB]

Offline

#4 2012-04-18 19:17:42

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 30,330
Website

Re: ALSA sound too quiet

This may be crazy, as I'm just learning to use alsa effectively myself.  But I imagine you could create a new pcm in .asoundrc that duplicates the default but uses a ttable setting to amplify.  An example

pcm.louder {
	type plug
	slave.pcm "dmix"
	ttable.0.0 2.0
	ttable.1.1 2.0
}

You'd then have to set "louder" as the default device.  The two "2.0"s can be adjusted for further amplification if needed.  But perhaps to start you should bring them closer to 1.0, then adjust from there (to avoid potential(??) speaker damage).

FYI: this is for stereo sound.  The ttable lines would have to be repeated for each channel if there are more channels.

I did try this, and it works when testing with aplay.

Last edited by Trilby (2012-04-18 19:18:37)


"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman

Offline

#5 2012-04-18 19:21:14

Lockheed
Member
Registered: 2010-03-16
Posts: 1,527

Re: ALSA sound too quiet

My .asoundrc was empty. How do I set default ALSA device?

Offline

#6 2012-04-18 19:30:15

Gcool
Member
Registered: 2011-08-16
Posts: 1,456

Re: ALSA sound too quiet


Burninate!

Offline

#7 2012-04-18 19:32:23

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 30,330
Website

Re: ALSA sound too quiet

Try this in your ~/.asoundrc

pcm.louder {
	type plug
	slave.pcm "dmix"
	ttable.0.0 2.0
	ttable.1.1 2.0
}

pcm.!default "louder"

This "works", but bear in mind I'm still learning what all these asoundrc entries do so there might be a much "smarter" way.  All I know about this came from a careful reading of the .asoundrc in Breb's signature and a little skimming of the archlinux alsa wiki and alsa's own wiki.  For the quick solution though, just adjust the two "2.0" numbers.  They are volume multipliers.


GCool, I believe this is different, as he needs to set the new pcm as default, it's not setting a new actual device.

Last edited by Trilby (2012-04-18 19:33:47)


"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman

Offline

#8 2012-04-18 19:35:54

brebs
Member
Registered: 2007-04-03
Posts: 3,742

Re: ALSA sound too quiet

Well, the *first* thing to try is all the model= options - look in e.g. /usr/src/linux/Documentation/sound/alsa/HD-Audio-Models.txt

Offline

#9 2012-04-18 19:47:45

Lockheed
Member
Registered: 2010-03-16
Posts: 1,527

Re: ALSA sound too quiet

Trilby wrote:

Try this in your ~/.asoundrc

pcm.louder {
	type plug
	slave.pcm "dmix"
	ttable.0.0 2.0
	ttable.1.1 2.0
}

pcm.!default "louder"

This "works", but bear in mind I'm still learning what all these asoundrc entries do so there might be a much "smarter" way.  All I know about this came from a careful reading of the .asoundrc in Breb's signature and a little skimming of the archlinux alsa wiki and alsa's own wiki.  For the quick solution though, just adjust the two "2.0" numbers.  They are volume multipliers.


GCool, I believe this is different, as he needs to set the new pcm as default, it's not setting a new actual device.

Thanks, it works but I had to set it to 8.0 to get noticable volume increase.

Offline

#10 2012-04-18 20:25:27

Lockheed
Member
Registered: 2010-03-16
Posts: 1,527

Re: ALSA sound too quiet

Is there a way to only make flash content louder? With loud volume of 8.0 sound of other sources gets distorted.

Offline

#11 2012-04-18 21:42:05

brebs
Member
Registered: 2007-04-03
Posts: 3,742

Re: ALSA sound too quiet

You would have to use flash's own volume control - it uses the standard PCM named "default".

Now how about trying the "model=" parameters, and fixing this the *proper* way?

Offline

#12 2012-04-18 21:46:10

Lockheed
Member
Registered: 2010-03-16
Posts: 1,527

Re: ALSA sound too quiet

I am not sure what exactly you are suggesting. I do not have HD-Audio-Models.txt file, but I found it online and all it is, is list of soundcard models.

Offline

#13 2012-04-19 17:36:38

Lockheed
Member
Registered: 2010-03-16
Posts: 1,527

Re: ALSA sound too quiet

So, my soundcard model is 'thinkpad'. I add this line to
/etc/modprobe.d/alsa-base.conf
and
/etc/modprobe.d/sound.conf

options snd-hda-intel model=thinkpad

It did not change much, if anything.

Last edited by Lockheed (2012-04-19 17:44:27)

Offline

#14 2012-04-20 06:30:49

praxis
Member
Registered: 2008-01-30
Posts: 16

Re: ALSA sound too quiet

I had a similar problem so I added the following to my /etc/asound.conf:

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
  }

This creates an option in the alsa-mixer tool called "Pre-Amp" that allows you to boost the pcm.

Last edited by praxis (2012-04-20 06:31:15)

Offline

#15 2012-04-20 06:53:37

Lockheed
Member
Registered: 2010-03-16
Posts: 1,527

Re: ALSA sound too quiet

praxis wrote:

This creates an option in the alsa-mixer tool called "Pre-Amp" that allows you to boost the pcm.

Useful stuff. Thanks.

Offline

Board footer

Powered by FluxBB