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