You are not logged in.

#1 2009-10-13 01:27:28

hungerfish
Member
Registered: 2009-09-13
Posts: 254

Alsa Sound mixer woes.

Hi,
I have a SBLive sound card, to which I have attached two amplifiers. One is connected to the front-output-jack, the other to the rear (analog).
I've been using this setup for ages, and have always had one minor problem: It has always been a pain to level out the mixer settings, so that both amplifiers output at roughly the same volume.
This has always been especially difficult, due to the fact that I need to dualboot this system with windows...

Anyhow, I was wondering if anyone has an idea how I could simplify my setup?? cool

What I currently do is, using Windows, where both rear and front output levels are linked to the same volume, I just adjust both amps to match.
I then try and get the same volume using linux & alsa by fiddling with the mixer settings.
Basically the Master, PCM and Wave Mixer settings control the front , while Wave Surround controls the rear. They are not linked, and more annoyingly I have found that the rear needs to be about 25% more muted than the front to match the 'volume' at which windows outputs.

I get around this in apps like mplayer or audacious by using software-volume-control, but anything else, for instance games, I need to rely on being able to adjust volume levels from inside the app.
Things like Dosbox just don't play well here, so more often than not I need to manually adjust both front and rear mixer levels (and restore things after I'm done).

Now I know I could use PulseAudio or such things, but I'm wondering if there is a 'pure-alsa' way of doing this.
Any pointers would be great, because this has recently turned into quite an issue for me... roll


Beetles and bacteria are vastly more successful than humans in terms of survival.

Offline

#2 2009-10-13 03:05:56

thisoldman
Member
From: Pittsburgh
Registered: 2009-04-25
Posts: 1,172

Re: Alsa Sound mixer woes.

The alsa driver has a command line mixer, 'amixer'.  I use amixer to raise, lower and mute the sound via Openbox keybindings.

amixer -c 0 -q set Master 3%+ unmute     # Increase volume 3%
amixer -c 0 -q set Master 3%- unmute     # Decrease volume 3%
amixer -c 0 -q set Master toggle         # Toggle mute

You'll have to check the man page for all the options and syntax.  You could set up simple scripts to adjust the volume, start the game and to restore the volume when gameplaying is done.

I hope this helps.

Offline

#3 2009-10-13 13:53:48

hungerfish
Member
Registered: 2009-09-13
Posts: 254

Re: Alsa Sound mixer woes.

Ok, I'll look into that, but I was thinking of something more 'universal'.

Kind of like 'routing' the different outputs through a 'virtual'-one which could be governed by only one volume-level.
I'm just not sure if and how this can be done...

EDIT:

So I tried fiddling with amixer, as I call all games that I play in dosbox via individual scripts (to which I link to in my openbox menu), so adding those few commands wouldn't really be a problem or more work, as those scripts need to be written anyway...
But, while adjusting the 'Master'-mixer level works just fine, 'Wave Surround' just doesn't work, neither from the script nor 'manually'.

This is the relevant output from:

> amixer scontrols
Simple mixer control 'Master',0
Simple mixer control 'Wave Surround',0

So a line like

amixer -c 0 -q set Wave Surround 20%+ unmute

should work, should it not?

EDIT2:

ok, putting Wave Surround in "" solves it.... roll

But I'm still looking for a more generic solution!!

Last edited by hungerfish (2009-10-13 23:58:14)


Beetles and bacteria are vastly more successful than humans in terms of survival.

Offline

Board footer

Powered by FluxBB