Sophie

Sophie

distrib > CentOS > 6 > i386 > by-pkgid > cf93d8a8acdcc6fe2225039da0502495 > files > 4130

kernel-doc-2.6.32-131.17.1.el6.centos.plus.noarch.rpm

<?xml version="1.0" encoding="ANSI_X3.4-1968" standalone="no"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=ANSI_X3.4-1968" /><title>Chapter&#160;2.&#160;Basic Flow for PCI Drivers</title><meta name="generator" content="DocBook XSL Stylesheets V1.75.2" /><link rel="home" href="index.html" title="Writing an ALSA Driver" /><link rel="up" href="index.html" title="Writing an ALSA Driver" /><link rel="prev" href="ch01s12.html" title="oss directory" /><link rel="next" href="ch02s02.html" title="Full Code Example" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Chapter&#160;2.&#160;Basic Flow for PCI Drivers</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="ch01s12.html">Prev</a>&#160;</td><th width="60%" align="center">&#160;</th><td width="20%" align="right">&#160;<a accesskey="n" href="ch02s02.html">Next</a></td></tr></table><hr /></div><div class="chapter" title="Chapter&#160;2.&#160;Basic Flow for PCI Drivers"><div class="titlepage"><div><div><h2 class="title"><a id="basic-flow"></a>Chapter&#160;2.&#160;Basic Flow for PCI Drivers</h2></div></div></div><div class="toc"><p><b>Table of Contents</b></p><dl><dt><span class="section"><a href="ch02.html#basic-flow-outline">Outline</a></span></dt><dt><span class="section"><a href="ch02s02.html">Full Code Example</a></span></dt><dt><span class="section"><a href="ch02s03.html">Constructor</a></span></dt><dd><dl><dt><span class="section"><a href="ch02s03.html#basic-flow-constructor-device-index">1) Check and increment the device index.</a></span></dt><dt><span class="section"><a href="ch02s03.html#basic-flow-constructor-create-card">2) Create a card instance</a></span></dt><dt><span class="section"><a href="ch02s03.html#basic-flow-constructor-create-main">3) Create a main component</a></span></dt><dt><span class="section"><a href="ch02s03.html#basic-flow-constructor-main-component">4) Set the driver ID and name strings.</a></span></dt><dt><span class="section"><a href="ch02s03.html#basic-flow-constructor-create-other">5) Create other components, such as mixer, MIDI, etc.</a></span></dt><dt><span class="section"><a href="ch02s03.html#basic-flow-constructor-register-card">6) Register the card instance.</a></span></dt><dt><span class="section"><a href="ch02s03.html#basic-flow-constructor-set-pci">7) Set the PCI driver data and return zero.</a></span></dt></dl></dd><dt><span class="section"><a href="ch02s04.html">Destructor</a></span></dt><dt><span class="section"><a href="ch02s05.html">Header Files</a></span></dt></dl></div><div class="section" title="Outline"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="basic-flow-outline"></a>Outline</h2></div></div></div><p>
        The minimum flow for PCI soundcards is as follows:

        </p><div class="itemizedlist"><ul class="itemizedlist" type="disc"><li class="listitem"><p>define the PCI ID table (see the section
          <a class="link" href="ch04s05.html" title="PCI Entries"><em class="citetitle">PCI Entries
          </em></a>).</p></li><li class="listitem"><p>create <code class="function">probe()</code> callback.</p></li><li class="listitem"><p>create <code class="function">remove()</code> callback.</p></li><li class="listitem"><p>create a <span class="structname">pci_driver</span> structure
	  containing the three pointers above.</p></li><li class="listitem"><p>create an <code class="function">init()</code> function just calling
	  the <code class="function">pci_register_driver()</code> to register the pci_driver table
	  defined above.</p></li><li class="listitem"><p>create an <code class="function">exit()</code> function to call
	  the <code class="function">pci_unregister_driver()</code> function.</p></li></ul></div><p>
      </p></div></div><div class="navfooter"><hr /><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="ch01s12.html">Prev</a>&#160;</td><td width="20%" align="center">&#160;</td><td width="40%" align="right">&#160;<a accesskey="n" href="ch02s02.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">oss directory&#160;</td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top">&#160;Full Code Example</td></tr></table></div></body></html>