You are not logged in.

#1 2003-10-15 10:08:54

Moritz
Member
From: Cologne, NRW, Germany
Registered: 2002-10-12
Posts: 166

automaticaly loading modules

hey!

I currently use ALSA modules to enable my SB-Audigy. Everything works perfectly! big_smile
I load them on startup by adding them to the "modules"-line at the rc.conf

My question: I don't want to load them at startup, because I didn't use it all the time. How to configure AL, to load the modules by using /dev/sound/dsp or mixer or so...?

Regards,
Moritz

Offline

#2 2003-10-15 14:28:50

Jagged
Member
From: Blacksburg, VA
Registered: 2003-07-18
Posts: 153

Re: automaticaly loading modules

write yourself a script like:

#!/bin/sh

#ALSA module-loading script
modprobe snd-audigy #or whatever

#eof


#!/bin/sh

#ALSA module unloading
lsmod | awk `{print $1;}` | grep snd | xargs rmmod

#eof

off-topic:
It's sad when i tried to post this by pressing ESC :wq   sad


Nkawtg...n!

Offline

#3 2003-10-15 14:47:23

famavolat
Member
From: Louisville, KY
Registered: 2003-09-22
Posts: 80
Website

Re: automaticaly loading modules

off-topic:
It's sad when i tried to post this by pressing ESC :wq

lol nice.

Offline

#4 2003-10-15 16:26:53

Xentac
Forum Fellow
From: Victoria, BC
Registered: 2003-01-17
Posts: 1,797
Website

Re: automaticaly loading modules

Problem with loading those drivers with modules with something like modules.conf (or a silly little bash script) is that you won't get your old mixer settings... everything will be off and muted.  You can use modules.conf to run scripts (I'm pretty sure...) to load your old settings if you really want to, but I figured that most systems wouldn't take much of a hit to have sound modules loaded all the time...


I have discovered that all of mans unhappiness derives from only one source, not being able to sit quietly in a room
- Blaise Pascal

Offline

#5 2003-10-15 18:07:40

Moritz
Member
From: Cologne, NRW, Germany
Registered: 2002-10-12
Posts: 166

Re: automaticaly loading modules

Xentac wrote:

but I figured that most systems wouldn't take much of a hit to have sound modules loaded all the time...

okay... another example: printers, scanners...

@Jagged:
where should I add them?
I've tried to add this to the /etc/modules.devfs:

probeall  /dev/sound  snd-audigy snd mixer...

or better

probeall  /dev/usb/lp0  usb-printer

Offline

#6 2003-10-15 20:21:50

Xentac
Forum Fellow
From: Victoria, BC
Registered: 2003-01-17
Posts: 1,797
Website

Re: automaticaly loading modules

Didn't you read that huge note at the top saying that modules.devfs is generated automatically and you shouldn't change it? ;o)

If you check in modules.devfs for examples, it looks like you want to use the alias option, not the probeall option.  ie. alias /dev/usb/lp0 usb-printer


I have discovered that all of mans unhappiness derives from only one source, not being able to sit quietly in a room
- Blaise Pascal

Offline

#7 2003-10-16 00:43:48

marin_linuxer
Member
From: San Rafael, CA U.S.A.
Registered: 2003-09-03
Posts: 111
Website

Re: automaticaly loading modules

Jagged wrote:

off-topic:
It's sad when i tried to post this by pressing ESC :wq   sad

Hey, try "ESC|^ZZ" ... (That's a SHIFT-ZZ) in Vim, it's the same, but faster!


-- Linux!  Isn't it time?

Offline

#8 2003-10-16 00:53:18

zen_guerrilla
Member
From: Greece
Registered: 2002-12-22
Posts: 259

Re: automaticaly loading modules

Xentac wrote:

Problem with loading those drivers with modules with something like modules.conf (or a silly little bash script) is that you won't get your old mixer settings... everything will be off and muted.

This could be easily solved by adding these lines in /etc/modules.conf:

post-install snd-emu10k1 /usr/sbin/alsactl restore
pre-remove snd-emu10k1 /usr/sbin/alsactl store

Offline

#9 2003-10-16 05:04:22

Jagged
Member
From: Blacksburg, VA
Registered: 2003-07-18
Posts: 153

Re: automaticaly loading modules

ive known about ZZ... but its hard to break a habit, yes


Nkawtg...n!

Offline

#10 2003-10-17 07:27:19

Moritz
Member
From: Cologne, NRW, Germany
Registered: 2002-10-12
Posts: 166

Re: automaticaly loading modules

I read a littlebit in the alsa-docs and found this:

# ALSA portion
        alias char-major-116 snd
        alias snd-card-0 snd-emu10k1
    # module options should go here

        # OSS/Free portion
        alias char-major-14 soundcore
        alias sound-slot-0 snd-card-0
    
    # card #1
    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

So I added that to my modules.conf

But it only loads the midi devices... don't know why :cry:

Offline

#11 2003-10-17 15:19:16

Jagged
Member
From: Blacksburg, VA
Registered: 2003-07-18
Posts: 153

Re: automaticaly loading modules

you still need to modprobe snd-emu10k1 (is emu10k1 the driver for audigy??)

and you need to run alsamixer and unmute everyithing


Nkawtg...n!

Offline

#12 2003-10-17 15:44:56

Xentac
Forum Fellow
From: Victoria, BC
Registered: 2003-01-17
Posts: 1,797
Website

Re: automaticaly loading modules

Yeah, right now you have the aliases set up, but nothing to try to load them.  I have an alsa init script kicking around somewhere if you want to look at that... or you could write your own.  Those instructions are based off of the assumption that you're running something like redhat or debian that does include an init script.


I have discovered that all of mans unhappiness derives from only one source, not being able to sit quietly in a room
- Blaise Pascal

Offline

#13 2003-10-19 10:27:10

Moritz
Member
From: Cologne, NRW, Germany
Registered: 2002-10-12
Posts: 166

Re: automaticaly loading modules

snd-emu10k1 is the right module, yeah...

If I try to modprobe it says:
"Note: /etc/modules.conf is more recent than /lib/modules/2.4.22/modules.dep"
what should I do?

Offline

#14 2003-10-19 10:35:35

neri
Forum Fellow
From: Victoria, Canada
Registered: 2003-05-04
Posts: 553

Re: automaticaly loading modules

Hi,

Moritz wrote:

snd-emu10k1 is the right module, yeah...

If I try to modprobe it says:
"Note: /etc/modules.conf is more recent than /lib/modules/2.4.22/modules.dep"
what should I do?

depmod -a as root should help.

bye neri

Offline

#15 2003-10-19 14:47:33

Moritz
Member
From: Cologne, NRW, Germany
Registered: 2002-10-12
Posts: 166

Re: automaticaly loading modules

thanks for that.... mordprobe work now

but I ain't got the /dev/sound devices....
lsmod lists:

Module                  Size  Used by    Tainted: P
snd-emu10k1            72484   0  (autoclean)
snd-hwdep               5280   0  (autoclean) [snd-emu10k1]
snd-pcm                61284   0  (autoclean) [snd-emu10k1]
snd-page-alloc          6388   0  (autoclean) [snd-emu10k1 snd-pcm]
snd-timer              14468   0  (autoclean) [snd-pcm]
snd-rawmidi            13984   0  (autoclean) [snd-emu10k1]
snd-seq-device          4304   0  (autoclean) [snd-emu10k1 snd-rawmidi]
snd-util-mem            1392   0  (autoclean) [snd-emu10k1]
snd-ac97-codec         42136   0  (autoclean) [snd-emu10k1]
snd                    31236   0  (autoclean) [snd-emu10k1 snd-hwdep snd-pcm snd-timer snd-rawmidi snd-seq-device snd-util-mem snd-ac97-codec]
nvidia               1629984  11  (autoclean)
smbfs                  38704   1  (autoclean)

But only "admmidi  amidi  dmmidi  midi00" exist at /dev/sound....

Offline

Board footer

Powered by FluxBB