cdrio.h revision 91645
115903Swosch/*- 215903Swosch * Copyright (c) 2000,2001,2002 S�ren Schmidt <sos@FreeBSD.org> 315903Swosch * All rights reserved. 415903Swosch * 515903Swosch * Redistribution and use in source and binary forms, with or without 615903Swosch * modification, are permitted provided that the following conditions 715903Swosch * are met: 815903Swosch * 1. Redistributions of source code must retain the above copyright 914968Swosch * notice, this list of conditions and the following disclaimer, 1014968Swosch * without modification, immediately at the beginning of the file. 1115903Swosch * 2. Redistributions in binary form must reproduce the above copyright 1215903Swosch * notice, this list of conditions and the following disclaimer in the 1315903Swosch * documentation and/or other materials provided with the distribution. 1415903Swosch * 3. The name of the author may not be used to endorse or promote products 1515903Swosch * derived from this software without specific prior written permission. 1615903Swosch * 1715903Swosch * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR 1815903Swosch * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 1915903Swosch * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 2015903Swosch * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, 2115903Swosch * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 2215903Swosch * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 2315903Swosch * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 2415903Swosch * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 2515903Swosch * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 2615903Swosch * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 2715903Swosch * 2815903Swosch * $FreeBSD: head/sys/sys/cdrio.h 91645 2002-03-04 21:08:35Z sos $ 2915903Swosch */ 3015903Swosch 3115903Swosch#ifndef _SYS_CDRIO_H_ 3215903Swosch#define _SYS_CDRIO_H_ 3315903Swosch 3415903Swosch#include <sys/ioccom.h> 3515903Swosch 3615903Swoschstruct cdr_track { 3715903Swosch int datablock_type; /* data type code */ 3815903Swosch#define CDR_DB_RAW 0x0 /* 2352 bytes of raw data */ 3915903Swosch#define CDR_DB_RAW_PQ 0x1 /* 2368 bytes raw data + P/Q subchan */ 4015903Swosch#define CDR_DB_RAW_PW 0x2 /* 2448 bytes raw data + P-W subchan */ 4115903Swosch#define CDR_DB_RAW_PW_R 0x3 /* 2448 bytes raw data + P-W raw sub */ 4215903Swosch#define CDR_DB_RES_4 0x4 /* reserved */ 4315903Swosch#define CDR_DB_RES_5 0x5 /* reserved */ 4415903Swosch#define CDR_DB_RES_6 0x6 /* reserved */ 4515903Swosch#define CDR_DB_VS_7 0x7 /* vendor specific */ 4615903Swosch#define CDR_DB_ROM_MODE1 0x8 /* 2048 bytes Mode 1 (ISO/IEC 10149) */ 4715903Swosch#define CDR_DB_ROM_MODE2 0x9 /* 2336 bytes Mode 2 (ISO/IEC 10149) */ 4815903Swosch#define CDR_DB_XA_MODE1 0xa /* 2048 bytes Mode 1 (CD-ROM XA 1) */ 4915903Swosch#define CDR_DB_XA_MODE2_F1 0xb /* 2056 bytes Mode 2 (CD-ROM XA 1) */ 5015903Swosch#define CDR_DB_XA_MODE2_F2 0xc /* 2324 bytes Mode 2 (CD-ROM XA 2) */ 5115903Swosch#define CDR_DB_XA_MODE2_MIX 0xd /* 2332 bytes Mode 2 (CD-ROM XA 1/2) */ 5215903Swosch#define CDR_DB_RES_14 0xe /* reserved */ 5315903Swosch#define CDR_DB_VS_15 0xf /* vendor specific */ 5415903Swosch 5515903Swosch int preemp; /* preemphasis if audio track*/ 5615903Swosch int test_write; /* use test writes, laser turned off */ 5715903Swosch}; 5815903Swosch 5915903Swoschstruct cdr_cue_entry { 6015903Swosch u_int8_t adr:4; 6115903Swosch u_int8_t ctl:4; 6215903Swosch u_int8_t track; 6315903Swosch u_int8_t index; 6415903Swosch u_int8_t dataform; 6515903Swosch u_int8_t scms; 6615903Swosch u_int8_t min; 6715903Swosch u_int8_t sec; 6815903Swosch u_int8_t frame; 6915903Swosch}; 7015903Swosch 7115903Swoschstruct cdr_cuesheet { 7215903Swosch int32_t len; 7315903Swosch struct cdr_cue_entry *entries; 7415903Swosch int session_format; 7515903Swosch#define CDR_SESS_CDROM 0x00 7615903Swosch#define CDR_SESS_CDI 0x10 7715903Swosch#define CDR_SESS_CDROM_XA 0x20 7815903Swosch 7915903Swosch int session_type; 8015903Swosch#define CDR_SESS_NONE 0x00 8115903Swosch#define CDR_SESS_FINAL 0x01 8215903Swosch#define CDR_SESS_RESERVED 0x02 8315903Swosch#define CDR_SESS_MULTI 0x03 8415903Swosch 8515903Swosch int test_write; 8615903Swosch}; 8715903Swosch 8815903Swosch#define CDRIOCBLANK _IOW('c', 100, int) 8915903Swosch#define CDR_B_ALL 0x0 9015903Swosch#define CDR_B_MIN 0x1 9115903Swosch#define CDR_B_SESSION 0x6 9215903Swosch 9315903Swosch#define CDRIOCNEXTWRITEABLEADDR _IOR('c', 101, int) 9415903Swosch#define CDRIOCINITWRITER _IOW('c', 102, int) 9515903Swosch#define CDRIOCINITTRACK _IOW('c', 103, struct cdr_track) 9615903Swosch#define CDRIOCSENDCUE _IOW('c', 104, struct cdr_cuesheet) 9715903Swosch#define CDRIOCFLUSH _IO('c', 105) 9815903Swosch#define CDRIOCFIXATE _IOW('c', 106, int) 9915903Swosch#define CDRIOCREADSPEED _IOW('c', 107, int) 10015903Swosch#define CDRIOCWRITESPEED _IOW('c', 108, int) 10115903Swosch#define CDRIOCGETBLOCKSIZE _IOR('c', 109, int) 10215903Swosch#define CDRIOCSETBLOCKSIZE _IOW('c', 110, int) 10315903Swosch#define CDRIOCGETPROGRESS _IOR('c', 111, int) 10415903Swosch 10515903Swosch#endif /* !_SYS_CDRIO_H_ */ 10615903Swosch