|
|
1.1 root 1: /*
2: * these values are critical;
3: * dsseq depends on da being 0
4: * and ad being 1
5: */
6: # define DA ((int)0)
7: # define AD ((int)1)
8:
9: /*
10: * start address for d/a and a/d converters
11: */
12: #define ADBASE ((int)0)
13: #define DABASE ((int)010)
14:
15: /*
16: * ASC sequence table bit for last entry
17: */
18: #define LAST_SEQ bit(7)
19:
20: /*
21: * Ioctl commands.
22: */
23: # define DSSEQ ((('s') << 8) | 0) /* set sequence */
24: # define DSRATE ((('s') << 8) | 1) /* set rate */
25: # define DS08KHZ ((('s') << 8) | 2) /* set 08kHz filter */
26: # define DS04KHZ ((('s') << 8) | 3) /* set 04kHz filter */
27: # define DSBYPAS ((('s') << 8) | 5) /* set bypass filter */
28: # define DSERRS ((('s') << 8) | 6) /* get errors */
29: # define DSRESET ((('s') << 8) | 7) /* reset dsc */
30: # define DSTRANS ((('s') << 8) | 8) /* get transit. counts */
31: # define DSLAST ((('s') << 8) | 12) /* last seq ram */
32: # define DSDONE ((('s') << 8) | 14) /* amnt. done */
33: # define DSMON ((('s') << 8) | 15) /* set monitor mode */
34: # define DSBRD ((('s') << 8) | 16) /* set broadcast mode */
35: # define DSDEBUG ((('s') << 8) | 19) /* debug */
36: # define DSWAIT ((('s') << 8) | 20) /* wait for io to finish */
37: # define DSSTEREO ((('s') << 8) | 21) /* switch to stereo mode */
38: # define DSMONO ((('s') << 8) | 22) /* switch to mono mode */
39: # define DSSTOP ((('s') << 8) | 23) /* stop conversion */
40: # define DSFILTER ((('s') << 8) | 24) /* select filter */
41: # define DSCOMPLETE ((('s') << 8) | 25) /* wait for buffer io done */
42: # define DSRECORD ((('s') << 8) | 26) /* begin recording */
43:
44: # define NDSB 3 /* number of buffers chaining with */
45:
46: /*
47: * reg specifies a sequence register (0-15).
48: * conv specifies a converter.
49: * dirt specifies the direction when
50: * setting up the sequence ram (DSSEQ) or the
51: * sampling rate (DSRATE).
52: */
53: struct ds_seq {
54: short reg;
55: short conv;
56: short dirt; /* shared by DSSEQ and DSRATE */
57: };
58: /*
59: * Format of returned converter
60: * errors.
61: */
62: struct ds_err {
63: short dma_csr;
64: short asc_csr;
65: short errors;
66: };
67:
68: /*
69: * Format of returned transition counts
70: */
71: struct ds_trans {
72: short to_idle;
73: short to_active;
74: };
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.