FreeBSD/Linux Kernel Cross Reference
sys/sys/wormio.h
1 /* Shared between kernel & process */
2
3 #ifndef _SYS_WORMIO_H_
4 #define _SYS_WORMIO_H_
5
6 #include <sys/ioccom.h>
7
8 /***************************************************************\
9 * Ioctls for the WORM drive *
10 \***************************************************************/
11
12
13 /*
14 * Prepare disk-wide parameters.
15 */
16
17 struct wormio_prepare_disk
18 {
19 int dummy; /* use dummy writes, laser turned off */
20 int speed; /* drive speed selection */
21 };
22
23 #define WORMIOCPREPDISK _IOW('W', 20, struct wormio_prepare_disk)
24
25 /*
26 * Prepare track-specific parameters.
27 */
28
29 struct wormio_prepare_track
30 {
31 int audio; /* audio track (data track if 0) */
32 int preemp; /* audio with preemphasis */
33 #define BLOCK_RAW 0 /* 2352 bytes, raw data */
34 #define BLOCK_RAWPQ 1 /* 2368 bytes, raw data with P and Q subchannels */
35 #define BLOCK_RAWPW 2 /* 2448 bytes, raw data with P-W subchannel appended */
36 #define BLOCK_MODE_1 8 /* 2048 bytes, mode 1 (ISO/IEC 10149) */
37 #define BLOCK_MODE_2 9 /* 2336 bytes, mode 2 (ISO/IEC 10149) */
38 #define BLOCK_MODE_2_FORM_1 10 /* 2048 bytes, CD-ROM XA form 1 */
39 #define BLOCK_MODE_2_FORM_1b 11 /* 2056 bytes, CD-ROM XA form 1 */
40 #define BLOCK_MODE_2_FORM_2 12 /* 2324 bytes, CD-ROM XA form 2 */
41 #define BLOCK_MODE_2_FORM_2b 13 /* 2332 bytes, CD-ROM XA form 2 */
42 int track_type; /* defines the number of bytes in a block */
43 #define COPY_INHIBIT 0 /* no copy allowed */
44 #define COPY_PERMITTED 1 /* track can be copied */
45 #define COPY_SCMS 2 /* alternate copy */
46 int copy_bits; /* define the possibilities for copying */
47 int track_number;
48 char ISRC_country[2]; /* country code (2 chars) */
49 char ISRC_owner[3]; /* owner code (3 chars) */
50 int ISRC_year; /* year of recording */
51 char ISRC_serial[5]; /* serial number */
52 };
53 #define WORMIOCPREPTRACK _IOW('W', 21, struct wormio_prepare_track)
54
55
56 /*
57 * Fixation: write leadins and leadouts. Select table-of-contents
58 * type for this session. If onp is != 0, another session will be
59 * opened.
60 */
61
62 struct wormio_fixation
63 {
64 int toc_type; /* TOC type */
65 int onp; /* open next program area */
66 };
67
68 #define WORMIOCFIXATION _IOW('W', 22, struct wormio_fixation)
69
70 /*
71 * Finalize track
72 */
73 #define WORMIOCFINISHTRACK _IO('W', 23)
74
75
76 struct wormio_session_info {
77 u_short lead_in;
78 u_short lead_out;
79 };
80 #define WORMIOCREADSESSIONINFO _IOR('W', 31, struct wormio_session_info)
81
82 struct wormio_write_session {
83 int toc_type;
84 int onp;
85 int lofp;
86 int length;
87 char catalog[13];
88 u_char *track_desc;
89 };
90 #define WORMIOCWRITESESSION _IOW('W', 32, struct wormio_write_session)
91
92 struct wormio_first_writable_addr {
93 int track;
94 int mode;
95 int raw;
96 int audio;
97 int *addr;
98 };
99 #define WORMIOCFIRSTWRITABLEADDR _IOWR('W', 33, struct wormio_first_writable_addr)
100
101 /* Errors/warnings */
102 #define WORM_SEQUENCE_ERROR 1
103 #define WORM_DUMMY_BLOCKS_ADDED 2
104 #define WORM_CALIBRATION_AREA_ALMOST_FULL 3
105 #define WORM_CALIBRATION_AREA_FULL 4
106 #define WORM_BUFFER_UNDERRUN 5
107 #define WORM_ABSORPTION_CONTROL_ERROR 6
108 #define WORM_END_OF_MEDIUM 7
109 #define WORM_OPTIMUM_POWER_CALIBRATION_ERROR 8
110
111 #define WORMIOERROR _IOR('W', 24, int)
112
113 #endif /* !_SYS_WORMIO_H_ */
Cache object: fab9c680178bca7a897f71b143f1e0dc
|