site  contact  subhomenews

Sound settings not remembered after reboot

February 22, 2012 — BarryK
This was something dumb that I did late in 2011. Thanks to broomdodger for bringing this to my attention. Fixed.

if you go here and do an anonymous login, you can download the latest /etc/init.d/10alsa:
http://bkhome.org/fossil/woof2.cgi/finfo?name=woof-code/rootfs-skeleton/etc/init.d/10alsa

Comments

testing asound.state
Username: shinobar
The issue is not there. The file /etc/asound.state should be created at initial only when the audio setup succeeded, and be checked before saving. Otherwise, asound.state is always broken once audio setup failed and no chance to recover unless manually run the alsaconf. From line 60- [quote]set Playback 100% unmute set "SB Live Analog/Digital Output Jack" off set "Audigy Analog/Digital Output Jack" off set Speaker 75 % unmute EOF [b][ $? -eq 0 ] && alsactl -f /etc/asound.state store # shinobar[/b] else alsactl -f /etc/asound.state restore #from /etc/asound.state. fi[/quote]

Full diff
Username: shinobar
"[code]# diff 10alsa-barry 10alsa-shinobar 9c9 < #111229 add test file /etc/asound.state exists. --- > # 7dec2011 shinobar: wait loading modules, conditional saving asound.state (merged form the Quickset Wary, wary-511-01q) 11d10 < #120222 revert 111229. 17a17,23 > # shinobar: wait sound drivers loaded > GOOD="" > for I in $(seq 8); do > [ "`lsmod | grep '^snd_'`" != "" ] && GOOD="yes" && break > sleep 1 > done > [ "$GOOD" != "" ] || exit 23,26c29,37 < for I in $(seq 4); do #110111 shinobar: for reliable sound detection on HP Compac nc4010. < sleep 0.5 #110113 reduce 1 to 0.5. 110216 move up. < [ -c /dev/mixer ] && break #note, /dev/mixer is deleted in /etc/rc.d/rc.sysinit. < done --- > #110111 shinobar: for reliable sound detection on HP Compac nc4010. > #110113 reduce 1 to 0.5. 110216 move up. > GOOD="" > for I in $(seq 8); do > [ -c /dev/mixer ] && GOOD="yes" && break > sleep 0.5 > done > [ "$GOOD" != "" ] || exit > touch /tmp/rc_d_rc_services_alsa_ok # shinobar: delayedrun may use it (precaution/compatibility) 65c76 < --- > [ $? -eq 0 ] && alsactl -f /etc/asound.state store # shinobar 72c83 < alsactl -f /etc/asound.state store #saves to /etc/asound.state. 111229 add test file exists. 120222 revert. --- > [ -f /etc/asound.state ] && alsactl -f /etc/asound.state store #saves to /etc/asound.state. # shinobar[/code]

Re testing asound.state
Username: BarryK
"shinobar, Yes, much better solution! I have put that into Woof.

Extra space?
Username: BarryK
"This line was provided by pemasu: [i]set Speaker 75 % unmute [/i] But, shouldn't it be like the others: [i]set Speaker 75% unmute [/i]


Tags: woof