Skip to contentSkip to conversation

Alsa module configuration

DISCUSSION Andy Wingo 3 participants 6 messages Aug 30, 2002 – Sep 2, 2002 2 messages not in the archive

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

Andy Wingo

author
#1 lore raw

Hey alsa kernel wizards,

Is there any way we can get rid of this?

On Thu, 29 Aug 2002, frank pirrone wrote to linux-audio-user:

Quoted 16 lines

*** grab the Alsa 0.9.0rc3 tarball and compile it
*** Configure /etc/modules.conf as follows:

# ALSA native device support
alias char-major-116 snd
options snd snd_major=116 snd_cards_limit=1
alias snd-card-0 snd-cs4236
options snd-cs4236 snd_id="Crystal Audio" snd_index=0 snd_isapnp=1 # OSS/Free compatibility setup
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 sound-slot-0 snd-card-0

It just struck me how every alsa install has to do this. I am not a kernel wiz, but it would be so much nicer if (somehow) this just worked:

alias snd-card-0 snd-cs4236

And maybe an options line with the snd_id or something. But it seems that these are the only crucial pieces of information. I know, I know, alsaconf is supposed to help. Still. Is there any way this can be simpler?

Just wondering, yo.

wingo.

-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf

#2 lore raw

At Fri, 30 Aug 2002 00:26:48 -0400,

Quoted 13 lines · Andy Wingo

Hey alsa kernel wizards,

Is there any way we can get rid of this?

On Thu, 29 Aug 2002, frank pirrone wrote to linux-audio-user:

Quoted 6 lines

*** grab the Alsa 0.9.0rc3 tarball and compile it
*** Configure /etc/modules.conf as follows:

# ALSA native device support
alias char-major-116 snd
options snd snd_major=116 snd_cards_limit=1

these are needed to load alsa modules _dynamically_.
if you're using an init script for loading the alsa, then basically you don't need them.

Quoted 1 line
Quoted 1 line

alias snd-card-0 snd-cs4236

this value is usually referred in alsasound init script. so this is somehow essential if you use this init script. also, this alias is called from the alsa itself, if the corresponding card (in this case #0) is not found. then the alsa tries to load the module automatically.

Quoted 1 line
Quoted 1 line

options snd-cs4236 snd_id="Crystal Audio" snd_index=0 snd_isapnp=1

this is somehow fundmamental, too, but mostly omissible. snd_id is not always necessary. if it's omitted, then the default name "card0" is set. this id is used in saving the status into /etc/asound.state.
snd_index is not always necessary, too, unless you have multiple cards. even if you have multiple cards, usually it can be omitted. the index option ensures the order of the driver loading. snd_isapnp=1 is the default setting, so you can ommit it safely.

Quoted 8 lines
Quoted 8 lines

# OSS/Free compatibility setup
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 sound-slot-0 snd-card-0

these stuffs are only for loading OSS emulation modules _dynamically_. if you load these modules statically prior to the actual use, you don't need these entries.

Quoted 10 lines

It just struck me how every alsa install has to do this. I am not a kernel wiz, but it would be so much nicer if (somehow) this just worked:

alias snd-card-0 snd-cs4236

And maybe an options line with the snd_id or something. But it seems that these are the only crucial pieces of information. I know, I know, alsaconf is supposed to help. Still. Is there any way this can be simpler?

yes, most of them are NOT necessary.

it depends on your system - you can omit most of the values above. but setting the configuration above is more safer (i.e. portable on every system).

Takashi

-------------------------------------------------------
This sf.net email is sponsored by: OSDN - Tired of that same old cell phone? Get a new here for FREE!
https://www.inphonic.com/r.asp?r=sourceforge1&refcode1=vs3390

#3 lore raw
Quoted 3 lines

these are needed to load alsa modules _dynamically_.
if you're using an init script for loading the alsa, then basically you don't need them.

which script? is there one? alsasound doesn't load the OSS modules, for example.

-------------------------------------------------------
This sf.net email is sponsored by: OSDN - Tired of that same old cell phone? Get a new here for FREE!
https://www.inphonic.com/r.asp?r=sourceforge1&refcode1=vs3390

#4 lore raw

At Mon, 02 Sep 2002 08:48:20 -0400,

Quoted 7 lines · Paul Davis
Quoted 4 lines

these are needed to load alsa modules _dynamically_.
if you're using an init script for loading the alsa, then basically you don't need them.

which script? is there one? alsasound doesn't load the OSS modules, for example.

The above sentence is for the entries cited there, namely the following two:

Quoted 3 lines
Quoted 3 lines

# ALSA native device support
alias char-major-116 snd
options snd snd_major=116 snd_cards_limit=1

About OSS configuration, it was explained separately in another part after the sentence above.

Takashi

-------------------------------------------------------
This sf.net email is sponsored by: OSDN - Tired of that same old cell phone? Get a new here for FREE!
https://www.inphonic.com/r.asp?r=sourceforge1&refcode1=vs3390

#5 lore raw
Quoted 2 lines

About OSS configuration, it was explained separately in another part after the sentence above.

but we don't provide any such script ... without it and without the modules.conf entries, any OSS program will fail, right?

-------------------------------------------------------
This sf.net email is sponsored by: OSDN - Tired of that same old cell phone? Get a new here for FREE!
https://www.inphonic.com/r.asp?r=sourceforge1&refcode1=vs3390

A message that is not in the archive (sent off-list or not yet received): [email protected]

#7 lore raw

At Mon, 02 Sep 2002 09:24:20 -0400,

Quoted 6 lines · Paul Davis
Quoted 3 lines

About OSS configuration, it was explained separately in another part after the sentence above.

but we don't provide any such script ... without it and without the modules.conf entries, any OSS program will fail, right?

well, you can load the modules manually, of course :)

recently i came to believe that loading the oss modules in the init script would make the life easier. then we can delete all these complex things. the only necessary configuration is an alias

alias snd-card-0 snd-xxxxx

and others are not necessary. even the alias above can be omitted if alsasound init script reads another configuration file such like /etc/sysconfig/sound and retrieves the driver modules from it.

nevertheless, the two entries i referred to are irrelevant with OSS. as long as you're using alsasound init script, they are not needed, although you may get annoying messages from the kernel if you access to an unexisting device (but this also happens e.g. when you access to /dev/mixer3 which is not aliased).

Takashi

-------------------------------------------------------
This sf.net email is sponsored by: OSDN - Tired of that same old cell phone? Get a new here for FREE!
https://www.inphonic.com/r.asp?r=sourceforge1&refcode1=vs3390