FS#10003 - alsa-utils new options: STATE_FILE, SAVE_VOLUME, MUTE_VOLUME

Attached to Project: Arch Linux
Opened by Paul Bredbury (brebs) - Friday, 28 March 2008, 22:02 GMT
Last edited by Roman Kyrylych (Romashka) - Saturday, 27 December 2008, 08:26 GMT
Task Type Feature Request
Category Packages: Extra
Status Closed
Assigned To Aaron Griffin (phrakture)
Architecture All
Severity Very Low
Priority Normal
Reported Version 2007.08-2
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

Hi, here's some extensions to the alsa service, so I won't have to patch the runscript any more :)

SAVE_VOLUME makes saving the volume levels optional.

MUTE_VOLUME defaults to no, so as not to change existing behaviour, and because some soundcards might have the Master channel named something else, or not even be able to mute it. Useful for my crummy laptop soundcard which otherwise often makes a loud crackle on system poweroff.

I've also incorporated  FS#9383  (configurable STATE_FILE).

Enclosed are what the new alsa & alsa.conf.d files should be.
This task depends upon

This task blocks these from closing
 FS#9384 - [initscripts] allow read only root 
Closed by  Roman Kyrylych (Romashka)
Saturday, 27 December 2008, 08:26 GMT
Reason for closing:  Fixed
Comment by Glenn Matthys (RedShift) - Tuesday, 17 June 2008, 13:59 GMT
Status as of this writing: not implemented in alsa-utils 1.0.16-1. No package in testing.

I think the MUTE_VOLUME parameter is superfluous (what a nice word).
Comment by Glenn Matthys (RedShift) - Tuesday, 22 July 2008, 21:25 GMT
Instead of all these variables, why not just use ALSA_ARGS="" in the conf.d file, like most other daemons do?
Comment by Aaron Griffin (phrakture) - Tuesday, 22 July 2008, 21:30 GMT
Because they all do different things, it's not one arg to a daemon. POWERSAVE echo's something to sysfs, SAVE_VOLUME is a boolean indicating if volume info should be saved or not. MUTE_VOLUME mutes the master channel on stop.

actually... if I think about this, I can't see much point in ever shutting SAVE_VOLUME off, but the MUTE_VOLUME one seems useful. STATE_FILE, obviously, is a little useful. Especially for a read-only /etc
Comment by Glenn Matthys (RedShift) - Tuesday, 22 July 2008, 21:36 GMT
Meh, I dislike these features because they're not transparant enough. But I still suggest we use ALSA_ARGS instead of STATE_FILE, since you know what's happening there, and is in line with the other conf.d's. So by default we'd ship the conf.d file with ALSA_ARGS="--file /etc/asound.state". And it's compatible with the suggested SAVE/MUTE_VOLUME features, and additional args can be added without other weird tricks.
Comment by Aaron Griffin (phrakture) - Tuesday, 22 July 2008, 21:47 GMT
That's probably the best idea. An empty ALSA_ARGS will work by default too.

Does this work? http://archlinux.org/pipermail/arch-commits/2008-July/014168.html
Comment by Glenn Matthys (RedShift) - Tuesday, 22 July 2008, 21:53 GMT
Tested that patch here, works OK for me!
Comment by Aaron Griffin (phrakture) - Tuesday, 22 July 2008, 21:55 GMT
This will be part of the next alsa-utils release (soon)

Loading...