Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 63015 - RFE: Set reasonable ALSA mixer defaults on (first) emerge
Summary: RFE: Set reasonable ALSA mixer defaults on (first) emerge
Status: RESOLVED CANTFIX
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: High enhancement (vote)
Assignee: Gentoo Sound Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-09-06 08:17 UTC by Per Cederberg
Modified: 2004-09-27 06:27 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments
set_defaults.sh (set_defaults.sh,133 bytes, text/plain)
2004-09-22 03:16 UTC, Per Cederberg
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Per Cederberg 2004-09-06 08:17:30 UTC
The first time alsa-utils is installed all the mixer levels are at zero (0), which leads many new users to assume that their Linux sound setup doesn't work. This could be avoided if the default mixer levels for master, CD playback and PCM were set to sensible defaults upon the first emerge of alsa-utils.

One way to accomplish this would be to use alsactl to create a default /etc/asound.state file in the emerge work directory. This file could then be processed via a script to set the mixer values to 15 (or another reasonable value) for the three previously mentioned outputs. Finally it could be installed as /etc/asound.state which would make the new settings the default ones when /etc/init.d/alsasound is started for the first time.

How about it? Should I go ahead a create the needed script?


Reproducible: Always
Steps to Reproduce:
Comment 1 Jeremy Huddleston (RETIRED) gentoo-dev 2004-09-22 02:42:31 UTC
if you can get a way to do it, I'd say great, but the problem is that the asound.state files are specific to the individual cards, and alsa-utils package is independent of knowing what cards are installed... so I don't think it's possible...
Comment 2 Per Cederberg 2004-09-22 03:16:14 UTC
Created attachment 40152 [details]
set_defaults.sh

I understand that the asound.state files are different for each soundcard.
That's why my proposed solution depends on first getting the default one, then
processing it a bit, and finally restoring it. Should work most of the time.
And I don't think the processing have to be so complex.

The attached shell script works this way, please try it out. I haven't set any
absolute paths or anything, so you'll probably want to adjust that if this
solution seems viable. Also, the logic is pretty simple, just change all 0
values to 15. That should give people an idea that the volume is too low.
Comment 3 Per Cederberg 2004-09-27 00:38:37 UTC
Reopening to encourage reviewing the added patch (newer than the bug itself and the previous reason for rejection).
Comment 4 Jeremy Huddleston (RETIRED) gentoo-dev 2004-09-27 05:37:56 UTC
that's great, but the problem is that it can't be incorporated into portage because we can't do something like that when we install a package.
Comment 5 Per Cederberg 2004-09-27 06:24:37 UTC
Could you please provide some specific reasons?

If it is really technically impossible (hard to see) to run this automatically, it should still be possible to provide it through the "ebuild ... config" mechanism. And displaying a note about it among the pkg_postinst messages.
Comment 6 Per Cederberg 2004-09-27 06:27:58 UTC
Or if the issue is changing the ASLA mixer values, then use this method to create a default asound.state file that can be installed. That way, reasonable mixer levels will be set the first time the user starts alsasound.