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