summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorsos <sos@FreeBSD.org>1998-12-27 17:12:02 +0000
committersos <sos@FreeBSD.org>1998-12-27 17:12:02 +0000
commit8214ce6ac3a4ee52f740c53bfcbdd2d5e05b0a1e (patch)
tree23f0d975b23bad2804d9ee5099d01e9a6553c434
parent58ce405aac26d60e4ff67cfaf739c559872679ee (diff)
downloadFreeBSD-src-8214ce6ac3a4ee52f740c53bfcbdd2d5e05b0a1e.zip
FreeBSD-src-8214ce6ac3a4ee52f740c53bfcbdd2d5e05b0a1e.tar.gz
Fix breakage by cleanup.
-rw-r--r--sys/i386/isa/atapi.c16
-rw-r--r--sys/i386/isa/atapi.h4
-rw-r--r--sys/i386/isa/snd/dmabuf.c2
-rw-r--r--sys/i386/isa/snd/ulaw.h74
-rw-r--r--sys/pc98/pc98/atapi.h4
5 files changed, 82 insertions, 18 deletions
diff --git a/sys/i386/isa/atapi.c b/sys/i386/isa/atapi.c
index 964a3ae..9b3090d 100644
--- a/sys/i386/isa/atapi.c
+++ b/sys/i386/isa/atapi.c
@@ -88,7 +88,7 @@
* You will need to make at least three routines: open(), close(),
* strategy() and possibly ioctl().
* 2. Make attach() routine, which should allocate all the needed data
- * structures and print the device description string (see wcdattach()).
+ * structures and print the device description string (see xxxattach()).
* 3. Add an appropriate case to the switch in atapi_attach() routine,
* call attach() routine of the new driver here. Add the appropriate
* #include line at the top of attach.c.
@@ -104,7 +104,6 @@
#ifndef ATAPI_MODULE
# include "acd.h"
-# include "wcd.h"
# include "wfd.h"
# include "wst.h"
/* # include "wmd.h" -- add your driver here */
@@ -172,7 +171,6 @@ static int atapi_wait_cmd (struct atapi *ata, struct atapicmd *ac);
extern int wdstart (int ctrlr);
extern int acdattach(struct atapi*, int, struct atapi_params*, int);
-extern int wcdattach(struct atapi*, int, struct atapi_params*, int);
extern int wfdattach(struct atapi*, int, struct atapi_params*, int);
extern int wstattach(struct atapi*, int, struct atapi_params*, int);
@@ -302,17 +300,9 @@ int atapi_attach (int ctlr, int unit, int port)
ata->attached[unit] = 1;
return (1);
#else
-#if NWCD > 0
- /* ATAPI CD-ROM drives */
- if (wcdattach (ata, unit, ap, ata->debug) < 0)
- break;
- ata->attached[unit] = 1;
- return (1);
-#else
printf ("wdc%d: ATAPI CD-ROMs not configured\n", ctlr);
break;
#endif
-#endif
case AT_TYPE_TAPE: /* streaming tape */
#if NWST > 0
@@ -662,8 +652,8 @@ int atapi_start_cmd (struct atapi *ata, struct atapicmd *ac)
*/
int atapi_wait_cmd (struct atapi *ata, struct atapicmd *ac)
{
- /* Wait for DRQ from 50 usec to 3 msec for slow devices */
- int cnt = ata->intrcmd ? 10000 : ata->slow ? 3000 : 50;
+ /* Wait for DRQ from 100 usec to 3 msec for slow devices */
+ int cnt = ata->intrcmd ? 10000 : ata->slow ? 3000 : 100;
int ireason = 0, phase = 0;
/* Wait for command phase. */
diff --git a/sys/i386/isa/atapi.h b/sys/i386/isa/atapi.h
index dce85fb..1973325 100644
--- a/sys/i386/isa/atapi.h
+++ b/sys/i386/isa/atapi.h
@@ -226,8 +226,8 @@ struct atapidrv { /* delayed attach info */
};
struct buf;
-struct wcd;
-typedef void atapi_callback_t(struct wcd *, struct buf *, int, struct atapires);
+struct dmy;
+typedef void atapi_callback_t(struct dmy *, struct buf *, int, struct atapires);
struct atapicmd { /* ATAPI command block */
struct atapicmd *next; /* next command in queue */
diff --git a/sys/i386/isa/snd/dmabuf.c b/sys/i386/isa/snd/dmabuf.c
index 6abd8ec..da96309 100644
--- a/sys/i386/isa/snd/dmabuf.c
+++ b/sys/i386/isa/snd/dmabuf.c
@@ -32,7 +32,7 @@
*/
#include <i386/isa/snd/sound.h>
-#include <i386/isa/sound/ulaw.h>
+#include <i386/isa/snd/ulaw.h>
#define MIN_CHUNK_SIZE 256 /* for uiomove etc. */
#define DMA_ALIGN_THRESHOLD 4
diff --git a/sys/i386/isa/snd/ulaw.h b/sys/i386/isa/snd/ulaw.h
new file mode 100644
index 0000000..4b9916f
--- /dev/null
+++ b/sys/i386/isa/snd/ulaw.h
@@ -0,0 +1,74 @@
+/*
+ * on entry: ulaw, on exit: unsigned 8 bit.
+ */
+static unsigned char ulaw_dsp[] = {
+ 3, 7, 11, 15, 19, 23, 27, 31,
+ 35, 39, 43, 47, 51, 55, 59, 63,
+ 66, 68, 70, 72, 74, 76, 78, 80,
+ 82, 84, 86, 88, 90, 92, 94, 96,
+ 98, 99, 100, 101, 102, 103, 104, 105,
+ 106, 107, 108, 109, 110, 111, 112, 113,
+ 113, 114, 114, 115, 115, 116, 116, 117,
+ 117, 118, 118, 119, 119, 120, 120, 121,
+ 121, 121, 122, 122, 122, 122, 123, 123,
+ 123, 123, 124, 124, 124, 124, 125, 125,
+ 125, 125, 125, 125, 126, 126, 126, 126,
+ 126, 126, 126, 126, 127, 127, 127, 127,
+ 127, 127, 127, 127, 127, 127, 127, 127,
+ 128, 128, 128, 128, 128, 128, 128, 128,
+ 128, 128, 128, 128, 128, 128, 128, 128,
+ 128, 128, 128, 128, 128, 128, 128, 128,
+ 253, 249, 245, 241, 237, 233, 229, 225,
+ 221, 217, 213, 209, 205, 201, 197, 193,
+ 190, 188, 186, 184, 182, 180, 178, 176,
+ 174, 172, 170, 168, 166, 164, 162, 160,
+ 158, 157, 156, 155, 154, 153, 152, 151,
+ 150, 149, 148, 147, 146, 145, 144, 143,
+ 143, 142, 142, 141, 141, 140, 140, 139,
+ 139, 138, 138, 137, 137, 136, 136, 135,
+ 135, 135, 134, 134, 134, 134, 133, 133,
+ 133, 133, 132, 132, 132, 132, 131, 131,
+ 131, 131, 131, 131, 130, 130, 130, 130,
+ 130, 130, 130, 130, 129, 129, 129, 129,
+ 129, 129, 129, 129, 129, 129, 129, 129,
+ 128, 128, 128, 128, 128, 128, 128, 128,
+ 128, 128, 128, 128, 128, 128, 128, 128,
+ 128, 128, 128, 128, 128, 128, 128, 128,
+};
+
+#ifndef DSP_ULAW_NOT_WANTED
+static unsigned char dsp_ulaw[] = {
+ 0, 0, 0, 0, 0, 1, 1, 1,
+ 1, 2, 2, 2, 2, 3, 3, 3,
+ 3, 4, 4, 4, 4, 5, 5, 5,
+ 5, 6, 6, 6, 6, 7, 7, 7,
+ 7, 8, 8, 8, 8, 9, 9, 9,
+ 9, 10, 10, 10, 10, 11, 11, 11,
+ 11, 12, 12, 12, 12, 13, 13, 13,
+ 13, 14, 14, 14, 14, 15, 15, 15,
+ 15, 16, 16, 17, 17, 18, 18, 19,
+ 19, 20, 20, 21, 21, 22, 22, 23,
+ 23, 24, 24, 25, 25, 26, 26, 27,
+ 27, 28, 28, 29, 29, 30, 30, 31,
+ 31, 32, 33, 34, 35, 36, 37, 38,
+ 39, 40, 41, 42, 43, 44, 45, 46,
+ 47, 49, 51, 53, 55, 57, 59, 61,
+ 63, 66, 70, 74, 78, 84, 92, 104,
+ 254, 231, 219, 211, 205, 201, 197, 193,
+ 190, 188, 186, 184, 182, 180, 178, 176,
+ 175, 174, 173, 172, 171, 170, 169, 168,
+ 167, 166, 165, 164, 163, 162, 161, 160,
+ 159, 159, 158, 158, 157, 157, 156, 156,
+ 155, 155, 154, 154, 153, 153, 152, 152,
+ 151, 151, 150, 150, 149, 149, 148, 148,
+ 147, 147, 146, 146, 145, 145, 144, 144,
+ 143, 143, 143, 143, 142, 142, 142, 142,
+ 141, 141, 141, 141, 140, 140, 140, 140,
+ 139, 139, 139, 139, 138, 138, 138, 138,
+ 137, 137, 137, 137, 136, 136, 136, 136,
+ 135, 135, 135, 135, 134, 134, 134, 134,
+ 133, 133, 133, 133, 132, 132, 132, 132,
+ 131, 131, 131, 131, 130, 130, 130, 130,
+ 129, 129, 129, 129, 128, 128, 128, 128,
+};
+#endif /* !DSP_ULAW_NOT_WANTED */
diff --git a/sys/pc98/pc98/atapi.h b/sys/pc98/pc98/atapi.h
index dce85fb..1973325 100644
--- a/sys/pc98/pc98/atapi.h
+++ b/sys/pc98/pc98/atapi.h
@@ -226,8 +226,8 @@ struct atapidrv { /* delayed attach info */
};
struct buf;
-struct wcd;
-typedef void atapi_callback_t(struct wcd *, struct buf *, int, struct atapires);
+struct dmy;
+typedef void atapi_callback_t(struct dmy *, struct buf *, int, struct atapires);
struct atapicmd { /* ATAPI command block */
struct atapicmd *next; /* next command in queue */
OpenPOWER on IntegriCloud