Page MenuHomeFreeBSD

D47868.diff
No OneTemporary

D47868.diff

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 <dev/sound/pcm/sound.h>
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 <dev/sound/pcm/sound.h>
-#include <dev/sound/pcm/ac97.h>
-
#include <dev/pci/pcivar.h>
-#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 <dev/sound/pcm/sound.h>
-#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 <dev/sound/pcm/sound.h>
-#include <dev/sound/pcm/vchan.h>
-
-#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 <dev/sound/pcm/sound.h>
-#include <sys/ctype.h>
-#include <sys/lock.h>
-#include <sys/rwlock.h>
-#include <sys/sysent.h>
-
-#include <vm/vm.h>
-#include <vm/vm_object.h>
-#include <vm/vm_page.h>
-#include <vm/vm_pager.h>
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 <dev/sound/pcm/sound.h>
-#include <dev/sound/pcm/vchan.h>
-
-#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 <dev/sound/pcm/sound.h>
-#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 <dev/sound/pcm/sound.h>
-#include <dev/sound/pcm/pcm.h>
-#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 <dev/sound/pcm/sound.h>
-#include <dev/sound/pcm/g711.h>
-#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 <dev/sound/pcm/sound.h>
-#include <dev/sound/pcm/pcm.h>
-#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 <dev/sound/pcm/sound.h>
-#include <dev/sound/pcm/pcm.h>
-#include <dev/sound/pcm/vchan.h>
-#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 <dev/sound/pcm/sound.h>
-#include <dev/sound/pcm/pcm.h>
-#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 <dev/sound/pcm/sound.h>
-#include <dev/sound/pcm/pcm.h>
-#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 <dev/sound/pcm/sound.h>
-#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 <sys/param.h>
-
/*
* 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 <dev/sound/pcm/sound.h>
-#include <sys/param.h>
-#include <sys/lock.h>
-#include <sys/malloc.h>
#include <sys/nv.h>
#include <sys/dnv.h>
#include <sys/sx.h>
-#include <dev/sound/pcm/sound.h>
-#include <dev/sound/pcm/pcm.h>
-
-#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 <sys/param.h>
#include <sys/systm.h>
+#include <sys/bus.h>
+#include <sys/condvar.h>
+#include <sys/conf.h>
+#include <sys/ctype.h>
+#include <sys/errno.h>
#include <sys/eventhandler.h>
-#include <sys/ioccom.h>
-#include <sys/filio.h>
-#include <sys/sockio.h>
#include <sys/fcntl.h>
-#include <sys/selinfo.h>
-#include <sys/proc.h>
-#include <sys/kernel.h> /* for DATA_SET */
-#include <sys/module.h>
-#include <sys/conf.h>
#include <sys/file.h>
-#include <sys/uio.h>
-#include <sys/syslog.h>
-#include <sys/errno.h>
-#include <sys/malloc.h>
-#include <sys/bus.h>
-#include <machine/resource.h>
-#include <machine/bus.h>
-#include <sys/rman.h>
+#include <sys/filio.h>
+#include <sys/ioccom.h>
+#include <sys/kernel.h> /* for DATA_SET */
+#include <sys/kobj.h>
#include <sys/limits.h>
+#include <sys/lock.h>
+#include <sys/malloc.h>
#include <sys/mman.h>
+#include <sys/module.h>
+#include <sys/mutex.h>
#include <sys/poll.h>
+#include <sys/proc.h>
+#include <sys/rman.h>
+#include <sys/rwlock.h>
#include <sys/sbuf.h>
-#include <sys/soundcard.h>
+#include <sys/selinfo.h>
#include <sys/sndstat.h>
+#include <sys/sockio.h>
+#include <sys/soundcard.h>
#include <sys/sysctl.h>
-#include <sys/kobj.h>
-#include <vm/vm.h>
-#include <vm/pmap.h>
+#include <sys/syslog.h>
+#include <sys/uio.h>
-#include <sys/lock.h>
-#include <sys/mutex.h>
-#include <sys/condvar.h>
+#include <machine/bus.h>
+#include <machine/resource.h>
-#ifndef KOBJMETHOD_END
-#define KOBJMETHOD_END { NULL, NULL }
-#endif
+#include <vm/pmap.h>
+#include <vm/vm.h>
+#include <vm/vm_object.h>
+#include <vm/vm_page.h>
+#include <vm/vm_pager.h>
struct pcm_channel;
struct pcm_feeder;
struct snd_dbuf;
struct snd_mixer;
-#include <dev/sound/pcm/buffer.h>
#include <dev/sound/pcm/matrix.h>
-#include <dev/sound/pcm/channel.h>
#include <dev/sound/pcm/pcm.h>
+#include <dev/sound/pcm/ac97.h>
+#include <dev/sound/pcm/buffer.h>
+#include <dev/sound/pcm/channel.h>
+#include <dev/sound/pcm/dsp.h>
#include <dev/sound/pcm/feeder.h>
+#include <dev/sound/pcm/g711.h>
#include <dev/sound/pcm/mixer.h>
-#include <dev/sound/pcm/dsp.h>
+#include <dev/sound/pcm/vchan.h>
+
+#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 <dev/sound/pcm/sound.h>
-#include <dev/sound/pcm/ac97.h>
-#include <dev/sound/pcm/vchan.h>
-#include <dev/sound/pcm/dsp.h>
-#include <sys/limits.h>
-#include <sys/sysctl.h>
-
-#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 <dev/sound/pcm/sound.h>
-#include <dev/sound/pcm/vchan.h>
/*
* [ac3 , dts , linear , 0, linear, 0]

File Metadata

Mime Type
text/plain
Expires
Thu, Jan 9, 3:46 AM (6 h, 36 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
15729115
Default Alt Text
D47868.diff (11 KB)

Event Timeline