For the above example, at least the following include files are necessary.
#include <linux/init.h> #include <linux/pci.h> #include <linux/slab.h> #include <sound/core.h> #include <sound/initval.h>
In addition to these headers, you'll need
<linux/interrupt.h>
for interrupt
handling, and <asm/io.h>
for I/O
access. If you use the mdelay()
or
udelay()
functions, you'll need to include
<linux/delay.h>
too.
The ALSA interfaces like the PCM and control APIs are defined in other
<sound/xxx.h>
header files.
They have to be included after
<sound/core.h>
.