Fix breakage by cleanup.
This commit is contained in:
parent
2f0c4e01f6
commit
28706d37a7
@ -88,7 +88,7 @@
|
|||||||
* You will need to make at least three routines: open(), close(),
|
* You will need to make at least three routines: open(), close(),
|
||||||
* strategy() and possibly ioctl().
|
* strategy() and possibly ioctl().
|
||||||
* 2. Make attach() routine, which should allocate all the needed data
|
* 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,
|
* 3. Add an appropriate case to the switch in atapi_attach() routine,
|
||||||
* call attach() routine of the new driver here. Add the appropriate
|
* call attach() routine of the new driver here. Add the appropriate
|
||||||
* #include line at the top of attach.c.
|
* #include line at the top of attach.c.
|
||||||
@ -104,7 +104,6 @@
|
|||||||
|
|
||||||
#ifndef ATAPI_MODULE
|
#ifndef ATAPI_MODULE
|
||||||
# include "acd.h"
|
# include "acd.h"
|
||||||
# include "wcd.h"
|
|
||||||
# include "wfd.h"
|
# include "wfd.h"
|
||||||
# include "wst.h"
|
# include "wst.h"
|
||||||
/* # include "wmd.h" -- add your driver here */
|
/* # 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 wdstart (int ctrlr);
|
||||||
extern int acdattach(struct atapi*, int, struct atapi_params*, int);
|
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 wfdattach(struct atapi*, int, struct atapi_params*, int);
|
||||||
extern int wstattach(struct atapi*, int, struct atapi_params*, int);
|
extern int wstattach(struct atapi*, int, struct atapi_params*, int);
|
||||||
|
|
||||||
@ -301,17 +299,9 @@ int atapi_attach (int ctlr, int unit, int port)
|
|||||||
break;
|
break;
|
||||||
ata->attached[unit] = 1;
|
ata->attached[unit] = 1;
|
||||||
return (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
|
#else
|
||||||
printf ("wdc%d: ATAPI CD-ROMs not configured\n", ctlr);
|
printf ("wdc%d: ATAPI CD-ROMs not configured\n", ctlr);
|
||||||
break;
|
break;
|
||||||
#endif
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
case AT_TYPE_TAPE: /* streaming tape */
|
case AT_TYPE_TAPE: /* streaming tape */
|
||||||
@ -662,8 +652,8 @@ int atapi_start_cmd (struct atapi *ata, struct atapicmd *ac)
|
|||||||
*/
|
*/
|
||||||
int atapi_wait_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 */
|
/* Wait for DRQ from 100 usec to 3 msec for slow devices */
|
||||||
int cnt = ata->intrcmd ? 10000 : ata->slow ? 3000 : 50;
|
int cnt = ata->intrcmd ? 10000 : ata->slow ? 3000 : 100;
|
||||||
int ireason = 0, phase = 0;
|
int ireason = 0, phase = 0;
|
||||||
|
|
||||||
/* Wait for command phase. */
|
/* Wait for command phase. */
|
||||||
|
@ -226,8 +226,8 @@ struct atapidrv { /* delayed attach info */
|
|||||||
};
|
};
|
||||||
|
|
||||||
struct buf;
|
struct buf;
|
||||||
struct wcd;
|
struct dmy;
|
||||||
typedef void atapi_callback_t(struct wcd *, struct buf *, int, struct atapires);
|
typedef void atapi_callback_t(struct dmy *, struct buf *, int, struct atapires);
|
||||||
|
|
||||||
struct atapicmd { /* ATAPI command block */
|
struct atapicmd { /* ATAPI command block */
|
||||||
struct atapicmd *next; /* next command in queue */
|
struct atapicmd *next; /* next command in queue */
|
||||||
|
@ -32,7 +32,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#include <i386/isa/snd/sound.h>
|
#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 MIN_CHUNK_SIZE 256 /* for uiomove etc. */
|
||||||
#define DMA_ALIGN_THRESHOLD 4
|
#define DMA_ALIGN_THRESHOLD 4
|
||||||
|
74
sys/i386/isa/snd/ulaw.h
Normal file
74
sys/i386/isa/snd/ulaw.h
Normal file
@ -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 */
|
@ -226,8 +226,8 @@ struct atapidrv { /* delayed attach info */
|
|||||||
};
|
};
|
||||||
|
|
||||||
struct buf;
|
struct buf;
|
||||||
struct wcd;
|
struct dmy;
|
||||||
typedef void atapi_callback_t(struct wcd *, struct buf *, int, struct atapires);
|
typedef void atapi_callback_t(struct dmy *, struct buf *, int, struct atapires);
|
||||||
|
|
||||||
struct atapicmd { /* ATAPI command block */
|
struct atapicmd { /* ATAPI command block */
|
||||||
struct atapicmd *next; /* next command in queue */
|
struct atapicmd *next; /* next command in queue */
|
||||||
|
Loading…
x
Reference in New Issue
Block a user