Re: [linux-audio-user] auto-restoring alsamixer settings?

From: Dragan Noveski <perodog@email-addr-hidden>
Date: Mon Mar 19 2007 - 15:49:37 EET

Paul Winkler wrote:
> On Sat, Mar 17, 2007 at 04:52:03PM -0400, Lee Revell wrote:
>
>> On 3/17/07, Dragan Noveski <perodog@email-addr-hidden> wrote:
>>
>>> hi list,
>>> yesterday i successfully replaced the debian alsa drivers/libs/etc with
>>> the selfcompiled ones, v1.0.14rc3 - and (almost) everything works
>>> wonderful!
>>>
>>> well, the only thing what does not work as previously is that the
>>> alsamixer settings for my onboard device (intel8x0) are not restored
>>> after a reboot - everything muted!
>>> if i plug the usb interface, the mixer is not muted, but there are some
>>> old settings saved, and if i change the settings, on the next boot they
>>> are not restored too.
>>> plugin the multiface(cardbus) works wery well, since we use the
>>> 'hdspmixer' and not the 'alsamixer' for that one.
>>>
>> Debian stores asound.state in a non-standard location (somwhere under
>> /var IIRC). I think the easiest fix is to replace your self-compiled
>> alsactl with Debian's, or hack the startup/shutdown scripts to
>> save/restore asound.state where you want it.
>>
>
> I doubt there's anything special about their version of alsactl, they
> probably just do what you're suggesting in an init script.
> (On gentoo, the relevant script is called /etc/init.d/alsasound.)
> On shutdown, you want to do:
>
> alsactl store
>
> On startup, you want to do:
>
> alsactl restore
>
>
>
problem solved!
me ashamed, cause it was pretty much easier than i was thinking.

i create a file in the /etc/init.d called 'alsasoundresotoremixer',
containing only:

alsactl restore

and a file called 'alsasoundstoremixer', containing:

alsactl store

making them both executable,

than i made some syn-links:

/etc/rc0.d/K15alsasoundstoremixer
/etc/rc1.d/K15alsasoundstoremixer
/etc/rc6.d/K15alsasoundstoremixer
/etc/rcS.d/S59alsasoundrestoremixer

to the both,

and it works now very well, the mixer settings are restored on a new boot,
if i do some changes, i don't have to store by myself, on the next boot the
changes are restored!

this actually all is documented in the alsa-wiki, but i was confused
of how many different 'tipps' are listed there!

very much thanks for support!!

cheers,
doc
Received on Mon Mar 19 16:15:12 2007

This archive was generated by hypermail 2.1.8 : Mon Mar 19 2007 - 16:15:12 EET