You are not logged in.

#1 2005-07-10 17:14:36

Gullible Jones
Member
Registered: 2004-12-29
Posts: 4,863

ALSA volumes not stored properly - what gives?

Recently, I've encountered a problem wherein my ALSA settings are not stored, even though I have the alsa daemon running. The relevent settings are for PCM and CD - when I shut down, both are at 100 and unmuted; after booting, PCM is at 100 and muted, and CD is at 0 and muted. Any other changes I make are also lost on the next bootup. What is going on?

Offline

#2 2005-07-10 17:32:42

Dusty
Schwag Merchant
From: Medicine Hat, Alberta, Canada
Registered: 2004-01-18
Posts: 5,986
Website

Re: ALSA volumes not stored properly - what gives?

same here. I suspect its a udev thing; the devices haven't had time to set up when alsa is called. I added

      sleep 5

underneath

      stat_busy "Restoring ALSA Levels"

in /etc/rc.d/alsamixer and it works ok. Since I background the alsa daemon, this doesn't slow down bootup. THere's got to be a better way.

Dusty

Offline

#3 2005-07-11 06:39:43

tmadhavan
Member
From: Wales :D
Registered: 2004-03-26
Posts: 441

Re: ALSA volumes not stored properly - what gives?

I assume you've done an

alsactl store

Then you can restore with

 alsactl restore

in rc.local. Tho, I think you might know that asready big_smile

Offline

#4 2005-07-11 10:56:24

Gullible Jones
Member
Registered: 2004-12-29
Posts: 4,863

Re: ALSA volumes not stored properly - what gives?

I use the alsa script in /etc/rc.d - does the same thing. (Yes, it uses alsactl.)

Offline

#5 2005-07-11 14:52:49

phrakture
Arch Overlord
From: behind you
Registered: 2003-10-29
Posts: 7,879
Website

Re: ALSA volumes not stored properly - what gives?

Gullible Jones wrote:

I use the alsa script in /etc/rc.d - does the same thing. (Yes, it uses alsactl.)

Ditto - the /etc/rc.d/alsa script is part of one of the alsa packages now (alsa-lib?)

Offline

#6 2005-07-11 15:32:15

Dusty
Schwag Merchant
From: Medicine Hat, Alberta, Canada
Registered: 2004-01-18
Posts: 5,986
Website

Re: ALSA volumes not stored properly - what gives?

Yeah, that's the script I meant. Regardless, it only seems to work if you give udev time to propogate the devices. Maybe there's a way to set them up automatically. THis was discussed a while ago.  I had to use the sleep 5 solution on my old system, but when I set up my new one it was working fine until recently (ie: with all the kerfluffle over udev).

Dusty

Offline

#7 2005-07-11 15:35:51

phrakture
Arch Overlord
From: behind you
Registered: 2003-10-29
Posts: 7,879
Website

Re: ALSA volumes not stored properly - what gives?

Ummm another thing to point out - if your module isn't loaded at the time of the alsa call, nothing will happen - if you are either:
a) running alsa *before* hotplug
b) backgrounding hotplug
This could be the cause - if you're running hotplug, run it before alsa as a non-backgrounded service (or dump it altogether, or use /etc/rd.c/hwd)

Offline

#8 2005-07-11 15:53:15

Dusty
Schwag Merchant
From: Medicine Hat, Alberta, Canada
Registered: 2004-01-18
Posts: 5,986
Website

Re: ALSA volumes not stored properly - what gives?

True enough. I don't use hotplug though; I load my modules in the MODULES array.

Dusty

Offline

#9 2005-07-11 15:57:43

phrakture
Arch Overlord
From: behind you
Registered: 2003-10-29
Posts: 7,879
Website

Re: ALSA volumes not stored properly - what gives?

Dusty wrote:

True enough. I don't use hotplug though; I load my modules in the MODULES array.

tongue I was talking to the original poster, heh  tongue

Offline

#10 2005-07-11 16:09:22

Dusty
Schwag Merchant
From: Medicine Hat, Alberta, Canada
Registered: 2004-01-18
Posts: 5,986
Website

Re: ALSA volumes not stored properly - what gives?

I was talking to the world at large.

I'm not sure how hotplug works, but does it ensure that the devices have been created by udev before exiting? Because if it just loads the modules and tells udev to have at it, its not going to solve the issue.

Assuming, of course, that I am correct in assuming that the delay is in udev's creating the devices.

Dusty

Offline

#11 2005-07-11 17:53:09

Gullible Jones
Member
Registered: 2004-12-29
Posts: 4,863

Re: ALSA volumes not stored properly - what gives?

I don't use hotplug. Hotplug, in my experience, sucks.

As for my situation with the sound, it's the same as Dusty's: this didn't happen until the latest udev upgrade.

(Hmm... Why should udev take so long to do its job?)

Offline

#12 2005-07-12 06:40:25

Shofs
Member
From: Central Illinois
Registered: 2004-12-15
Posts: 184

Re: ALSA volumes not stored properly - what gives?

What if you compile your ALSA stuff into the kernel rather than as modules?

Offline

#13 2005-07-12 10:28:19

Gullible Jones
Member
Registered: 2004-12-29
Posts: 4,863

Re: ALSA volumes not stored properly - what gives?

Wouldn't help, this is a udev problem.

Offline

#14 2005-07-12 14:42:57

Dusty
Schwag Merchant
From: Medicine Hat, Alberta, Canada
Registered: 2004-01-18
Posts: 5,986
Website

Re: ALSA volumes not stored properly - what gives?

I would think it should be possible to make a udev rule to create the specific sound devices statically. Or maybe those devices could specifically be populated to /dev using mknod commands. I wonder...

Dusty

Offline

Board footer

Powered by FluxBB