Gentoo Archives: gentoo-user

From: Stroller <stroller@××××××××××××××××××.uk>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] asound.state bug? Can anyone else reproduce this, please?
Date: Tue, 08 May 2012 01:54:51
Message-Id: 2663B068-F479-4A7A-904C-D65834DBDCEF@stellar.eclipse.co.uk
In Reply to: Re: [gentoo-user] asound.state bug? Can anyone else reproduce this, please? by Walter Dnes
1 On 8 May 2012, at 01:35, Walter Dnes wrote:
2
3 > On Mon, May 07, 2012 at 09:40:41PM +0100, Stroller wrote
4 >
5 >> I'm also seeing that maybe alsa's default state is muted, so that
6 >> the muted state would be correct even if the sound state is not being
7 >> restored.
8 >
9 > According to the Alsa-Project HDA Intel page
10 > http://www.alsa-project.org/main/index.php/Matrix:Module-hda-intel
11 > and probably applicable for all cards. The quote is...
12 >
13 >> Now adjust your soundcard's volume levels. All mixer channels are
14 >> muted by default. You must use a native mixer program to unmute
15 >> appropriate channels, for example alsamixer from the alsa-utils
16 >> package.
17
18
19 Right, but you snipped the important part of my quoted text:
20
21 That's fine - restore the previous backup of sound from when audio was
22 playing (`cp ~/asound.state.bu /var/lib/alsa/asound.state`) and reboot
23 the system. Now the unmuted state is restored and you can listen to
24 your music without starting /etc/init.d/alsasound.
25
26 Alternatively, you can ensure that the alsa startup script is stopped and disabled (`/etc/init.d/alsasound stop && rc-update del alsasound default`), manually ensure the sound is unmuted (play music), run `/etc/init.d/alsasound save` and reboot the system - the *unmuted* state is restored, even though /etc/init.d/alsasound has never been started.
27
28 So the default muting is overridden, even though this has not been requested.
29
30 This appears to contradict the option in /etc/conf.d/alsasound - RESTORE_ON_START.
31 We can set RESTORE_ON_START="no" and yet the setting is overridden - the sound (unmuting) *is* restored on start!
32
33 This is obviously easiest to see and demonstrate using muting, but volume levels and so on are restored, too.
34
35 I kinda feel silly making a distinction about this, because "of course" a muted soundcard is useless, and of course I want sound to be restored. But I've been trying to figure my way through how ALSA works, and it seems to be via the /etc/init.d/alsasound script, and yet I find that script is just being ignored and that the last state is restored, irrespective of that script's directives. And I guess that bugs me.
36
37 I mean, the statement "of course a muted soundcard is useless" begs the question of why ALSA ships like that in the first place (but the ALSA mailing list remains silent in response to my previous question, so let's not go there). But if it makes sense for ALSA to ship with channels muted by default, surely it makes sense for the distro not to override that without the user specifying otherwise.
38
39 I hope this makes sense. I'm not used to doing desktoppy stuff on Linux, and I do kinda feel like I'm walking in bizarro-land with this one.
40
41 Stroller.