diff options
Diffstat (limited to 'sys')
-rw-r--r-- | sys/sys/cdrio.h | 72 | ||||
-rw-r--r-- | sys/sys/dvdio.h | 15 |
2 files changed, 82 insertions, 5 deletions
diff --git a/sys/sys/cdrio.h b/sys/sys/cdrio.h new file mode 100644 index 0000000..6c7966c --- /dev/null +++ b/sys/sys/cdrio.h @@ -0,0 +1,72 @@ +/*- + * Copyright (c) 2000 Søren Schmidt + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer, + * without modification, immediately at the beginning of the file. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * $FreeBSD$ + */ + +#ifndef _SYS_CDRIO_H_ +#define _SYS_CDRIO_H_ + +#include <sys/ioccom.h> + +struct cdr_track { + int track_type; /* type of this track */ +#define CDR_DB_RAW 0x0 /* 2352 bytes of raw data */ +#define CDR_DB_RAW_PQ 0x1 /* 2368 bytes raw data + P/Q subchan */ +#define CDR_DB_RAW_PW 0x2 /* 2448 bytes raw data + P-W subchan */ +#define CDR_DB_RAW_PW_R 0x3 /* 2448 bytes raw data + P-W raw sub */ +#define CDR_DB_RES_4 0x4 /* reserved */ +#define CDR_DB_RES_5 0x5 /* reserved */ +#define CDR_DB_RES_6 0x6 /* reserved */ +#define CDR_DB_VS_7 0x7 /* vendor specific */ +#define CDR_DB_ROM_MODE1 0x8 /* 2048 bytes Mode 1 (ISO/IEC 10149) */ +#define CDR_DB_ROM_MODE2 0x9 /* 2336 bytes Mode 2 (ISO/IEC 10149) */ +#define CDR_DB_XA_MODE1 0xa /* 2048 bytes Mode 1 (CD-ROM XA 1) */ +#define CDR_DB_XA_MODE2_F1 0xb /* 2056 bytes Mode 2 (CD-ROM XA 1) */ +#define CDR_DB_XA_MODE2_F2 0xc /* 2324 bytes Mode 2 (CD-ROM XA 2) */ +#define CDR_DB_XA_MODE2_MIX 0xd /* 2332 bytes Mode 2 (CD-ROM XA 1/2) */ +#define CDR_DB_RES_14 0xe /* reserved */ +#define CDR_DB_VS_15 0xf /* vendor specific */ + + int preemp; /* preemphasis if audio track*/ + int test_write; /* use test writes, laser turned off */ +}; + +#define CDRIOCBLANK _IOW('c', 100, int) +#define CDRIOCNEXTWRITEABLEADDR _IOR('c', 101, int) + +#define CDRIOCOPENDISK _IO('c', 102) +#define CDRIOCCLOSEDISK _IO('c', 103) + +#define CDRIOCOPENTRACK _IOW('c', 104, struct cdr_track) +#define CDRIOCCLOSETRACK _IO('c', 105) + +#define CDRIOCWRITESPEED _IOW('c', 106, int) +#define CDRIOCGETBLOCKSIZE _IOR('c', 107, int) +#define CDRIOCSETBLOCKSIZE _IOW('c', 108, int) + +#endif /* !_SYS_CDRIO_H_ */ diff --git a/sys/sys/dvdio.h b/sys/sys/dvdio.h index 667a8e5..42d7ca2 100644 --- a/sys/sys/dvdio.h +++ b/sys/sys/dvdio.h @@ -1,5 +1,5 @@ /*- - * Copyright (c) 1999 Søren Schmidt + * Copyright (c) 1999,2000 Søren Schmidt * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -28,6 +28,9 @@ * $FreeBSD$ */ +#ifndef _SYS_DVDIO_H_ +#define _SYS_DVDIO_H_ + struct dvd_layer { u_int8_t book_type :4; u_int8_t book_version :4; @@ -70,10 +73,6 @@ struct dvd_authinfo { u_char keychal[10]; }; -#define DVDIOCREPORTKEY _IOWR('c', 32, struct dvd_authinfo) -#define DVDIOCSENDKEY _IOWR('c', 33, struct dvd_authinfo) -#define DVDIOCREADSTRUCTURE _IOWR('c', 34, struct dvd_struct) - #define DVD_STRUCT_PHYSICAL 0x00 #define DVD_STRUCT_COPYRIGHT 0x01 #define DVD_STRUCT_DISCKEY 0x02 @@ -101,3 +100,9 @@ struct dvd_authinfo { #define DVD_SEND_CHALLENGE 1 #define DVD_SEND_KEY2 3 #define DVD_SEND_RPC 6 + +#define DVDIOCREPORTKEY _IOWR('c', 200, struct dvd_authinfo) +#define DVDIOCSENDKEY _IOWR('c', 201, struct dvd_authinfo) +#define DVDIOCREADSTRUCTURE _IOWR('c', 202, struct dvd_struct) + +#endif _SYS_DVDIO_H_ |