Re: alsa re-muting itself

From: John Oliver (joliver_at_john-oliver.net)
Date: 04/09/04


Date: 09 Apr 2004 00:41:26 GMT

On Thu, 01 Apr 2004 23:04:34 -0600, Tommy Reynolds wrote:
> On Thu, 01 Apr 2004 23:53:40 +0000, John Oliver wrote:
>
>> I installed alsa-1.0.3rc2 on a Red Hat 9 box. The modules load and all
>> looks well. I use amixer or alsamixer to unmute and turn up the volume
>> some. If I exit and re-enter the mixer, the settings are still there.
>> The man pages say nothing about anything needing to be done to save the
>> settings. But... if I try to play a sound, nothing happens. When I
>> look at the mixer again, it's muted. What's the deal? :-)
>
> See if the module has been loaded with the "autoclean" flag set:
>
> # lsmod | fgrep snd-
> snd-pcm-oss 44228 0 (autoclean)
> snd-ali5451 16452 1 (autoclean)
> snd-pcm 84580 0 (autoclean) [snd-pcm-oss snd-ali5451]
> snd-page-alloc 9652 0 (autoclean) [snd-pcm]
> snd-timer 18980 0 (autoclean) [snd-pcm]
> snd-ac97-codec 57932 0 (autoclean) [snd-ali5451]
> snd-mixer-oss 15888 1 (autoclean) [snd-pcm-oss]
> snd 45764 0 (autoclean) [snd-pcm-oss snd-ali5.....]
>
> If so, the module is being unloaded after it sits idle for a few
> moments. When the module gets loaded again, the settings are back to
> their default (muted).

If I run alsamixer and make a change, that change will sit there for
seconds, minutes... probably hours or days. It's only after I try to
play a sound that it re-sets itself.

> To fix this, add two lines to the "/etc/modules.conf" file:
>
> post-install snd-card-0 /usr/sbin/alsactl restore >/dev/null 2>&1 || :
>
> pre-remove snd-card-0 /usr/sbin/alsactl store >/dev/null 2>&1 || :

Here's what alsa gave me:

[root@timdl1 root]# cat /etc/modules.conf
alias eth0 8139too

# --- BEGIN: Generated by ALSACONF, do not edit. ---
# --- ALSACONF verion 1.0.3rc2 ---
alias char-major-116 snd
alias char-major-14 soundcore
alias sound-service-0-0 snd-mixer-oss
alias sound-service-0-1 snd-seq-oss
alias sound-service-0-3 snd-pcm-oss
alias sound-service-0-8 snd-seq-oss
alias sound-service-0-12 snd-pcm-oss
alias snd-card-0 snd-intel8x0
# --- END: Generated by ALSACONF, do not edit. ---

alias sound-slot-0 snd-intel8x0
post-install sound-slot-0 /bin/aumix-minimal -f /etc/.aumixrc -L
>/dev/null 2>&1 || :
pre-remove sound-slot-0 /bin/aumix-minimal -f /etc/.aumixrc -S
>/dev/null 2>&1 || :

Can I have more than one post-install and pre-remove?

-- 
* John Oliver                              http://www.john-oliver.net/ *
* California gun owners - protect your rights and join the CRPA today! *
* http://www.crpa.org/         Free 3 month trial membership available *
* San Diego shooters come to http://groups.yahoo.com/group/sdshooting/ *


Relevant Pages

  • re alsa sound and xmms
    ... alias parport_lowlevel parport_pc ... alias char-major-14-* soundcore ... alias sound-service-0-0 snd-mixer-oss ...
    (Fedora)
  • ALSA working kernel 2.6.7 not sure how
    ... alias char-major-14 soundcore ... alias sound-service-0-0 snd-mixer-oss ... alias sound-service-0-12 snd-pcm-oss ... pcmC3D3c ...
    (Debian-User)
  • ALSA problems sarge 2.4.25
    ... Extensive Googling and several kernel recompiles later ... Here is the output of aadebug from the ALSA website ... alias char-major-14 soundcore ... alias sound-service-0-0 snd-mixer-oss ...
    (Debian-User)
  • Module problems/questions with Slackware 9.1 and Linux-2.6.1
    ... I reconfigured, built, built the modules, and upgraded ... The modules.conf conversion script seems to have missed the alias ... winmodem driver, ppp, pcmci card drivers, etc). ... alias sound-service-0-0 snd-mixer-oss ...
    (comp.os.linux.development.system)
  • No Sound (ThinkPad/Fedora/2.6.0-test11)
    ... ad1848/cs4248 codec driver Copyright by Hannu Savolainen 1993-1996 ... alias parport_lowlevel parport_pc ... alias sound-service-0-0 snd-mixer-oss ... echo "Starting CS4232 driver" ...
    (linux.redhat.install)