summaryrefslogtreecommitdiffstats
path: root/sys/dev
diff options
context:
space:
mode:
authorgreen <green@FreeBSD.org>2001-07-02 15:27:28 +0000
committergreen <green@FreeBSD.org>2001-07-02 15:27:28 +0000
commit9243c4f1a8f9d9e3568d0f943ae5147a24e62e46 (patch)
tree023577fe7d9f79128cbd9ba190280135ebf61495 /sys/dev
parentfd2fcd17ee2995f9eec606ef9b918fe0e766545f (diff)
downloadFreeBSD-src-9243c4f1a8f9d9e3568d0f943ae5147a24e62e46.zip
FreeBSD-src-9243c4f1a8f9d9e3568d0f943ae5147a24e62e46.tar.gz
Make all this compile on 4.3, modulus sbuf.
Diffstat (limited to 'sys/dev')
-rw-r--r--sys/dev/sound/isa/sb16.c4
-rw-r--r--sys/dev/sound/pcm/channel.h1
-rw-r--r--sys/dev/sound/pcm/sound.c7
-rw-r--r--sys/dev/sound/pcm/sound.h6
4 files changed, 15 insertions, 3 deletions
diff --git a/sys/dev/sound/isa/sb16.c b/sys/dev/sound/isa/sb16.c
index 1fcceff..c9fdbfc 100644
--- a/sys/dev/sound/isa/sb16.c
+++ b/sys/dev/sound/isa/sb16.c
@@ -36,8 +36,6 @@
#include <dev/sound/isa/sb.h>
#include <dev/sound/chip.h>
-#include <sys/mutex.h>
-
#include "mixer_if.h"
#define SB16_BUFFSIZE 4096
@@ -151,8 +149,10 @@ sb_dspwr(struct sb_info *sb, u_char val)
return 1;
}
}
+#if __FreeBSD_version > 50000
if (curproc->p_intr_nesting_level == 0)
printf("sb_dspwr(0x%02x) timed out.\n", val);
+#endif
return 0;
}
diff --git a/sys/dev/sound/pcm/channel.h b/sys/dev/sound/pcm/channel.h
index 9095c1b..6ad1b43 100644
--- a/sys/dev/sound/pcm/channel.h
+++ b/sys/dev/sound/pcm/channel.h
@@ -36,6 +36,7 @@ struct pcmchan_caps {
u_int32_t *fmtlist;
u_int32_t caps;
};
+typedef struct pcmchan_caps pcmchan_caps;
#define CHN_NAMELEN 32
struct pcm_channel {
diff --git a/sys/dev/sound/pcm/sound.c b/sys/dev/sound/pcm/sound.c
index bd85220..c96151f 100644
--- a/sys/dev/sound/pcm/sound.c
+++ b/sys/dev/sound/pcm/sound.c
@@ -38,9 +38,14 @@ int snd_unit = 0;
TUNABLE_INT("hw.snd.unit", &snd_unit);
#endif
int snd_autovchans = 0;
-TUNABLE_INT("hw.snd.autovchans", &snd_autovchans);
int snd_maxvchans = 0;
+#if __FreeBSD > 50000
+TUNABLE_INT("hw.snd.autovchans", &snd_autovchans);
TUNABLE_INT("hw.snd.maxvchans", &snd_maxvchans);
+#else
+TUNABLE_INT("hw.snd.autovchans", 0, snd_autovchans);
+TUNABLE_INT("hw.snd.maxvchans", 0, snd_maxvchans);
+#endif
SYSCTL_NODE(_hw, OID_AUTO, snd, CTLFLAG_RD, 0, "Sound driver");
diff --git a/sys/dev/sound/pcm/sound.h b/sys/dev/sound/pcm/sound.h
index f38a059..f759c58 100644
--- a/sys/dev/sound/pcm/sound.h
+++ b/sys/dev/sound/pcm/sound.h
@@ -75,6 +75,8 @@
#if __FreeBSD_version > 500000
#define USING_MUTEX
#define USING_DEVFS
+#else
+#define INTR_TYPE_AV INTR_TYPE_MISC
#endif
#define SND_DYNSYSCTL
@@ -95,9 +97,13 @@ struct isa_device { int dummy; };
#endif /* _OS_H_ */
struct pcm_channel;
+typedef struct pcm_channel pcm_channel;
struct pcm_feeder;
+typedef struct pcm_feeder pcm_feeder;
struct snd_dbuf;
+typedef struct snd_dbuf snd_dbuf;
struct snd_mixer;
+typedef struct snd_mixer snd_mixer;
#include <dev/sound/pcm/buffer.h>
#include <dev/sound/pcm/channel.h>
OpenPOWER on IntegriCloud