1<html><head><meta http-equiv="Content-Type" content="text/html; charset=ANSI_X3.4-1968"><title>Header Files</title><meta name="generator" content="DocBook XSL Stylesheets V1.78.1"><link rel="home" href="index.html" title="Writing an ALSA Driver"><link rel="up" href="basic-flow.html" title="Chapter 2. Basic Flow for PCI Drivers"><link rel="prev" href="basic-flow-destructor.html" title="Destructor"><link rel="next" href="card-management.html" title="Chapter 3. Management of Cards and Components"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Header Files</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="basic-flow-destructor.html">Prev</a> </td><th width="60%" align="center">Chapter 2. Basic Flow for PCI Drivers</th><td width="20%" align="right"> <a accesskey="n" href="card-management.html">Next</a></td></tr></table><hr></div><div class="section"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="basic-flow-header-files"></a>Header Files</h2></div></div></div><p> 2 For the above example, at least the following include files 3 are necessary. 4 5 </p><div class="informalexample"><pre class="programlisting"> 6 7 #include <linux/init.h> 8 #include <linux/pci.h> 9 #include <linux/slab.h> 10 #include <sound/core.h> 11 #include <sound/initval.h> 12 13 </pre></div><p> 14 15 where the last one is necessary only when module options are 16 defined in the source file. If the code is split into several 17 files, the files without module options don't need them. 18 </p><p> 19 In addition to these headers, you'll need 20 <code class="filename"><linux/interrupt.h></code> for interrupt 21 handling, and <code class="filename"><asm/io.h></code> for I/O 22 access. If you use the <code class="function">mdelay()</code> or 23 <code class="function">udelay()</code> functions, you'll need to include 24 <code class="filename"><linux/delay.h></code> too. 25 </p><p> 26 The ALSA interfaces like the PCM and control APIs are defined in other 27 <code class="filename"><sound/xxx.h></code> header files. 28 They have to be included after 29 <code class="filename"><sound/core.h></code>. 30 </p></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="basic-flow-destructor.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="basic-flow.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="card-management.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Destructor </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> Chapter 3. Management of Cards and Components</td></tr></table></div></body></html> 31