diff --git a/sys/dev/sound/driver.c b/sys/dev/sound/driver.c --- a/sys/dev/sound/driver.c +++ b/sys/dev/sound/driver.c @@ -26,10 +26,6 @@ * SUCH DAMAGE. */ -#ifdef HAVE_KERNEL_OPTION_HEADERS -#include "opt_snd.h" -#endif - #include static int diff --git a/sys/dev/sound/pcm/ac97.h b/sys/dev/sound/pcm/ac97.h --- a/sys/dev/sound/pcm/ac97.h +++ b/sys/dev/sound/pcm/ac97.h @@ -26,6 +26,8 @@ * SUCH DAMAGE. */ +#include "ac97_if.h" + #define AC97_MUTE 0x8080 #define AC97_REG_RESET 0x00 @@ -88,8 +90,6 @@ struct ac97_info; -#include "ac97_if.h" - extern kobj_class_t ac97_getmixerclass(void); struct ac97_info *ac97_create(device_t dev, void *devinfo, kobj_class_t cls); diff --git a/sys/dev/sound/pcm/ac97.c b/sys/dev/sound/pcm/ac97.c --- a/sys/dev/sound/pcm/ac97.c +++ b/sys/dev/sound/pcm/ac97.c @@ -26,17 +26,9 @@ * SUCH DAMAGE. */ -#ifdef HAVE_KERNEL_OPTION_HEADERS -#include "opt_snd.h" -#endif - #include -#include - #include -#include "mixer_if.h" - static MALLOC_DEFINE(M_AC97, "ac97", "ac97 codec"); typedef void (*ac97_patch)(struct ac97_info *); diff --git a/sys/dev/sound/pcm/buffer.c b/sys/dev/sound/pcm/buffer.c --- a/sys/dev/sound/pcm/buffer.c +++ b/sys/dev/sound/pcm/buffer.c @@ -28,14 +28,8 @@ * SUCH DAMAGE. */ -#ifdef HAVE_KERNEL_OPTION_HEADERS -#include "opt_snd.h" -#endif - #include -#include "feeder_if.h" - #define SND_USE_FXDIV #define SND_DECLARE_FXDIV #include "snd_fxdiv_gen.h" diff --git a/sys/dev/sound/pcm/channel.h b/sys/dev/sound/pcm/channel.h --- a/sys/dev/sound/pcm/channel.h +++ b/sys/dev/sound/pcm/channel.h @@ -28,6 +28,8 @@ * SUCH DAMAGE. */ +#include "channel_if.h" + struct pcmchan_caps { u_int32_t minspeed, maxspeed; u_int32_t *fmtlist; @@ -244,8 +246,6 @@ (x)->parentchannel->bufhard != NULL) ? \ (x)->parentchannel->bufhard : (y)) -#include "channel_if.h" - int chn_reinit(struct pcm_channel *c); int chn_write(struct pcm_channel *c, struct uio *buf); int chn_read(struct pcm_channel *c, struct uio *buf); diff --git a/sys/dev/sound/pcm/channel.c b/sys/dev/sound/pcm/channel.c --- a/sys/dev/sound/pcm/channel.c +++ b/sys/dev/sound/pcm/channel.c @@ -29,14 +29,7 @@ * SUCH DAMAGE. */ -#ifdef HAVE_KERNEL_OPTION_HEADERS -#include "opt_snd.h" -#endif - #include -#include - -#include "feeder_if.h" int report_soft_formats = 1; SYSCTL_INT(_hw_snd, OID_AUTO, report_soft_formats, CTLFLAG_RW, diff --git a/sys/dev/sound/pcm/dsp.c b/sys/dev/sound/pcm/dsp.c --- a/sys/dev/sound/pcm/dsp.c +++ b/sys/dev/sound/pcm/dsp.c @@ -32,20 +32,7 @@ * SUCH DAMAGE. */ -#ifdef HAVE_KERNEL_OPTION_HEADERS -#include "opt_snd.h" -#endif - #include -#include -#include -#include -#include - -#include -#include -#include -#include struct dsp_cdevpriv { struct snddev_info *sc; diff --git a/sys/dev/sound/pcm/feeder.h b/sys/dev/sound/pcm/feeder.h --- a/sys/dev/sound/pcm/feeder.h +++ b/sys/dev/sound/pcm/feeder.h @@ -27,6 +27,8 @@ * SUCH DAMAGE. */ +#include "feeder_if.h" + struct pcm_feederdesc { u_int32_t type; u_int32_t in, out; diff --git a/sys/dev/sound/pcm/feeder.c b/sys/dev/sound/pcm/feeder.c --- a/sys/dev/sound/pcm/feeder.c +++ b/sys/dev/sound/pcm/feeder.c @@ -27,14 +27,7 @@ * SUCH DAMAGE. */ -#ifdef HAVE_KERNEL_OPTION_HEADERS -#include "opt_snd.h" -#endif - #include -#include - -#include "feeder_if.h" static MALLOC_DEFINE(M_FEEDER, "feeder", "pcm feeder"); diff --git a/sys/dev/sound/pcm/feeder_chain.c b/sys/dev/sound/pcm/feeder_chain.c --- a/sys/dev/sound/pcm/feeder_chain.c +++ b/sys/dev/sound/pcm/feeder_chain.c @@ -26,14 +26,8 @@ * SUCH DAMAGE. */ -#ifdef HAVE_KERNEL_OPTION_HEADERS -#include "opt_snd.h" -#endif - #include -#include "feeder_if.h" - /* chain state */ struct feeder_chain_state { uint32_t afmt; /* audio format */ diff --git a/sys/dev/sound/pcm/feeder_eq.c b/sys/dev/sound/pcm/feeder_eq.c --- a/sys/dev/sound/pcm/feeder_eq.c +++ b/sys/dev/sound/pcm/feeder_eq.c @@ -36,12 +36,7 @@ */ #ifdef _KERNEL -#ifdef HAVE_KERNEL_OPTION_HEADERS -#include "opt_snd.h" -#endif #include -#include -#include "feeder_if.h" #define SND_USE_FXDIV #include "snd_fxdiv_gen.h" diff --git a/sys/dev/sound/pcm/feeder_format.c b/sys/dev/sound/pcm/feeder_format.c --- a/sys/dev/sound/pcm/feeder_format.c +++ b/sys/dev/sound/pcm/feeder_format.c @@ -32,12 +32,7 @@ */ #ifdef _KERNEL -#ifdef HAVE_KERNEL_OPTION_HEADERS -#include "opt_snd.h" -#endif #include -#include -#include "feeder_if.h" #define SND_USE_FXDIV #include "snd_fxdiv_gen.h" diff --git a/sys/dev/sound/pcm/feeder_matrix.c b/sys/dev/sound/pcm/feeder_matrix.c --- a/sys/dev/sound/pcm/feeder_matrix.c +++ b/sys/dev/sound/pcm/feeder_matrix.c @@ -44,12 +44,7 @@ */ #ifdef _KERNEL -#ifdef HAVE_KERNEL_OPTION_HEADERS -#include "opt_snd.h" -#endif #include -#include -#include "feeder_if.h" #define SND_USE_FXDIV #include "snd_fxdiv_gen.h" diff --git a/sys/dev/sound/pcm/feeder_mixer.c b/sys/dev/sound/pcm/feeder_mixer.c --- a/sys/dev/sound/pcm/feeder_mixer.c +++ b/sys/dev/sound/pcm/feeder_mixer.c @@ -27,13 +27,7 @@ */ #ifdef _KERNEL -#ifdef HAVE_KERNEL_OPTION_HEADERS -#include "opt_snd.h" -#endif #include -#include -#include -#include "feeder_if.h" #define SND_USE_FXDIV #include "snd_fxdiv_gen.h" diff --git a/sys/dev/sound/pcm/feeder_rate.c b/sys/dev/sound/pcm/feeder_rate.c --- a/sys/dev/sound/pcm/feeder_rate.c +++ b/sys/dev/sound/pcm/feeder_rate.c @@ -51,12 +51,7 @@ */ #ifdef _KERNEL -#ifdef HAVE_KERNEL_OPTION_HEADERS -#include "opt_snd.h" -#endif #include -#include -#include "feeder_if.h" #define SND_USE_FXDIV #include "snd_fxdiv_gen.h" diff --git a/sys/dev/sound/pcm/feeder_volume.c b/sys/dev/sound/pcm/feeder_volume.c --- a/sys/dev/sound/pcm/feeder_volume.c +++ b/sys/dev/sound/pcm/feeder_volume.c @@ -29,12 +29,7 @@ /* feeder_volume, a long 'Lost Technology' rather than a new feature. */ #ifdef _KERNEL -#ifdef HAVE_KERNEL_OPTION_HEADERS -#include "opt_snd.h" -#endif #include -#include -#include "feeder_if.h" #define SND_USE_FXDIV #include "snd_fxdiv_gen.h" diff --git a/sys/dev/sound/pcm/mixer.h b/sys/dev/sound/pcm/mixer.h --- a/sys/dev/sound/pcm/mixer.h +++ b/sys/dev/sound/pcm/mixer.h @@ -30,6 +30,8 @@ #ifndef _PCM_MIXER_H_ #define _PCM_MIXER_H_ +#include "mixer_if.h" + struct snd_mixer *mixer_create(device_t dev, kobj_class_t cls, void *devinfo, const char *desc); int mixer_delete(struct snd_mixer *m); diff --git a/sys/dev/sound/pcm/mixer.c b/sys/dev/sound/pcm/mixer.c --- a/sys/dev/sound/pcm/mixer.c +++ b/sys/dev/sound/pcm/mixer.c @@ -28,15 +28,8 @@ * SUCH DAMAGE. */ -#ifdef HAVE_KERNEL_OPTION_HEADERS -#include "opt_snd.h" -#endif - #include -#include "feeder_if.h" -#include "mixer_if.h" - static MALLOC_DEFINE(M_MIXER, "mixer", "mixer"); static int mixer_bypass = 1; diff --git a/sys/dev/sound/pcm/pcm.h b/sys/dev/sound/pcm/pcm.h --- a/sys/dev/sound/pcm/pcm.h +++ b/sys/dev/sound/pcm/pcm.h @@ -29,8 +29,6 @@ #ifndef _SND_PCM_H_ #define _SND_PCM_H_ -#include - /* * Macros for reading/writing PCM sample / int values from bytes array. * Since every process is done using signed integer (and to make our life diff --git a/sys/dev/sound/pcm/sndstat.c b/sys/dev/sound/pcm/sndstat.c --- a/sys/dev/sound/pcm/sndstat.c +++ b/sys/dev/sound/pcm/sndstat.c @@ -35,22 +35,12 @@ * SUCH DAMAGE. */ -#ifdef HAVE_KERNEL_OPTION_HEADERS -#include "opt_snd.h" -#endif +#include -#include -#include -#include #include #include #include -#include -#include - -#include "feeder_if.h" - #define SS_TYPE_PCM 1 #define SS_TYPE_MIDI 2 #define SS_TYPE_SEQUENCER 3 diff --git a/sys/dev/sound/pcm/sound.h b/sys/dev/sound/pcm/sound.h --- a/sys/dev/sound/pcm/sound.h +++ b/sys/dev/sound/pcm/sound.h @@ -38,56 +38,69 @@ #ifdef _KERNEL #include #include +#include +#include +#include +#include +#include #include -#include -#include -#include #include -#include -#include -#include /* for DATA_SET */ -#include -#include #include -#include -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include /* for DATA_SET */ +#include #include +#include +#include #include +#include +#include #include +#include +#include +#include #include -#include +#include #include +#include +#include #include -#include -#include -#include +#include +#include -#include -#include -#include +#include +#include -#ifndef KOBJMETHOD_END -#define KOBJMETHOD_END { NULL, NULL } -#endif +#include +#include +#include +#include +#include struct pcm_channel; struct pcm_feeder; struct snd_dbuf; struct snd_mixer; -#include #include -#include #include +#include +#include +#include +#include #include +#include #include -#include +#include + +#ifdef HAVE_KERNEL_OPTION_HEADERS +#include "opt_snd.h" +#endif + +#ifndef KOBJMETHOD_END +#define KOBJMETHOD_END { NULL, NULL } +#endif #define PCM_SOFTC_SIZE (sizeof(struct snddev_info)) diff --git a/sys/dev/sound/pcm/sound.c b/sys/dev/sound/pcm/sound.c --- a/sys/dev/sound/pcm/sound.c +++ b/sys/dev/sound/pcm/sound.c @@ -33,18 +33,7 @@ * SUCH DAMAGE. */ -#ifdef HAVE_KERNEL_OPTION_HEADERS -#include "opt_snd.h" -#endif - #include -#include -#include -#include -#include -#include - -#include "feeder_if.h" devclass_t pcm_devclass; diff --git a/sys/dev/sound/pcm/vchan.c b/sys/dev/sound/pcm/vchan.c --- a/sys/dev/sound/pcm/vchan.c +++ b/sys/dev/sound/pcm/vchan.c @@ -33,12 +33,7 @@ /* Almost entirely rewritten to add multi-format/channels mixing support. */ -#ifdef HAVE_KERNEL_OPTION_HEADERS -#include "opt_snd.h" -#endif - #include -#include /* * [ac3 , dts , linear , 0, linear, 0]