⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 readme.modules

📁 linux-2.6.15.6
💻 MODULES
字号:
Building a modular sound driver================================  The following information is current as of linux-2.1.85. Check the otherreadme files, especially README.OSS, for information not specific tomaking sound modular.  First, configure your kernel. This is an idea of what you should besetting in the sound section:<M> Sound card support <M> 100% Sound Blaster compatibles (SB16/32/64, ESS, Jazz16) support   I have SoundBlaster. Select your card from the list.<M> Generic OPL2/OPL3 FM synthesizer support <M> FM synthesizer (YM3812/OPL-3) support   If you don't set these, you will probably find you can play .wav filesbut not .midi. As the help for them says, set them unless you know yourcard does not use one of these chips for FM support.  Once you are configured, make zlilo, modules, modules_install; reboot.Note that it is no longer necessary or possible to configure sound in thedrivers/sound dir. Now one simply configures and makes one's kernel andmodules in the usual way. Then, add to your /etc/modprobe.conf something like:alias char-major-14-* sbinstall sb /sbin/modprobe -i sb && /sbin/modprobe adlib_cardoptions sb io=0x220 irq=7 dma=1 dma16=5 mpu_io=0x330options adlib_card io=0x388     # FM synthesizer Alternatively, if you have compiled in kernel level ISAPnP support:alias char-major-14 sbpost-install sb /sbin/modprobe "-k" "adlib_card"options adlib_card io=0x388  The effect of this is that the sound driver and all necessary bits andpieces autoload on demand, assuming you use kerneld (a sound choice) andautoclean when not in use. Also, options for the device drivers areset. They will not work without them. Change as appropriate for your card.If you are not yet using the very cool kerneld, you will have to "modprobe-k sb" yourself to get things going. Eventually things may be fixed sothat this kludgery is not necessary; for the time being, it seems to workwell.  Replace 'sb' with the driver for your card, and give it the rightoptions. To find the filename of the driver, look in/lib/modules/<kernel-version>/misc. Mine looks like:adlib_card.o # This is the generic OPLx driveropl3.o # The OPL3 driversb.o # <<The SoundBlaster driver. Yours may differ.>>sound.o # The sound driveruart401.o # Used by sb, maybe other cards Whichever card you have, try feeding it the options that would be thedefault if you were making the driver wired, not as modules. You canlook at function referred to by module_init() for the card to see whatargs are expected. Note that at present there is no way to configure the io, irq and otherparameters for the modular drivers as one does for the wired drivers.. Oneneeds to pass the modules the necessary parameters as arguments, eitherwith /etc/modprobe.conf or with command-line args to modprobe, e.g.modprobe sb io=0x220 irq=7 dma=1 dma16=5 mpu_io=0x330modprobe adlib_card io=0x388 recommend using /etc/modprobe.conf.Persistent DMA Buffers:The sound modules normally allocate DMA buffers during open() anddeallocate them during close(). Linux can often have problems allocatingDMA buffers for ISA cards on machines with more than 16MB RAM. This isbecause ISA DMA buffers must exist below the 16MB boundary and it is quitepossible that we can't find a large enough free block in this region afterthe machine has been running for any amount of time. The way to avoid thisproblem is to allocate the DMA buffers during module load and deallocatethem when the module is unloaded. For this to be effective we need to loadthe sound modules right after the kernel boots, either manually or by aninit script, and keep them around until we shut down. This is a littlewasteful of RAM, but it guarantees that sound always works.To make the sound driver use persistent DMA buffers we need to pass thesound.o module a "dmabuf=1" command-line argument. This is normally donein /etc/modprobe.conf like so:options sound		dmabuf=1If you have 16MB or less RAM or a PCI sound card, this is wasteful andunnecessary. It is possible that machine with 16MB or less RAM will findthis option useful, but if your machine is so memory-starved that itcannot find a 64K block free, you will be wasting even more RAM by keepingthe sound modules loaded and the DMA buffers allocated when they are notneeded. The proper solution is to upgrade your RAM. But you do also havethis improper solution as well. Use it wisely.  I'm afraid I know nothing about anything but my setup, being more of atext-mode guy anyway. If you have options for other cards or other helpfulhints, send them to me, Jim Bray, jb@as220.org, http://as220.org/jb.

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -