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

📄 575-578.html

📁 linux-unix130.linux.and.unix.ebooks130 linux and unix ebookslinuxLearning Linux - Collection of 12 E
💻 HTML
字号:
<HTML>

<HEAD>

<TITLE>Using Linux:Managing the Kernel</TITLE>

<META NAME="ROBOTS" CONTENT="NOINDEX, NOFOLLOW">
<SCRIPT>
<!--
function displayWindow(url, width, height) {
        var Win = window.open(url,"displayWindow",'width=' + width +
',height=' + height + ',resizable=1,scrollbars=yes');
}
//-->
</SCRIPT>
</HEAD>

 -->




<!--ISBN=0789716232//-->

<!--TITLE=Using Linux//-->

<!--AUTHOR=William Ball//-->

<!--PUBLISHER=Macmillan Computer Publishing//-->

<!--IMPRINT=Que//-->

<!--CHAPTER=32//-->

<!--PAGES=575-578//-->

<!--UNASSIGNED1//-->

<!--UNASSIGNED2//-->



<CENTER>

<TABLE BORDER>

<TR>

<TD><A HREF="573-575.html">Previous</A></TD>

<TD><A HREF="../ewtoc.html">Table of Contents</A></TD>

<TD><A HREF="578-580.html">Next</A></TD>

</TR>

</TABLE>

</CENTER>

<P><BR></P>

<P><FONT SIZE="+1"><B><I>Configuring your sound card</I></B></FONT></P>

<DL>

<DD><B>1.</B>&nbsp;&nbsp;Determine what device driver module supports your sound board. The best place to start looking for information is in the Linux HOWTOs. The most up-to-date copies are kept at <A HREF="http://sunsite.unc.edu/ldp/">http://sunsite.unc.edu/LDP/</A>, but relatively current copies of these documents are usually included with CD-ROM distributions.

<DD><B>2.</B>&nbsp;&nbsp;Determine the device addresses for your audio card. The easiest way to do this on a dual-boot Windows 95/Linux machine is to look up the audio card in the device manager to get the interrupt and IO addresses. Barring that, it is possible to configure Plug and Play devices as discussed in the next section.

<DD><B>3.</B>&nbsp;&nbsp;Using your favorite text editor, edit the <TT>/etc/conf.modules</TT> file. Make sure you have a backup of this file somewhere so you can restore it in case things go wrong. My <TT>/etc/conf.modules</TT> looks like this:

<!-- CODE SNIP //-->

<PRE>

alias eth0 ne

options ne io=0xe000 irq=12

alias scsi_hostadapter ppa

options ppa ppa_nybble=0

alias sound sb

</PRE>

<!-- END CODE SNIP //-->

<BR>The key element here is the line <TT>alias sound sb</TT>. In this case, the <TT>init</TT> scripts included with Linux look for the sound alias in the <TT>/etc/conf.modules</TT> file and, if they find it, load the sound modules. In this case, the defaults work fine. The modules attempt to find the sound card, and in the case of common hardware, everything will work just fine.

<DD><B>4.</B>&nbsp;&nbsp;If you (or the sound card&#146;s configuration program) have set the configuration to non-default settings, you might need to specify these when adding your sound card. Generally, the IO address, IRQ(s), and DMA channels must be specified. The following example tells the SoundBlaster driver to look for the card at the factory default values:

<!-- CODE SNIP //-->

<PRE>

alias sound sb

options sound ioaddr=220 irq=5 dma=1,5

</PRE>

<!-- END CODE SNIP //-->

<BR>This tells the driver to look for the SoundBlaster card at IO address 220, interrupt 5, and using DMA channels 1 and 5. For 8-bit SoundBlaster and SoundBlaster Pros, only one 8-bit DMA channel is required.

</DL>



<TABLE BORDER="2" BORDERCOLOR="#0000" ALIGN="CENTER">

<TR><TD><FONT SIZE="+1"><B>Determining the device driver module for your sound card</B></FONT>

<BR>Determining what device driver module supports your sound card can take quite a bit of time because there is a lot of documentation to wade through for some of the weirder configurations. The Creative Labs&#146; ubiquitous SoundBlaster series is well supported, and can even be made to work without recompiling the kernel. Even the cheaper Opti and Crystal audio chipsets can be made to work with some effort, but these are the cards in which it&#146;s best to combine all the drivers you need into one module.</TABLE>





<TABLE BORDER="2" BORDERCOLOR="#0000" ALIGN="CENTER">

<TR><TD><FONT SIZE="+1"><B>Using sndconfig to configure SoundBlaster cards</B></FONT>

<BR>If you have a SoundBlaster, SoundBlaster Pro, SoundBlaster 16, 16 Pnp, AWE 32, or AWE 64 sound card, you can use <TT><B>/usr/sbin/sndconfig</B></TT> to configure Plug and Play and the sound modules for you. Although these are the only cards <TT><B>sndconfig</B></TT> officially supports, you can use <TT><B>sndconfig</B></TT> to gain insight into how sound configuration works by looking over the output files (that is, the changes to <TT><B>/etc/conf.modules</B></TT> and <TT><B>/etc/isapnp.conf</B></TT> files). If all this works for you and your SoundBlaster card, you can stop reading this section right now&#133;</TABLE>



<H4 ALIGN="LEFT"><A NAME="Heading6"></A><FONT COLOR="#000077">Plug and Play Devices</FONT></H4>

<P>ISA Plug and Play hardware is becoming more and more common. Although it is a common myth that only Windows 95 supports Plug and Play devices, PCI devices are inherently Plug and Play, and are managed (for the most part) by your PC BIOS with little operating system intervention. ISA Plug and Play is another matter altogether because the ISA bus predates the Plug and Play standard by more than a few years. Most people mean <I>ISA Plug and Play</I> when they utter the words <I>Plug and Play</I>.</P>

<P>Linux can be made to work with ISA Plug and Play devices. The first tool that can be used to make Plug and Play devices work with Linux is your system&#146;s BIOS. Most PC BIOSes have a setting to indicate whether a Plug and Play operating system is installed. Changing the setting to No often causes the BIOS to activate all ISA Plug and Play devices before booting the system. This means that, for the most part, these devices act as regular jumpered devices.</P>

<P>Some BIOSes, however, either do not have this capability, or don&#146;t support the correct Plug and Play specification. There are two specifications: the Intel one, and the Microsoft one. Each is somewhat compatible with the other, but more so in theory than in practice. If this is the case for you, all is not lost.</P>

<P>One ISA Plug and Play utility for Linux can be used to activate ISA Plug and Play devices. There is a good Web page that describes the process in greater detail, as well as links to the software, at <A HREF="http://www.redhat.com/linux-info/pnp/">http://www.redhat.com/linux-info/pnp/</A>.</P>



<TABLE BORDER="2" BORDERCOLOR="#0000" ALIGN="CENTER">

<TR><TD><FONT SIZE="+1"><B>The system will use PnP if it finds a configuration file</B></FONT>

<BR>Red Hat&#146;s <B>init</B> scripts actually look for the PnP package&#146;s configuration files, and automatically call the program to configure the hardware for you if the program is installed according to specifications.</TABLE>



<H3><A NAME="Heading7"></A><FONT COLOR="#000077">Managing Modules</FONT></H3>

<P>Most modules on your system are managed by <TT>kerneld</TT>, but there are times during which manual intervention is required. One limitation is having multiple SCSI adapters of different types in the system. The main SCSI adapter is in the <TT>conf.modules</TT>&#146; <TT>scsi_hostadapter</TT> alias, but since <TT>kerneld</TT> allows only one SCSI setting in the <TT>conf.modules</TT> file, you have a problem. The answer is not overly complicated&#151;the additional SCSI adapter must be managed manually. This is not as big of a deal as it seems, since the SCSI driver can be loaded with one command and then left in memory. In most cases, this is a parallel port SCSI device anyway, such as a Zip drive.</P>

<P>Other circumstances can occur where it is more convenient to manage modules manually. Sound driver modules should be tested by manually loading and unloading them, rather than immediately configuring them into the <TT>/etc/modules.conf</TT> file.</P>

<H4 ALIGN="LEFT"><A NAME="Heading8"></A><FONT COLOR="#000077">Installing Modules</FONT></H4>

<P>To load a module manually from the command line, log on as root and issue the following command:

</P>

<!-- CODE SNIP //-->

<PRE>

/sbin/modprobe &lt;module-name&gt;

</PRE>

<!-- END CODE SNIP //-->

<P>In this case, <TT>&lt;module-name&gt;</TT> is the name of the module you want to install (for instance, use <TT>ppa</TT> to install the Zip driver module). <TT>modprobe</TT> reads its configuration from <TT>/etc/conf.modules</TT> as well, and it accepts aliases as well as real module names on the command line.</P>



<TABLE BORDER="2" BORDERCOLOR="#0000" ALIGN="CENTER">

<TR><TD><FONT SIZE="+1"><B>If you&#146;re logged on as root</B></FONT>

<BR>If you have logged on as root rather than having <TT><B>su</B></TT>&#146;d from a user account, you can leave out the <TT><B>/sbin</B></TT> at the beginning of the command.</TABLE>



<P><BR></P>

<CENTER>

<TABLE BORDER>

<TR>

<TD><A HREF="573-575.html">Previous</A></TD>

<TD><A HREF="../ewtoc.html">Table of Contents</A></TD>

<TD><A HREF="578-580.html">Next</A></TD>

</TR>

</TABLE>

</CENTER>





</td>
</tr>
</table>

<!-- begin footer information -->





</body></html>

⌨️ 快捷键说明

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