📄 introduction
字号:
Introduction Notes on Modular Sound Drivers and SoundcoreWade Hampton 2/14/2001Purpose: ========This document provides some general notes on the modular sound drivers and their configuration, along with the support modules sound.o and soundcore.o.Note, some of this probably should be added to the Sound-HOWTO!Note, soundlow.o was present with 2.2 kernels but is not required for 2.4.x kernels. References have been removedto this.Copying:========noneHistory:========0.1.0 11/20/1998 First version, draft1.0.0 11/1998 Alan Cox changes, incorporation in 2.2.0 as Documentation/sound/oss/Introduction1.1.0 6/30/1999 Second version, added notes on making the drivers, added info on multiple sound cards of similar types,] added more diagnostics info, added info about esd. added info on OSS and ALSA.1.1.1 19991031 Added notes on sound-slot- and sound-service. (Alan Cox)1.1.2 20000920 Modified for Kernel 2.4 (Christoph Hellwig)1.1.3 20010214 Minor notes and corrections (Wade Hampton) Added examples of sound-slot-0, etc.Modular Sound Drivers:======================Thanks to the GREAT work by Alan Cox (alan@lxorguk.ukuu.org.uk),[And Oleg Drokin, Thomas Sailer, Andrew Veliath and more than a few others - not to mention Hannu's original code being designed well enough to cope with that kind of chopping up](Alan)the standard Linux kernels support a modular sound driver. FromAlan's comments in linux/drivers/sound/README.FIRST: The modular sound driver patches were funded by Red Hat Software (www.redhat.com). The sound driver here is thus a modified version of Hannu's code. Please bear that in mind when considering the appropriate forums for bug reporting.The modular sound drivers may be loaded via insmod or modprobe. To support all the various sound modules, there are two general support modules that must be loaded first: soundcore.o: Top level handler for the sound system, provides a set of functions for registration of devices by type. sound.o: Common sound functions required by all modules.For the specific sound modules (e.g., sb.o for the Soundblaster), read the documentation on that module to determine what optionsare available, for example IRQ, address, DMA.Warning, the options for different cards sometime use different names for the same or a similar feature (dma1= versus dma16=). As a last resort, inspect the code (search for MODULE_PARM).Notes:1. There is a new OpenSource sound driver called ALSA which is currently under development: http://www.alsa-project.org/ The ALSA drivers support some newer hardware that may not be supported by this sound driver and also provide some additional features.2. The commercial OSS driver may be obtained from the site: http://www/opensound.com. This may be used for cards that are unsupported by the kernel driver, or may be used by other operating systems. 3. The enlightenment sound daemon may be used for playing multiple sounds at the same time via a single card, eliminating some of the requirements for multiple sound card systems. For more information, see: http://www.tux.org/~ricdude/EsounD.html The "esd" program may be used with the real-player and mpeg players like mpg123 and x11amp. The newer real-player and some games even include built-in support for ESD!Building the Modules:=====================This document does not provide full details on building the kernel, etc. The notes below apply only to making the kernelsound modules. If this conflicts with the kernel's README,the README takes precedence. 1. To make the kernel sound modules, cd to your /usr/src/linux directory (typically) and type make config, make menuconfig, or make xconfig (to start the command line, dialog, or x-based configuration tool). 2. Select the Sound option and a dialog will be displayed. 3. Select M (module) for "Sound card support".4. Select your sound driver(s) as a module. For ProAudio, Sound Blaster, etc., select M (module) for OSS sound modules. [thanks to Marvin Stodolsky <stodolsk@erols.com>]A5. Make the kernel (e.g., make bzImage), and install the kernel.6. Make the modules and install them (make modules; make modules_install).Note, for 2.5.x kernels, make sure you have the newer module-init-tools installed or modules will not be loaded properly. 2.5.x requires anupdated module-init-tools.Plug and Play (PnP:===================If the sound card is an ISA PnP card, isapnp may be usedto configure the card. See the file isapnp.txt in the directory one level up (e.g., /usr/src/linux/Documentation).Also the 2.4.x kernels provide PnP capabilities, see the file NEWS in this directory.PCI sound cards are highly recommended, as they are far easier to configure and from what I have read, they useless resources and are more CPU efficient.INSMOD:=======If loading via insmod, the common modules must be loaded in the order below BEFORE loading the other sound modules. The card-specificmodules may then be loaded (most require parameters). For example,I use the following via a shell script to load my SoundBlaster:SB_BASE=0x240SB_IRQ=9SB_DMA=3SB_DMA2=5SB_MPU=0x300#echo Starting sound/sbin/insmod soundcore/sbin/insmod sound #echo Starting sound blaster..../sbin/insmod uart401/sbin/insmod sb io=$SB_BASE irq=$SB_IRQ dma=$SB_DMA dma16=$SB_DMA2 mpu_io=$SB_MPWhen using sound as a module, I typically put these commandsin a file such as /root/soundon.sh.MODPROBE:=========If loading via modprobe, these common files are automatically loaded when requested by modprobe. For example, my /etc/modprobe.conf contains:alias sound sb options sb io=0x240 irq=9 dma=3 dma16=5 mpu_io=0x300All you need to do to load the module is: /sbin/modprobe sbSound Status:=============The status of sound may be read/checked by: cat (anyfile).au >/dev/audio[WWH: This may not work properly for SoundBlaster PCI 128 cardssuch as the es1370/1 (see the es1370/1 files in this directory) as they do not automatically support uLaw on /dev/audio.]The status of the modules and which modules depend on which other modules may be checked by: /sbin/lsmod/sbin/lsmod should show something like the following: sb 26280 0 uart401 5640 0 [sb] sound 57112 0 [sb uart401] soundcore 1968 8 [sb sound]Removing Sound: =============== Sound may be removed by using /sbin/rmmod in the reverse orderin which you load the modules. Note, if a program has a sound deviceopen (e.g., xmixer), that module (and the modules on which it depends) may not be unloaded.For example, I use the following to remove my Soundblaster (rmmodin the reverse order in which I loaded the modules):/sbin/rmmod sb/sbin/rmmod uart401/sbin/rmmod sound/sbin/rmmod soundcoreWhen using sound as a module, I typically put these commandsin a script such as /root/soundoff.sh.Removing Sound for use with OSS: ================================ If you get really stuck or have a card that the kernel moduleswill not support, you can get a commercial sound driver fromhttp://www.opensound.com. Before loading the commercial sounddriver, you should do the following:1. remove sound modules (detailed above)
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -