alsa-base README.Debian ----------------------- contents -------- news loading modules creating device files reloading modules after suspension unloading modules initscript internal speaker news ---- Last updated 30 April 2009 loading modules --------------- The initscripts in some unstable releases of alsa-base between Debian 3.0 and Debian 3.1 attempted to load ALSA driver modules on boot. The initscript in the current alsa-base package does not do this. ALSA has a special built-in module autoloading system. You do not have to make use of it, and it is useless if your /dev directory is managed by udev, but in case you do want to use it, here is a brief explanation of how it is supposed to work. When the "snd" module is loaded and the user tries to open a sound device file with a minor number that indicates that card number N is wanted, snd modprobes "snd-card-N". Thus, if you set up module loader configuration file /etc/modprobe.d/sound.conf to look like this: alias snd-card-0 snd-cs46xx options snd-cs46xx index=0 then snd-cs46xx will be automagically loaded when it is needed to handle the attempted open() of the sound device. The "index=0" option ensures that when snd-cs46xx is loaded the first card that it registers is given index 0. If you have an additional sound card of the same type then make the file look like this: alias snd-card-0 snd-cs46xx alias snd-card-1 snd-cs46xx options snd-cs46xx index=0,1 If you have, instead, an additional sound card of a different type then make the file look like this: alias snd-card-0 snd-cs46xx options snd-cs46xx index=0 alias snd-card-1 snd-emu10k1 options snd-emu10k1 index=1 ALSA supports up to eight sound cards. The module loader configuration files just described are additional to /etc/modprobe.d/alsa-base.conf which is shipped as conffile with the alsa-base package. The files contain basic configuration entries which don't normally need to be customized. The entries may include: * ALSA autoloader aliases * an entry for each normal sound card driver that will cause a command to be executed after the driver has initialized * an entry for each abnormal driver (i.e., a driver that drives hardware such as a TV card or modem that is not suited to be the primary sound card) preventing it from grabbing index 0 Suppose you decide that you need to load a certain driver, snd-foo, with options: "dma1=0 ctlport=0x530". The recommended way to set this up is to create additional files in /etc/modprobe.d/ each containing an "options" line: # /etc/modprobe.d/alsa_local.conf options snd-foo dma1=0 ctlport=0x530 creating device files --------------------- ALSA native device files are located in /dev/snd/. (ALSA's kernel- OSS-emulation device files are of course the same as the OSS device files.) Udev takes care of creating devices files when modules are loaded. reloading modules across APM suspend-and-resume ----------------------------------------------- During suspension many peripherals are switched off; on resuming the machine these peripherals need to be re-initialized. Many ALSA drivers do this properly but some still do not. If this problem affects you and if your ALSA drivers are built as loadable modules and your kernel supports module unloading then you can work around the problem by unloading the driver before suspending and loading it again after resuming. This will be done for you automatically if you add the name of the problematic sound card driver module to the variable force_unload_modules_before_suspend variable in /etc/default/alsa. E.g., if your CS46XX and AZX cards don't work properly after resuming from APM suspend, add the names of their driver modules to the list: force_unload_modules_before_suspend="snd-cs46xx snd-azx" restoring sound volumes across APM suspend-and-resume ----------------------------------------------------- alsa-base provides an APM script in /etc/apm/scripts.d/alsa to automatically store/restore sound volumes during APM suspension. Since this option relies on alsactl, please install the recommended alsa-utils package. unloading modules ----------------- If you want to unload ALSA driver modules then you will have to stop all applications that are using ALSA device files. You can do both in one step by running: alsa force-unload getting OSS support ------------------- If you need old-style OSS devices for legacy applications, you should install the oss-compat package, which should get in charge of setting up your system with the required compatibility modules. Any Debian package needing these devices should depend on oss-compat. internal speaker ---------------- If you want to get the internal speaker to work comment # blacklist snd-pcsp in /etc/modprobe.d/alsa-base-blacklist.conf